/* today ai — Headway-shaped funnel with our amber+BW palette.
   Mobile-first (target 375-414px). No build step. */

:root {
  /* brand */
  --bg: #F9F7F2;               /* warm off-white (Headway-style cream) */
  --surface: #FFFFFF;
  --surface-2: #F3EFE8;
  --ink: #0F0F0F;
  --ink-2: #1F1F22;
  --muted: #7A7670;
  --line: #E7E2D7;
  --line-2: #D9D3C5;
  --amber: #F4A82B;            /* sun primary */
  --amber-deep: #B07300;
  --amber-soft: #FBE9C7;
  --red-now: #C84B2F;
  --green-goal: #1F7050;
  --shadow: 0 1px 0 rgba(0,0,0,.03), 0 10px 30px -20px rgba(0,0,0,.12);

  /* tokens — copy Headway scale */
  --r-card: 14px;             /* cards / option rows */
  --r-chip: 10px;             /* chips */
  --r-btn: 14px;              /* CTAs — rounded rect, NOT pill */
  --r-pill: 999px;
  --tap: 56px;                /* primary button height */
  --tap-row: 60px;            /* option row height */
  --p-screen: 18px;
  --p-card: 16px 18px;

  --t-eyebrow: 11.5px;
  --t-headline: 26px;          /* main H1 */
  --t-headline-mascot: 24px;
  --t-sub: 15px;
  --t-body: 15px;
  --t-option: 16px;
  --t-hint: 12.5px;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  font-feature-settings: "ss01","cv01";
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

/* ===== app shell ===== */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 10px var(--p-screen) calc(env(safe-area-inset-bottom) + 24px);
  background: var(--bg);
}

/* ===== top bar ===== */
.screen-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 0 8px;
  position: sticky;
  top: 0;
  z-index: 9;
  background: var(--bg);
}
.logo {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink);
  justify-self: center;
}
.logo .dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--amber);
  border: 1.5px solid var(--ink);
  display: inline-block;
}
.btn-back {
  width: auto;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  justify-self: start;
  color: var(--ink-2);
}
.btn-back:active { transform: scale(.97); }
.btn-back .chev { font-size: 16px; }
.btn-menu {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  justify-self: end;
  color: var(--ink-2);
}

/* ===== section progress (Headway-exact: 4 dots on one continuous line) ===== */
.section-progress {
  position: relative;
  height: 18px;
  margin: 12px 8px 4px;
}
.section-progress .line {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  left: 0; right: 0;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.section-progress .line-fill {
  height: 100%;
  background: var(--amber);
  width: calc(var(--p, 0) * 1%);
  transition: width .45s cubic-bezier(.6,.0,.2,1);
}
.section-progress .dot-row {
  position: absolute;
  inset: 0;
}
.section-progress .dot-row .dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}
.section-progress .dot-row .dot:nth-child(1) { left: 0%; }
.section-progress .dot-row .dot:nth-child(2) { left: 33.33%; }
.section-progress .dot-row .dot:nth-child(3) { left: 66.66%; }
.section-progress .dot-row .dot:nth-child(4) { left: 100%; }
/* 4 dots: passed = small filled, active = LARGER ring, future = small hollow */
.section-progress .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  z-index: 1;
  transition: width .2s ease, height .2s ease, border-color .2s ease;
}
.section-progress .dot.done {
  width: 8px; height: 8px;
  background: var(--amber);
  border-color: var(--amber);
}
.section-progress .dot.active {
  width: 14px; height: 14px;
  border-width: 2.5px;
  border-color: var(--amber);
  background: var(--bg);
}

.section-pill {
  display: block;
  text-align: center;
  font-size: var(--t-eyebrow);
  letter-spacing: .22em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin: 8px 0 16px;
}

/* ===== main area ===== */
.screen-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}
.spacer { flex: 1; min-height: 12px; }

/* ===== typography ===== */
.eyebrow {
  font-size: var(--t-eyebrow);
  letter-spacing: .2em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin: 0 0 8px;
  text-align: center;
}

.headline {
  font-size: var(--t-headline);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.018em;
  margin: 6px 0 14px;
  color: var(--ink);
  text-align: center;
}
.headline.lh-tight { line-height: 1.12; }
.headline.left { text-align: left; }

.sub {
  font-size: var(--t-sub);
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
  text-align: center;
}
.sub.left { text-align: left; }

.hint {
  font-size: var(--t-hint);
  color: var(--muted);
  text-align: center;
}

