/* Callback — the Studio Scorecard design language.
   Mobile-first (375px canvas). Light default, first-class dark. One accent, earned. */

/* ---------- Fonts (self-hosted variable) ---------- */
@font-face { font-family: "Fraunces"; src: url("/assets/fraunces.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fraunces-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/figtree.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Spline Sans Mono"; src: url("/assets/splinemono.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Figtree", -apple-system, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;

  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-2: #F3EFE8;
  --ink: #16130F;
  --ink-2: #675F52;
  --ink-3: #948A7C;
  --border: #E9E3D9;
  --border-strong: #D9D0C1;

  --accent: #3D3BF3;
  --accent-btn: #3D3BF3;      /* filled-button surface; darkened separately in dark mode for AA */
  --accent-edge: #211FA6;     /* visibly darker ledge so the 3D press affordance reads */
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(61, 59, 243, 0.07);

  /* Vivid tier hues for large graphics (gauge stroke, bars) */
  --score-bad: #E5484D;
  --score-warn: #D18A1F;
  --score-good: #2F9E62;
  --score-great: #3D3BF3;
  /* Darkened tier hues for small text (WCAG AA on paper) */
  --score-bad-text: #C1373C;
  --score-warn-text: #96660D;
  --score-good-text: #1F7A48;
  --score-great-text: #3D3BF3;

  --shadow-float: 0 4px 16px rgba(20, 17, 14, 0.08);
  --shadow-pop: 0 12px 32px rgba(20, 17, 14, 0.12);

  --r-input: 10px;
  --r-btn: 12px;
  --r-card: 16px;
  --r-hero: 20px;

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-reveal: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 20px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #161310;
  --surface: #201C18;
  --surface-2: #292420;
  --ink: #F4EFE7;
  --ink-2: #B9AF9F;
  --ink-3: #8F8578;
  --border: #322C25;
  --border-strong: #463E33;

  --accent: #6B6AFF;
  --accent-btn: #4644D6;      /* deeper fill so white button text passes AA in dark mode */
  --accent-edge: #26247D;
  --accent-soft: rgba(107, 106, 255, 0.13);

  --score-great: #6B6AFF;
  --score-warn: #E8A33D; /* dark surfaces want the brighter amber */
  --score-bad-text: #F0666B;
  --score-warn-text: #EDB25C;
  --score-good-text: #4CBA80;
  --score-great-text: #8C8BFF;

  --shadow-float: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background 300ms var(--ease-out), color 300ms var(--ease-out);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 8.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 4vw, 1.6rem); }
h1 em, h2 em { font-style: italic; font-weight: 550; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-2);
}
.h-compact { font-size: clamp(1.25rem, 4vw, 1.6rem); }
.touch-only { display: inline; }
.pointer-only { display: none; }
@media (hover: hover) and (pointer: fine) {
  .touch-only { display: none; }
  .pointer-only { display: inline; }
}
#full-title:focus, #scorecard:focus { outline: none; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.nowrap { white-space: nowrap; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 56px 0; }
.hero, section[id], #full-report { scroll-margin-top: 76px; }

/* ---------- Entrances (state + one-shot scroll rise only) ----------
   Gated on html.js (set by the inline head script) so the page is fully
   visible if JavaScript ever fails to run. */
html.js .animate-in { opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
html.js .animate-in.is-visible { opacity: 1; transform: none; }
html.js .scroll-reveal { opacity: 0; transform: translateY(8px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
html.js .scroll-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  background: var(--accent-btn);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--r-btn);
  box-shadow: 0 4px 0 var(--accent-edge);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), filter 160ms;
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 5px 0 var(--accent-edge); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 0 0 var(--accent-edge); transition-duration: 90ms; }
.btn-primary:disabled { opacity: 0.6; pointer-events: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-btn);
  transition: border-color 160ms, background 160ms, transform 160ms var(--ease-out);
}
.btn-ghost:hover { border-color: var(--ink-3); background: var(--surface); transform: translateY(-1px); }
.btn-ghost:active { transform: none; }

