/* Product — Rebase styling. */

/* The wrap's horizontal padding is tracked as a CSS variable so the
 * announce bar (which uses negative margins to span the gradient
 * gutters) can match it without re-stating the literal at every
 * breakpoint. Update --rb-wrap-pad-x in @media blocks below and the
 * announce bar follows. */
.rb-wrap {
  --rb-wrap-pad-x: 30px;
  max-width: 920px; margin: 0 auto;
  padding: 0 var(--rb-wrap-pad-x) 80px;
}

/* page.layout maxWidth */
.rb-wrap.rb-mw-narrow  { max-width: 640px; }
.rb-wrap.rb-mw-default { max-width: 920px; }
.rb-wrap.rb-mw-wide    { max-width: 1200px; }

/* page.layout spacing — adjusts the gap between sections */
.rb-wrap.rb-spacing-tight       .rb-section { padding: 36px 0; }
.rb-wrap.rb-spacing-comfortable .rb-section { padding: 64px 0; }
.rb-wrap.rb-spacing-loose       .rb-section { padding: 96px 0; }

/* ---- announce bar ---- */
#rb-announce {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 9px 40px; font-size: 13px; font-weight: 500;
  background: linear-gradient(90deg, #a9e5c2, #c7b5ff);
  color: #14101c; position: relative;
  /* Negative margin matches the wrap's horizontal padding so the
   * bar bleeds to the wrap edges at any breakpoint. */
  margin: 18px calc(-1 * var(--rb-wrap-pad-x)) 0;
  border-radius: 10px;
}
#rb-announce button {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: rgba(20,16,28,.12); color: #14101c;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 13px; line-height: 1;
}

/* ---- nav ---- */
.rb-nav {
  display: flex; align-items: center; gap: 26px;
  padding: 22px 0 18px;
}
.rb-logo {
  font-family: var(--rb-heading-font); font-size: 21px; font-weight: 560;
  letter-spacing: -.01em; display: flex; align-items: center; gap: 8px;
}
.rb-logo i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rb-accent); box-shadow: 0 0 12px rgba(169,229,194,.8);
  font-style: normal;
}
.rb-navlinks { display: flex; gap: 22px; margin-left: auto; }
.rb-navlinks a { color: var(--rb-text-muted); text-decoration: none; font-size: 13.5px; }
.rb-navlinks a:hover { color: var(--rb-text); }

/* ---- buttons ---- */
.rb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 11px 22px; font-size: 14px; font-weight: 600;
  background: var(--rb-accent); color: #14101c; text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}