/* ===== buttons ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -.005em;
  background: var(--ink);
  color: #fff;
  transition: opacity .15s ease, background .15s ease, transform .05s ease;
}
.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .35; cursor: not-allowed; }
.btn.amber { background: var(--amber); color: var(--ink); }
.btn.amber:hover { background: #f5b04a; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-2);
}

/* sticky bottom CTA — Headway always has full-width primary visible */
.cta-zone {
  padding-top: 14px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, var(--bg) 35%);
  padding-bottom: 4px;
  /* NOTE: margin-top: auto removed. The "bottom stack" is pinned by
     .feedback-slot's margin-top:auto instead — emoji-scale + labels + cta
     then flow naturally right under the bubble (Headway pattern). */
}
/* When no feedback bubble exists, push CTA to bottom directly. */
.screen-main > .cta-zone:not(.feedback-slot ~ .cta-zone) {
  margin-top: auto;
}

/* ===== option lists (single-select rows) ===== */
/* Bottom-anchor — Headway pattern: headline at top, options near bottom for thumb-reach. */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 16px;
}
/* When a feedback bubble precedes any input container, the bubble already
   carries margin-top:auto — input should follow naturally, not double-pull
   (otherwise the bubble floats mid-page and the input glues to the bottom). */
.feedback-slot + .option-list,
.feedback-slot + .chip-grid,
.feedback-slot + .emoji-scale {
  margin-top: 0;
}
.option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-card);
  font-size: var(--t-option);
  font-weight: 500;
  min-height: var(--tap-row);
  width: 100%;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
  color: var(--ink);
}
.option .emoji {
  font-size: 22px;
  width: 28px;
  text-align: center;
  flex: 0 0 28px;
}
.option:hover { border-color: var(--line-2); }
.option.selected {
  border-color: var(--amber);
  border-width: 1.5px;
  background: var(--surface);
}
.option.selected::after {
  content: "✓";
  margin-left: auto;
  color: var(--amber-deep);
  font-weight: 700;
}
.option:active { transform: translateY(1px); }

/* ===== reveal-children pattern (areas-to-elevate) =====
   Primary option reveals 3 child rows below it. Children are visually indented,
   slightly smaller, marked with a · in the icon column. */
.option.is-hidden { display: none; }
.option.revealing { animation: chipReveal .38s cubic-bezier(.5,1.6,.4,1) forwards; }
.option[data-child] {
  margin-left: 24px;
  /* Compensate so the row doesn't overflow .option-list to the right. */
  width: calc(100% - 24px);
  padding-top: 12px;
  padding-bottom: 12px;
  min-height: 0;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  border-color: var(--line);
}
.option[data-child] .emoji {
  color: var(--muted);
  font-weight: 400;
  font-size: 18px;
}

