@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root { color-scheme:dark; --page:#25292d; --surface:#2e3439; --text:#edf2f5; --muted:#a8b6bf; --line:#ffffff1b; --teal:#62c9c7; --coral:#eda396; --blue:#acc1f4; --violet:#c7ade2; --accent:var(--teal); }
* { box-sizing:border-box; letter-spacing:0; }
[hidden] { display:none !important; }
html { background:var(--page); scroll-padding-top:100px; }
body { margin:0; background:var(--page); color:var(--text); font:16px/1.65 system-ui,sans-serif; }
a { color:var(--blue); }
button { font:inherit; cursor:pointer; color:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:2px solid var(--blue); outline-offset:4px; }
h1,h2,h3,.subject,.chapter-nav,.slide-count,.duration { font-family:'Space Grotesk',system-ui,sans-serif; }
h1,h2,h3 { line-height:1.25; }
svg { width:22px; height:22px; stroke-width:1.8; flex:none; }
.presentation-shell { max-width:1760px; margin:0 auto; padding:16px 32px 72px; }
.toolbar { display:flex; align-items:center; gap:10px; position:sticky; top:10px; z-index:20; min-height:62px; padding:8px; border:1px solid var(--line); border-radius:8px; background:#292f34f5; backdrop-filter:blur(16px); }
.subject { font-size:14px; font-weight:600; margin:0 10px; }
.subject > span { color:var(--muted); font-weight:400; }
.view-switch,.downloads { display:flex; gap:5px; }
.view-switch { margin-left:auto; }
.view-switch .view-option { width:auto; display:flex; gap:8px; padding:0 12px; font-size:13px; white-space:nowrap; }
.mobile-chapters { display:none; }
.downloads { border-left:1px solid var(--line); padding-left:10px; }
.icon-button { position:relative; display:inline-grid; place-items:center; width:42px; height:42px; padding:0; flex:none; border:1px solid var(--line); border-radius:6px; background:#ffffff03; color:#c2d1dd; text-decoration:none; transition:color .16s,background .16s,transform .16s,border-color .16s; }
.icon-button:hover:not(:disabled) { color:var(--text); background:#acc1f419; transform:translateY(-1px); border-color:#acc1f45e; }
.icon-button:active:not(:disabled) { transform:scale(.96); }
.icon-button[aria-pressed=true] { background:#acc1f421; border-color:#acc1f46b; color:var(--blue); }
.icon-button:disabled { opacity:.3; cursor:default; }
[data-tooltip]::after { content:attr(data-tooltip); position:absolute; top:calc(100% + 8px); right:0; z-index:50; width:max-content; max-width:210px; border:1px solid #ffffff28; border-radius:5px; padding:5px 9px; background:#171e24; color:var(--text); font:12px/1.5 system-ui,sans-serif; box-shadow:0 6px 20px #0005; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .15s; }
[data-tooltip]:hover::after,[data-tooltip]:focus-visible::after { opacity:1; visibility:visible; }
.toolbar > a:first-child::after { left:0; right:auto; }
.page-title { padding:30px 4px 27px; display:flex; gap:16px; justify-content:space-between; align-items:center; }
.eyebrow { color:var(--accent); margin:0 0 6px; font-size:11px; font-weight:600; text-transform:uppercase; }
h1 { margin:0; font-size:30px; font-weight:600; }
.duration { display:flex; align-items:center; gap:9px; color:var(--text); font-size:14px; white-space:nowrap; }
.duration svg { color:var(--teal); width:19px; }
.duration > span { color:var(--muted); }
.presentation-layout { display:grid; grid-template-columns:180px minmax(0,1fr); align-items:start; gap:26px; }
.chapter-nav { display:flex; flex-direction:column; gap:5px; position:sticky; top:94px; }
.chapter-nav button { display:grid; grid-template-columns:25px minmax(0,1fr); gap:7px; align-items:center; text-align:left; padding:12px 10px; min-height:60px; border:1px solid transparent; border-left:2px solid transparent; background:transparent; border-radius:0 5px 5px 0; color:var(--muted); font-size:13px; line-height:1.4; transition:background .18s,color .18s,border-color .18s; }
.chapter-nav button > span:first-child { color:var(--accent); font-size:12px; opacity:.6; }
.chapter-nav button:hover { background:#ffffff04; color:var(--text); }
.chapter-nav button[aria-current=true] { border-left-color:var(--accent); background:color-mix(in srgb,var(--accent) 9%,transparent); color:var(--text); }
.chapter-nav button[aria-current=true] > span:first-child { opacity:1; }
.content-column { min-width:0; }
.slide-frame { position:relative; width:100%; aspect-ratio:16/9; overflow:hidden; background:#0b2230; border:1px solid #ffffff19; border-radius:5px; }
.slide-frame > img { width:100%; height:100%; object-fit:contain; display:block; transition:opacity .2s; }
[aria-busy=true] > img { opacity:.15; }
.image-loader { position:absolute; inset:0; display:grid; place-content:center; background:#0b223038; pointer-events:none; }
[aria-busy=false] > .image-loader { display:none; }
.image-error { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:16px; background:#0b2230; color:var(--muted); }
.image-error > span { font-size:14px; }
.spinner { display:inline-block; width:28px; height:28px; border:2px solid #ffffff1e; border-top-color:#f6fbff; border-right-color:#ffffff8c; border-radius:50%; animation:spin .72s linear infinite; filter:drop-shadow(0 0 5px #ffffff55); }
.loading-message,.error-message { min-height:45vh; display:flex; align-items:center; justify-content:center; gap:16px; color:var(--muted); font-size:14px; }
.slide-controls { display:flex; align-items:center; gap:8px; padding:12px 0; border-bottom:1px solid var(--line); }
.slide-count { display:inline-block; min-width:54px; text-align:center; font-size:14px; font-variant-numeric:tabular-nums; }
.slide-timing { margin-left:auto; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; padding-right:10px; }
.speaker-notes { max-width:950px; margin:auto; padding:28px 12px 0; }
.speaker-notes h2 { margin:0 0 20px; font-size:22px; font-weight:500; }
.speaker-notes p,.script-body p { line-height:1.9; margin:0 0 16px; font-size:17px; }
.speaker-notes .eyebrow { line-height:1.5; font-size:11px; margin-bottom:7px; }
.speaker-notes .key-point { margin-top:25px; border-left:2px solid var(--accent); padding:10px 16px; font-size:14px; line-height:1.7; color:var(--accent); background:color-mix(in srgb,var(--accent) 4%,transparent); }
.script-heading { display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--line); padding:0 0 18px; }
.script-heading h2 { font-size:24px; font-weight:500; margin:0; }
.script-heading > span { margin-left:auto; color:var(--muted); font-size:12px; padding-right:8px; }
.script-section { border-bottom:1px solid var(--line); scroll-margin-top:96px; }
.script-section summary { display:flex; align-items:center; gap:16px; padding:23px 6px; cursor:pointer; list-style:none; transition:background .18s; }
.script-section summary::-webkit-details-marker { display:none; }
.script-section summary:hover { background:#ffffff04; }
.script-number { color:var(--accent); font-size:13px; }
.script-section h3 { margin:0; font-size:20px; font-weight:500; }
.script-section summary > span:nth-child(2) { flex:1; min-width:0; }
.script-section summary small { color:var(--muted); font-size:12px; display:block; margin-top:7px; }
.script-section summary svg { width:18px; color:var(--muted); transition:transform .2s; }
.script-section[open] summary svg { transform:rotate(180deg); }
.script-body { padding:0 16px 12px 38px; max-width:960px; animation:enter .2s ease-out; }
.script-body > p:last-child { margin-bottom:16px; }
.spoken-label { color:var(--accent); font-size:12px; font-weight:600; text-transform:uppercase; margin:0 0 8px; }
.script-section > .spoken-label { padding-left:38px; }
.speaker-notes .spoken-label { font-size:12px; margin-bottom:8px; line-height:1.5; }
.notes-only .content-column { max-width:960px; width:100%; }
.signal-relay { list-style:none; counter-reset:relay; margin:22px 0; padding:0; }
.signal-relay li { position:relative; counter-increment:relay; padding:0 0 24px 40px; border-left:1px solid color-mix(in srgb,var(--accent) 40%,transparent); margin-left:12px; }
.signal-relay li::before { content:counter(relay); display:grid; place-items:center; position:absolute; left:-13px; top:0; width:26px; height:26px; background:var(--page); border:1px solid var(--accent); border-radius:50%; color:var(--accent); font-size:12px; }
.signal-relay li:last-child { border-color:transparent; padding-bottom:0; }
.signal-relay strong { display:block; color:var(--accent); font-size:16px; margin:0 0 7px; }
.signal-relay p { margin:0; }
.figure-explanation { border-top:1px solid var(--line); margin-top:30px; padding-top:24px; scroll-margin-top:100px; }
.figure-explanation > h3 { margin:0 0 22px; font-size:21px; font-weight:500; }
.explanation-part { margin:0 0 22px; }
.explanation-part h4 { margin:0 0 7px; color:var(--accent); font-size:16px; font-weight:600; }
.figure-explanation .explanation-part p { font-size:16px; line-height:1.85; margin:0; }
.script-explanation:empty { display:none; }
.script-explanation { max-width:960px; padding:0 16px 20px 38px; }
.backup-reference { margin-top:44px; border-top:2px solid var(--blue); padding-top:24px; scroll-margin-top:130px; }
.backup-reference > h2 { margin:0 0 24px; font-size:24px; font-weight:500; }
.backup-section { border-bottom:1px solid var(--line); padding:24px 4px; max-width:960px; }
.backup-section h3 { color:var(--accent); margin:0 0 18px; font-size:21px; font-weight:500; }
.backup-section ul { padding-left:22px; margin:0; }
.backup-section li { padding-left:5px; margin:0 0 17px; line-height:1.85; }
.backup-section li::marker { color:var(--accent); }
.backup-pathway { padding:15px 18px; border-left:2px solid var(--accent); color:var(--accent); line-height:1.9; }
.terms-reference { margin-top:44px; padding-top:24px; border-top:2px solid var(--teal); scroll-margin-top:100px; }
.terms-heading { display:flex; align-items:center; gap:8px; margin-bottom:20px; }
.terms-heading > div { flex:1; min-width:0; }
.terms-heading h2 { margin:0; font-size:24px; font-weight:500; }
.terms-search-row { display:flex; gap:16px; align-items:center; margin-bottom:18px; }
.terms-search { display:flex; align-items:center; gap:10px; flex:1; min-width:0; padding:8px 12px; border:1px solid var(--line); border-radius:6px; background:#ffffff04; transition:border-color .15s; }
.terms-search:focus-within { border-color:var(--teal); }
.terms-search svg { color:var(--muted); width:18px; }
.terms-search input { width:100%; min-width:0; border:0; padding:4px 0; background:transparent; color:var(--text); font:inherit; font-size:15px; }
.terms-search input:focus-visible { outline:0; }
#terms-count { font-size:12px; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.term-group { border-bottom:1px solid var(--line); }
.term-group summary { display:flex; align-items:center; gap:12px; padding:18px 4px; cursor:pointer; list-style:none; color:var(--accent); transition:background .15s; }
.term-group summary::-webkit-details-marker { display:none; }
.term-group summary:hover { background:#ffffff04; }
.term-group summary h3 { flex:1; min-width:0; font-size:18px; font-weight:500; margin:0; }
.term-group summary > span { color:var(--muted); font-size:12px; }
.term-group summary svg { width:18px; transition:transform .2s; }
.term-group[open] summary svg { transform:rotate(180deg); }
.term-definitions { margin:0; animation:enter .2s ease-out; }
.term-entry { display:grid; grid-template-columns:minmax(130px, 23%) minmax(0, 1fr); gap:20px; padding:16px 4px; border-top:1px solid #ffffff0b; }
.term-entry dt { color:var(--accent); font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.term-entry dd { margin:0; font-size:15px; line-height:1.8; overflow-wrap:anywhere; }
.term-sources { display:flex; gap:8px 20px; flex-wrap:wrap; margin:12px 4px 20px; font-size:12px; }
.term-sources a { color:var(--muted); text-decoration:none; }
.term-sources a:hover { color:var(--blue); }
#terms-empty { color:var(--muted); padding:16px 0; }
.term { cursor:help; border:0; border-radius:2px; color:inherit; background:transparent; text-decoration:none; -webkit-tap-highlight-color:transparent; }
.term-tooltip { position:fixed; z-index:100; width:300px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow-y:auto; overscroll-behavior:contain; padding:14px 16px; background:#171f26f7; border:1px solid #62c9c743; border-radius:6px; box-shadow:0 10px 35px #0005; backdrop-filter:blur(16px); }
.term-tooltip strong { display:block; color:var(--teal); font-weight:600; font-size:14px; }
.term-tooltip p { margin:6px 0 0; font-size:13px; line-height:1.7; color:#d1dce2; }
.background-notes { margin-top:22px; border-top:1px solid var(--line); }
.background-notes > summary { padding:12px 0; cursor:pointer; color:var(--muted); font-size:14px; }
.background-notes ul { padding-left:20px; }
.background-notes li { margin-bottom:12px; }
[data-tone=coral] { --accent:var(--coral); }
[data-tone=teal] { --accent:var(--teal); }
[data-tone=blue] { --accent:var(--blue); }
[data-tone=violet] { --accent:var(--violet); }
#presentation-dialog { width:100vw; height:100dvh; max-width:100vw; max-height:100dvh; border:0; padding:0; margin:0; background:#08171e; color:var(--text); overflow:hidden; }
#presentation-dialog[open] { display:grid; grid-template-rows:minmax(0,1fr) auto; }
#presentation-dialog::backdrop { background:#08171e; }
.theatre-frame { position:relative; display:grid; place-items:center; min-height:0; overflow:auto; overscroll-behavior:contain; }
.theatre-frame > img { display:block; width:100%; height:100%; object-fit:contain; min-height:0; }
.theatre-controls { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:8px; padding:10px 18px max(10px,env(safe-area-inset-bottom)); border-top:1px solid #ffffff16; background:#111f27; }
.theatre-controls [data-tooltip]::after { top:auto; bottom:calc(100% + 8px); }
.rehearsal-clock { display:flex; align-items:center; gap:8px; margin:0 20px; }
#timer { min-width:50px; text-align:center; font-variant-numeric:tabular-nums; font-size:17px; color:var(--teal); }
#timer.is-near { color:#e7c78b; }
#timer.is-over { color:var(--coral); }
#presentation-dialog.zoomed .theatre-frame { display:block; }
#presentation-dialog.zoomed .theatre-frame > img { width:max(100%,1280px); height:auto; max-width:none; }
body.presenting { overflow:hidden; }
.skip-link { position:fixed; top:-100px; z-index:100; padding:10px; background:var(--surface); }
.skip-link:focus { top:10px; }
.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; }
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes enter { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
@media (min-width:1800px) { .presentation-layout { grid-template-columns:205px minmax(0,1fr); gap:34px; } }
@media (max-width:1000px) {
    .presentation-shell { padding:12px 20px 50px; }
    .presentation-layout { grid-template-columns:1fr; gap:15px; }
    .chapter-nav { position:static; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
    .chapter-nav button { min-height:48px; padding:9px; border:1px solid var(--line); border-radius:5px; }
    .chapter-nav button[aria-current=true] { border-color:color-mix(in srgb,var(--accent) 55%,transparent); }
    h1 { font-size:26px; }
    .duration > span { display:none; }
}
@media (max-width:620px) {
    .presentation-shell { padding:8px 12px 45px; }
    .toolbar { top:5px; gap:7px; flex-wrap:wrap; padding:7px; }
    .subject { flex:1; margin:0 4px; font-size:12px; }
    .subject > span { display:none; }
    .downloads { padding-left:0; border-left:0; }
    .toolbar .icon-button { width:36px; height:38px; }
    .toolbar svg { width:20px; height:20px; }
    .view-switch { margin-left:0; }
    .page-title { display:block; padding:24px 2px 20px; }
    h1 { font-size:25px; }
    .duration { margin-top:13px; font-size:12px; }
    .duration > span { display:inline; }
    .chapter-nav { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .chapter-nav button { display:flex; flex-direction:column; align-items:flex-start; gap:3px; font-size:11px; min-height:65px; }
    .chapter-nav button > span:first-child { font-size:10px; }
    .slide-timing { padding-right:0; font-size:11px; }
    .slide-controls { gap:4px; }
    .slide-controls .icon-button { width:38px; height:38px; }
    .slide-count { min-width:45px; font-size:12px; }
    .speaker-notes { padding:24px 2px 0; }
    .speaker-notes h2 { font-size:21px; }
    .speaker-notes p,.script-body p { font-size:16px; line-height:1.85; }
    .script-body { padding:0 4px 14px; }
    .script-explanation { padding:0 4px 20px; }
    .script-section h3 { font-size:18px; }
    .script-heading h2 { font-size:21px; }
    .script-heading > span { display:none; }
    .script-heading .terms-jump { margin-left:auto; }
    .terms-heading h2 { font-size:21px; }
    .term-entry { grid-template-columns:1fr; gap:6px; }
    .script-section summary { gap:10px; }
    .rehearsal-clock { margin:0 2px; gap:2px; }
    .theatre-controls { gap:3px; padding:8px 4px; }
    .theatre-controls .icon-button { width:34px; height:38px; }
    .theatre-controls .slide-count { min-width:37px; }
    #timer { min-width:44px; font-size:14px; }
}
@media (max-width:370px) {
    .subject { font-size:11px; margin:0; }
    .toolbar { gap:4px; }
    .toolbar .icon-button { width:33px; }
    .view-switch,.downloads { gap:3px; }
    .chapter-nav { gap:4px; }
}
@media (max-width:760px), (pointer:coarse) and (max-width:1000px) {
    html { scroll-padding-top:84px; }
    .presentation-shell { padding:8px 14px 48px; }
    .toolbar { top:5px; min-height:54px; padding:5px; gap:6px; flex-wrap:nowrap; }
    .toolbar .icon-button { width:42px; height:42px; }
    .toolbar .subject { flex:1; min-width:0; margin:0 3px; font-size:12px; }
    .subject > span,.view-switch,.slide-download,#chapters,#deck-view,#presentation-dialog { display:none !important; }
    .downloads { border:0; padding:0; gap:4px; }
    .mobile-chapters { display:flex; align-items:center; gap:9px; border-bottom:1px solid var(--line); margin:10px 0 0; padding:4px 0 8px; color:var(--muted); }
    .mobile-chapters svg { width:19px; }
    .mobile-chapters select { min-width:0; width:100%; min-height:40px; padding:6px 2px; color:var(--text); background:var(--page); border:0; font:14px/1.4 system-ui,sans-serif; }
    .page-title { display:block; padding:20px 0 18px; }
    .page-title .eyebrow { display:none; }
    .page-title h1 { font-size:22px; line-height:1.3; }
    .duration { font-size:12px; margin-top:9px; }
    .presentation-layout { display:block; }
    #full-script { display:block !important; }
    .script-heading { gap:6px; padding-bottom:12px; }
    .script-heading > span { display:none; }
    .script-heading h2 { font-size:18px; }
    .script-heading .terms-jump { margin-left:auto; }
    .script-heading .icon-button { width:40px; height:40px; }
    .script-section,.backup-reference,.terms-reference { scroll-margin-top:8px; }
    .script-section summary { padding:22px 0 16px; gap:10px; align-items:flex-start; }
    .script-number { font-size:15px; line-height:1.6; flex:none; min-width:23px; }
    .script-section h3 { font-size:19px; line-height:1.35; }
    .script-section summary small { font-size:11px; margin-top:6px; }
    .script-section summary svg { margin-top:4px; flex:none; }
    .script-section > .spoken-label { padding:0; }
    .script-body,.script-explanation { padding:0 0 18px; }
    .script-body p { font-size:17px; line-height:1.7; margin-bottom:13px; }
    .figure-explanation { margin-top:7px; padding-top:19px; }
    .figure-explanation > h3 { font-size:20px; line-height:1.4; margin-bottom:22px; }
    .explanation-part { margin-bottom:23px; }
    .explanation-part h4 { font-size:16px; line-height:1.45; margin-bottom:8px; }
    .figure-explanation .explanation-part p,.backup-section li { font-size:16px; line-height:1.7; }
    .signal-relay li { padding-left:28px; }
    .backup-section { padding:22px 0; }
    .backup-section h3 { font-size:20px; line-height:1.4; }
    .term-entry { grid-template-columns:1fr; gap:7px; padding:16px 0; }
    .term-sources { margin-left:0; line-height:1.6; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none !important; animation:none !important; scroll-behavior:auto !important; } }
@media print {
    :root { color-scheme:light; }
    body { color:#17232b; background:white; }
    .toolbar,.chapter-nav,.mobile-chapters,.page-title .duration,#deck-view,.script-heading .icon-button,.terms-heading button,.terms-search-row,.term-tooltip,.skip-link,dialog { display:none !important; }
    .presentation-shell { padding:0; }
    .presentation-layout { display:block; }
    #full-script { display:block !important; }
    .script-section { break-inside:avoid; }
    .script-section summary { color:#17232b; }
    .script-body { padding:0; }
    .script-body p { font-size:11pt; line-height:1.6; }
    .term { color:inherit; background:none; }
    .term-group summary,.term-entry dt { color:#17232b; }
    .term-entry { break-inside:avoid; }
    .explanation-part { break-inside:avoid; }
    .explanation-part h4 { color:#17232b; }
    .backup-section li { break-inside:avoid; }
    .backup-section h3,.backup-pathway { color:#17232b; }
    .signal-relay li { break-inside:avoid; }
    .signal-relay li::before { background:white; }
    .signal-relay strong,.spoken-label { color:#17232b; }
}
