/* StoryWorks Academy — public and participant styles. Mobile first.
   Palette and type follow storyworks.in: Roboto Slab headings, a Century Gothic style body
   (Didact Gothic self-hosted, Century Gothic where installed), blue #3B7FD9 pill buttons,
   red #E03221 accent from the wordmark, grey #525556 text, white sections with black bands. */
@font-face { font-family: "Roboto Slab"; font-weight: 400; font-display: swap; src: url("../fonts/roboto-slab-400.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 700; font-display: swap; src: url("../fonts/roboto-slab-700.woff2") format("woff2"); }
@font-face { font-family: "Didact Gothic"; font-weight: 400; font-display: swap; src: url("../fonts/didact-gothic-400.woff2") format("woff2"); }
:root {
  --ink: #2c2d33;
  --ink-soft: #525556;
  --paper: #ffffff;
  --paper-alt: #f6f7f7;
  --card: #ffffff;
  --line: #e2e4e7;
  --accent: #3b7fd9;
  /* The brand blue reads 4.02:1 on white: fine behind a button, under the 4.5:1 that WCAG AA asks
     of body text. Text-sized links take the darker one, which is already in the palette. */
  --link: #2f66b0;
  --accent-dark: #2f66b0;
  --accent-ink: #ffffff;
  --brand-red: #e03221;
  /* The wordmark red reads 4.21:1 on the off-white band — under the 4.5:1 AA asks of body text.
     It stays the colour for rules, dots and outlines; anything that is read takes the darker one. */
  --brand-red-text: #c62a1b;
  --accent-deep: #26538f;
  --ok: #2f6b3a;
  /* Read as text on the amber pill ground, #9a6a00 is 4.29:1 — under the 4.5:1 AA asks. */
  --warn: #8a5e00;
  --bad: #a13a3a;
  --radius: 12px;
  --space: 16px;
  --font: "Century Gothic", "Didact Gothic", "URW Gothic", Futura, "Trebuchet MS", system-ui, sans-serif;
  --font-head: "Roboto Slab", Georgia, "Times New Roman", serif;
  --progress: 0%;
}
* { box-sizing: border-box; }
/* "hidden" always hides, whatever display a class gives the element (F-52: a hidden video player showed under the audio one). */
[hidden] { display: none !important; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink-soft); background: var(--paper); line-height: 1.6; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.container { max-width: 900px; margin: 0 auto; padding: var(--space); }
.narrow { max-width: 520px; }
.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--space); }
.site-header { border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 10; }
.site-footer { border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .9rem; margin-top: 40px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space); margin: 0 auto var(--space); }
.hero { padding: 32px 0; }
.button { display: inline-block; min-height: 44px; padding: 11px 26px; border-radius: 50px; background: var(--link); color: var(--accent-ink); text-decoration: none; font-family: var(--font-head); font-weight: 700; border: 0; font-size: .95rem; cursor: pointer; line-height: 1.4; }
.button:hover, .button:focus-visible { background: var(--accent-deep); }
.button-small { min-height: 36px; padding: 6px 14px; font-size: .95rem; }
.button-secondary { background: transparent; color: var(--link); border: 2px solid var(--accent); }
.button-secondary:hover, .button-secondary:focus-visible { background: #eef4fc; }
.button-link { background: none; color: var(--link); padding: 0; min-height: 0; text-decoration: underline; font-weight: 500; }
.button-link:hover, .button-link:focus-visible { background: none; color: var(--accent-dark); }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 120px; }
.field { margin-bottom: 18px; }
.field .hint { color: var(--ink-soft); font-size: .9rem; margin-top: 4px; }
.field .error { color: var(--bad); font-size: .95rem; margin-top: 4px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-wrap .toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--link); font: inherit; cursor: pointer; min-height: 32px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: var(--space); border: 1px solid var(--line); background: var(--card); }
.flash-success { border-color: var(--ok); }
.flash-error { border-color: var(--bad); }
.muted { color: var(--ink-soft); }
.debug { white-space: pre-wrap; font-size: .8rem; background: #f3f1ec; padding: 12px; border-radius: 8px; overflow-x: auto; }
:focus-visible { outline: 3px solid var(--brand-red); outline-offset: 2px; }
@media (min-width: 720px) {
  html { font-size: 18px; }
  h1 { font-size: 2.1rem; }
  .container { padding: 32px var(--space); }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.form-inline-alt p { margin: 8px 0; }
/* Viewing as somebody. Sticky, because two screens down a transcript an admin had no reminder they
   were in a view and no way out of it without scrolling back up. */
.viewas { position: sticky; top: 0; z-index: 30; background: #fff3c4; border-bottom: 1px solid #e0c060; padding: 8px var(--space); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; font-size: .95rem; }
/* The button keeps its words on one line. Wrapped inside a 50px radius it became a circle. */
.viewas form { margin: 0; flex: none; }
.viewas .button { white-space: nowrap; }
/* A line for the admin in that view, never for the participant. It has to be unmistakably not
   content: the page's own hints are grey prose, so this is amber, ruled and labelled. */
.admin-note { background: #fffaeb; border-left: 3px dashed #e0c060; padding: 8px 12px; margin: 0 0 12px; font-size: .9rem; color: var(--ink); }
/* One step up from a page reached through More. A generous tap area without a box around it. */
.up-link { margin: 0 0 4px; font-size: .9rem; }
.up-link a { display: inline-flex; align-items: center; min-height: 44px; padding-right: 8px; color: var(--ink-soft); text-decoration: none; gap: 4px; }
.up-link a:hover, .up-link a:focus-visible { color: var(--link); text-decoration: underline; }
.admin-note b { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #8a6d1f; font-weight: 700; }
.bottom-nav { position: sticky; bottom: 0; display: flex; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { flex: 1; text-align: center; min-height: 44px; line-height: 44px; text-decoration: none; color: var(--ink-soft); font-size: .9rem; }
.bottom-nav a[aria-current="page"], .bottom-nav a:hover { color: var(--link); font-weight: 600; }
@media (min-width: 900px) { .bottom-nav { position: static; justify-content: flex-start; gap: 24px; padding: 0 var(--space) 24px; border: 0; } }
.honour-text { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 16px 0; max-height: 50vh; overflow-y: auto; background: #fff; }
/* The tick box stays 22 px, as tick boxes are; the row around it is what a thumb aims at. */
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; min-height: 44px; padding: 10px 0; cursor: pointer; }
label.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; }
fieldset.kind-choice { border: 0; padding: 0; min-width: 0; }
fieldset.kind-choice legend { font-weight: 600; margin-bottom: 2px; padding: 0; }
fieldset.kind-choice label.check { padding: 6px 0; }
/* Player */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-mark { position: absolute; right: 10px; bottom: 44px; font-size: 11px; color: rgba(255,255,255,.55); pointer-events: none; text-shadow: 0 0 3px rgba(0,0,0,.8); font-family: var(--font); letter-spacing: .02em; }
.player:fullscreen { border-radius: 0; }
.player:fullscreen .player-mark { font-size: 13px; }
.player-fullscreen { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 6px; padding: 6px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.resume { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chapters { list-style: none; padding: 0; margin: 0; }
.chapters li { border-bottom: 1px solid var(--line); }
.chapters li:last-child { border-bottom: 0; }
.chapter { display: flex; gap: 12px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; padding: 10px 4px; font: inherit; color: var(--ink); cursor: pointer; min-height: 44px; }
.chapter .time { color: var(--link); font-variant-numeric: tabular-nums; min-width: 60px; }
.chapter:hover, .chapter:focus-visible { background: #faf6f0; }
details.card summary { cursor: pointer; list-style: none; }
details.card summary h2 { display: inline; }
details.card summary::before { content: "▸ "; color: var(--accent); }
details[open].card summary::before { content: "▾ "; }
.transcript p { margin: .6em 0; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.progress span { display: block; height: 100%; width: var(--progress, 0%); background: var(--accent); }
.session-card h2 a { text-decoration: none; }
.story-card { border-color: var(--accent); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; background: #eee; }
.pill-ok { background: #e3f1e5; color: var(--ok); }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.file-list li:last-child { border-bottom: 0; }

/* Public front page, in the storyworks.in manner */
.brand { display: inline-flex; align-items: center; }
.brand svg { height: 46px; width: auto; display: block; }
body.public .container { max-width: 1100px; }
.hero { padding: 16px 0 32px; text-align: center; max-width: 880px; margin: 0 auto; }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; color: var(--brand-red-text); font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-size: 2rem; text-transform: uppercase; letter-spacing: .01em; }
.hero .lead { font-size: 1.15rem; max-width: 720px; margin: 0 auto 1em; }
.lead p { margin: 0 0 .5em; }
.lead p:last-child, .live-description p:last-child { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 24px 0 18px; }
.notice { display: inline-block; background: var(--paper-alt); border-left: 4px solid var(--brand-red); padding: 8px 14px; border-radius: 6px; color: var(--ink-soft); margin: 0; text-align: left; }
.band { background: #000; color: #e9e9e9; margin: 32px calc(50% - 50vw) 0; padding: 48px calc(50vw - 50%); }
.band h2 { color: #fff; text-transform: uppercase; text-align: center; font-size: 1.5rem; }
.band .band-sub { text-align: center; color: #c9c9c9; max-width: 720px; margin: 0 auto 28px; }
.three-up, .split { display: grid; gap: var(--space); margin: 0; }
.band .three-up .card { background: #111; border-color: #2a2a2a; color: #d9d9d9; }
.band .three-up h3 { color: #fff; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; }
.band .num { display: block; font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.section { padding: 40px 0 8px; }
.section > h2 { text-transform: uppercase; text-align: center; font-size: 1.5rem; }
.section > .section-sub { text-align: center; max-width: 720px; margin: 0 auto 24px; }
.three-up .card, .split .card { margin: 0; }
.three-up h3, .split h2 { font-size: 1.1rem; margin-bottom: .4em; }
.three-up h3 { text-transform: uppercase; letter-spacing: .04em; }
.bio { background: var(--paper-alt); }
.bio em { color: var(--brand-red-text); }
.cta { text-align: center; padding: 40px 0 8px; }
.cta h2 { text-transform: uppercase; font-size: 1.5rem; }
.faq-teaser { margin: 24px 0 0; }
@media (min-width: 720px) {
  .hero { padding: 24px 0 40px; }
  .hero h1 { font-size: 2.9rem; }
  .three-up { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 3fr 2fr; }
  .band h2, .section > h2, .cta h2 { font-size: 1.9rem; }
  .brand svg { height: 64px; }
}
.hero-small { padding: 32px 0 8px; }
.hero-small h1 { font-size: 1.9rem; }
.faq-item summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; color: var(--accent); font-weight: 700; width: 18px; flex: none; }
.faq-item[open] summary::before { content: "–"; }
.faq-item summary h2 { font-size: 1.05rem; margin: 0; }
.faq-item p { margin: 10px 0 0 28px; }
.prose h2 { font-size: 1.1rem; margin-top: 1.2em; }

/* Participant shell */
.wordmark { height: 46px; width: auto; display: block; font-family: var(--font); }
.brand { text-decoration: none; }
.participant-header { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.participant-header .who { color: var(--ink-soft); font-size: .95rem; }
.top-nav { display: none; }
body.participant { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center; text-decoration: none; color: var(--ink-soft); font-size: .72rem; line-height: 1.2; border-radius: 10px; }
.bottom-nav svg { width: 24px; height: 24px; fill: currentColor; }
.bottom-nav a[aria-current="page"] { color: var(--link); font-weight: 700; }
.auth-card { margin-top: 24px; }
.auth-card h1 { text-align: center; font-size: 1.6rem; }
.auth-card > .muted { text-align: center; margin-bottom: 20px; }
.button-wide { width: 100%; text-align: center; }
.bottom-nav a { position: relative; }
.bottom-nav .dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--brand-red); }
.auth-alt { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; display: grid; gap: 10px; text-align: center; }
.auth-alt .muted { margin: 0; }
.page-narrow .container { max-width: 520px; }
.cards { display: grid; gap: var(--space); }
.card h2 { font-size: 1.15rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head .more { font-size: .9rem; white-space: nowrap; }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.status-list li:last-child { border-bottom: 0; }
.status-list a { text-decoration: none; color: var(--ink); font-weight: 600; }
.status-list small { display: block; color: var(--ink-soft); font-weight: 400; }
.pill-warn { background: #fff3d6; color: var(--warn); }
.pill-bad { background: #f7dede; color: var(--bad); }
.pill-muted { background: #eee; color: var(--ink-soft); }
.pill-info { background: #e6effc; color: var(--accent-dark); }
.count { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.week-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.week-item:last-child { border-bottom: 0; }
.week-item .when { min-width: 74px; font-family: var(--font-head); font-weight: 700; color: var(--accent); font-size: .95rem; line-height: 1.3; }
.week-item h3 { font-size: 1rem; margin: 0 0 2px; }
.week-item p { margin: 0 0 8px; }
.eyebrow-sm { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--brand-red-text); font-weight: 700; margin: 0 0 6px; }
.page-title { margin-bottom: 4px; }
.page-lead { margin-bottom: 20px; }
.code-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.code-box code { font-size: 1.3rem; letter-spacing: .08em; background: var(--paper-alt); padding: 8px 14px; border-radius: 8px; }
.live-item { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.live-item:last-child { border-bottom: 0; }
.live-item h3 { margin: 0; font-size: 1.05rem; }
.month { margin: 20px 0 8px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: var(--ink-soft); }
.section-list .card { margin-bottom: var(--space); }
.copy-button { min-height: 36px; padding: 6px 14px; }
@media (min-width: 900px) {
  body.participant { padding-bottom: 32px; }
  .bottom-nav { display: none; }
  .participant-header { grid-template-columns: auto 1fr auto; }
  .top-nav { display: flex; gap: 6px; justify-content: center; }
  .top-nav a { text-decoration: none; color: var(--ink-soft); padding: 8px 14px; border-radius: 50px; font-weight: 600; }
  .top-nav a[aria-current="page"] { background: #e6effc; color: var(--accent-dark); }
  .cards.two { grid-template-columns: 3fr 2fr; }
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { margin: 0; }
.cards { max-width: 900px; }
.cards > .card, .section-list > .card { margin: 0; width: 100%; }

/* Mockup structure: main column plus a right rail on desktop, timeline lists, next-up card */
.layout { display: grid; gap: var(--space); align-items: start; }
.layout > .main, .layout > .rail { display: grid; gap: var(--space); min-width: 0; }
.layout .card { margin: 0; }
@media (min-width: 900px) { .layout { grid-template-columns: 2fr 1fr; } .layout.even { grid-template-columns: 3fr 2fr; } .layout.single { grid-template-columns: minmax(0, 1fr); } }
.cohort-head h1 { font-size: 1.35rem; margin-bottom: 4px; }
.progress-bar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 12px 0 8px; }
.progress-bar i { display: block; height: 100%; width: var(--progress, 0%); background: var(--accent); }
.next-up { border-left: 4px solid var(--accent); }
.next-up .two { display: grid; gap: 16px; }
.next-up .two > div b { display: block; font-family: var(--font-head); font-size: 1rem; color: var(--ink); margin-bottom: 4px; }
.next-up .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
@media (min-width: 720px) { .next-up .two { grid-template-columns: 1fr 1fr; } }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: center; }
.tl li:first-child { border-top: 0; }
.tl .d { font-size: .85rem; color: var(--ink-soft); line-height: 1.3; }
.tl .t b { display: block; color: var(--ink); font-weight: 600; }
.tl .t b a { color: inherit; text-decoration: none; }
.tl .t b a:hover { color: var(--accent); }
.tl .t span { font-size: .85rem; color: var(--ink-soft); }
.tl.plain li { grid-template-columns: 1fr auto; }
.tl.stamps li { grid-template-columns: 64px 1fr; }
.pill { font-size: .78rem; padding: 3px 10px; }
.soft-card { background: #fffbeb; border-color: #fde68a; }
.soft-card h2, .soft-card h3 { color: var(--warn); }
.card h3 { font-size: 1rem; margin: 0 0 8px; }
.button-small { min-height: 36px; padding: 6px 14px; font-size: .85rem; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--paper-alt); border: 1px dashed #cbd5e1; padding: 8px 12px; border-radius: 6px; display: inline-block; font-size: 1rem; letter-spacing: .08em; }
.foot-note { color: var(--ink-soft); font-size: .85rem; }

/* Story recorder (W3-02) */
.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; }
.button-large { font-size: 1.05rem; padding: 14px 28px; }
.player-audio { width: 100%; margin: 12px 0; }
.calendar-links { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.player-video { display: block; width: 100%; max-height: 60vh; margin: 12px 0; background: #000; border-radius: 8px; }
.recorder .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 0; }
.recorder .row form { margin: 0; }
.recorder-timer { font-size: 1.6rem; font-weight: 700; margin: 8px 0 4px; }
.recorder-timer .muted { font-size: .9rem; font-weight: 400; }
.level { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 4px 0 8px; }
.level i { display: block; height: 100%; width: var(--level, 0%); background: var(--brand-red); transition: width .1s linear; }
.countdown { color: var(--brand-red-text); }
.story-card.sent { border-left: 4px solid var(--accent); }
.form-error { color: var(--brand-red-text); margin-top: 12px; }
.field.has-error input, .field.has-error textarea { border-color: var(--brand-red-text); }
.field.has-error .form-error { margin: 0 0 6px; }

/* Indranil's feedback, on the story page once it is his to give. */
.feedback-card h3 { margin: 20px 0 6px; }
.voice-player .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.support-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 16px; }
.story-maps { display: grid; gap: 12px; }
.story-maps img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.row-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 0; }
.story-map-file { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; }
@media (min-width: 720px) { .story-maps { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }

/* Touch targets (W4-13). A phone gets 44 px whatever a wider screen is doing to save room:
   a thumb is the same size on every device, and these are the controls that were under it. */
@media (max-width: 719px) {
  .button-small, .copy-button, .player-fullscreen { min-height: 44px; }
  .pw-wrap .toggle { min-height: 44px; padding: 0 8px; }
  .brand { min-height: 44px; }
  .actions .button-link { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Certificate and verification (W5-02). */
.break-any { overflow-wrap: anywhere; word-break: break-word; }
.verify { text-align: center; }
.verify h1 { margin: 6px 0 18px; }
.verify-flag { display: inline-block; margin: 0 0 4px; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.verify-ok { background: #e6f4ea; color: var(--ok); }
.verify-bad { background: #fee2e2; color: var(--bad); }
.verify-unknown { background: #f1f2f4; color: var(--ink-soft); }
.verify-detail { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 20px 0; text-align: left; }
.verify-detail dt { color: var(--ink-soft); font-size: .85rem; }
.verify-detail dd { margin: 0; }
@media (max-width: 460px) {
  .verify-detail { grid-template-columns: 1fr; gap: 2px; }
  .verify-detail dd { margin-bottom: 10px; }
}

/* Closing feedback (W5-03). */
.answer-label { margin: 16px 0 2px; font-size: .85rem; color: var(--ink-soft); }
.scale { display: flex; flex-wrap: wrap; gap: 8px; }
.scale-option { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.scale-option:has(input:checked) { border-color: var(--accent); background: #eef4fc; }
.scale-option input { margin: 0; }
blockquote { margin: 6px 0; padding: 10px 16px; border-left: 3px solid var(--line); color: var(--ink); }

/* Sessions made of short videos (F-11). The list is the session page; each video has its own. */
.session-overview h1 { margin-bottom: 4px; }
.session-overview .lead { margin-bottom: 4px; }
.session-progress { margin: 14px 0 4px; }
.session-progress .muted { margin: 0; font-size: .9rem; }
.session-summary { margin-top: 12px; }
.video-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.video-row { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.video-line { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 72px; padding: 12px; color: var(--ink-soft); text-decoration: none; }
a.video-line:hover, a.video-line:focus-visible { background: var(--paper-alt); }
.video-text b { display: block; color: var(--ink); font-weight: 600; line-height: 1.3; }
.video-text small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: .82rem; margin-top: 3px; }
/* The round play button on the right of every video: big enough to hit with a thumb. */
.video-play { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); box-shadow: 0 2px 6px rgba(38, 83, 143, .25); transition: background .15s, transform .15s; }
.video-play svg { width: 26px; height: 26px; fill: var(--accent-ink); }
a.video-line:hover .video-play { background: var(--accent-deep); transform: scale(1.05); }
.video-row.is-done .video-play { background: var(--paper-alt); box-shadow: inset 0 0 0 2px var(--accent); }
.video-row.is-done .video-play svg { fill: var(--accent-deep); }
.video-row.is-done a.video-line:hover .video-play { background: #e8f0fb; transform: scale(1.05); }
/* A text part (F-62): lines of a page instead of the play triangle, and the words set for reading. */
.video-play svg .read-lines { fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; }
.video-row.is-done .video-play svg .read-lines { stroke: var(--accent-deep); }
.reading { font-size: 1.0625rem; line-height: 1.65; max-width: 68ch; }
.reading > * + * { margin-top: .9em; }
.video-state { width: 26px; height: 26px; display: block; }
.video-state .vs-done { fill: var(--ok); }
.video-state .vs-tick { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.video-state .vs-ring { fill: #fff; stroke: #d3d7dd; stroke-width: 2; }
.video-state .vs-arc { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.video-state .vs-n { font-family: var(--font-head); font-size: 11px; font-weight: 700; fill: var(--ink); }
.video-row.is-current { background: #f3f7fd; border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.video-text .video-stop { display: block; margin-top: 4px; font-size: .9rem; color: var(--ink); }
.session-story.is-primary { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.session-story h2, .session-story h3 { margin-bottom: 4px; }
.nudge { background: #f3f7fd; border-radius: 8px; padding: 8px 12px; color: var(--ink); }
.video-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .9rem; margin: 4px 0 6px; }
.video-answers .answers { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.video-answers .answers h2 { margin-bottom: 4px; }
.video-answers label { color: var(--ink); line-height: 1.45; }
.video-answers textarea { min-height: 110px; resize: vertical; }
.saved-note { min-height: 1.4em; font-size: .9rem; color: var(--ok); margin: -6px 0 0; }
.video-next { margin: 18px 0 8px; }
.video-next .muted { margin: 6px 0 0; font-size: .9rem; text-align: center; }
/* Previous video on the left, the session page on the right; each a full 44 px target. */
.video-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 4px 0 8px; }
.video-pager a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.video-pager .up { margin-left: auto; }
/* A session page's neighbours: two boxes side by side from tablet width, the next one on the right. */
.session-steps { display: grid; gap: 12px; }
.session-step { display: grid; align-content: start; gap: 2px; min-height: 44px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); text-decoration: none; }
.session-step small { font-size: .85rem; font-weight: 600; color: var(--link); }
.session-step b { line-height: 1.3; }
.session-step span { font-size: .85rem; color: var(--ink-soft); }
a.session-step:hover, a.session-step:focus-visible { border-color: var(--accent); background: #f3f7fd; }
.session-step.is-locked { background: var(--paper-alt); }
.session-step.is-locked small { color: var(--ink-soft); }
@media (min-width: 600px) {
  .session-steps { grid-template-columns: 1fr 1fr; }
  .session-step.next { grid-column: 2; text-align: right; }
}
.video-mini { list-style: none; margin: 0; padding: 0; }
.video-mini li + li { border-top: 1px solid var(--line); }
.video-mini-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 44px; padding: 6px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .92rem; line-height: 1.35; }
.video-mini-row .video-state { width: 22px; height: 22px; }
.video-mini-row small { color: var(--ink-soft); white-space: nowrap; font-size: .8rem; }
.video-mini-row:hover, .video-mini-row:focus-visible { background: var(--paper-alt); }
.video-mini-row.is-here { background: #f3f7fd; font-weight: 700; }
@media (min-width: 900px) {
  .video-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
  .video-next .button-wide { width: auto; }
  .video-next .muted { margin: 0; text-align: left; }
}

/* R6: rail headings are h2 for order, sized like the h3 they replaced; focus stays visible inside the list. */
.card h2.h3 { font-size: 1rem; margin: 0 0 8px; }
a.video-line:focus-visible { outline-offset: -3px; }