/* ===== card option grid (age select, 2x2) ===== */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 16px;
}
.card-option {
  display: flex; flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-card);
  overflow: hidden;
  text-align: left;
  transition: border-color .15s ease, transform .05s ease;
  min-height: 158px;
}
.card-option .img {
  flex: 1;
  background: var(--surface-2);
  display: grid; place-items: center;
  font-size: 64px;
  color: var(--muted);
}
.card-option.bg-cream { --bgc: #F1ECDD; }
.card-option.bg-mint  { --bgc: #DDEDE3; }
.card-option.bg-blush { --bgc: #F7E1DD; }
.card-option.bg-lilac { --bgc: #E8E3F4; }
.card-option .img.tint { background: var(--bgc); }
.card-option .label {
  background: var(--amber);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 14px;
  display: flex; align-items: center; justify-content: space-between;
  letter-spacing: .005em;
}
.card-option .label .arrow {
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
}
.card-option:active { transform: translateY(1px); }
.card-option.selected { border-color: var(--amber); border-width: 1.5px; }

/* ===== age-grid: Headway IMG_5624 — 2x2 photo cards.
   Card aspect-ratio matches source crop (illustration 1.14:1) + label band,
   so background-size: cover fills with NO empty space at top or bottom. ===== */
.option-grid.age-grid {
  align-content: start;
  margin: 8px 0 12px;
}
.age-grid .card-option {
  /* 174 wide, 153 illustration (174/1.136) + 38 label = 191 → aspect 174/191 */
  aspect-ratio: 174 / 191;
  min-height: 0;
}
.age-grid .card-option .img {
  flex: 1;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #FBF7EE;
  min-height: 0;
}
.age-grid .card-option .label {
  padding: 9px 14px;
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: 0 0 auto;
  /* Headway: text + arrow CENTERED together, not edge-justified. */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.age-grid .card-option .label .arrow {
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  width: auto;
  height: auto;
}

/* ===== chip grid (multi-select areas/habits/etc — Headway style) ===== */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 16px;
}
.chip {
  padding: 14px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-chip);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  min-height: 56px;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--line-2); }
.chip.selected {
  border-color: var(--amber);
  border-width: 1.5px;
  color: var(--amber-deep);
  background: var(--surface);
}
.chip.selected::after {
  content: "";
  position: absolute;
  top: -7px; right: -7px;
  width: 20px; height: 20px;
  background: var(--amber);
  border: 2px solid var(--bg);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7 L6 10 L11 4' stroke='white' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-origin: border-box;
  background-clip: border-box;
}
.chip.is-hidden { display: none; }
.chip.revealing { animation: chipReveal .38s cubic-bezier(.5,1.6,.4,1) forwards; }
@keyframes chipReveal {
  0%   { opacity: 0; transform: scale(.55) translateY(-4px); }
  60%  { opacity: 1; transform: scale(1.06) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== emoji scale — Headway IMG_5631 pattern: ONE rounded rect with
   5 cells separated by thin vertical dividers (NOT separate cards). ===== */
.emoji-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  overflow: hidden;
}
.emoji-scale button {
  height: 64px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  transition: transform .1s ease, background .15s ease;
  line-height: 1;
  display: grid;
  place-items: center;
  position: relative;
  /* Size differences are dramatic — Headway gradient: 44 → 26 → 30 → 26 → 44 */
  font-size: 26px;
}
.emoji-scale button:last-child { border-right: 0; }
/* Pronounced size gradient — big thumbs at edges, small near center, shrug centered. */
.emoji-scale button.size-lg { font-size: 44px; }
.emoji-scale button.size-md { font-size: 24px; }
.emoji-scale button.size-shrug { font-size: 30px; }
.emoji-scale button:hover { background: rgba(0,0,0,.025); }
.emoji-scale button.selected {
  background: var(--amber-soft);
  /* Inset glow shows selection without breaking the unified rectangle. */
  box-shadow: inset 0 0 0 2px var(--amber);
  z-index: 1;
}
.scale-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted);
  padding-top: 6px;
  margin-bottom: 8px;
}

/* Headway-style feedback tooltip — full-width tinted block, NO tail, sits
   directly above the input row (emoji-scale or option-list). Height grows
   as text types in. Caret blinks indefinitely (no removal at end). */
.feedback-slot {
  /* margin-top: auto pushes everything below to the bottom of .screen-main,
     so headline floats up and the bubble lives right above the controls. */
  margin: 0 0 12px;
  margin-top: auto;
  min-height: 0;
  width: 100%;
}
.feedback-bubble {
  background: #E5EFE0;   /* soft mint, Headway-style */
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity .2s ease;
  display: none;
}
.feedback-bubble.show {
  display: block;
  opacity: 1;
}
.feedback-bubble strong,
.feedback-bubble .fb-title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--ink);
}
.typing-caret {
  display: inline-block;
  width: 1.5px;
  height: 1em;
  background: var(--ink);
  vertical-align: -2px;
  margin-left: 1px;
  animation: caretBlink 1s steps(2) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== tooltip after answer (Headway green-ish, ours warm) ===== */
.tooltip {
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: var(--r-card);
  background: var(--amber-soft);
  color: #6f4800;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
}
.tooltip::before {
  content: ""; position: absolute; top: -7px; left: 24px;
  width: 12px; height: 12px;
  background: var(--amber-soft);
  transform: rotate(45deg);
}

/* ===== mascot stages (welcome, validation, checkpoint) ===== */
.mascot-stage {
  display: grid; place-items: center;
  padding: 16px 0 8px;
}
.mascot-stage .mascot { width: 180px; height: 180px; }

/* ===== checkpoint card (72% / 94%) ===== */
.checkpoint {
  text-align: center;
}
.checkpoint .pct {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--amber-deep);
  line-height: 1;
  margin: 12px 0 4px;
}
.checkpoint .pct-label {
  font-size: var(--t-eyebrow);
  letter-spacing: .22em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ===== concept bubbles (today ai explanation) ===== */
.concept-bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px 16px;
  margin: 10px 0;
  display: flex; gap: 14px;
  align-items: flex-start;
}
.concept-bubble .ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--amber-soft);
  font-size: 20px;
  flex: 0 0 40px;
}
.concept-bubble.evening .ico { background: #2A2A2A; color: var(--amber); }
.concept-bubble .label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
}
.concept-bubble .copy {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.5;
}

