/* User Perspective: cobalt on cream. */
:root {
  --cream: #F6F2EA;
  --paper: #FBF9F4;
  --panel: #EFEAE0;
  --ink: #161B3D;
  --cobalt: #2233C9;
  --cobalt-deep: #18239A;
  --slate: #565C7A;
  --rule: #DCD5C7;
  --you: #2233C9;
  --agent: #C9851A;
  --danger: #B33A2B;
  --focus: #2233C9;
  --k-need: #2233C9;
  --k-desire: #8a5a00;
  --k-pain: #b33a2b;
  --k-request: #2f7d4f;
  --k-value: #7a4fa3;
  --k-workaround: #8a4b14;

  --display: "Inter Tight", "Helvetica Neue", Arial, system-ui, sans-serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --fog: var(--cream);  /* the demo screens' background name */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #0F1330;
    --paper: #151A3D;
    --panel: #1B2147;
    --ink: #ECEBFA;
    --cobalt: #9AA4FF;
    --cobalt-deep: #B8C0FF;
    --slate: #A3A8C8;
    --rule: #2B3263;
    --you: #9AA4FF;
    --agent: #E7AD45;
    --danger: #E0715F;
    --focus: #B8C0FF;
    --k-need: #9AA4FF;
    --k-desire: #e7ad45;
    --k-pain: #e0715f;
    --k-request: #5fbf86;
    --k-value: #b493dc;
    --k-workaround: #e39a5c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
a { color: inherit; }
[hidden] { display: none !important; }  /* a display rule (.field is grid) would otherwise show it */
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--s5); }
.muted { color: var(--slate); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cobalt); text-decoration: none;
  font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: -0.01em; }
.brand.small { font-size: 16px; }
.mark { width: 28px; height: 28px; color: var(--cobalt); flex: none; }
.brand.small .mark { width: 22px; height: 22px; }
.mark.small { width: 18px; height: 18px; }