.btn-text { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; background: none; border: none; color: var(--ink-2); font-size: 0.9rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; transition: color 150ms; }
.btn-text:hover { color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--ink); letter-spacing: -0.01em; }
.wordmark .wm-dot { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-cta { min-height: 44px; padding: 0 14px; font-size: 0.9rem; }

#theme-toggle {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--ink-2);
  transition: border-color 160ms, color 160ms, transform 160ms var(--ease-out);
}
#theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); transform: rotate(15deg); }
#theme-toggle .icon-sun { display: none; }
#theme-toggle .icon-moon { display: block; }
[data-theme="dark"] #theme-toggle .icon-sun { display: block; }
[data-theme="dark"] #theme-toggle .icon-moon { display: none; }

/* ---------- Hero / scan machine ---------- */
.hero { padding: 48px 0 64px; }
.hero .wrap { display: flex; flex-direction: column; gap: 18px; text-align: left; }
.hero-sub { color: var(--ink-2); font-size: 1.05rem; max-width: 34rem; }

.hero .scan-idle, .hero .scan-theater, .hero .scorecard-wrap, .hero .full-report { display: none; }
.hero[data-state="idle"] .scan-idle { display: flex; flex-direction: column; gap: 18px; }
.hero[data-state="scanning"] .scan-theater { display: block; }
.hero[data-state="result"] .scorecard-wrap { display: flex; flex-direction: column; gap: 24px; }
.hero[data-state="full"] .scorecard-wrap { display: flex; flex-direction: column; gap: 24px; }
.hero[data-state="full"] .full-report { display: block; }
.hero[data-state="full"] .locked-block { display: none; }
.hero[data-state="full"] .findings [data-rescan] { display: none; }

/* Dropzone: the hero object */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 20px;
  background: var(--surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-hero);
  text-align: center;
  cursor: pointer;
  transition: border-color 200ms, background 200ms, transform 200ms var(--ease-out), box-shadow 200ms;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); box-shadow: var(--shadow-float); }
.dropzone .dz-icon { color: var(--accent); }
.dz-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.dz-sub { color: var(--ink-2); font-size: 0.92rem; }
.dz-meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-2); }
.dz-browse { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.track-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.track-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--ink-2); margin-right: 2px; }
@media (max-width: 479px) {
  .track-label { width: 100%; margin: 0 0 2px; }
  .track-chip { flex: 1 1 calc(50% - 8px); } /* balanced 2x2, no orphan chip */
}
.track-chip {
  min-height: 44px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 160ms var(--ease-out);
}
.track-chip:hover { border-color: var(--ink-3); color: var(--ink); }
.track-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }

.privacy-line { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 0.85rem; }
.privacy-line svg { flex: none; }

.hero-error, #unlock-error {
  padding: 12px 16px;
  background: color-mix(in srgb, var(--score-bad) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--score-bad) 35%, var(--border));
  border-radius: var(--r-input);
  color: var(--score-bad-text);
  font-size: 0.92rem;
  font-weight: 500;
}

/* Scan theater */
.theater-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 44px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-hero);
}
.theater-ring { width: 56px; height: 56px; }
.theater-ring svg { animation: spin 1.1s linear infinite; }
.theater-ring circle.spinner-track { stroke: var(--border); }
.theater-ring circle.spinner-arc { stroke: var(--accent); stroke-linecap: round; }
@keyframes spin { to { transform: rotate(360deg); } }

.check-list { list-style: none; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ink-2);
  opacity: 0.65;
  transition: opacity 250ms, color 250ms;
}
.check-list li.is-active { opacity: 1; color: var(--ink); }
.check-list li.is-done { opacity: 1; color: var(--ink-2); }
.check-list .tick { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--border-strong); border-radius: 50%; font-size: 10px; color: transparent; transition: all 250ms; }
.check-list li.is-done .tick { background: var(--accent-btn); border-color: var(--accent-btn); color: var(--accent-ink); }