/* ===== inspirational figures grid (3x3 circular B&W — Headway pattern) ===== */
.figures-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 8px;
  margin: 8px 0 16px;
}
.figures-grid .figure {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.figures-grid .figure .avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background-color: var(--surface-2);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border: 2px solid var(--line);
  filter: grayscale(1) contrast(1.05);
  transition: filter .25s ease, border-color .15s ease;
}
.figures-grid .figure:hover .avatar { border-color: var(--line-2); }
.figures-grid .figure.selected .avatar {
  border-color: var(--amber);
  border-width: 3px;
  filter: grayscale(0.2) contrast(1.05);
}
.figures-grid .figure .nm {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  letter-spacing: -.005em;
  text-shadow: none;
  line-height: 1.2;
}

/* ===== universities seal cards ===== */
.uni-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 12px;
}
.uni-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 8px 14px;
  text-align: center;
}
.uni-card .seal {
  display: flex; justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
  margin-bottom: 8px;
}
.uni-card .name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -.005em;
}
.uni-card .lab {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* clean typeset universities (Liven/Fabulous style) */
.uni-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 28px 0 24px;
}
.uni-card-clean {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px 16px;
  text-align: center;
}
.uni-card-clean .uni-name {
  font-family: "Playfair Display", "EB Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.05;
}
.uni-card-clean .uni-suffix {
  font-family: "Playfair Display", "EB Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: 6px;
}

/* ===== social proof hero (Headway-exact) ===== */
.hero-amber {
  background: var(--amber-soft);
  border-radius: 22px;
  padding: 32px 22px 22px;
  margin: 4px 0 12px;
  text-align: center;
}
.hero-amber .hero-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--amber-deep);
  margin: 0;
  line-height: 1.02;
}
.hero-amber .hero-sub {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 8px 0 22px;
  line-height: 1.25;
}
.hero-quote {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px 20px 20px;
  margin: 16px 0 26px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.32;
  color: var(--ink);
  text-align: center;
  position: relative;
}
.hero-quote .hero-qmark {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 38px;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--amber-deep);
  font-weight: 700;
}
.hero-quote .hero-qbody {
  display: block;
  margin-top: 22px;
}
.press-label {
  font-size: 12px;
  letter-spacing: .26em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  margin: 6px 0 18px;
  text-align: center;
}
.press-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
  align-items: center;
  justify-items: center;
  margin-bottom: 4px;
}
.press-logo {
  height: 22px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  /* Headway-style: press row is uniformly black (silhouettes of real logos) */
  filter: brightness(0) saturate(100%);
}
.press-logo.small { height: 28px; }

/* ===== awards card ===== */
.awards {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: var(--r-card);
  margin: 14px 0;
  font-size: 13px;
  color: var(--ink-2);
}
.awards .laurel { font-size: 26px; }

/* ===== loading screen ===== */
.loader-bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
  margin: 14px 0 8px;
}
.loader-bar .fill {
  height: 100%;
  background: var(--amber);
  width: var(--pct, 0%);
  transition: width .8s ease;
}
.loader-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.loader-step {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.loader-step.done {
  color: var(--ink);
  border-color: var(--amber);
}
.loader-step.done::after { content: "✓"; color: var(--amber-deep); font-weight: 700; }
.loader-step.active { color: var(--ink); border-color: var(--amber); background: var(--amber-soft); }
.loader-step.active::after { content: "…"; color: var(--amber-deep); font-weight: 700; }

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px;
  text-align: left;
  margin-top: 16px;
}
.testimonial-card .stars { color: var(--amber); font-size: 14px; }
.testimonial-card .who { font-size: 12px; color: var(--muted); margin-top: 6px; }
.testimonial-card .body { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin-top: 6px; }

/* ===== popup (loader interruption) ===== */
.popup-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.popup-card h3 { margin: 0 0 14px; font-size: 18px; }

