/* Landing page: one screen with the pitch, the ask box and the hero. */
.p-landing {
  display: flex; flex-direction: column;
  width: min(100%, 1360px); min-height: 100dvh; margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.p-brand { font: 700 1.375rem/1 var(--hand); letter-spacing: -.005em; padding-top: 3px; }
.p-badge-slot { display: flex; align-items: center; gap: 14px; min-width: 0; }
.p-pass-badge {
  padding: 0 14px; background: none; color: var(--peach);
  border: 1px solid currentColor; border-radius: 999px; font-size: .875rem; font-weight: 600; white-space: nowrap;
}

/* On a phone everything is one column, with the lesson playing between the headline and the ask box. */
.p-stage { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.p-hero { display: contents; }
.p-hero h1 { order: 0; margin: 0; font: 700 clamp(1.625rem, 7.6vw, 2.125rem)/1.12 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.p-hero h1 em { display: block; color: var(--yellow); font-style: normal; }
.p-sub { order: 1; margin: -2px 0 0; color: var(--chalk-dim); font-size: clamp(.8125rem, 3.9vw, .9375rem); line-height: 1.3; }
.p-sub-more { display: none; }
.p-demo { order: 2; }
.p-capacity, .p-notice { order: 3; padding-left: 12px; border-left: 2px solid var(--chalk-dim); color: var(--chalk); }
.p-ask { order: 4; }
.p-offer { order: 5; }
.p-examples { order: 6; }
.p-trust-slot { order: 7; }

/* A real lesson, on the same whiteboard and wooden rail as the player. */
.p-demo { display: flex; flex: 1 1 0; flex-direction: column; min-height: 132px; max-height: 52dvh; margin: 0; overflow: hidden; background: #0c0d0f; border-radius: 8px; box-shadow: 0 0 0 1px #33363b, 0 8px 26px rgb(0 0 0 / .45); }
.p-demo-board { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: #fbfaf6; border-top: 3px solid var(--wood); pointer-events: none; }
.p-demo-fit { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.p-demo-fit > .board { background: none; }
.p-demo .room { inset: 0; padding: 0; gap: 0; grid-template: minmax(0, 1fr) / minmax(0, 1fr) !important; }
.p-demo .room[data-mix="both"] .surface-black { display: none; }
.p-demo .surface-white { border: 0; border-radius: 0; box-shadow: none; }
.p-demo .surface-black { background: var(--board); color: var(--chalk); }
.p-demo .surface-view { overflow: hidden; }
.p-demo-foot { display: flex; flex: none; align-items: center; gap: 10px; min-height: 48px; padding: 2px 10px 2px 2px; background: var(--board-raised); border-top: 4px solid var(--wood-dark); }
.p-demo-line { flex: 1; min-width: 0; margin: 0; color: var(--chalk-dim); font-size: .8125rem; line-height: 1.22; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.p-demo-line .said { color: var(--chalk); }
.p-demo-line .now { color: var(--yellow); }
.p-listen { flex: none; min-width: 76px; min-height: 40px; margin-left: 4px; padding: 0 12px; background: none; border: 1px solid var(--chalk-dim); border-radius: 999px; color: var(--chalk); font-size: .875rem; font-weight: 600; }
.p-listen:hover, .p-listen[aria-pressed="true"] { background: var(--chalk); border-color: var(--chalk); color: #17171a; }

/* The ask box is the brightest thing on the page. */
.p-ask {
  display: grid; gap: 4px; padding: 8px;
  background: #1a1b1e; border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 12px 32px rgb(0 0 0 / .35);
  transition: border-color .15s, box-shadow .15s;
}
.p-ask:focus-within { border-color: #5a5d63; box-shadow: 0 0 0 4px rgb(255 255 255 / .05), 0 12px 32px rgb(0 0 0 / .35); }
.p-ask textarea { display: block; width: 100%; color: var(--chalk); }
.p-ask-input {
  min-height: 30px; max-height: 30dvh; padding: 2px 4px; resize: none; field-sizing: content;
  background: none; border: 0; outline: 0; font-size: 1.0625rem; line-height: 1.3;
}
.p-ask-input::placeholder { color: var(--chalk-dim); opacity: .85; }
.p-code-area { display: grid; gap: 8px; }
.p-code-input {
  padding: 10px 12px; resize: vertical; background: var(--board); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: .875rem; line-height: 1.5; white-space: pre; overflow: auto;
}
.p-code-input:focus { outline: 0; border-color: var(--chalk-dim); }
.p-lang {
  width: fit-content; min-width: 140px; min-height: 44px; padding: 0 12px;
  background: var(--board); color: var(--chalk); border: 1px solid var(--line); border-radius: var(--radius); font: inherit;
}
.p-ask-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.p-tools { display: flex; align-items: center; gap: 0; min-width: 0; }
.p-tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 42px; height: 44px; padding: 0 5px;
  background: none; border: 0; border-radius: 10px; color: var(--chalk-dim); font-size: .875rem;
}
.p-tool:hover { color: var(--chalk); background: rgb(255 255 255 / .07); }
.p-tool[aria-pressed="true"], .p-tool[aria-expanded="true"] { color: var(--board); background: var(--yellow); }
.p-tool:disabled { opacity: .55; cursor: default; }
.p-tool svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.p-tool span { display: none; }
.p-tool[data-testid="ask-photo"] { color: var(--chalk); }
.p-tool[data-testid="ask-photo"] span { display: inline; }
.p-ask .p-primary { flex: none; width: auto; min-width: 104px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 1rem; }
.p-photo-note { margin: 0; color: var(--blue); font-size: .875rem; }

.p-offer { margin: 0; color: var(--chalk); font-size: clamp(.78rem, 3.6vw, .9375rem); line-height: 1.3; }
.p-offer { color: var(--chalk-dim); }
.p-offer strong { color: var(--chalk); font-weight: 600; }
@media (max-width: 430px) { .p-through { display: none; } }

.p-examples { display: flex; gap: 6px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); overflow-x: auto; list-style: none; scrollbar-width: none; scroll-snap-type: x proximity; }
.p-examples::-webkit-scrollbar { display: none; }
.p-examples li { flex: none; scroll-snap-align: start; scroll-margin-left: var(--gutter); }
.p-example {
  display: block; height: 100%; min-height: 44px; padding: 4px 11px; white-space: nowrap;
  background: rgb(255 255 255 / .04); border: 1px solid transparent; border-radius: 999px; color: var(--chalk);
  font-size: .8125rem; line-height: 1.22; text-align: left;
}
.p-example:hover { border-color: var(--hairline); background: rgb(255 255 255 / .07); }
.p-course { margin-right: 6px; color: var(--chalk-dim); font-size: .75rem; font-weight: 650; letter-spacing: .02em; white-space: nowrap; }

.p-trust { margin: 0; color: var(--chalk-dim); font-size: .75rem; line-height: 1.4; text-align: center; }
.p-trust a { color: inherit; }
.p-link { min-height: 0; padding: 0; background: none; border: 0; color: inherit; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.p-sheet .p-trust { margin-top: 8px; }

@media (min-width: 960px) {
  .p-landing { padding-bottom: 10px; }
  .p-top { min-height: 56px; }
  .p-brand { font-size: 2rem; }
  .p-stage {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr);
    gap: clamp(28px, 3.6vw, 60px); align-items: center; padding-bottom: 12px;
  }
  .p-hero { display: grid; gap: clamp(10px, 1.7vh, 16px); min-width: 0; }
  .p-hero h1 { font-size: clamp(2.5rem, min(3.9vw, 7.4vh), 4rem); line-height: 1.05; }
  .p-sub { margin: 0; font-size: clamp(1rem, 2.2vh, 1.1875rem); line-height: 1.35; text-wrap: pretty; }
  .p-sub-more { display: inline; }
  .p-ask { gap: 8px; padding: 14px; border-radius: 16px; }
  .p-ask-input { min-height: 66px; font-size: 1.3125rem; }
  .p-tool { gap: 6px; padding: 0 9px; }
  .p-tool span { display: inline; }
  .p-ask .p-primary { min-width: 128px; min-height: 46px; font-size: 1.0625rem; }
  .p-offer { font-size: 1rem; }
  .p-examples { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
  .p-example { padding: 7px 12px; font-size: .875rem; }
  .p-trust { text-align: left; }
  .p-demo { flex: none; width: 100%; height: min(calc(100dvh - 140px), 36vw); max-height: 560px; }
  .p-demo-foot { min-height: 62px; padding-right: 16px; }
  .p-demo-line { font-size: 1rem; }
  .p-listen { min-width: 96px; margin-left: 10px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .p-ask { transition: none; }
}

/* The topic picker: a scrolling list above a bar that always shows the length and Start. */
.t-page { display: flex; flex-direction: column; width: min(100%, 1120px); min-height: 100dvh; margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
.t-main { flex: 1; min-width: 0; padding-bottom: 16px; }
.t-main h1 { margin: 12px 0 4px; font: 700 clamp(1.625rem, 7vw, 2.125rem)/1.15 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.t-question { margin: 0 0 12px; color: var(--chalk-dim); overflow-wrap: anywhere; }
.t-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.t-preset { display: grid; gap: 1px; align-content: center; min-width: 0; padding: 9px 6px; background: none; border: 1px solid var(--hairline); border-radius: var(--radius); color: var(--chalk-dim); font-size: .75rem; line-height: 1.25; text-align: center; }
.t-preset strong { color: var(--chalk); font-size: 1rem; }
.t-preset[aria-pressed="true"] { background: rgb(255 255 255 / .07); border-color: var(--chalk-dim); color: var(--chalk); }
.t-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 6px; }
.t-legend { flex: none; margin: 0; }
.t-note { min-height: 1.3em; margin: 0; color: var(--chalk-dim); font-size: .875rem; line-height: 1.3; }
.t-list { display: grid; gap: 0 32px; margin: 0; padding: 0; list-style: none; }
.t-list li { border-top: 1px solid var(--hairline); }
.t-topic { display: flex; align-items: flex-start; gap: 12px; height: 100%; padding: 12px 4px; border-radius: 6px; cursor: pointer; }
@media (hover: hover) { .t-topic:hover { background: rgb(255 255 255 / .035); } }
.t-topic:not(:has(:checked)) .t-title { color: var(--chalk-dim); font-weight: 500; }
.t-topic:has(:focus-visible) { outline: 2px solid var(--yellow); outline-offset: 2px; }
.t-topic input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--yellow); }
.t-copy { display: grid; flex: 1; gap: 1px; min-width: 0; }
.t-title { font-weight: 600; line-height: 1.25; }
.t-about { color: var(--chalk-dim); font-size: .8125rem; line-height: 1.3; }
.t-tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.t-title { position: relative; }
.t-copy:has(.t-tag) .t-title::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 2px 8px; border-radius: 50%; background: var(--yellow); vertical-align: middle; }
.t-legend { color: var(--chalk-dim); font-size: .8125rem; }
.t-legend::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--yellow); vertical-align: middle; }
.t-min { flex: none; color: var(--chalk-dim); font-size: .8125rem; white-space: nowrap; }
.t-ghost { height: 58px; margin-top: 8px; background: rgb(255 255 255 / .04); border-radius: 6px; animation: t-breathe 1.2s ease-in-out infinite alternate; }
@keyframes t-breathe { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .t-ghost { animation: none; } }
.t-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 calc(var(--gutter) * -1); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgb(18 19 21 / .92); backdrop-filter: blur(8px); border-top: 1px solid var(--hairline); }
.t-summary { min-width: 0; margin: 0; font-weight: 600; line-height: 1.25; }
.t-start { flex: none; width: auto; padding: 0 18px; }
@media (min-width: 860px) {
  .t-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-presets { max-width: 620px; }
  .t-bar { margin: 0; padding-right: 0; padding-left: 0; }
}