/* ---------- Scorecard ---------- */
.scorecard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-hero);
  box-shadow: var(--shadow-pop);
  text-align: center;
  overflow: hidden;
}
.scored-file { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gauge { position: relative; width: min(64vw, 240px); margin: 6px auto 0; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge .gauge-track { fill: none; stroke: var(--border); stroke-width: 12; stroke-linecap: round; }
.gauge #gauge-ring { fill: none; stroke-width: 12; stroke-linecap: round; }
.gauge #gauge-dot circle { fill: var(--surface); stroke-width: 4; }
.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
#gauge-number { font-family: var(--font-display); font-size: clamp(3.4rem, 16vw, 4.5rem); font-weight: 650; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gauge-outof { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-2); margin-top: 4px; }

.tier-label { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; margin-top: 6px; }
.hero[data-band="bad"] .tier-label { color: var(--score-bad-text); }
.hero[data-band="warn"] .tier-label { color: var(--score-warn-text); }
.hero[data-band="good"] .tier-label { color: var(--score-good-text); }
.hero[data-band="great"] .tier-label { color: var(--score-great-text); }

.verdict { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; font-weight: 500; max-width: 26rem; margin-top: 2px; }
.reveal-sub { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-2); }

.confetti-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-layer span { position: absolute; top: 38%; left: 50%; width: 7px; height: 11px; border-radius: 2px; }

/* Breakdown bars */
.breakdown { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; text-align: left; }
.bd-head { display: flex; justify-content: space-between; font-size: 0.86rem; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
.bd-val { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.bd-max { color: var(--ink-2); font-weight: 400; }
.bd-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bd-fill { height: 100%; width: 0; border-radius: 999px; transition: width 900ms var(--ease-reveal); }

/* Findings + lock */
.findings { display: flex; flex-direction: column; gap: 14px; }
.findings h3 { margin-bottom: 2px; }
#issue-headlines { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.issue-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  font-size: 0.95rem;
  font-weight: 500;
}
.issue-sev {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}
.sev-critical .issue-sev { background: color-mix(in srgb, var(--score-bad) 13%, var(--surface)); color: var(--score-bad-text); }
.sev-high .issue-sev { background: color-mix(in srgb, var(--score-warn) 16%, var(--surface)); color: var(--score-warn-text); }
.sev-medium .issue-sev { background: var(--accent-soft); color: var(--score-great-text); }
.sev-clean .issue-sev { background: color-mix(in srgb, var(--score-good) 14%, var(--surface)); color: var(--score-good-text); }

.locked-block { position: relative; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.locked-cards { display: flex; flex-direction: column; gap: 10px; padding: 16px; filter: blur(7px); user-select: none; pointer-events: none; }
.locked-cards .issue-chip { border-style: dashed; }
.unlock-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(2px);
  border-top: 1px solid var(--border);
  text-align: center;
  align-items: center;
}
.unlock-panel .lock-icon { color: var(--ink-3); }
.unlock-panel p { font-size: 0.95rem; color: var(--ink-2); max-width: 30rem; }
#unlock-form { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; }
#unlock-form input {
  min-height: 50px;
  padding: 0 16px;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  transition: border-color 160ms;
}
#unlock-form input:focus { border-color: var(--accent); }
.unlock-fine { font-size: 0.78rem !important; color: var(--ink-2) !important; }

/* Full report */
.full-report { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.fix-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.fix-head { display: flex; align-items: flex-start; gap: 10px; }
.fix-head .issue-sev { margin-top: 3px; }
.fix-head h4 { font-family: var(--font-ui); font-size: 1.02rem; font-weight: 600; }
.fix-detail { color: var(--ink-2); font-size: 0.94rem; }
.fix-action { font-size: 0.94rem; }
.fix-action strong { color: var(--ink); font-weight: 600; }
.fix-clean { color: var(--ink-2); }

.kw-block { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--surface-2); border-radius: var(--r-card); }
.kw-block h4 { font-family: var(--font-ui); font-weight: 600; }
.kw-block > p { font-size: 0.9rem; color: var(--ink-2); }
#missing-keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.kw-chip { font-family: var(--font-mono); font-size: 0.78rem; padding: 6px 11px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; color: var(--ink-2); }

.report-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  text-align: center;
  align-items: center;
}
.report-cta p { font-size: 0.98rem; color: var(--ink-2); max-width: 32rem; }
.report-cta .btn-primary { width: 100%; max-width: 340px; }
.cta-fine { font-size: 0.8rem !important; }