/* ===== plan reveal ===== */
.plan-chart {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px;
  margin: 12px 0 16px;
}
.plan-chart svg { width: 100%; height: auto; display: block; }
.plan-chart .row {
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 12px; color: var(--muted);
  margin-top: 6px;
}
.plan-chart .row .target {
  font-weight: 600; color: var(--green-goal);
  background: #fff; padding: 4px 8px; border-radius: var(--r-pill);
  border: 1px solid var(--line);
}
.plan-chart .target-label {
  position: absolute; top: 12px; right: 14px;
  background: #fff; padding: 6px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600; color: var(--green-goal);
  box-shadow: var(--shadow);
}

.promo-code {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--surface);
  border: 1.5px dashed var(--amber);
  padding: 14px;
  border-radius: var(--r-card);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 12px 0 6px;
  color: var(--ink);
}
.promo-code .badge {
  background: var(--amber); color: var(--ink);
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px;
}

.commitment-quote {
  border-left: 3px solid var(--amber);
  padding: 4px 0 4px 14px;
  font-size: 14px;
  color: var(--ink-2);
  font-style: italic;
  margin: 16px 0;
  line-height: 1.55;
}

/* ===== scratch card ===== */
.scratch-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/2.6;
  margin: 14px 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.scratch-wrap .reveal {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  padding: 18px;
}
.scratch-wrap .reveal .pct {
  font-size: 72px; font-weight: 800;
  color: var(--amber-deep); letter-spacing: -.04em; line-height: 1;
}
.scratch-wrap .reveal .lbl {
  font-size: 14px; color: var(--muted); margin-top: 4px;
}
.scratch-wrap canvas {
  position: absolute; inset: 0; touch-action: none;
}

/* ===== now vs goal ===== */
.now-vs-goal {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 14px 0;
}
.now-vs-goal .card {
  border-radius: 18px;
  padding: 14px;
  min-height: 230px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.now-vs-goal .card.now {
  background: #FDEFEC; color: var(--red-now);
}
.now-vs-goal .card.goal {
  background: #E6F0EB; color: var(--green-goal);
}
.now-vs-goal .card .face {
  font-size: 64px; line-height: 1; text-align: center;
}
.now-vs-goal .card .ttl {
  font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; font-weight: 700;
}
.now-vs-goal .card .desc {
  font-size: 14px; line-height: 1.4;
  margin-top: 8px;
}
.compare-bars {
  display: grid; grid-template-columns: 90px 1fr 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  margin: 8px 0;
}
.compare-bars .bar {
  height: 8px; border-radius: var(--r-pill);
  background: var(--surface-2); overflow: hidden;
  position: relative;
}
.compare-bars .bar.now::after,
.compare-bars .bar.goal::after {
  content: ""; position: absolute; inset: 0;
  width: var(--w, 0%); border-radius: inherit;
}
.compare-bars .bar.now::after { background: var(--red-now); }
.compare-bars .bar.goal::after { background: var(--green-goal); }

/* ===== pricing — Headway exact ===== */
.pricing-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  font-size: 13px;
  color: var(--ink-2);
}
.pricing-bar .left {
  display: flex; flex-direction: column; line-height: 1.25;
}
.pricing-bar .left .timer {
  font-weight: 800; font-size: 16px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pricing-bar .btn-mini {
  background: var(--amber);
  color: var(--ink);
  border-radius: var(--r-btn);
  padding: 9px 18px;
  font-weight: 700;
  font-size: 14px;
}

.plan-list {
  display: flex; flex-direction: column;
  gap: 10px;
  margin: 8px 0 14px;
}
.plan-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px 16px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
}
.plan-card .radio {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  display: grid; place-items: center;
  flex: 0 0 22px;
}
.plan-card.selected .radio {
  border-color: var(--amber);
  background: var(--amber);
}
.plan-card.selected .radio::after {
  content: ""; width: 8px; height: 8px;
  border-radius: 50%; background: var(--ink);
}
.plan-card.popular { border-color: var(--amber); }
.plan-card.popular::before {
  content: "most popular";
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--amber); color: var(--ink);
  font-size: 10.5px; letter-spacing: .18em; font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.plan-card.selected { background: var(--amber-soft); }
.plan-card .name { font-weight: 700; font-size: 16px; }
.plan-card .save {
  display: inline-block; background: var(--amber);
  color: var(--ink);
  font-size: 10.5px; letter-spacing: .08em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}
.plan-card .strike {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
  margin-top: 4px;
}
.plan-card .now-price {
  font-size: 14px; font-weight: 700; margin-left: 4px; color: var(--ink);
}
.plan-card .per-day {
  display: flex; align-items: baseline;
  font-weight: 700;
  color: var(--ink);
}
.plan-card .per-day .dollar { font-size: 16px; }
.plan-card .per-day .num { font-size: 32px; letter-spacing: -.04em; margin: 0 1px; line-height: 1; }
.plan-card .per-day .unit {
  font-size: 9px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
  font-weight: 700;
  margin-left: 4px;
}

