/* StoryWorks Academy — public and participant styles. Mobile first. */
:root {
  --ink: #1d1d1b;
  --ink-soft: #5c5a55;
  --paper: #fbfaf7;
  --card: #ffffff;
  --line: #e4e0d8;
  --accent: #8a2b2b;
  --accent-ink: #ffffff;
  --ok: #2f6b3a;
  --warn: #9a6a00;
  --bad: #a13a3a;
  --radius: 12px;
  --space: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --progress: 0%;
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.5; }
a { color: var(--accent); }
h1, h2, h3 { 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); }
.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: 10px 18px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; border: 0; font-size: 1rem; cursor: pointer; line-height: 1.4; }
.button:hover, .button:focus-visible { filter: brightness(1.1); }
.button-small { min-height: 36px; padding: 6px 14px; font-size: .95rem; }
.button-secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.button-link { background: none; color: var(--accent); padding: 0; min-height: 0; text-decoration: underline; font-weight: 500; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], input[type="time"], input[type="number"], 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(--accent); 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 #f0b429; 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; }
.viewas { background: #fff3c4; border-bottom: 1px solid #e0c060; padding: 8px var(--space); display: flex; gap: 12px; align-items: center; justify-content: space-between; font-size: .95rem; }
.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(--accent); 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; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
label.check input { width: 22px; height: 22px; margin-top: 2px; }
/* 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(--accent); 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 */
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
body.public .container { max-width: 1040px; }
.hero { padding: 40px 0 24px; max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.hero h1 { font-size: 2rem; letter-spacing: -.01em; }
.hero .lead { font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 16px; }
.notice { display: inline-block; background: #f3ede2; border-left: 4px solid var(--accent); padding: 8px 14px; border-radius: 6px; color: var(--ink-soft); margin: 0; }
.three-up, .split { display: grid; gap: var(--space); margin: 24px 0; }
.three-up .card, .split .card { margin: 0; }
.three-up h2, .split h2 { font-size: 1.1rem; margin-bottom: .4em; }
.bio { background: #1d1d1b; color: #f3f1ec; border-color: #1d1d1b; }
.bio h2 { color: #fff; }
.bio em { color: #f0d9a0; }
.faq-teaser { margin: 24px 0 0; }
@media (min-width: 720px) {
  .hero { padding: 64px 0 32px; }
  .hero h1 { font-size: 2.7rem; }
  .three-up { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 3fr 2fr; }
}
.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; }