/* Navigation */
.nav { max-width: 1120px; margin: 0 auto; padding: var(--s5); display: flex; align-items: center; gap: var(--s6); }
.nav-links { display: flex; gap: var(--s5); margin-left: auto; }
.nav-links a { color: var(--cobalt); text-decoration: none; font-size: 16px; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.back-site { display: none; margin-left: auto; color: var(--cobalt); font-size: 15px; }
body[data-mode="app"] .nav-links, body[data-mode="app"] .nav-cta, body[data-mode="app"] .site { display: none; }
body[data-mode="app"] .back-site { display: inline; }
/* During the interview and while the recap is written there is no leaving: no "Back to site", an inert logo. */
body[data-screen="live"] .back-site, body[data-screen="writing"] .back-site { display: none; }
body[data-screen="live"] .nav .brand, body[data-screen="writing"] .nav .brand { pointer-events: none; cursor: default; }

/* Buttons */
.btn {
  font: inherit; font-weight: 500; font-size: 16px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; padding: 12px 20px; cursor: pointer;
  border: 1px solid transparent; line-height: 1.2;
}
.btn.primary { background: var(--cobalt); color: #fff; }
.btn.primary:hover { background: var(--cobalt-deep); }
.btn.soft { background: var(--panel); color: var(--cobalt); }
.btn.soft:hover { background: color-mix(in srgb, var(--panel) 80%, var(--cobalt)); }
.btn.inverse { background: var(--cream); color: var(--cobalt); }
.btn.inverse:hover { background: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--slate); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[aria-pressed="true"] { background: var(--panel); border-color: var(--slate); }
@media (prefers-color-scheme: dark) {
  .btn.primary { color: #0F1330; }
  .btn.inverse { background: #0F1330; color: var(--cobalt); }
}

/* Hero */
.hero { padding-top: var(--s7); padding-bottom: var(--s9); }
.eyebrow { display: inline-block; font-size: 14px; color: var(--cobalt); background: color-mix(in srgb, var(--cobalt) 10%, transparent);
  border-radius: 6px; padding: 3px 9px; margin: 0 0 var(--s5); }
.hero-title { font-family: var(--display); font-weight: 500; color: var(--cobalt);
  font-size: clamp(48px, 8.4vw, 112px); line-height: .98; letter-spacing: -0.035em; margin: 0 0 var(--s6); max-width: 17ch; }
.hero-sub { max-width: 40em; margin: 0 0 var(--s6); }
.hero-lead { font-size: clamp(20px, 2.1vw, 26px); line-height: 1.4; color: var(--ink); margin: 0 0 var(--s3); }
.hero-more { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--slate); margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Sections */
.band { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: var(--s8) 0; }
.section-title { font-family: var(--display); font-weight: 500; color: var(--cobalt); font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.04; letter-spacing: -0.025em; margin: 0; }
.section-title.small { font-size: clamp(26px, 3vw, 36px); }
.section-body { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; margin: 0; }
.section-note { color: var(--slate); margin: var(--s4) 0 0; }

/* How it works */
.how .section-title { margin-bottom: var(--s6); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.step { background: var(--cream); border: 1px solid var(--rule); border-radius: 12px; padding: var(--s5); }
.step p { margin: var(--s4) 0 0; color: var(--ink); }
.step-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: start;
  background: color-mix(in srgb, var(--cobalt) 6%, var(--paper)); border-color: color-mix(in srgb, var(--cobalt) 30%, var(--rule)); }
.step-wide p { margin: 0; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; max-width: 46em; }
.card-num { font-family: var(--display); color: var(--cobalt); font-size: 44px; line-height: 1; letter-spacing: -0.03em; }
.how-cta { margin-top: var(--s6); }
.how-cta .fine { margin-top: var(--s3); }

.closing { background: var(--cobalt); color: #fff; padding: var(--s9) 0; }
.closing-title { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 5.4vw, 72px); line-height: 1; letter-spacing: -0.03em; margin: 0 0 var(--s4); }
.closing p { font-size: 20px; max-width: 30em; margin: 0 0 var(--s6); opacity: .9; }
@media (prefers-color-scheme: dark) { .closing { color: #0F1330; } }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); padding-top: var(--s6); padding-bottom: var(--s6); font-size: 15px; }

/* Invite-only notice */
.invite { border: 1px solid var(--rule); border-radius: 14px; padding: var(--s6); max-width: 440px; background: var(--paper); color: var(--ink); }
.invite::backdrop { background: color-mix(in srgb, var(--ink) 40%, transparent); }
.invite h2 { font-family: var(--display); font-weight: 500; color: var(--cobalt); font-size: 28px; letter-spacing: -0.02em; margin: 0 0 var(--s3); }
.invite p { margin: 0 0 var(--s5); color: var(--slate); }

/* ===================== Demo screens ===================== */
.app { max-width: 720px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s8); }
.screen:focus, [tabindex="-1"]:focus { outline: none; }
.display { font-family: var(--display); font-weight: 500; color: var(--cobalt); font-size: clamp(38px, 6.4vw, 60px);
  line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 var(--s5); max-width: 14ch; }
.title { font-family: var(--display); font-weight: 500; color: var(--cobalt); font-size: clamp(30px, 4.6vw, 42px);
  line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 var(--s4); }
.lede { font-size: 20px; line-height: 1.5; max-width: 34em; margin: 0 0 var(--s6); }
.lede.small { font-size: 17px; color: var(--slate); margin-bottom: var(--s5); }
.fine { font-size: 14px; color: var(--slate); margin: var(--s4) 0 0; }
.consent { margin: var(--s4) 0 0; max-width: 40em; }
.section-head { font-size: 15px; font-weight: 600; margin: var(--s6) 0 var(--s3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* Voice choice: two side-by-side options */
.voice-pick { border: 0; padding: 0; margin: 0 0 var(--s4); display: flex; flex-wrap: wrap; gap: var(--s2); }
.voice-pick legend { margin-bottom: var(--s2); padding: 0; }
.voice-opt {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 8px var(--s4); border: 1px solid var(--rule); border-radius: 999px; cursor: pointer;
}
.voice-opt input { accent-color: var(--cobalt); margin: 0; }
.voice-opt:has(input:checked) { border-color: var(--cobalt); background: color-mix(in srgb, var(--cobalt) 10%, transparent); }
.voice-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Goal screen */
.presets { border: 0; padding: 0; margin: 0 0 var(--s5); display: grid; gap: 0; }
.preset {
  display: grid; grid-template-columns: 20px 1fr; gap: var(--s3);
  padding: var(--s4) 0; border-top: 1px solid var(--rule); cursor: pointer;
}
.preset:last-child { border-bottom: 1px solid var(--rule); }
.preset input { margin: 5px 0 0; accent-color: var(--you); width: 16px; height: 16px; }
.preset-name { display: block; font-weight: 650; }
.preset-goal { display: block; color: var(--slate); font-size: 16px; }

[hidden] { display: none !important; }  /* a display rule (.field is grid) would otherwise show it */
.field { display: grid; gap: var(--s2); }
.field-label { font-weight: 650; font-size: 15px; }
textarea {
  font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--rule); border-radius: 10px; padding: var(--s3) var(--s4);
  resize: vertical; min-height: 96px;
}
textarea:focus { border-color: var(--you); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--you) 22%, transparent); }
input:not([type]), input[type="text"] {
  font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--rule); border-radius: 10px; padding: 10px var(--s4);
}
input:not([type]):focus { border-color: var(--you); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--you) 22%, transparent); }
.field { margin-bottom: var(--s4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.optional { font-weight: 400; color: var(--slate); font-size: 13px; margin-left: 4px; }
.presets legend { margin-bottom: var(--s2); padding: 0; }
.field-meta { justify-self: end; font-size: 13px; color: var(--slate); font-variant-numeric: tabular-nums; }

/* Before screen */
.checklist { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.checklist li { padding: var(--s3) 0 var(--s3) var(--s5); position: relative; max-width: 36em; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 22px; width: 10px; height: 4px; border-radius: 2px; background: var(--you); }
.goal-echo { color: var(--slate); font-size: 15px; margin: 0 0 var(--s4); }
.goal-echo span { color: var(--ink); }
.notice { background: var(--panel); border-left: 3px solid var(--slate); padding: var(--s3) var(--s4); margin: var(--s4) 0 0; border-radius: 0 8px 8px 0; }
.notice p { margin: 0; }
.notice.error { border-left-color: var(--danger); }
.spinner { display: inline-block; width: 12px; height: 12px; margin-right: var(--s2); border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--you); animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Live screen: the speaking status is the hero, the timer is secondary. */
.live { padding-top: var(--s2); }
.live-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); margin-bottom: var(--s8); }
.live-product { color: var(--slate); font-size: 15px; }
.timer { font-size: 15px; color: var(--slate); font-variant-numeric: tabular-nums; padding: 4px 12px; border: 1px solid var(--rule); border-radius: 999px; }
.timer span { color: var(--ink); font-weight: 650; }
.timer-wrap { display: inline-flex; align-items: center; gap: var(--s1); }

/* Wrap-up: the timer turns amber and breathes; a one-line banner says what happens next. */
.live[data-wrap="true"] .timer {
  border-color: var(--agent); color: var(--ink);
  background: color-mix(in srgb, var(--agent) 14%, transparent);
  animation: wrap-pulse 1.6s ease-in-out infinite;
}
.live[data-wrap="true"] .timer span { color: var(--ink); }
@keyframes wrap-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--agent) 45%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--agent) 0%, transparent); }
}
.wrap-banner {
  margin: calc(-1 * var(--s7)) 0 var(--s6); padding: var(--s2) var(--s3);
  border-left: 3px solid var(--agent); background: var(--panel);
  font-size: 15px; color: var(--ink); border-radius: 0 8px 8px 0;
}
.chime-toggle {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid transparent; border-radius: 999px; background: transparent;
  color: var(--slate); cursor: pointer;
}
.chime-toggle:hover { color: var(--ink); border-color: var(--rule); }
.chime-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chime-toggle .slash { display: none; }
.chime-toggle[aria-pressed="false"] .slash { display: inline; }
.chime-toggle[aria-pressed="false"] .bell { opacity: .55; }