.payment-icons {
  display: flex; gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 14px 0;
  filter: grayscale(.4);
  opacity: .85;
}
.payment-icons span {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
}

/* ===== below pricing (benefits/faq) ===== */
.benefits {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin: 14px 0;
}
.benefits ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.benefits li { padding: 5px 0; }
.benefits .ttl {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 15px;
}

.faq .item {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.faq .item summary {
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex; justify-content: space-between;
  list-style: none;
}
.faq .item summary::-webkit-details-marker { display: none; }
.faq .item summary::after {
  content: "+"; font-size: 22px;
  color: var(--muted);
}
.faq .item[open] summary::after { content: "−"; }
.faq .item .body {
  font-size: 14px; color: var(--ink-2);
  padding-top: 8px;
  line-height: 1.55;
}

.review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px;
  margin: 8px 0;
}
.review-card .who { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.review-card .stars { color: var(--amber); margin-right: 4px; }

.app-rating {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin: 14px 0;
}
.app-rating .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px; text-align: center;
}
.app-rating .num { font-size: 22px; font-weight: 700; }
.app-rating .ico { font-size: 28px; }
.app-rating .ct { font-size: 12px; color: var(--muted); }

.guarantee {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--amber);
  border-radius: var(--r-card);
  padding: 14px;
  margin: 14px 0;
  font-size: 14px; color: var(--ink-2);
}
.guarantee .ico { font-size: 26px; flex: 0 0 32px; }
.guarantee strong { color: var(--ink); }

/* ===== paywall layout (Headway long-scroll) ===== */
.paywall-bar {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--bg);
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 10px;
}
.paywall-bar .left {
  display: flex; flex-direction: column;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.2;
}
.paywall-bar .left .timer {
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.paywall-bar .btn-mini {
  background: var(--amber);
  color: var(--ink);
  border-radius: var(--r-btn);
  padding: 9px 18px;
  font-weight: 700;
  font-size: 14px;
  border: 0;
  display: inline-flex; align-items: center; justify-content: center;
}

.paywall-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 18px;
  margin: 4px 0 22px;
}
.paywall-card .ttl {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.015em;
  text-align: center;
  margin: 0 0 16px;
}

.pay-icons {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px;
  margin: 12px 0 6px;
}
.pay-icons .pi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: .02em;
  min-width: 44px;
  text-align: center;
}
.pay-icons .pi.paypal { color: #003087; }
.pay-icons .pi.visa { color: #1A1F71; }
.pay-icons .pi.mc { color: #EB001B; }
.pay-icons .pi.amex { color: #2E77BB; }

.pay-secure-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #E6F0EB;
  color: var(--green-goal);
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  margin: 10px auto;
}

.legal-paywall {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
  margin: 6px 0 0;
}

.reserved-banner {
  background: #FBE9C7;
  color: var(--amber-deep);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 700;
  margin: 18px 0 8px;
}
.reserved-banner .timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 15px;
}

/* ===== checkout overlay (modal sheet, slides up) ===== */
.checkout-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 100;
  display: none;
  align-items: flex-end; justify-content: center;
}
.checkout-overlay.open { display: flex; }
.checkout-sheet {
  background: var(--surface);
  width: 100%; max-width: 480px;
  border-top-left-radius: 22px; border-top-right-radius: 22px;
  padding: 14px 18px calc(env(safe-area-inset-bottom) + 20px);
  animation: slideUp .25s ease forwards;
  max-height: 92dvh;
  overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(40px); opacity:0 } to { transform: translateY(0); opacity:1 } }

.checkout-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  padding: 6px 0 12px;
  position: sticky; top: 0;
  background: var(--surface);
}
.checkout-head .close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid; place-items: center;
  font-size: 18px; color: var(--ink-2);
  border: 0;
}
.checkout-head .ttl {
  text-align: center; font-weight: 700; font-size: 16px;
}

.checkout-hero {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.2;
  margin: 8px 0 16px;
}
.checkout-hero .em { color: var(--amber-deep); }

.checkout-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 4px 0 18px;
  font-size: 15px;
}
.checkout-total .label { font-weight: 500; color: var(--ink-2); }
.checkout-total .price-row { font-weight: 700; font-size: 17px; }
.checkout-total .strike { color: var(--muted); text-decoration: line-through; font-weight: 500; margin-right: 8px; font-size: 14px; }