/* ---------- Sections ---------- */
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.section-head p { color: var(--ink-2); max-width: 36rem; }

.pain-grid, .how-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.pain-card, .how-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.pain-num, .how-num { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--ink-2); font-weight: 550; }
.pain-card h3, .how-card h3 { font-family: var(--font-ui); font-size: 1.08rem; font-weight: 600; }
.pain-card p, .how-card p { color: var(--ink-2); font-size: 0.94rem; }

/* Proof */
.proof-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 24px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-hero);
}
[data-theme="dark"] .proof-card { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.proof-card blockquote { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; line-height: 1.4; font-weight: 500; }
.proof-scores { display: flex; align-items: center; gap: 16px; }
.proof-score { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--r-card); background: rgba(255, 255, 255, 0.07); text-align: center; }
[data-theme="dark"] .proof-score { background: var(--surface-2); }
.proof-score .num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 650; line-height: 1; }
.proof-score.before .num { opacity: 0.55; }
.proof-score .lbl { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase; opacity: 0.7; }
.proof-arrow { color: var(--ink-3); flex: none; }
.proof-attr { font-size: 0.88rem; opacity: 0.75; }
.proof-cta { align-self: flex-start; border-color: rgba(255, 255, 255, 0.35); color: inherit; }
.proof-cta:hover { background: rgba(255, 255, 255, 0.1); color: inherit; border-color: rgba(255, 255, 255, 0.6); }
[data-theme="dark"] .proof-cta { border-color: var(--border-strong); }
[data-theme="dark"] .proof-cta:hover { background: var(--surface-2); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-hero);
  transition: transform 200ms var(--ease-out), box-shadow 200ms;
}
.price-card:hover { transform: translateY(-3px); }
.price-card.is-featured { border: 2px solid var(--accent); }
.featured-pill {
  position: absolute;
  top: -12px;
  left: 22px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  padding: 5px 11px;
  background: var(--accent-btn);
  color: var(--accent-ink);
  border-radius: 999px;
}
.price-name { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 600; }
.price-amount { font-family: var(--font-display); font-size: 2.4rem; font-weight: 650; line-height: 1; }
.price-amount .price-per { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 400; color: var(--ink-2); }
.price-anchor { font-size: 0.85rem; color: var(--ink-2); border-left: 2px solid var(--border-strong); padding-left: 10px; }
.price-desc { color: var(--ink-2); font-size: 0.92rem; }
.price-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.price-list li { display: flex; gap: 10px; font-size: 0.92rem; align-items: flex-start; }
.price-list .pc { flex: none; width: 18px; height: 18px; margin-top: 2px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); border-radius: 50%; font-size: 10px; font-weight: 600; }
.price-card .btn-primary, .price-card .btn-ghost { width: 100%; margin-top: auto; min-height: 52px; }
.price-fine { font-size: 0.78rem; color: var(--ink-2); text-align: center; min-height: 2.4em; display: flex; align-items: center; justify-content: center; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  transition: background 160ms;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-2); transition: transform 200ms var(--ease-out); flex: none; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { background: var(--surface-2); }
.faq-list details p { padding: 0 20px 18px; color: var(--ink-2); font-size: 0.93rem; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 36px 0 110px; }
@media (min-width: 768px) {
  footer { padding-bottom: 44px; } /* sticky CTA is hidden here; no clearance needed */
}
.foot { display: flex; flex-direction: column; gap: 8px; }
.foot .tagline { font-family: var(--font-display); font-style: italic; color: var(--ink-2); }
.foot .fine { font-size: 0.8rem; color: var(--ink-2); }

/* ---------- Nav link ---------- */
.nav-link { display: none; font-size: 0.9rem; font-weight: 500; color: var(--ink-2); padding: 0 6px; }
.nav-link:hover { color: var(--ink); }
@media (min-width: 560px) { .nav-link { display: inline-flex; align-items: center; } }