.rb-btn:hover { background: #bdf0d2; transform: translateY(-1px); }
.rb-btn.ghost {
  background: transparent; color: var(--rb-text); border-color: #38304a;
}
.rb-btn.ghost:hover { border-color: #5b4f78; background: rgba(199,181,255,.06); }
.rb-btn.small { padding: 8px 16px; font-size: 13px; }

/* ---- hero ---- */
.rb-hero {
  display: flex; gap: 44px; align-items: center;
  padding: 50px 0 30px;
}
.rb-hero-copy-slot   { flex: 1 1 56%; min-width: 0; }
.rb-hero-widget-slot { flex: 0 0 300px; }

.rb-kicker {
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--rb-accent); margin: 0 0 18px;
}
.rb-kicker-calm { color: var(--rb-accent-2); }
.rb-h1 {
  font-family: var(--rb-heading-font); font-weight: 560;
  font-size: clamp(2.2rem, 3.0vw + 1rem, 3.6rem);
  line-height: 1.04; letter-spacing: -.015em; margin: 0 0 20px;
}
.rb-h1 em { font-style: italic; font-weight: 520; color: var(--rb-accent-2); }
.rb-h1-urgent em { color: #ff8a6b; }
.rb-h1-calm em { color: var(--rb-accent); }
.rb-sub { color: var(--rb-text-muted); font-size: 16px; line-height: 1.65; margin: 0 0 28px; max-width: 46ch; }
.rb-sub-calm { color: #c7c0d0; }

.rb-hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rb-hero-cta a.alt {
  color: var(--rb-text-muted); font-size: 13.5px; text-decoration: none;
  border-bottom: 1px dotted #5b4f78; padding-bottom: 2px;
}
.rb-hero-cta a.alt:hover { color: var(--rb-text); }

/* urgent variant */
.rb-urgent-pill {
  display: inline-block;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: .18em; color: #ff8a6b;
  border: 1px solid #ff8a6b; padding: 4px 10px; border-radius: 999px;
  margin-bottom: 16px;
}
.rb-btn-urgent { background: #ff8a6b; color: #14101c; }
.rb-btn-urgent:hover { background: #ffa388; }

/* calm variant */
.rb-btn-calm { background: #d5cdfb; color: #14101c; }
.rb-btn-calm:hover { background: #e3ddff; }

/* ---- status widget ---- */
.rb-widget {
  background: var(--rb-card-bg); border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius); padding: 18px 20px 20px;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.8);
}
.w-head {
  display: flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: #79708a;
  margin-bottom: 16px;
}
.w-live { width: 7px; height: 7px; border-radius: 50%;
  background: var(--rb-accent); animation: rbPulseDot 1.6s ease-in-out infinite; }
@keyframes rbPulseDot {
  0%,100% { opacity: .55; transform: scale(.9); }
  50%     { opacity: 1;   transform: scale(1.1); }
}
.w-row { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 0; }
.w-label { font-size: 12.5px; color: var(--rb-text-muted); }
.w-num   { font-family: "JetBrains Mono", monospace; font-size: 15px; font-weight: 600; color: var(--rb-text); }
.w-num.big { font-size: 30px; color: var(--rb-accent); }
.w-bars { display: flex; gap: 4px; align-items: flex-end; height: 30px; margin: 6px 0 2px; }
.w-bars i { width: 9px; background: linear-gradient(180deg, #c7b5ff, #6e5aa8); border-radius: 3px 3px 0 0; transition: height .8s ease; }
.w-sober {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--rb-border);
  font-size: 12.5px; color: var(--rb-text-muted); line-height: 1.55;
}
.w-sober b  { color: var(--rb-accent); font-weight: 600; }
.w-sober em { color: var(--rb-accent-2); font-style: italic; }

/* ---- sections ---- */
.rb-section { padding: var(--rb-pad-section) 0; border-top: 1px solid var(--rb-border); }
.rb-sec-kicker {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--rb-accent-2); margin: 0 0 12px;
}
.rb-h2 {
  font-family: var(--rb-heading-font); font-weight: 560;
  font-size: clamp(1.6rem, 1.6vw + 1rem, 2.2rem);
  letter-spacing: -.01em; margin: 0 0 12px; line-height: 1.12;
}
.rb-h2 em { font-style: italic; color: var(--rb-accent); font-weight: 520; }
.rb-lede { color: var(--rb-text-muted); font-size: 15px; line-height: 1.65; max-width: 56ch; margin: 0 0 34px; }

/* ---- pricing grid ----
 * auto-fit + minmax handles every breakpoint: 3 columns when there's
 * room, 2 when the container narrows (split mode, tablet), 1 on
 * mobile. Beats a single 1-column @media rule because the panel can
 * be any width depending on mode. */
.rb-cards3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 24px;
}
.rb-card {
  background: var(--rb-card-bg); border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius); padding: 22px 22px 24px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s ease, transform .15s ease;
}
.rb-card:hover { border-color: #4a4060; transform: translateY(-2px); }
.rb-card.hot { border-color: var(--rb-accent-2); box-shadow: 0 0 0 1px rgba(199,181,255,.4) inset; }
.rb-card-name {
  font-family: var(--rb-heading-font); font-size: 19px; font-weight: 560;
  color: var(--rb-text);
}
.rb-card-price {
  font-family: "JetBrains Mono", monospace; font-size: 26px; font-weight: 600;
  color: var(--rb-text); margin: 4px 0 4px;
}
.rb-card-currency { font-size: 18px; color: #79708a; margin-right: 2px; }
.rb-card-cadence  { font-size: 13px; color: #79708a; margin-left: 4px; }
.rb-card-blurb { color: var(--rb-text-muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 10px; }
.rb-card-feats { list-style: none; padding: 0; margin: 0 0 16px; color: #c7c0d0; font-size: 13px; }
.rb-card-feats li { padding: 4px 0; border-top: 1px dashed var(--rb-border); }
.rb-card-feats li:first-child { border-top: 0; }
.rb-card .rb-btn { margin-top: auto; }
.rb-card.hero-card {
  border-color: var(--rb-accent-2);
  background: linear-gradient(155deg, #1b1428, var(--rb-card-bg));
  padding: 28px 28px 30px;
}

/* spotlight layout */
.rb-pricing-spotlight { display: flex; flex-direction: column; gap: 18px; }
.rb-cards-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* ---- promo banner inside pricing ---- */
.rb-promo {
  margin: 6px 0 0; padding: 10px 14px;
  background: rgba(255,138,107,.12); border: 1px solid rgba(255,138,107,.3);
  border-radius: 10px; color: #ffb39c; font-size: 13px;
}

/* ---- testimonials ---- */
.rb-quote {
  background: var(--rb-card-bg); border: 1px solid var(--rb-border); border-radius: 14px;
  padding: 22px; color: #c7c0d0; margin: 0;
}
.rb-quote-text { font-size: 14px; line-height: 1.55; margin: 0 0 16px; font-style: italic; color: #e9e3d8; }
.rb-quote cite { display: block; font-style: normal; font-size: 12.5px; color: var(--rb-text-muted); }
.rb-quote cite b { color: var(--rb-accent-2); font-weight: 600; }

/* ---- panic ---- */
.rb-panic-wrap { max-width: 56ch; }
.rb-btn-panic { background: #ff8a6b; color: #14101c; }
.rb-btn-panic:hover { background: #ffa388; }

/* ---- treatments.showcase ---- */
.rb-treatments {
  --rb-accent: #a9e5c2;
  --rb-tr-pad: 22px;
  --rb-tr-gap: 16px;
  --rb-tr-radius: 16px;
}
.rb-treatments.density-compact   { --rb-tr-pad: 14px; --rb-tr-gap: 10px; }
.rb-treatments.density-spacious  { --rb-tr-pad: 24px; --rb-tr-gap: 18px; }
.rb-treatments.tone-clinical     { --rb-tr-radius: 6px; }
.rb-treatments.tone-cool .rb-h2 em       { color: #7fb8e8; }
.rb-treatments.tone-clinical .rb-h2 em   { color: #c7c0d0; font-style: normal; border-bottom: 1px dotted #c7c0d0; }
.rb-treatments.tone-unhinged .rb-h2      { font-style: italic; transform: rotate(-0.4deg); }
.rb-treatments.tone-unhinged .rb-h2 em   { color: #ff8a6b; }

.rb-tr-head { margin-bottom: 22px; }

.rb-icon { display: inline-flex; color: var(--rb-accent); }
.rb-icon svg { display: block; }
.rb-tr-icon       { display: inline-flex; align-items: center; justify-content: center;
                    width: 36px; height: 36px; border-radius: 10px;
                    background: rgba(255,255,255,.04); border: 1px solid var(--rb-border);
                    color: var(--rb-accent); margin-bottom: 12px; }
.rb-tr-icon.small { width: 26px; height: 26px; border-radius: 7px; margin: 0; }
.rb-tr-icon.tiny  { width: 22px; height: 22px; border-radius: 5px; margin: 0; }
.rb-tr-icon.huge  { width: 64px; height: 64px; border-radius: var(--rb-radius); margin-bottom: 18px; }
.rb-tr-icon.huge svg { width: 32px; height: 32px; }

.rb-tr-meta {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--rb-accent); margin-bottom: 8px;
}

.rb-tr-title {
  font-family: var(--rb-heading-font); font-weight: 560; font-size: 18px;
  color: var(--rb-text); margin: 0 0 8px; line-height: 1.2;
}
.rb-tr-body {
  font-size: 13.5px; line-height: 1.6; color: #c7c0d0; margin: 0;
}

/* cards layout */
.rb-tr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--rb-tr-gap);
}
.rb-tr-card {
  background: var(--rb-card-bg); border: 1px solid var(--rb-border); border-radius: var(--rb-tr-radius);
  padding: var(--rb-tr-pad);
  transition: border-color .15s ease, transform .15s ease;
  cursor: pointer;
}
.rb-tr-card:hover { border-color: var(--rb-accent); transform: translateY(-2px); }
.tone-clinical .rb-tr-card { background: #161217; border-color: var(--rb-border); }
.tone-unhinged .rb-tr-card { background: linear-gradient(155deg, #221624, var(--rb-card-bg)); }

/* timeline layout */
.rb-tr-timeline { list-style: none; padding: 0; margin: 0; }
.rb-tr-tl-item { display: flex; gap: 18px; padding-bottom: var(--rb-tr-gap); cursor: pointer; }
.rb-tr-tl-marker { flex: 0 0 18px; display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.rb-tr-tl-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--rb-accent); box-shadow: 0 0 0 4px rgba(169,229,194,.15);
}
.rb-tr-tl-rail { flex: 1; width: 2px; background: var(--rb-border); margin: 6px 0 -4px; }
.rb-tr-tl-body { flex: 1; min-width: 0;
  background: var(--rb-card-bg); border: 1px solid var(--rb-border); border-radius: var(--rb-tr-radius);
  padding: var(--rb-tr-pad);
  transition: border-color .15s ease; }
.rb-tr-tl-item:hover .rb-tr-tl-body { border-color: var(--rb-accent); }
.rb-tr-tl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rb-tr-tl-meta {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--rb-accent);
}

/* stepper layout */
.rb-tr-stepper {
  display: flex; align-items: stretch; gap: 0;
  overflow-x: auto;
  padding-bottom: 6px;
}
.rb-tr-step {
  flex: 1 1 0; min-width: 180px;
  background: var(--rb-card-bg); border: 1px solid var(--rb-border); border-radius: var(--rb-tr-radius);
  padding: var(--rb-tr-pad); cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.rb-tr-step:hover { border-color: var(--rb-accent); transform: translateY(-2px); }
.rb-tr-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--rb-accent); color: #14101c;
  font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 13px;
  margin-bottom: 10px;
}
.rb-tr-step-rail {
  flex: 0 0 16px; align-self: center; height: 2px;
  background: linear-gradient(90deg, var(--rb-accent), var(--rb-border));
  margin: 0 -2px; z-index: 0;
}

/* hero layout */
.rb-tr-hero {
  background: linear-gradient(155deg, #1b1428 0%, var(--rb-card-bg) 100%);
  border: 1px solid var(--rb-accent);
  border-radius: var(--rb-tr-radius); padding: calc(var(--rb-tr-pad) * 1.5);
  cursor: pointer;
  margin-bottom: var(--rb-tr-gap);
}
.tone-unhinged .rb-tr-hero {
  border-style: dashed;
  background: linear-gradient(155deg, #2a161b 0%, var(--rb-card-bg) 100%);
}
.rb-tr-hero-title {
  font-family: var(--rb-heading-font); font-weight: 560; font-size: 28px;
  color: var(--rb-text); margin: 0 0 10px; line-height: 1.15;
}
.rb-tr-hero-body { font-size: 15px; line-height: 1.6; color: #c7c0d0; margin: 0; max-width: 64ch; }
.rb-tr-hero-rest {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.rb-tr-hero-rest li {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rb-card-bg); border: 1px solid var(--rb-border);
  padding: 6px 12px 6px 8px; border-radius: 999px;
  color: #c7c0d0; font-size: 12.5px; cursor: pointer;
  transition: border-color .15s ease;
}
.rb-tr-hero-rest li:hover { border-color: var(--rb-accent); }

/* ============================================================
 * sandbox.canvas — own pane (replaces #productPane when the
 * Constraints tab is active)
 * ============================================================ */

.rb-sandbox-pane {
  min-height: 100%;
  padding: 40px 32px 80px;
  background:
    radial-gradient(circle at 20% 0%,
      color-mix(in srgb, #6843c4 22%, #14101c 0%) 0%,
      #14101c 60%) no-repeat,
    #14101c;
  color: #e9e3d8;
  font-family: var(--rb-body-font, "Inter", sans-serif);
}
.rb-sandbox-head {
  max-width: 900px; margin: 0 auto 28px;
  text-align: center;
}
.rb-sandbox-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #c7b5ff;
  margin-bottom: 12px;
}
.rb-sandbox-title {
  font-family: var(--rb-heading-font, "Fraunces", serif);
  font-weight: 560; font-size: 36px; line-height: 1.1;
  margin: 0 0 10px; color: #fff;
}
.rb-sandbox-caption {
  margin: 0 auto; max-width: 60ch;
  color: #b8aec7; font-size: 14.5px; line-height: 1.55;
}
.rb-sandbox-body { max-width: 900px; margin: 0 auto; }
.rb-sandbox-empty {
  border: 1px dashed #3a3148; border-radius: 14px;
  padding: 56px 28px; text-align: center;
  background: rgba(255,255,255,0.02);
}
.rb-sandbox-empty-pill {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(199,181,255,0.12);
  color: #c7b5ff;
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 16px;
}
.rb-sandbox-empty p {
  color: #b8aec7; font-size: 14px; line-height: 1.55;
  margin: 0 auto; max-width: 50ch;
}

.rb-sandbox-issues {
  background: rgba(197,74,74,0.10);
  border: 1px solid rgba(197,74,74,0.42);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.rb-sandbox-issues-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.rb-sandbox-issues-head b {
  font-family: var(--rb-heading-font, "Fraunces", serif);
  font-size: 16px; color: #fff;
}
.rb-sandbox-issues-head span {
  color: #b8aec7; font-size: 12.5px;
}
.rb-sandbox-issue {
  font-family: "JetBrains Mono", monospace; font-size: 11.5px;
  padding: 5px 10px; border-radius: 6px; line-height: 1.5;
  color: #fff; margin-bottom: 4px;
}
.rb-sandbox-issue:last-child { margin-bottom: 0; }
.rb-sandbox-issue-error { background: rgba(197,74,74,0.22); }
.rb-sandbox-issue-warn  { background: rgba(201,137,38,0.22); }
.rb-sandbox-issue code  {
  background: rgba(0,0,0,0.30); padding: 1px 5px; border-radius: 3px;
  color: #fff;
}
.rb-sandbox-issue-rule { font-style: italic; opacity: .85; }

.rb-sandbox-clean {
  background: rgba(46,138,58,0.14);
  border: 1px solid rgba(46,138,58,0.45);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  color: #d9ecdc;
  font-family: "JetBrains Mono", monospace; font-size: 12.5px;
}
.rb-sandbox-clean b { color: #6cd97c; margin-right: 6px; font-size: 14px; }

.rb-sandbox-stage {
  border: 1px dashed #3a3148;
  border-radius: 14px;
  padding: 32px 28px;
  background: rgba(255,255,255,0.02);
  position: relative;
}

/* ============================================================
 * Responsive product — narrow viewports + split view
 *
 * The split layout halves the visitor's window for the product
 * pane. When that's < ~860px we need to stack the hero, shrink
 * the type ramp, and tighten padding so nothing overflows.
 * ============================================================ */

@media (max-width: 860px) {
  .rb-wrap { --rb-wrap-pad-x: 20px; padding-bottom: 60px; }
  .rb-section { padding: 36px 0 !important; }

  /* Nav row was logo | links | CTA in one non-wrapping flex line —
   * at narrow widths the CTA spills past the wrap. Let it wrap to
   * a second line. Logo stays alone on row 1; links + CTA share
   * row 2 with the links absorbing the leftover space. */
  .rb-nav { flex-wrap: wrap; gap: 12px 20px; }
  .rb-navlinks { margin-left: 0; }

  /* Hero stacks: copy first, widget below */
  .rb-hero {
    flex-direction: column; align-items: stretch;
    gap: 24px; padding: 30px 0 18px;
  }
  .rb-hero-copy-slot   { flex: 1 1 100%; }
  .rb-hero-widget-slot { flex: 1 1 100%; min-width: 0; }
  .rb-widget { max-width: 480px; }

  .rb-h1 {
    font-size: clamp(1.7rem, 5vw + 0.8rem, 2.4rem);
    line-height: 1.08; margin-bottom: 14px;
  }
  .rb-sub { font-size: 14.5px; margin-bottom: 22px; max-width: none; }
  .rb-hero-cta { gap: 12px; }

  /* Sandbox pane gets the same treatment when it replaces the
   * product pane in narrow splits. */
  .rb-sandbox-pane { padding: 28px 18px 60px; }
  .rb-sandbox-title { font-size: 28px; }
}

@media (max-width: 520px) {
  .rb-wrap { --rb-wrap-pad-x: 14px; padding-bottom: 48px; }
  .rb-section { padding: 28px 0 !important; }
  .rb-h1 { font-size: clamp(1.5rem, 7vw + 0.5rem, 2rem); }
  .rb-hero { padding: 18px 0 12px; gap: 18px; }
  .rb-widget { padding: 14px 16px; }
  .rb-sandbox-pane { padding: 20px 14px 40px; }
  .rb-sandbox-title { font-size: 24px; }
  .rb-sandbox-stage { padding: 18px 14px; }
}