.pay-with {
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  margin: 8px 0 14px;
}

.pay-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.pay-tabs button {
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px 8px;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink-2);
}
.pay-tabs button.active {
  border-color: var(--amber);
  border-width: 2px;
}

.gpay-btn {
  background: #000;
  color: #fff;
  border-radius: var(--r-card);
  min-height: 52px;
  width: 100%;
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 4px 0 14px;
}
.gpay-btn .g {
  background: conic-gradient(from -45deg, #EA4335 0 25%, #FBBC04 0 50%, #34A853 0 75%, #4285F4 0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 900;
  font-size: 18px;
}

.divider-or {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}
.divider-or::before, .divider-or::after {
  content: ""; height: 1px; background: var(--line); flex: 1;
}

.card-form {
  background: #1F2123;
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  position: relative;
  margin-bottom: 14px;
}
.card-form .field {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.card-form .field .lbl {
  font-size: 11px;
  color: #B7BCC2;
  letter-spacing: .04em;
}
.card-form .field input {
  background: transparent;
  border: 0; outline: 0;
  color: #fff;
  font-size: 16px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 4px 0 2px;
  letter-spacing: .02em;
  width: 100%;
}
.card-form .field input::placeholder { color: rgba(255,255,255,.45); }
.card-form .field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.card-form .brand {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 24px;
  background: rgba(255,255,255,.12);
  border-radius: 4px;
}
.card-form .cvv-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: #22C55E; color: #fff;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  margin-left: 4px;
}

.pay-confirm {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-btn);
  min-height: 56px;
  width: 100%;
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 4px;
}

.checkout-legal {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

.trust-row-inline {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  justify-content: center;
  margin-top: 14px;
  font-size: 10.5px; color: var(--muted);
  letter-spacing: .03em;
  font-weight: 600;
}

/* ===== old modal-sheet kept for backward compat ===== */
.modal-sheet {
  background: var(--surface);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  padding: 18px 20px 28px;
  border: 1px solid var(--line);
  border-bottom: 0;
}
.modal-sheet h2 {
  font-size: 18px;
  margin: 0 0 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-sheet .close {
  font-size: 22px; color: var(--muted);
}
.payment-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin: 12px 0;
}
.payment-tabs button {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px 8px;
  font-size: 13px; font-weight: 600;
  background: var(--surface);
}
.payment-tabs button.active {
  border-color: var(--amber);
  background: var(--amber-soft);
  border-width: 1.5px;
}
.pay-btn {
  background: var(--ink);
  color: #fff;
  min-height: 56px;
  border-radius: var(--r-btn);
  font-weight: 700;
  font-size: 16px;
  width: 100%;
}
.pay-btn.applepay { background: #000; }
.trust-row {
  display: flex; justify-content: space-between;
  gap: 6px; flex-wrap: wrap;
  margin-top: 14px; font-size: 11px;
  color: var(--muted);
}
.legal {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* ===== confirmation ===== */
.confetti {
  font-size: 64px;
  text-align: center;
  padding: 18px 0 8px;
}
.store-row {
  display: flex; gap: 10px;
  margin: 14px 0;
}
.store-btn {
  flex: 1;
  border: 1px solid var(--ink);
  border-radius: var(--r-card);
  padding: 12px;
  text-align: left;
  font-size: 12px;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink);
  color: #fff;
}
.store-btn .big { font-size: 14px; font-weight: 700; }
.store-btn .ico { font-size: 24px; }

/* ===== legal footer ===== */
.legal-footer {
  margin-top: 24px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
.legal-footer a { color: var(--muted); text-decoration: underline; }

/* ===== SPA shell transitions ===== */
#screen-root {
  transition: opacity .22s ease, transform .22s ease;
}
#screen-root.screen-exit {
  opacity: 0;
  transform: translateX(-12px);
}
#screen-root.screen-enter {
  opacity: 0;
  transform: translateX(12px);
}

