/* Light to Latent, Direction C: Exposure Sheet. Shared styles: tokens, shell, slate, Today, lesson. */

:root {
  color-scheme: light;
  --sheet: #FAFBF7;          /* sheet white */
  --grid: #D5E6D8;           /* X-sheet grid green */
  --ink: #2B2E33;            /* graphite */
  --blue: #2F6FD0;           /* animator's blue pencil */
  --blue-text: #2A63BD;      /* the blue pencil darkened for text (4.9:1 on every light surface) */
  --red: #D2433B;            /* red pencil: keys, deadlines */
  --slate: #1A1C1F;          /* slate black */

  --ink-2: #4F555D;          /* secondary text */
  --dis: #6B7178;            /* disabled text */
  --grid-soft: #EEF4EC;
  --line: #D5E6D8;
  --line-strong: #B3CDB9;
  --panel: #F3F6EF;
  --red-text: #B5372F;       /* red pencil darkened for text on sheet */
  --accent-bg: #2F6FD0;
  --accent-fg: #FFFFFF;
  --sel: #E3ECFA;
  --chalk: #F2F4EF;
  --chalk-2: #B9BEB6;
  --focus: #2F6FD0;
  --on-slate-btn-bg: #FAFBF7;
  --on-slate-btn-fg: #1A1C1F;

  --hdr: 60px;
  --font-ui: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-read: "Source Serif 4", "Iowan Old Style", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --sheet: #15171A; --grid: #2A3A30; --ink: #E8EAE6; --blue: #6FA2F0; --blue-text: #6FA2F0; --red: #F06B62; --slate: #1A1C1F;
    --ink-2: #A9AFA8; --dis: #8A908A; --grid-soft: #1B211E; --line: #2A3A30; --line-strong: #3B5244;
    --panel: #1B1E21; --red-text: #F06B62; --accent-bg: #6FA2F0; --accent-fg: #101215; --sel: #22324A;
    --focus: #9DC1F7; --on-slate-btn-bg: #E8EAE6; --on-slate-btn-fg: #15171A;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --sheet: #15171A; --grid: #2A3A30; --ink: #E8EAE6; --blue: #6FA2F0; --blue-text: #6FA2F0; --red: #F06B62; --slate: #1A1C1F;
  --ink-2: #A9AFA8; --dis: #8A908A; --grid-soft: #1B211E; --line: #2A3A30; --line-strong: #3B5244;
  --panel: #1B1E21; --red-text: #F06B62; --accent-bg: #6FA2F0; --accent-fg: #101215; --sel: #22324A;
  --focus: #9DC1F7; --on-slate-btn-bg: #E8EAE6; --on-slate-btn-fg: #15171A;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 16px); }
body {
  margin: 0; background: var(--sheet); color: var(--ink);
  font: 400 16px/1.5 var(--font-ui); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--blue-text); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 500; background: var(--ink); color: var(--sheet); padding: 10px 14px; border-radius: 3px; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: 1248px; margin-inline: auto; padding-inline: 24px; }
.cond { font-stretch: 68%; font-weight: 800; }

/* ---------- pencil marks (hand-authored svg paths) ---------- */
.pencil { overflow: visible; }
.pencil path { fill: none; stroke: var(--blue); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.pencil.ring path, .pencil.restx path { stroke-width: 2.6; vector-effect: non-scaling-stroke; }
.pencil.ring path { stroke: var(--red); }
.pencil.restx path { stroke: var(--blue); stroke-width: 2.2; vector-effect: non-scaling-stroke; }

/* ---------- icons ---------- */
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-s { width: 14px; height: 14px; margin-left: 4px; vertical-align: -1px; }
.ico-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-sun { display: block; }
  :root:not([data-theme="light"]) .ico-moon { display: none; }
}
:root[data-theme="dark"] .ico-sun { display: block; }
:root[data-theme="dark"] .ico-moon { display: none; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50; min-height: var(--hdr);
  display: flex; align-items: center; gap: 20px; padding: 0 24px;
  background: var(--sheet); border-bottom: 2px solid var(--line-strong);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 26px; color: var(--ink); }
.brand-name { font-weight: 800; font-stretch: 68%; font-size: 24px; line-height: 1; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; flex: 1; min-width: 0; }
.nav-item {
  appearance: none; background: none; border: 0; cursor: pointer; text-decoration: none;
  padding: 8px 12px; min-height: 40px; display: inline-flex; align-items: center;
  font: 600 15px/1 var(--font-ui); color: var(--ink); border-radius: 3px;
}
.nav-item:hover { background: var(--grid-soft); }
.nav-item[aria-current="page"], .nav-item.is-current { box-shadow: inset 0 -3px 0 var(--blue); }
.tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tool {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  background: transparent; border: 2px solid transparent; border-radius: 3px; font: 600 14px/1 var(--font-ui); color: var(--ink);
}
.tool:hover { background: var(--grid-soft); border-color: var(--line); }
.kbd { font: 600 12px/1 var(--font-ui); color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 3px; padding: 4px 6px; background: var(--grid-soft); }
.js-search { border-color: var(--line-strong); min-width: 150px; }
.js-search .kbd { margin-left: auto; }
.foot-replay { display: none; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  min-height: 44px; padding: 0 18px; border-radius: 3px; border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font: 600 15px/1.1 var(--font-ui); transition: background-color .12s, transform .08s;
}
.btn:hover { background: var(--grid-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-bg); border-color: var(--accent-bg); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-bg); filter: brightness(1.08); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn[aria-disabled="true"], .btn:disabled { color: var(--dis); border-color: var(--line-strong); border-style: dashed; cursor: not-allowed; background: transparent; }
.btn[aria-disabled="true"]:hover, .btn:disabled:hover { background: transparent; }
.btn:disabled { cursor: not-allowed; }
@media (pointer: coarse) { .btn-sm, .tool, .nav-item { min-height: 44px; } }

/* ---------- headings ---------- */
.h2 { font: 800 34px/1.05 var(--font-ui); font-stretch: 70%; letter-spacing: 0; }
.h2-s { font-size: 26px; }
.sub { color: var(--ink-2); font-size: 15px; margin-top: 6px; max-width: 70ch; }

/* ---------- tip box + badge ---------- */
#tipbox {
  position: fixed; z-index: 300; max-width: min(300px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 3px;
  background: var(--ink); color: var(--sheet); font: 500 14px/1.4 var(--font-ui); pointer-events: none;
  box-shadow: 0 2px 0 rgba(0,0,0,.15);
}
#tipbox strong { font-weight: 800; }
#tipbox[hidden] { display: none; }