.participant { color: var(--slate); font-size: 16px; margin: 0 0 var(--s4); max-width: 36em; }
.participant strong { color: var(--ink); font-weight: 650; }

.status { display: grid; justify-items: start; gap: var(--s3); margin-bottom: var(--s8); min-height: 190px; }
.status-visual { display: inline-flex; align-items: center; gap: 6px; height: 56px; }
.status-visual i { display: block; width: 8px; height: 12px; border-radius: 4px; background: var(--rule); transition: background .2s; }
.status-text { font-family: var(--serif); font-size: clamp(36px, 7vw, 54px); line-height: 1.1; letter-spacing: -0.01em; }
.status-hint { color: var(--slate); font-size: 16px; min-height: 1.5em; }
.sound-on { display: flex; margin: 0 auto var(--s4); }

.status[data-state="speaking"] .status-visual i { background: var(--agent); animation: bar 0.9s ease-in-out infinite; }
.status[data-state="you"] .status-visual i { background: var(--you); animation: bar 1.1s ease-in-out infinite; }
.status[data-state="listening"] .status-visual i { background: var(--you); opacity: .55; }
.status[data-state="thinking"] .status-visual i { background: var(--slate); animation: dot 1.2s ease-in-out infinite; }
.status[data-state="muted"] .status-visual i { background: var(--danger); opacity: .6; }
.status-visual i:nth-child(2) { animation-delay: .12s !important; }
.status-visual i:nth-child(3) { animation-delay: .24s !important; }
.status-visual i:nth-child(4) { animation-delay: .36s !important; }
.status-visual i:nth-child(5) { animation-delay: .48s !important; }
@keyframes bar { 0%, 100% { height: 12px; } 50% { height: 52px; } }
@keyframes dot { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

.controls { display: flex; flex-wrap: wrap; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--rule); }