/* ===== hamburger menu overlay ===== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}
.menu-overlay.open { display: flex; }
.menu-sheet {
  background: var(--surface);
  width: 86%;
  max-width: 360px;
  height: 100%;
  padding: 18px 22px calc(env(safe-area-inset-bottom) + 22px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: menuSlide .26s ease forwards;
  box-shadow: -2px 0 22px rgba(0,0,0,.18);
}
@keyframes menuSlide {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.menu-sheet .close {
  align-self: flex-end;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 22px;
  color: var(--ink-2);
  border: 0;
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.menu-sheet .menu-logo {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink);
  margin-bottom: 4px;
}
.menu-sheet .menu-logo .dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--amber);
  border: 1.5px solid var(--ink);
}
.menu-sheet a.menu-item {
  padding: 16px 4px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  display: flex; align-items: center; justify-content: space-between;
}
.menu-sheet a.menu-item:last-child { border-bottom: 0; }
.menu-sheet a.menu-item .chev { color: var(--muted); font-size: 16px; }
.menu-sheet .menu-foot {
  margin-top: auto;
  padding-top: 18px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== compare panel (dev side-by-side with Headway/Liven/Fabulous ref) ===== */
.compare-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 50%;
  max-width: 560px;
  background: #161617;
  color: #e8e8e8;
  display: none;
  flex-direction: column;
  z-index: 180;
  border-left: 1px solid #2a2a2c;
  box-shadow: -4px 0 24px rgba(0,0,0,.4);
}
.compare-panel.open { display: flex; }
/* When compare mode is on, reserve right-edge space via body padding-right.
   The app inside still uses margin:0 auto → re-centers in the REMAINING width.
   No shrink, no max-width change. */
body.compare-mode {
  padding-right: min(50vw, 560px);
  transition: padding-right .25s ease;
}
.compare-panel .compare-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #2a2a2c;
  background: #1d1d1f;
  position: sticky; top: 0; z-index: 1;
}
.compare-panel .compare-head strong {
  font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--amber);
}
.compare-panel .compare-sub {
  flex: 1;
  font-size: 12.5px;
  color: #aaa;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.compare-panel .compare-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #2a2a2c;
  color: #fff;
  border: 0;
  font-size: 18px;
  cursor: pointer;
}
.compare-panel .compare-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 30px;
}
.compare-panel .compare-empty {
  color: #888;
  font-size: 13px;
  text-align: center;
  padding: 40px 0;
}
.compare-panel .compare-card {
  background: #1d1d1f;
  border: 1px solid #2a2a2c;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.compare-panel .compare-meta {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  line-height: 1.4;
}
.compare-panel .compare-tag {
  display: inline-block;
  background: var(--amber);
  color: #000;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .12em;
  font-weight: 800;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.compare-panel .compare-tag.liven    { background: #B8E0D0; color: #003524; }
.compare-panel .compare-tag.fabulous { background: #F1B5C8; color: #4A0F22; }
.compare-panel .compare-img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  display: block;
}
.compare-panel .compare-diff {
  font-size: 13px;
  line-height: 1.5;
  color: #ddd;
}
.compare-panel .compare-diff strong { color: var(--amber); }

/* When compare mode is on, the app shifts left and a bit smaller for side-by-side */
@media (max-width: 720px) {
  /* On narrow screens, hide app and only show compare (or vice versa) */
  body.compare-mode .app { display: none; }
  .compare-panel { width: 100%; max-width: 100%; }
}

/* ===== dev panel (localhost only) ===== */
.dev-panel {
  position: fixed;
  right: 12px; bottom: 12px;
  z-index: 250;
  font-family: -apple-system, system-ui, sans-serif;
}
.dev-panel .dev-fab {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--amber);
  font-size: 22px;
  border: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  display: grid; place-items: center;
  cursor: pointer;
}
.dev-panel .dev-tray {
  position: absolute;
  bottom: 56px; right: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 12px;
  display: none;
  min-width: 240px;
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
.dev-panel.open .dev-tray { display: block; }
.dev-panel .dev-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.dev-panel .dev-row:last-child { border-bottom: 0; }
.dev-panel .dev-now {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--amber);
}
.dev-panel .dev-link {
  color: var(--amber);
  background: none; border: 0;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.dev-panel .dev-link:hover { color: #fff; }
.dev-panel .dev-jump {
  width: 100%;
  margin-top: 6px;
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: inherit;
}
.dev-panel .dev-variant {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.dev-panel .dev-variant-label {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  letter-spacing: .08em;
  text-transform: uppercase;
  min-width: 54px;
}
.dev-panel .dev-variant-select {
  flex: 1;
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 11px;
  font-family: inherit;
}

/* ===== utility ===== */
.center { text-align: center; }
.left { text-align: left; }
.muted { color: var(--muted); }
.amber-text { color: var(--amber-deep); }
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
