/* Deadbolt. Greys and mint; Big Shoulders over Public Sans. */
:root {
  --bg: #ffffff;
  --surface: #f3f3f3;
  --ink: #232323;
  --muted: #5f5f5f;
  --accent: #a1ffcb;
  --accent-ink: #232323;
  --danger: #b3261e;

  --display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --text: 'Public Sans', system-ui, sans-serif;
  --s-small: 0.875rem;
  --s-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --s-lead: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem);
  --s-head: clamp(2.5rem, 1.2rem + 3.6vw, 4.5rem);
  --s-display: clamp(3rem, 4.6vw, 6rem);

  --m: clamp(16px, 2.2vw, 32px);
  --gap: clamp(120px, 14vw, 200px);
  --r: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--s-body)/1.5 var(--text); }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* ---------- shared bar and buttons ---------- */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px var(--m); }
.bar nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); font-size: 15px; }
.bar nav a:not(.btn) { text-decoration: none; }
.bar nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }
.wordmark { font: 800 1.75rem/1 var(--display); text-transform: uppercase; text-decoration: none; letter-spacing: -0.005em; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--r);
  background: var(--ink); color: var(--bg); font: 600 1rem/1 var(--text); text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s var(--ease); }
.btn:hover { background: #000; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; background: var(--accent); color: var(--accent-ink); }
.btn.small:hover { background: #7ff5b4; }
.btn.big { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.ghost:hover { background: #e6e6e6; }
.linkish { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; color: inherit; }

/* ---------- landing: hero, a sentence split by a reel of the app ---------- */
.landing .top { position: fixed; inset: 0 0 auto; z-index: 10; background: var(--bg); }
.hero { height: 400svh; }
.hero-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.hero-line { position: absolute; inset: 0; margin: 0; pointer-events: none; font: 800 max(2.5rem, calc(5.9vw - 10px))/0.88 var(--display); text-transform: uppercase; letter-spacing: -0.005em; }
.half { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; }
.half.left { left: var(--m); }
.half.right { right: var(--m); }

.reel-window { --fw: 38vw; --fh: calc(var(--fw) * 0.75); --fg: max(24px, calc((100svh - var(--fh)) / 2 - 60px));
  position: absolute; top: 0; bottom: 0; left: 50%; width: var(--fw); transform: translateX(-50%); }
.reel { position: absolute; left: 0; right: 0; top: calc(50% - var(--fh) / 2); display: grid; gap: var(--fg); transition: transform .5s var(--ease); will-change: transform; }
.frame { height: var(--fh); border-radius: var(--r); background: var(--surface); overflow: hidden; container-type: inline-size; }
.frame.dark { background: var(--ink); color: #fff; }
.frame.mint { background: var(--accent); }

.hero-foot { position: absolute; left: var(--m); right: var(--m); bottom: 32px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.lede { margin: 0; max-width: 34ch; font-size: 1.125rem; }

/* App fragments inside the reel: sized in container units so they scale with the frame. */
[data-ui] { font-family: var(--text); }
.frame > div { height: 100%; padding: 5cqw; }
.ui-k { margin: 0; font-size: max(13px, 2.6cqw); color: inherit; opacity: .75; }
.ui-title { margin: .3em 0 .8em; font: 600 max(14px, 3.6cqw)/1.25 var(--text); }
.ui-small { margin: 0; font-size: max(13px, 2.8cqw); line-height: 1.45; }
.ui-row { display: flex; justify-content: space-between; margin: 0; padding: .5em 0; font-size: max(13px, 2.8cqw); }
.ui-row + .ui-row { margin-top: .2em; }
.ui-btn { display: inline-block; margin-top: 1.2em; padding: .7em 1.1em; border-radius: var(--r); background: var(--ink); color: #fff; font: 600 max(13px, 2.8cqw)/1 var(--text); }
.ui-clock { margin: 0; font: 800 18cqw/0.95 var(--display); }
.ui-plan { display: grid; grid-template-columns: 1fr 1.1fr; gap: 5cqw; }
.sheet { background: #fff; padding: 4cqw; transform: rotate(-2deg); font-size: max(13px, 2.8cqw); }
.sheet-title { margin: 0 0 .6em; font-weight: 600; }
.sheet ol { margin: 0; padding-left: 1.4em; line-height: 2; }
.ui-lock { display: grid; grid-template-columns: 1fr 1fr; gap: 5cqw; align-items: center; }
.ui-lock .ui-small { margin-top: 1em; opacity: .8; }
.ui-chat p { margin: 0 0 .7em; padding: .7em .9em; border-radius: var(--r); font-size: max(13px, 2.7cqw); line-height: 1.4; }
.ui-chat .me { background: #3a3a3a; margin-left: 15%; }
.ui-chat .bot { background: var(--accent); color: var(--accent-ink); margin-right: 8%; }
.ui-break { display: grid; align-content: center; }
.ui-break .ui-clock { font-size: 26cqw; margin: .1em 0 .2em; }
.ui-grade { display: grid; grid-template-columns: auto 1fr; gap: 5cqw; align-items: center; }
.ui-score { margin: 0; font: 800 30cqw/0.9 var(--display); }
.ui-score span { font-size: .35em; }
.ui-grade .ui-btn { background: var(--accent); color: var(--accent-ink); }

/* ---------- how it works: a staircase of sentences ---------- */
.stairs { padding: var(--gap) var(--m) 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 56px; }
.step { grid-column: 1 / -1; }
.step:nth-child(3) { grid-column-start: 2; }
.step:nth-child(4) { grid-column-start: 3; }
.step:nth-child(5) { grid-column-start: 4; }
.step-line { margin: 0; font: 800 var(--s-head)/1 var(--display); text-transform: uppercase; }
.step p:not(.step-line) { margin: 12px 0 0; max-width: 40ch; }

/* ---------- switches ---------- */
.switches { margin-top: var(--gap); }
.band { min-height: 20vh; padding: 28px var(--m); display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 24px; font-size: var(--s-lead);
  color: var(--muted); transition: background-color .35s var(--ease), color .35s var(--ease); }
.band-text { grid-column: 1; margin: 0; font-weight: 600; line-height: 1.15; }
.band-more { grid-column: 1; margin: 0; max-height: 0; overflow: hidden; font-size: var(--s-body); font-weight: 400; transition: max-height .35s var(--ease), margin .35s var(--ease); }
.band.on { color: var(--ink); }
.band.on .band-more { max-height: 6em; margin-top: 10px; }
.band.on.f1, .band.on.f4 { background: var(--accent); }
.band.on.f2 { background: var(--ink); color: #fff; }
.band.on.f3 { background: var(--surface); }
.toggle { grid-column: 2; grid-row: 1 / span 2; font-size: inherit; position: relative; width: 2.1em; height: 1.1em; border-radius: 1em; border: 0; padding: 0; background: #cfcfcf; cursor: pointer; transition: background-color .2s var(--ease); }
.toggle::after { content: ''; position: absolute; top: .12em; left: .12em; width: .86em; height: .86em; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.toggle[aria-checked="true"] { background: var(--ink); }
.toggle[aria-checked="true"]::after { transform: translateX(1em); }
.band.on.f2 .toggle[aria-checked="true"] { background: var(--accent); }
.band.on.f2 .toggle[aria-checked="true"]::after { background: var(--ink); }
.toggle:active::after { width: 1em; }

/* ---------- questions ---------- */
.faq { padding: var(--gap) var(--m) 0; }
.qa { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.qa + .qa { margin-top: 80px; }
.q { grid-column: 1 / 7; margin: 0; font: 600 var(--s-lead)/1.1 var(--text); }
.q.soft { color: var(--muted); }
.a { grid-column: 8 / 13; }
.a p { margin: 0; max-width: 42ch; }
.try { margin-top: 24px; padding: 20px; background: var(--surface); border-radius: var(--r); }
.try-code { margin: 0 0 12px; font: 800 1.75rem/1.1 var(--display); letter-spacing: .04em; user-select: none; }
.code, .app input, .app textarea, .app select { width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: var(--r); background: #fff; color: var(--ink); font: inherit; box-shadow: inset 0 0 0 2px #d6d6d6; } /* taste-skill-ignore: form field edge */
.code { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.code:focus, .app input:focus, .app textarea:focus, .app select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); } /* taste-skill-ignore */
.code.done { box-shadow: inset 0 0 0 2px var(--ink); background: var(--accent); } /* taste-skill-ignore */
.try-msg { margin: 10px 0 0 !important; font-size: var(--s-small); color: var(--muted); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- close and footer ---------- */
.close { margin-top: var(--gap); min-height: 90svh; padding: 12vh var(--m) 40px; background: var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.close-line { margin: 0; font: 800 clamp(4rem, 11vw, 11rem)/0.88 var(--display); text-transform: uppercase; }
.close-foot { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.close-foot p { margin: 0; max-width: 36ch; font-size: 1.25rem; }
.close .btn { background: var(--accent); color: var(--accent-ink); }
.close .btn:hover { background: #7ff5b4; }

.foot { position: relative; min-height: 78svh; padding: 12vh var(--m) 0; background: var(--accent); color: var(--accent-ink); overflow: hidden; display: flex; flex-direction: column; }
.foot-top { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.foot-invite { margin: 0; font: 800 var(--s-head)/0.95 var(--display); text-transform: uppercase; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-legal { margin: auto 0 0; display: flex; justify-content: space-between; gap: 16px; font-size: var(--s-small); }
.foot-name { margin: 0 0 -0.3em; font: 800 28vw/0.8 var(--display); text-transform: uppercase; white-space: nowrap; transform: translateY(22%); }

/* entrances: only when script has marked the element; content never depends on it */
.pre { opacity: 0; transform: translateY(24px); }
.pre.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.band.pre.in { transition: opacity .7s var(--ease), transform .7s var(--ease), background-color .35s var(--ease), color .35s var(--ease); }

@media (max-width: 760px) {
  .bar nav a:not(.btn):not(:nth-last-child(2)) { display: none; }
  /* Phone: no pinned reel. The headline, then the four app screens as a swipe strip. */
  .hero { height: auto; padding-top: 80px; }
  .hero-stage { position: static; height: auto; overflow: visible; padding-bottom: 8px; }
  .hero-line { position: static; padding: 0 var(--m); font-size: 17vw; }
  .half { position: static; display: block; transform: none; }
  .half.right { text-align: right; }
  .reel-window { position: static; width: auto; transform: none; margin: 20px 0; }
  .reel { position: static; display: flex; gap: 12px; padding: 0 var(--m); overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; scrollbar-width: none; }
  .frame { flex: 0 0 88%; height: auto; aspect-ratio: 4 / 3; scroll-snap-align: center; }
  .hero-foot { position: static; padding: 0 var(--m); flex-direction: column; align-items: start; }
  .lede { font-size: 1rem; }
  .stairs { display: block; }
  .step + .step { margin-top: 40px; }
  .step:nth-child(3) { padding-left: 6vw; } .step:nth-child(4) { padding-left: 12vw; } .step:nth-child(5) { padding-left: 18vw; }
  .step-line { font-size: 8.4vw; }
  .band { min-height: 132px; }
  .qa { display: block; }
  .qa + .qa { margin-top: 56px; }
  .a { margin-top: 12px; }
  .close { min-height: 80svh; }
  .close-line { font-size: 22vw; }
  .close-foot { flex-direction: column; align-items: stretch; }
  .foot-top { flex-direction: column; }
  .foot-invite { font-size: 11vw; }
  .foot-links { display: flex; gap: 20px; }
  .foot-legal { flex-direction: column; gap: 4px; }
  .foot-name { font-size: 34vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* ---------- the app ---------- */
.app { background: var(--surface); min-height: 100svh; }
.app .bar { background: var(--bg); }
.app .bar nav { gap: 16px; }
.app-main { max-width: 1200px; margin: 0 auto; padding: 24px var(--m) 80px; display: grid; gap: 20px; }
.panel { background: var(--bg); border-radius: var(--r); padding: clamp(18px, 2.4vw, 28px); }
.panel.narrow { max-width: 520px; margin: 8vh auto 0; width: 100%; }
.panel.accent { background: var(--accent); }
.panel h1 { margin: 0 0 8px; font: 800 2.5rem/1 var(--display); text-transform: uppercase; }
.panel h2 { margin: 0 0 12px; font: 600 1.25rem/1.2 var(--text); }
.panel p { margin: 0 0 12px; }
.panel > * + .btn, .panel textarea + .btn, .panel .row { margin-top: 12px; }
.error { color: var(--danger); margin: 10px 0 0 !important; font-weight: 600; }
.error:empty { display: none; }
.ok { font-weight: 600; }
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }
.shot { max-height: 160px; border-radius: var(--r); }
.plan { margin-top: 20px; padding-top: 20px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-weight: 600; font-size: 15px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row .picker { margin: 0; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 12px 14px; background: var(--surface); border-radius: var(--r); font-size: 15px; }
.h-title { font-weight: 600; }
.h-res.overridden { color: var(--danger); }

.phase { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 56px); align-items: end; padding: clamp(20px, 3vw, 36px); border-radius: var(--r); background: var(--ink); color: #fff; }
.phase.break { background: var(--accent); color: var(--accent-ink); }
.phase-label { margin: 0; font-weight: 600; }
.clock { margin: 4px 0 0; font: 800 clamp(4.5rem, 12vw, 9rem)/0.9 var(--display); font-variant-numeric: tabular-nums; }
.phase-side h1 { margin: 0; font: 800 clamp(2rem, 4vw, 3.25rem)/1 var(--display); text-transform: uppercase; }
.phase-side p { margin: 8px 0 0; opacity: .8; }
.phase.proof .phase-label, .phase.quiz .phase-label { font: 800 clamp(2rem, 4vw, 3.25rem)/1 var(--display); text-transform: uppercase; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid2 > div { display: grid; gap: 20px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tasks label { display: flex; gap: 10px; align-items: start; padding: 8px 0; cursor: pointer; }
.tasks input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--ink); min-height: 0; box-shadow: none; } /* taste-skill-ignore: form field edge */
.tasks input:checked + * , .tasks input:checked { opacity: .6; }
.chat-log { max-height: 360px; overflow-y: auto; display: grid; gap: 8px; margin-bottom: 12px; }
.msg { margin: 0 !important; padding: 10px 12px; border-radius: var(--r); white-space: pre-wrap; }
.msg.user { background: var(--surface); margin-left: 12% !important; }
.msg.model { background: var(--accent); margin-right: 8% !important; }
.music-slot iframe { width: 100%; height: 152px; border: 0; border-radius: var(--r); margin-top: 12px; }
.music-slot p { margin-top: 12px; }
.override summary { cursor: pointer; font-weight: 600; }
.override[open] summary { margin-bottom: 12px; }
.override .code { margin: 8px 0 12px; }
.grade { margin-top: 16px; padding: 16px; border-radius: var(--r); background: var(--surface); }
.grade.pass { background: var(--accent); }
.score { margin: 0 0 6px !important; font: 800 3.5rem/1 var(--display); }
.score span { font-size: .45em; }
.grade li.wrong strong { color: var(--danger); }
.grade li { margin-bottom: 8px; }
.quiz fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.quiz legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice { display: flex; gap: 10px; align-items: start; padding: 8px 10px; border-radius: var(--r); cursor: pointer; }
.choice:hover { background: var(--surface); }
.choice input { width: 18px; height: 18px; min-height: 0; margin-top: 3px; box-shadow: none; accent-color: var(--ink); } /* taste-skill-ignore: form control */
.gbtn { min-height: 44px; margin: 8px 0; }
@media (max-width: 860px) {
  .grid2, .phase { grid-template-columns: 1fr; }
  .row3 { grid-template-columns: 1fr; }
  .history li { grid-template-columns: 1fr; gap: 2px; }
}
.foot-btn { margin-top: 24px; }
.legal { max-width: 760px; width: 100%; margin: 0 auto; }
.legal h2 { margin: 32px 0 10px; }
.legal li { margin-bottom: 8px; }
.legal p, .legal li { max-width: 68ch; }