/* ---------- slate (heavy element) ---------- */
.slate { --focus: #9DC1F7; background: var(--slate); color: var(--chalk); border-radius: 4px; overflow: hidden; border: 2px solid var(--slate); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .slate { border-color: #3A3F46; } }
:root[data-theme="dark"] .slate { border-color: #3A3F46; }
.clap-bar {
  height: 34px; border-bottom: 3px solid var(--chalk); position: relative;
  background: repeating-linear-gradient(115deg, var(--chalk) 0 24px, var(--slate) 24px 48px);
}
.cl { display: block; font: 500 13px/1.2 var(--font-ui); color: var(--chalk-2); }

/* ---------- home: today ---------- */
.today { padding-top: 32px; }
.hello { margin-bottom: 18px; }
.hello h1 { font: 800 56px/1 var(--font-ui); font-stretch: 66%; }
.hello-date { color: var(--ink-2); margin-top: 6px; }
.call-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr) 150px 170px; }
.cf { padding: 18px 22px 20px; border-left: 1px solid #44484f; min-width: 0; }
.cf:first-child { border-left: 0; }
.cv { display: block; font: 800 40px/1.05 var(--font-ui); font-stretch: 62%; margin-top: 4px; }
.cv { white-space: nowrap; }
.cv b { font-size: 64px; font-weight: 800; }
.cs { display: block; font-size: 14px; color: var(--chalk-2); margin-top: 2px; }
.ct { font: 800 58px/0.98 var(--font-ui); font-stretch: 64%; margin-top: 4px; text-wrap: balance; }
.call-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 22px 20px; border-top: 1px solid #44484f; flex-wrap: wrap; }
.call-prog { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.call-count { font-size: 15px; color: var(--chalk); }
.slate .btn-primary { background: var(--on-slate-btn-bg); border-color: var(--on-slate-btn-bg); color: var(--on-slate-btn-fg); }
.slate .btn-primary:hover { filter: none; background: #fff; border-color: #fff; }
:root[data-theme="dark"] .slate .btn-primary:hover { background: #fff; }

/* exposure cells: six frames */
.expo { display: inline-flex; gap: 4px; }
.expo i { width: 34px; height: 22px; border: 2px solid var(--chalk-2); border-radius: 2px; position: relative; display: block; }
.expo i.on { background: #6FA2F0; border-color: #6FA2F0; }
.expo i.on::after { content: ""; position: absolute; left: 50%; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; background: #1A1C1F; border-radius: 1px; opacity: .55; }
.expo-l i { width: 100%; flex: 1; border-color: var(--ink-2); }
.expo-l { display: flex; width: 100%; }
.expo-l i.on { background: var(--blue); border-color: var(--blue); }
.expo-l i.on::after { background: var(--sheet); opacity: .8; }

/* ---------- home: split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; margin-top: 64px; align-items: start; }
.scenes { margin-top: 18px; border-top: 2px solid var(--ink); }
.scene { border-bottom: 1px solid var(--line-strong); }
.scene a {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 36px; align-items: center; gap: 12px;
  padding: 14px 8px; color: var(--ink); text-decoration: none; min-height: 64px;
}
.scene a:hover { background: var(--grid-soft); }
.sc-no { font: 800 36px/1 var(--font-ui); font-stretch: 62%; color: var(--ink-2); text-align: center; }
.sc-t { font-weight: 600; font-size: 17px; line-height: 1.25; }
.sc-m { font: 700 17px/1 var(--font-ui); font-stretch: 68%; color: var(--ink-2); }
.sc-mark { width: 30px; height: 28px; display: block; }
.sc-mark .tick { width: 30px; height: 28px; display: none; }
.scene.is-done .sc-mark .tick { display: block; }
.scene.is-done .sc-t { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.scene.is-next { background: var(--grid-soft); box-shadow: inset 4px 0 0 var(--red); }
.scene.is-next .sc-no { color: var(--red-text); }

.side { display: grid; gap: 40px; }
.log-list { margin-top: 14px; border-top: 2px solid var(--ink); }
.log-list > div { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line-strong); }
.log-list dt { color: var(--ink-2); }
.log-list dd { font: 700 22px/1 var(--font-ui); font-stretch: 68%; }
.log-list dd b { font-size: 32px; font-weight: 800; }
.heat-wrap { margin-top: 18px; }
.heat-t { font-size: 14px; color: var(--ink-2); }
.heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin-top: 8px; }
.hm { aspect-ratio: 1 / 1; display: block; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--grid-soft); }
.hm.l1 { background: color-mix(in srgb, var(--blue) 35%, var(--sheet)); border-color: var(--blue); }
.hm.l2 { background: color-mix(in srgb, var(--blue) 65%, var(--sheet)); border-color: var(--blue); }
.hm.l3 { background: var(--blue); border-color: var(--blue); }
.hm.is-today { outline: 2px solid var(--red); outline-offset: 1px; }
.heat-key { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; color: var(--ink-2); justify-content: flex-end; }
.heat-key .hm { width: 16px; height: 16px; aspect-ratio: auto; }
.heat-key span:first-child { margin-right: 4px; }
.heat-key span:last-child { margin-left: 4px; }

.count-n { position: relative; display: inline-flex; align-items: baseline; gap: 14px; margin: 16px 0 6px 14px; }
.count-n b { font: 800 84px/1 var(--font-ui); font-stretch: 62%; color: var(--red-text); padding: 0 12px; }
.count-u { font: 700 28px/1 var(--font-ui); font-stretch: 68%; color: var(--red-text); }
.count-ring { position: absolute; left: -8px; top: -10px; width: 124px; height: calc(100% + 20px); pointer-events: none; }
.count-ring .ring { width: 100%; height: 100%; }
.count-d { color: var(--ink-2); max-width: 46ch; }
.ticks { display: flex; gap: 2px; margin-top: 14px; align-items: flex-end; }
.ticks li { flex: 1; height: 16px; background: var(--line-strong); border-radius: 1px; }
.ticks li.past { background: var(--blue); }
.ticks li.dl { background: var(--red); height: 26px; }

/* ---------- home: x-sheet ---------- */
.week, .shelf { margin-top: 72px; }
.week-head { margin-bottom: 18px; }
.xs { --fh: 30px; --xh: 140px; display: grid; grid-template-columns: 44px minmax(0, 1fr); border: 2px solid var(--ink); border-radius: 3px; background: var(--sheet); overflow: hidden; }
.xs-gut { border-right: 2px solid var(--ink); background: var(--grid-soft); }
.xs-gh { height: var(--xh); border-bottom: 2px solid var(--ink); }
.xg { height: var(--fh); display: flex; align-items: center; justify-content: center; font: 700 15px/1 var(--font-ui); font-stretch: 68%; color: var(--ink-2); border-top: 1px solid var(--line); }
.xg:nth-child(2) { border-top: 0; }
.xg:nth-child(4n+2):not(:nth-child(2)) { border-top-color: var(--line-strong); }
.xs-days { display: flex; }
.xd { flex: 1 1 0; border-left: 1px solid var(--line-strong); min-width: 0; }
.xd:first-child { border-left: 0; }
.xd-head { height: var(--xh); padding: 12px 12px 10px; display: flex; flex-direction: column; justify-content: space-between; border-bottom: 2px solid var(--ink); }
.xd-h { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.xd-n { font: 800 52px/0.9 var(--font-ui); font-stretch: 62%; position: relative; }
.xd-mark { width: 30px; height: 28px; display: block; margin-top: 2px; }
.xd-mark .tick { width: 30px; height: 28px; }
.xd-ring { position: absolute; left: -12px; top: -8px; width: 66px; height: 60px; pointer-events: none; }
.xd-ring .ring { width: 100%; height: 100%; }
.xd-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.xd-open { appearance: none; background: none; border: 0; padding: 0; text-align: left; font: 600 14px/1.25 var(--font-ui); color: var(--ink); text-decoration: none; cursor: pointer; display: block; }
a.xd-open { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button.xd-open { cursor: help; }
.xd-hrs { font-size: 13px; color: var(--ink-2); }
.xd-in-progress .xd-hrs { color: var(--red-text); font-weight: 600; }
.xd-frames { position: relative; }
.fr { height: var(--fh); border-top: 1px solid var(--line); position: relative; }
.fr:first-child { border-top: 0; }
.fr:nth-child(4n+1):not(:first-child) { border-top-color: var(--line-strong); }
.fr.off { background: var(--grid-soft); }
.xd-todo .fr:not(.off)::before, .xd-in-progress .fr:not(.off):not(.x)::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dotted var(--line-strong); margin-left: -1px;
}
.fr.x::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--blue); border-radius: 2px; }
.fr.x-first::before { top: 50%; }
.fr.x-first::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--blue); }
.fr.x-last::after { content: ""; position: absolute; left: calc(50% - 9px); bottom: 3px; width: 18px; height: 3px; background: var(--blue); border-radius: 2px; }
.fr.now::after { content: ""; position: absolute; inset: 3px 8px; border: 2px dashed var(--red); border-radius: 2px; }
.fr.now::before { display: none; }
.xd-restx { position: absolute; left: 14px; right: 14px; top: 12px; height: 128px; display: block; }
.xd-restx .restx { width: 100%; height: 100%; }
.xs.has-cu { --xh: 172px; }
.xd-catch { flex: 0 0 80px; background: var(--grid-soft); }
.xd-catch .xd-head { padding: 12px 8px 10px; }
.xd-n-cu { color: var(--ink-2); font-size: 44px; }
.xd-cu-l { font: 600 13px/1.25 var(--font-ui); color: var(--ink); }
.xd-catch .fr { background: transparent; }
.xd-catch .xd-frames { background: repeating-linear-gradient(135deg, transparent 0 7px, var(--line) 7px 8px); }
.k-cu { width: 16px; height: 16px; border: 1px solid var(--line-strong); background: repeating-linear-gradient(135deg, transparent 0 4px, var(--line-strong) 4px 5px); }
.longday { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; }
.longday label { font-weight: 600; font-size: 15px; }
.longday select { width: auto; min-width: 180px; }
.longday .hint { flex-basis: 100%; max-width: 70ch; }
.xs-key { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.xs-key i { display: inline-block; vertical-align: middle; margin-right: 8px; }
.k-x { width: 3px; height: 16px; background: var(--blue); border-radius: 2px; }
.k-ring { width: 22px; height: 16px; border: 2px solid var(--red); border-radius: 50%; }
.k-frame { width: 16px; height: 16px; border: 1px solid var(--line-strong); background: var(--sheet); }

/* ---------- art slots (container for a later render, degrades to drawn art) ---------- */
.slot {
  position: relative; overflow: hidden; border: 2px solid var(--ink); border-radius: 2px; aspect-ratio: 16 / 10; background-color: var(--sheet);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
}
.slot .art, .slot .art-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.slot .art-img { object-fit: cover; z-index: 1; }
.slot .art-img[hidden] { display: none; }
.art .i { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.art .b { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.art .r { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }
.art .dash { stroke-dasharray: 5 6; }
.art .rdot, .art .rfill { fill: var(--red); stroke: none; }
.art .bdot, .art .bfill { fill: var(--blue); stroke: none; }
.art .vbox { fill: #26292E; stroke: #6FA2F0; stroke-width: 2; }
.art .vtxt { stroke: #8D939B; stroke-width: 3; stroke-linecap: round; fill: none; }
.art .vwire { stroke: #6FA2F0; stroke-width: 2.4; fill: none; }
.art .vwire.vr { stroke: #F06B62; }
.art .vdot { fill: #F2F4EF; }

/* ---------- home: portfolio shelf ---------- */
.pieces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.piece-t { margin-top: 12px; }
.piece-t h3 { font: 800 24px/1.1 var(--font-ui); font-stretch: 72%; }
.piece-t p { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.piece-t .piece-s { color: var(--ink); font-weight: 600; }

/* ---------- footer ---------- */

/* ---------- command palette ---------- */
.pal { border: 2px solid var(--ink); border-radius: 4px; padding: 0; width: min(660px, calc(100vw - 20px)); margin: 10vh auto 0; background: var(--sheet); color: var(--ink); max-height: 76vh; overflow: hidden; }
.pal::backdrop { background: rgba(21, 23, 26, .55); }
.pal[open] { display: block; }
.pal-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 2px solid var(--ink); }
.pal-bar input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 18px/1.2 var(--font-ui); padding: 8px 0; outline: none; }
.pal-bar:focus-within { box-shadow: inset 0 -3px 0 var(--blue); }
.pal-x { appearance: none; background: var(--grid-soft); border: 1px solid var(--line-strong); border-radius: 3px; padding: 6px 8px; font: 600 12px/1 var(--font-ui); color: var(--ink-2); cursor: pointer; }
.pal-list { max-height: calc(76vh - 130px); overflow: auto; padding: 6px; }
.pal-list li { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 10px; border-radius: 3px; cursor: pointer; border-left: 4px solid transparent; }
.pal-list li[aria-selected="true"] { background: var(--sel); border-left-color: var(--blue); }
.pal-k { font: 700 13px/1 var(--font-ui); color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 3px; padding: 4px 6px; text-align: center; background: var(--sheet); }
.pal-t { display: block; font-weight: 600; }
.pal-s { display: block; font-size: 14px; color: var(--ink-2); }
.pal-empty { padding: 18px 14px; color: var(--ink-2); }
.pal-foot { padding: 10px 14px; border-top: 1px solid var(--line-strong); font-size: 13px; color: var(--ink-2); background: var(--grid-soft); }

/* ---------- lesson ---------- */
.crumbs { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-height: 36px; }
.back .ico { width: 18px; height: 18px; }
.crumb-pn { display: flex; gap: 8px; }
.board { display: grid; grid-template-columns: 120px 120px 120px minmax(0, 1fr) 120px 150px; }
.bc { padding: 16px 22px 18px; border-left: 1px solid #44484f; min-width: 0; }
.bc-wk { border-left: 0; }
.bn { display: block; font: 800 78px/0.95 var(--font-ui); font-stretch: 62%; margin-top: 4px; }
.bt { font: 800 64px/0.98 var(--font-ui); font-stretch: 64%; margin-top: 4px; text-wrap: balance; }
.bv { display: block; font: 800 38px/1 var(--font-ui); font-stretch: 64%; margin-top: 4px; }
.bg { font: 500 17px/1.5 var(--font-read); margin-top: 4px; max-width: 70ch; }
.bc-goal { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #44484f; }
.clap-arm { position: absolute; left: 0; right: 0; top: -2px; height: 34px; transform-origin: 0 100%; transform: rotate(0); background: repeating-linear-gradient(115deg, var(--slate) 0 24px, var(--chalk) 24px 48px); border-bottom: 3px solid var(--chalk); display: none; }
.clap-bar.snap .clap-arm { display: block; animation: lsnap .34s cubic-bezier(.6, 0, 1, .6) both; }
@keyframes lsnap { 0% { transform: rotate(-9deg); } 70% { transform: rotate(0); } 85% { transform: rotate(-1.2deg); } 100% { transform: rotate(0); } }

.daystrip { margin-top: 18px; }
.daystrip ol { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; }
.ds { border-left: 1px solid var(--line-strong); min-width: 0; }
.ds:first-child { border-left: 0; }
.ds a, .ds button {
  appearance: none; background: transparent; border: 0; cursor: pointer; width: 100%; height: 100%; text-align: left; text-decoration: none; color: var(--ink);
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "n m" "t t" "h h"; column-gap: 8px; padding: 10px 12px 10px; min-height: 92px; align-content: start;
}
.ds button { cursor: help; }
.dn { grid-area: n; font: 800 40px/0.95 var(--font-ui); font-stretch: 62%; }
.dm { grid-area: m; justify-self: end; width: 24px; height: 22px; }
.dm .tick { width: 24px; height: 22px; }
.dt { grid-area: t; font: 600 13.5px/1.25 var(--font-ui); margin-top: 6px; }
.dh { grid-area: h; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.ds.is-cur { background: var(--grid-soft); box-shadow: inset 0 -4px 0 var(--red); }
.ds.is-cur .dn { color: var(--red-text); }
.ds-rest .dt, .ds-rest .dn { color: var(--ink-2); }

.lgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; margin-top: 36px; align-items: start; }
.lmain { min-width: 0; }
.margin { min-width: 0; display: grid; gap: 22px; }

.poster {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; cursor: pointer;
  background: #1A1C1F; color: #F2F4EF; --focus: #9DC1F7; text-align: left;
}
.poster .art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .38; }
.poster-play {
  position: absolute; left: 50%; top: 42%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: #FAFBF7; color: #1A1C1F;
  display: grid; place-items: center; box-shadow: 0 0 0 6px rgba(250,251,247,.25); transition: transform .15s;
}
.poster-play .ico { width: 40px; height: 40px; margin-left: 5px; stroke: none; }
.poster:hover .poster-play { transform: scale(1.06); }
.poster-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px 14px; background: #1A1C1F; border-top: 3px solid #F2F4EF; display: block; }
.poster-t { display: block; font: 800 24px/1.1 var(--font-ui); font-stretch: 72%; }
.poster-m { display: block; font-size: 14px; color: #B9BEB6; margin-top: 2px; }
.video-note { border: 2px solid var(--ink); border-radius: 3px; padding: 20px 22px; background: var(--grid-soft); }
.video-note[hidden] { display: none; }
.vn-t { font: 800 28px/1.1 var(--font-ui); font-stretch: 70%; }
.vn-s { color: var(--ink-2); margin-top: 6px; }
.vn-a { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.video.is-open .poster { display: none; }

.steps { margin-top: 52px; }
.frames { margin-top: 20px; }
.frame { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px; padding-bottom: 36px; }
.frame::before { content: ""; position: absolute; left: 37px; top: 56px; bottom: 0; width: 0; border-left: 3px dashed var(--line-strong); }
.frame.is-done::before { border-left: 3px solid var(--blue); border-radius: 2px; }
.frame:last-child::before { display: none; }
.frame:last-child { padding-bottom: 8px; }
.gutter { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.fno { width: 76px; height: 54px; display: grid; place-items: center; font: 800 46px/1 var(--font-ui); font-stretch: 62%; border: 2px solid var(--ink); border-radius: 3px; background: var(--sheet); }
.frame.is-done .fno { background: var(--grid-soft); color: var(--ink-2); border-color: var(--blue); }
.fmin { font: 700 16px/1 var(--font-ui); font-stretch: 68%; color: var(--ink-2); margin-top: 6px; background: var(--sheet); padding: 2px 4px; }
.fhead { display: flex; align-items: center; gap: 14px; min-height: 54px; }
.ftitle { font: 800 28px/1.1 var(--font-ui); font-stretch: 72%; flex: 1; min-width: 0; }
.frame.is-done .ftitle { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.ftime { font: 700 17px/1 var(--font-ui); font-stretch: 68%; color: var(--ink-2); display: none; }
.chk { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.chk-in { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.chk-box { width: 34px; height: 34px; border: 2.5px solid var(--ink); border-radius: 4px; display: grid; place-items: center; background: var(--sheet); transition: border-color .12s, background-color .12s; }
.chk-box .tick { width: 30px; height: 28px; }
.chk-box .tick path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.chk-in:checked + .chk-box { border-color: var(--blue); background: var(--grid-soft); }
.chk-in:checked + .chk-box .tick path { stroke-dashoffset: 0; opacity: 1; }
.chk:hover .chk-box { border-color: var(--blue); }
.chk-in:focus-visible + .chk-box { outline: 3px solid var(--focus); outline-offset: 2px; }

.det, .chg, .copybox, .slinks { margin-top: 12px; }
.det { font: 400 17px/1.6 var(--font-read); font-optical-sizing: auto; max-width: 66ch; }
.chg { font: 400 17px/1.6 var(--font-read); padding-left: 0; max-width: 66ch; }
.chg li { position: relative; padding-left: 26px; margin-top: 6px; }
.chg li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 12px; height: 3px; background: var(--blue); border-radius: 2px; }
.term { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: help; text-decoration: underline dotted var(--blue); text-decoration-thickness: 2px; text-underline-offset: 4px; border-radius: 2px; }
.term:hover, .term[aria-expanded="true"] { background: var(--sel); }
.copybox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; border: 2px solid var(--ink); border-radius: 3px; padding: 12px 14px; background: var(--panel); max-width: 66ch; }
.copy-l { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.copy-t { font: 500 16px/1.45 var(--font-ui); word-break: break-word; }
.slinks { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.slinks a { font-weight: 600; }
.wrapmsg { margin-top: 18px; padding: 14px 16px; border: 2px solid var(--red); border-radius: 3px; color: var(--red-text); font: 800 24px/1.2 var(--font-ui); font-stretch: 72%; transform: rotate(-.6deg); }
.wrapmsg[hidden] { display: none; }

.terms { margin-top: 56px; }
.gls { margin-top: 16px; border-top: 2px solid var(--ink); }
.gl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 12px 6px; border-bottom: 1px solid var(--line-strong); }
.gl dt { font: 800 24px/1.1 var(--font-ui); font-stretch: 68%; }
.gl dd { font: 400 17px/1.55 var(--font-read); max-width: 60ch; }
.gl.flash { background: var(--sel); }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.pn-b { flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; min-height: 72px; padding: 10px 16px; gap: 2px; }
.pn-next { align-items: flex-end; text-align: right; }
.pn-l { font-size: 13px; font-weight: 500; }
.pn-t { font: 700 17px/1.2 var(--font-ui); }

.mpanel { border: 2px solid var(--ink); border-radius: 3px; padding: 16px 16px 18px; background: var(--sheet); }
.mh { font: 800 22px/1 var(--font-ui); font-stretch: 70%; margin-bottom: 12px; }
.take-count { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-strong); flex-wrap: wrap; }
.tclock { font: 800 52px/1 var(--font-ui); font-stretch: 62%; font-variant-numeric: tabular-nums; }
.tbtns { display: flex; gap: 8px; }
.tnote { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.bm { margin-top: 14px; }
.bm[aria-pressed="true"] { background: var(--sel); border-color: var(--blue); color: var(--ink); }
.bm[aria-pressed="true"] .ico { fill: var(--blue); stroke: var(--blue); }
.notes {
  background-color: var(--sheet);
  background-image: linear-gradient(var(--red), var(--red));
  background-repeat: no-repeat; background-size: 2px calc(100% - 46px); background-position: 38px 46px;
}
.notes-ta {
  display: block; width: 100%; resize: vertical; min-height: 150px; border: 0; border-radius: 0; padding: 0 0 0 52px; margin: 0;
  background-color: transparent; color: var(--ink); font: 500 16px/28px var(--font-ui);
  background-image: repeating-linear-gradient(transparent 0 27px, var(--line-strong) 27px 28px); background-attachment: local; outline: none;
}
.notes:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.notes-s { margin-top: 10px; padding-left: 52px; min-height: 24px; }
.saved { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.saved-t { width: 22px; height: 20px; display: inline-block; }
.saved-t .tick { width: 22px; height: 20px; }
.saved.is-saving .saved-t { opacity: 0; }
.notes .mh { padding-left: 0; }
.take.is-flow { margin-top: 24px; }
.notes.is-flow { margin-top: 40px; }
.asks { display: grid; gap: 8px; }
.ask { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 48px; border: 2px solid var(--ink); border-radius: 3px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.25; }
.ask:hover { background: var(--grid-soft); border-color: var(--blue); }
.ask .ico { color: var(--blue); }
.ask-main { display: block; min-width: 0; }
.ask-lbl { display: block; }
.ask-sub { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); margin-top: 2px; }


/* ================= additions for the live site ================= */
.sprite { position: absolute; }
.copy-shim { position: fixed; top: 0; left: 0; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.brand-cut { stroke: var(--sheet); stroke-width: 2; }
.art .dot { stroke-dasharray: 3 5; }
.art .thick { stroke-width: 5; }
.noscript { padding: 24px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

.h1 { font: 800 52px/1 var(--font-ui); font-stretch: 66%; text-wrap: balance; }
.h3 { font: 800 22px/1.15 var(--font-ui); font-stretch: 72%; }
.page { padding-top: 32px; padding-bottom: 8px; }
.page-head { margin-bottom: 28px; }
.page-head .sub { max-width: 70ch; }
.lead { font: 400 19px/1.55 var(--font-read); max-width: 62ch; margin-top: 10px; }
.kicker { color: var(--ink-2); font-size: 15px; }
.empty { border: 2px dashed var(--line-strong); border-radius: 3px; padding: 20px 22px; color: var(--ink-2); max-width: 62ch; }
.plain { padding-left: 0; }
.plain li { margin-top: 6px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.opt { font: 600 13px/1 var(--font-ui); color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 3px; padding: 2px 6px; margin-left: 6px; vertical-align: 3px; font-stretch: 100%; }
.flash { box-shadow: 0 0 0 4px var(--blue); background: var(--sel); }
.banner { border: 2px solid var(--red); border-left-width: 8px; border-radius: 3px; padding: 12px 16px; margin: 0 0 18px; background: var(--grid-soft); max-width: 78ch; }
.banner b { color: var(--red-text); }
.authbar { position: sticky; top: var(--hdr); z-index: 45; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 24px; background: var(--grid-soft); border-top: 2px solid var(--red); border-bottom: 2px solid var(--red); }
.authbar[hidden] { display: none; }
.authbar-t { flex: 1 1 36ch; max-width: 78ch; font-weight: 600; margin: 0; }
.authbar-b { flex: none; }
.more-link { margin-top: 14px; font-weight: 600; }
.call-alt { display: inline-block; margin-top: 10px; color: var(--chalk); font-weight: 600; }
.call-act { display: flex; flex-direction: column; align-items: flex-end; }
.outline-card { margin-top: 14px; border: 2px solid var(--ink); border-radius: 3px; padding: 16px 18px; background: var(--grid-soft); }
.outline-card .det { margin-top: 0; margin-bottom: 12px; }

/* header additions */
.top .tools { gap: 4px; }
.tool-icon { position: relative; padding: 0 10px; text-decoration: none; }
.dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--sheet); }
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; padding: 0 8px; white-space: nowrap; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); display: inline-block; }
.sync[data-status="saving"] .sync-dot { background: transparent; border: 2px solid var(--blue); }
.sync[data-status="offline"] .sync-dot, .sync[data-status="blocked"] .sync-dot, .sync[data-status="signin"] .sync-dot, .sync[data-status="full"] .sync-dot { background: var(--red); }
.sync[data-status="offline"], .sync[data-status="blocked"], .sync[data-status="signin"], .sync[data-status="full"] { color: var(--red-text); }
.sync[data-status="local"] .sync-dot { background: var(--dis); }
.timer-chip a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; background: var(--slate); color: var(--chalk); border-radius: 3px; padding: 8px 10px; font: 700 16px/1 var(--font-ui); font-stretch: 70%; font-variant-numeric: tabular-nums; }
.timer-chip.is-paused a { background: var(--grid-soft); color: var(--ink); border: 2px solid var(--line-strong); padding: 6px 8px; }
.timer-chip .ico { width: 16px; height: 16px; }
.tabbar { display: none; }
.sync-float { display: none; }
@media (max-width: 899px) {
  .sync-float:not([hidden]) { display: inline-flex; position: fixed; left: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 55; align-items: center; gap: 8px; background: var(--sheet); border: 2px solid var(--ink); border-radius: 3px; padding: 6px 10px; font-size: 13.5px; font-weight: 600; }
  .sync-float[data-status="offline"], .sync-float[data-status="blocked"], .sync-float[data-status="signin"], .sync-float[data-status="full"] { border-color: var(--red-text); color: var(--red-text); }
  .sync-float[data-status="offline"] .sync-dot, .sync-float[data-status="blocked"] .sync-dot, .sync-float[data-status="signin"] .sync-dot, .sync-float[data-status="full"] .sync-dot { background: var(--red); }
}
.foot-in { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.foot-links { display: flex; gap: 10px; flex-wrap: wrap; }
.foot-replay { display: none; }
.foot { margin-top: 88px; padding: 22px 0 80px; border-top: 2px solid var(--line-strong); }
.foot p { color: var(--ink-2); font-size: 14px; max-width: 72ch; }

/* forms */
.field { display: grid; gap: 4px; margin-top: 14px; min-width: 0; }
.field > label, fieldset.field > legend { font-weight: 600; font-size: 15px; }
.hint { color: var(--ink-2); font-size: 14px; }
input[type="text"], input[type="url"], input[type="date"], input[type="search"], input[type="email"], select, textarea {
  font: 500 16px/1.4 var(--font-ui); color: var(--ink); background: var(--sheet); border: 2px solid var(--ink); border-radius: 3px; padding: 9px 11px; min-height: 44px; width: 100%; max-width: 100%;
}
textarea { resize: vertical; min-height: 84px; font-family: var(--font-ui); }
select { appearance: auto; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--blue); }
input::placeholder, textarea::placeholder { color: var(--dis); }
.f-inline { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; }
.f-inline > label { white-space: nowrap; }
.f-grow { flex: 1; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; line-height: 1.35; min-height: 32px; }
.check input { appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 2.5px solid var(--ink); border-radius: 4px; background: var(--sheet); display: grid; place-items: center; cursor: pointer; }
.check input:checked { border-color: var(--blue); background: var(--grid-soft); }
.check input:checked::after { content: ""; width: 12px; height: 6px; border-left: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(-48deg) translate(1px, -1px); }
.check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 6px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-msg { margin-top: 10px; color: var(--red-text); min-height: 1.4em; }
.file-btn { cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn-danger { background: var(--red-text); border-color: var(--red-text); color: #fff; }
:root[data-theme="dark"] .btn-danger { color: #101215; background: var(--red); border-color: var(--red); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-danger { color: #101215; background: var(--red); border-color: var(--red); } }
.btn-danger-o { color: var(--red-text); border-color: var(--red-text); }
.btn .ico { width: 18px; height: 18px; }

/* dialogs and toast */
.dlg { border: 2px solid var(--ink); border-radius: 4px; padding: 0; background: var(--sheet); color: var(--ink); width: min(560px, calc(100vw - 20px)); max-height: 88vh; overflow: auto; }
.dlg::backdrop { background: rgba(21, 23, 26, .55); }
.dlg-sm { width: min(440px, calc(100vw - 20px)); }
.dlg-lg { width: min(960px, calc(100vw - 20px)); }
.dlg-in { padding: 22px 24px; }
.dlg-act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.dlg-img img { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto 10px; }
.keys { margin-top: 14px; }
.keys > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-strong); align-items: baseline; }
.keys dt { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.keys dd { margin: 0; }
.k-or { color: var(--ink-2); font-size: 13px; }
.more-list { margin-top: 12px; }
.more-list li { border-bottom: 1px solid var(--line-strong); }
.more-list a, .more-b { display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 4px; font: 600 18px/1 var(--font-ui); color: var(--ink); text-decoration: none; background: none; border: 0; text-align: left; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 350; background: var(--ink); color: var(--sheet); border-radius: 3px; padding: 11px 16px; font-weight: 600; max-width: calc(100vw - 32px); box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.pick-b { display: grid; gap: 4px; width: 100%; padding: 6px; border: 2px solid var(--line-strong); background: var(--sheet); border-radius: 3px; cursor: pointer; text-align: left; font-size: 13px; }
.pick-b img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pick-b.is-on { border-color: var(--blue); background: var(--sel); }
.pick-up { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; }

/* art slot with an uploaded image */
.slot-btn { position: absolute; right: 6px; top: 6px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 9px; border-radius: 3px; border: 2px solid var(--ink); background: var(--sheet); color: var(--ink); font: 600 13px/1 var(--font-ui); cursor: pointer; opacity: 0; transition: opacity .12s; }
.slot:hover .slot-btn, .slot:focus-within .slot-btn { opacity: 1; }
@media (pointer: coarse) { .slot-btn { opacity: 1; min-height: 44px; min-width: 44px; } .slot-btn-t { display: none; } }
.slot-btn .ico { width: 16px; height: 16px; }

/* opening */
.opening { display: none; position: fixed; inset: 0; z-index: 200; overflow: hidden; }
.opening-pending .opening { display: block; }
.opening-pending body { overflow: hidden; }
.op-sheet {
  position: absolute; inset: 0; background-color: var(--sheet);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
}
.op-wrap { position: absolute; left: 50%; top: 20vh; width: min(760px, 92vw); transform: translate(-50%, -160%); }
.op-clap { position: relative; height: 62px; }
.op-bar, .op-arm { position: absolute; left: 0; right: 0; height: 30px; border: 3px solid var(--chalk); box-shadow: 0 0 0 3px var(--slate); }
.op-bar { bottom: 0; border-radius: 3px 3px 0 0; background: repeating-linear-gradient(115deg, var(--slate) 0 24px, var(--chalk) 24px 48px); }
.op-arm { bottom: 30px; border-radius: 3px 3px 0 0; transform-origin: 0 100%; transform: rotate(-24deg); background: repeating-linear-gradient(115deg, var(--chalk) 0 24px, var(--slate) 24px 48px); }
.op-pin { position: absolute; left: 9px; bottom: 23px; width: 15px; height: 15px; border-radius: 50%; background: var(--chalk); border: 3px solid var(--slate); z-index: 3; }
.op-board { background: var(--slate); color: var(--chalk); padding: 22px 28px 20px; border-radius: 0 0 4px 4px; margin-top: -2px; border: 3px solid var(--chalk); border-top: 0; }
.op-row { display: flex; gap: 40px; }
.op-l { display: block; font: 500 14px/1.2 var(--font-ui); color: var(--chalk-2); }
.op-big { display: block; font: 800 76px/0.95 var(--font-ui); font-stretch: 62%; }
.op-scene { margin-top: 14px; padding-top: 12px; border-top: 1px solid #55595f; }
.op-title { display: block; font: 800 56px/1 var(--font-ui); font-stretch: 64%; }
.op-foot { margin-top: 14px; display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--chalk-2); }
.op-skip { position: absolute; left: 0; right: 0; bottom: max(26px, env(safe-area-inset-bottom)); text-align: center; color: var(--ink-2); font-size: 15px; padding: 0 16px; }
.op-skip b { color: var(--ink); font: 800 20px/1 var(--font-ui); font-stretch: 70%; margin-right: 6px; border-bottom: 3px solid var(--blue); }
.opening-go .opening { animation: op-fade 1300ms linear both; }
.opening-go .op-wrap { animation: op-slate 1300ms both; }
.opening-go .op-arm { animation: op-clap 1300ms both; }
.opening-static .op-wrap { transform: translate(-50%, 0); }
.opening-static .op-arm { transform: rotate(0); }
.opening.is-skipping { animation: none !important; opacity: 0; transition: opacity .12s linear; }
.opening.is-skipping .op-wrap, .opening.is-skipping .op-arm { animation: none !important; }
@keyframes op-fade { 0%, 65% { opacity: 1; } 100% { opacity: 0; } }
@keyframes op-slate {
  0% { transform: translate(-50%, -160%); animation-timing-function: cubic-bezier(.2, .8, .25, 1); }
  23% { transform: translate(-50%, 0); }
  65% { transform: translate(-50%, 0); animation-timing-function: cubic-bezier(.55, 0, .9, .6); }
  100% { transform: translate(-50%, -170%); }
}
@keyframes op-clap {
  0%, 23% { transform: rotate(-24deg); animation-timing-function: cubic-bezier(.6, 0, 1, .6); }
  29% { transform: rotate(0); }
  32% { transform: rotate(-3.5deg); }
  35%, 100% { transform: rotate(0); }
}

/* lesson refinements */
.chk-box .tick path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.frame.anim .chk-box .tick path { transition: stroke-dashoffset .3s ease-out; }
.frame.is-cur .fno { box-shadow: 0 0 0 3px var(--focus); }
.ftitle:focus-visible { outline-offset: 4px; }
.margin { max-height: none; }
.crumb-mid { flex: 1; text-align: center; color: var(--ink-2); font-size: 15px; }
.videos { display: grid; gap: 18px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-act { display: flex; gap: 16px; align-items: center; margin-top: 10px; flex-wrap: wrap; font-weight: 600; }
.video-more .poster { aspect-ratio: 21 / 6; }
.outline { margin-top: 40px; }
.outline-res { margin-top: 18px; }
.outline-note { margin-top: 18px; padding: 14px 16px; border: 2px solid var(--red); border-radius: 3px; max-width: 66ch; font-family: var(--font-read); font-size: 17px; line-height: 1.55; }
.outline-note b { color: var(--red-text); }
.draft { white-space: pre-line; font: 400 16px/1.55 var(--font-read); margin-top: 6px; }
.xt { margin-top: 28px; }
.review { margin-top: 56px; max-width: 72ch; }
.review-f { display: grid; gap: 4px; }
.review .saved { margin-top: 10px; }
.timer .tclock { font-size: 48px; }
.notes-s { padding-left: 52px; margin-top: 10px; min-height: 24px; }
.gl-w { display: block; font: 500 14px/1.3 var(--font-ui); color: var(--ink-2); margin-top: 4px; }
.aka { display: block; font: 500 14px/1.3 var(--font-ui); color: var(--ink-2); font-stretch: 100%; margin-top: 2px; }
.stamps, .mapshelf { margin-top: 64px; }
.mini { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 6px; }
.mini-f { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; border: 2px solid var(--ink); border-radius: 2px; text-decoration: none; color: var(--ink); background: var(--sheet); }
.mini-f:hover { background: var(--grid-soft); }
.mini-n { font: 800 24px/1 var(--font-ui); font-stretch: 62%; }
.mini-f.is-done { border-color: var(--blue); background: var(--grid-soft); }
.mini-f.is-cur { border-color: var(--red); border-width: 3px; }
.mini-t { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 16px; }
.mini-t .tick { width: 18px; height: 16px; }
.count-g { margin-top: 14px; font-weight: 600; }
.ticks li.aim { background: var(--blue); height: 26px; }
.xd-date { font-size: 13px; color: var(--ink-2); }
.xd-flag { font-size: 13px; font-weight: 700; color: var(--red-text); }
.xd-missed .xd-n { color: var(--red-text); }
.xd.is-here { background: color-mix(in srgb, var(--grid-soft) 70%, transparent); }
.badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 24px; }
.badge { display: flex; gap: 12px; align-items: center; }
.badge-t { display: grid; font-size: 14px; color: var(--ink-2); }
.badge-t b { font: 800 19px/1.1 var(--font-ui); font-stretch: 72%; color: var(--ink); }
.badge-art { width: 56px; height: 56px; flex: none; }
.badge-art .bd-ring { fill: none; stroke: var(--line-strong); stroke-width: 2.5; stroke-dasharray: 4 4; }
.badge-art .bd-bar { fill: var(--line-strong); }
.badge-art .bd-body { fill: none; stroke: var(--line-strong); stroke-width: 2.5; }
.badge-art .bd-n { font: 800 22px/1 var(--font-ui); fill: var(--dis); font-stretch: 62%; }
.badge-art.is-earned .bd-ring { stroke: var(--blue); stroke-dasharray: none; }
.badge-art.is-earned .bd-bar { fill: var(--blue); }
.badge-art.is-earned .bd-body { stroke: var(--blue); fill: var(--grid-soft); }
.badge-art.is-earned .bd-n { fill: var(--blue); }

/* ================= responsive ================= */
/* mid widths: the status keeps its dot and title, its words move to screen readers only, so the menu never collides with it */
.nav-item { white-space: nowrap; }
@media (max-width: 1400px) {
  .top .sync #sync-t { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .top .sync { padding: 0 6px; }
  .js-search { min-width: 0; }
  .js-search .tool-lbl, .js-search .kbd { display: none; }
  .tool-text span { display: none; }
}
@media (min-width: 900px) and (max-width: 1040px) {
  /* the wordmark folds to the clapper logo; its name stays for screen readers */
  .top .brand-name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
@media (max-width: 1180px) {
  .call-grid { grid-template-columns: 170px minmax(0, 1fr) 150px; }
  .ct { font-size: 48px; }
  .lgrid { grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; }
  .board { grid-template-columns: 100px 100px 100px minmax(0, 1fr) 100px 130px; }
  .bt { font-size: 52px; }
  .js-search { min-width: 0; }
  .js-search .tool-lbl, .js-search .kbd { display: none; }
  .tool-text span { display: none; }
}
@media (max-width: 1040px) {
  .nav-item { padding: 8px 9px; }
  .split { gap: 36px; }
  .brand-name { font-size: 22px; }
}
@media (min-width: 901px) and (max-height: 900px) {
  .margin { position: sticky; top: calc(var(--hdr) + 16px); max-height: calc(100vh - var(--hdr) - 32px); overflow: auto; }
}
@media (min-height: 901px) and (min-width: 901px) {
  .margin { position: sticky; top: calc(var(--hdr) + 16px); max-height: calc(100vh - var(--hdr) - 32px); overflow: auto; }
}
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); margin-top: 48px; }
  .pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lgrid { grid-template-columns: minmax(0, 1fr); }
  .margin { order: 2; }
  .mini { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  /* the exposure sheet turns on its side: one row per day */
  .xs { display: block; }
  .xs-gut { display: none; }
  .xs-days { display: block; }
  .xd { display: grid; grid-template-columns: 76px minmax(0, 1fr); border-left: 0; border-top: 1px solid var(--line-strong); }
  .xd:first-child { border-top: 0; }
  .xd-head { display: contents; }
  .xd-h { grid-column: 1; grid-row: 1 / 3; padding: 12px 10px; border-bottom: 0; border-right: 1px solid var(--line-strong); align-items: flex-start; flex-direction: column; gap: 6px; }
  .xd-n { font-size: 46px; }
  .xd-ring { left: -4px; top: -6px; width: 56px; height: 54px; }
  .xd-t { grid-column: 2; grid-row: 1; padding: 12px 14px 6px; }
  .xd-frames { grid-column: 2; grid-row: 2; display: flex; margin: 0 14px 14px; border: 1px solid var(--line-strong); }
  .fr { flex: 1; height: 26px; border-top: 0; border-left: 1px solid var(--line); }
  .fr:first-child { border-left: 0; }
  .fr:nth-child(4n+1):not(:first-child) { border-left-color: var(--line-strong); border-top: 0; }
  .fr.x::before { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 3px; margin: -1.5px 0 0; }
  .fr.x-first::before { left: 50%; top: 50%; }
  .fr.x-first::after { left: 50%; top: 50%; }
  .fr.x-last::after { left: auto; right: 3px; bottom: auto; top: calc(50% - 9px); width: 3px; height: 18px; }
  .xd-todo .fr:not(.off)::before, .xd-in-progress .fr:not(.off):not(.x)::before, .xd-missed .fr:not(.off):not(.x)::before { left: 0; right: 0; top: 50%; bottom: auto; border-left: 0; border-top: 2px dotted var(--line-strong); margin: -1px 0 0; }
  .fr.now::after { inset: 3px 2px; }
  .xd-catch .xd-frames { display: none; }
  .xd-catch .xd-head { padding: 0; }
  .xd-restx { left: 0; right: 0; top: 0; bottom: 0; height: auto; margin: 0; }
  .xd-rest .xd-frames { position: relative; height: 26px; }
  .xd-rest .fr { display: none; }
  .xd-rest .xd-restx { position: absolute; inset: 0; }
}
@media (max-width: 899px) {
  :root { --hdr: 52px; }
  .top { padding: 0 16px; gap: 6px; height: var(--hdr); min-height: 0; }
  .top .nav, .top .tool-text, .top .tool-icon, .top .js-search .tool-lbl, .top .js-search .kbd, .top .foot-replay { display: none; }
  .top .tools { margin-left: auto; }
  .brand-name { font-size: 22px; }
  .js-search, .top .js-theme { padding: 0 10px; min-width: 44px; justify-content: center; }
  .js-theme .tool-lbl { display: none; }
  .top .sync { display: none; }
  .foot-replay { display: inline-flex; }
  .tabbar {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--sheet); border-top: 2px solid var(--line-strong); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 6px 2px;
    color: var(--ink-2); text-decoration: none; font: 600 12px/1 var(--font-ui); background: none; border: 0; cursor: pointer;
  }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--blue); }
  .tabbar .dot { top: 8px; right: 50%; margin-right: -18px; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .wrap { padding-inline: 16px; }
  .authbar { padding: 12px 16px; }
  .page { padding-top: 22px; }
  .h1 { font-size: 40px; }
  .today { padding-top: 22px; }
  .hello h1 { font-size: 42px; }
  .call-grid { grid-template-columns: 1fr 1fr; }
  .cf { padding: 14px 16px 16px; }
  .cf-day { grid-column: 1; }
  .cf-scene { grid-column: 1 / -1; grid-row: 2; border-left: 0; border-top: 1px solid #44484f; }
  .cf-plan { grid-column: 2; grid-row: 1; }
  .cv { font-size: 34px; }
  .cv b { font-size: 52px; }
  .ct { font-size: 46px; }
  .call-foot { padding: 14px 16px 18px; }
  .call-act { align-items: stretch; width: 100%; }
  .call-foot .btn-lg { width: 100%; }
  .expo i { width: 30px; }
  .h2 { font-size: 30px; }
  .week, .shelf { margin-top: 56px; }
  .scene a { grid-template-columns: 40px minmax(0, 1fr) auto 28px; gap: 8px; padding: 12px 4px; }
  .sc-no { font-size: 30px; }
  .sc-t { font-size: 16px; }
  .heat { grid-template-columns: repeat(7, 1fr); }
  .count-n b { font-size: 72px; }
  /* lesson */
  .crumbs { padding-top: 16px; }
  .crumb-mid { order: 3; flex-basis: 100%; text-align: left; }
  .board { grid-template-columns: repeat(3, 1fr); }
  .bc { padding: 12px 14px 14px; }
  .bc-title { grid-column: 1 / -1; grid-row: 2; border-left: 0; border-top: 1px solid #44484f; }
  .bc-len { grid-column: 1 / 3; grid-row: 3; border-left: 0; border-top: 1px solid #44484f; }
  .bc-kind { grid-column: 3; grid-row: 3; border-top: 1px solid #44484f; }
  .bc-goal { grid-row: 4; }
  .bn { font-size: 58px; }
  .bt { font-size: 44px; }
  .bv { font-size: 30px; }
  .bg { font-size: 16px; }
  .ds a, .ds button { min-height: 62px; padding: 8px 6px; grid-template-columns: 1fr; grid-template-areas: "n" "m"; row-gap: 2px; justify-items: center; text-align: center; }
  .dn { font-size: 34px; }
  .dm { justify-self: center; height: 20px; }
  .dt, .dh { display: none; }
  .ds:not(.is-cur) .dm:empty { height: 0; }
  .lgrid { margin-top: 28px; gap: 36px; }
  .frame { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .frame::before { left: 25px; top: 44px; }
  .fno { width: 52px; height: 44px; font-size: 36px; }
  .fmin { font-size: 14px; }
  .fhead { min-height: 44px; gap: 8px; align-items: flex-start; }
  .ftitle { font-size: 23px; padding-top: 6px; }
  .chk { order: 3; }
  .copybox { grid-template-columns: 1fr; }
  .copybox .btn { justify-self: start; }
  .gl { grid-template-columns: 1fr; gap: 2px; }
  .pn { grid-template-columns: 1fr; }
  .pn-next { align-items: flex-start; text-align: left; }
  .poster-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .poster-play .ico { width: 30px; height: 30px; }
  .poster-t { font-size: 17px; }
  .poster-m { font-size: 12.5px; }
  .poster-cap { padding: 8px 12px; }
  .video-more .poster { aspect-ratio: 16 / 9; }
  .keys > div { grid-template-columns: 1fr; gap: 2px; }
  .dlg-in { padding: 18px 16px; }
  .dlg-sheet { margin-bottom: 0; width: 100vw; max-height: 80vh; border-radius: 8px 8px 0 0; }
  .f-inline { grid-template-columns: 1fr; }
  .pal { margin-top: 4vh; }
}
@media (max-width: 520px) {
  .pieces { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .brand-name { font-size: 20px; }
  .tclock { font-size: 46px; }
  .wrapmsg { font-size: 20px; }
  .ct { font-size: 40px; }
  .op-big { font-size: 56px; }
  .op-title { font-size: 40px; }
  .op-row { gap: 24px; }
  .op-board { padding: 16px 18px; }
  .mini { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
  .mini-n { font-size: 20px; }
  .h1 { font-size: 36px; }
}

/* ---------- reduced motion: nothing animates, the opening is a static slate ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