/* ---------- Role dropdown ---------- */
.role-row { display: flex; flex-direction: column; gap: 7px; }
.role-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--ink-2); }
.role-select-wrap { position: relative; }
#role-select {
  width: 100%;
  min-height: 52px;
  padding: 0 44px 0 16px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 160ms;
}
#role-select:hover { border-color: var(--ink-3); }
#role-select:focus { border-color: var(--accent); outline: none; }
.role-caret { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.role-templatelink { font-size: 0.85rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }

/* ---------- Templates gallery ---------- */
.templates-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tpl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: transform 200ms var(--ease-out), border-color 200ms;
}
.tpl-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.tpl-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tpl-card-top h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.tpl-seniority { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); text-align: right; flex: none; }
.tpl-ai { font-size: 0.88rem; color: var(--ink-2); line-height: 1.5; }
.tpl-ai-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em; color: var(--accent); background: var(--accent-soft); padding: 3px 7px; border-radius: 999px; margin-right: 8px; vertical-align: middle; }
.tpl-kws { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-kw { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-2); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; }
.tpl-open { width: 100%; margin-top: auto; }

/* ---------- Template modal ---------- */
.tpl-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.tpl-modal[hidden] { display: none; }
.tpl-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 17, 14, 0.55); backdrop-filter: blur(3px); }
.tpl-modal-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 22px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-pop);
}
.tpl-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: sticky; top: 0; }
.tpl-modal-head h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.tpl-modal-sub { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-2); margin-top: 4px; }
.tpl-close { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); border-radius: 50%; }
.tpl-close:hover { color: var(--ink); }
.tpl-modal-actions { display: flex; gap: 10px; margin: 16px 0 20px; }
.tpl-modal-actions .btn-primary, .tpl-modal-actions .btn-ghost { flex: 1; min-height: 46px; }
.tpl-render { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; font-size: 0.9rem; line-height: 1.6; }
.tpl-render h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 2px; }
.tpl-render h4 { font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 18px 0 8px; border-bottom: 1px solid var(--border); padding-bottom: 5px; }
.tpl-render h5 { font-family: var(--font-ui); font-size: 1rem; font-weight: 600; margin: 12px 0 2px; }
.tpl-render p { color: var(--ink-2); margin: 4px 0; }
.tpl-render ul { margin: 6px 0 6px 18px; display: flex; flex-direction: column; gap: 5px; }
.tpl-render li { color: var(--ink-2); }
.tpl-render strong { color: var(--ink); font-weight: 600; }
.tpl-loading { color: var(--ink-3); font-style: italic; }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  transform: translateY(110%);
  transition: transform 300ms var(--ease-out);
}
.sticky-cta.show { transform: none; }
.sticky-cta .btn-primary { width: 100%; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .wrap { max-width: 720px; }
  section { padding: 72px 0; }
  .hero { padding: 72px 0 88px; }
  .pain-grid, .how-grid, .pricing-grid { max-width: 560px; margin: 0 auto; }
  .wrap.wide .section-head { max-width: 560px; margin-left: auto; margin-right: auto; }
  .wrap.wide { max-width: 1020px; }
  .sticky-cta { display: none; }
  #unlock-form { flex-direction: row; }
  #unlock-form input { flex: 1; }
  .hero .wrap, .section-head { text-align: left; }
  .templates-grid { grid-template-columns: repeat(2, 1fr); }
  .tpl-modal { align-items: center; }
  .tpl-modal-panel { border-radius: 20px; max-height: 88vh; }
  .role-templatelink { align-self: flex-start; }
}
@media (min-width: 1080px) {
  .wrap { max-width: 760px; }
  .wrap.wide { max-width: 1020px; }
  .wrap.wide .section-head { max-width: none; margin-left: 0; margin-right: 0; }
  .pain-grid, .how-grid { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); max-width: none; align-items: stretch; }
  .templates-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .animate-in, .scroll-reveal { opacity: 1; transform: none; }
}