/* Writing */
.progress { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; max-width: 320px; }
.progress span { display: block; height: 100%; width: 30%; background: var(--you); border-radius: 2px; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* Recap */
.summary { font-size: 19px; line-height: 1.6; max-width: 36em; margin: 0; }
.insights { padding: 0; margin: 0; list-style: none; }
.insights li { padding: var(--s3) 0; border-top: 1px solid var(--rule); }
.insights li:last-child { border-bottom: 1px solid var(--rule); }
.insights .ev { display: block; font-size: 15px; color: var(--slate); margin-top: var(--s1); }
/* Recap timeline: the key moments in the order they were said, on a vertical line */
.timeline { list-style: none; margin: 0; padding: 0; }
.point { position: relative; padding: 0 0 var(--s6) var(--s6); }
.point::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: -4px; width: 2px; background: var(--rule); }
.point:last-child { padding-bottom: 0; }
.point:last-child::before { display: none; }
.point .dot { position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--kind); box-shadow: 0 0 0 4px var(--fog); }
.point { --kind: var(--you); }
.point[data-kind="need"] { --kind: var(--k-need); }
.point[data-kind="desire"] { --kind: var(--k-desire); }
.point[data-kind="pain_point"] { --kind: var(--k-pain); }
.point[data-kind="feature_request"] { --kind: var(--k-request); }
.point[data-kind="value"] { --kind: var(--k-value); }
.point-time { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font-size: 13px; font-weight: 650; color: var(--slate); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.kind.workaround { --kind: var(--k-workaround); color: var(--k-workaround); background: color-mix(in srgb, var(--k-workaround) 12%, transparent); }
.point-time .headline { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.point-time { flex-wrap: wrap; }
.kind { font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--kind); background: color-mix(in srgb, var(--kind) 12%, transparent); border-radius: 999px; padding: 2px 9px; }
.point-quote { margin: 0; font-family: var(--serif); font-size: 23px; line-height: 1.4; color: var(--ink); max-width: 32em; }
.theme { margin: var(--s3) 0 0; font-size: 14px; color: var(--slate); }
.theme span { color: var(--ink); font-weight: 650; }
.player { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s3); max-width: 22em; }
.player .play { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); cursor: pointer; }
.player .play:hover { border-color: var(--slate); }
.player .play:focus-visible { outline: 2px solid var(--you); outline-offset: 2px; }
.player.playing .play { background: var(--ink); color: var(--fog); border-color: var(--ink); }
.player .track { flex: 1; height: 4px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.player .fill { display: block; width: 0; height: 100%; background: var(--you); transition: width .25s linear; }
.player .len { font-size: 13px; color: var(--slate); font-variant-numeric: tabular-nums; }
.player.gone .play, .player.gone .track { display: none; }
textarea.script { font-size: 15px; line-height: 1.5; }
#script-section { margin-top: var(--s6); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .nav { gap: var(--s4); }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap, .nav, .app { padding-left: var(--s4); padding-right: var(--s4); }
  .hero-actions .btn, .how-cta .btn { width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .step-wide { grid-template-columns: 1fr; gap: var(--s4); }
  .controls .btn { flex: 1; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .player { max-width: none; }
  .point-quote { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
