/* Shell: quiet chrome around a 1920x1080 stage. One light theme, chosen to sit behind the slides.
   Colours and fonts match the _Shell section in Figma (variables "Portfolio / Shell colors"). */
:root {
  --paper: #f4f5f1;      /* Shell/Paper: page */
  --surface: #ffffff;    /* Shell/Surface: cards, the stage frame */
  --ink: #141513;        /* Shell/Ink: text, active marks */
  --muted: #6d706a;      /* Shell/Muted: secondary text */
  --line: #d6d9d1;       /* Shell/Line: hairlines, idle marks */
  --square: #f1d6d3;     /* Shell/Square */
  --current: #dfe9df;    /* the current slide's row in Contents (a plain fill in Figma, not a variable) */
  --letterbox: #0f100e;  /* Shell/Letterbox: around the stage in full screen */
  --error: #b3261e;      /* a wrong password (not in Figma) */
  --ui: "Roboto", "Helvetica Neue", Arial, sans-serif;                      /* interface text */
  --display: "Bricolage Grotesque", "Roboto", "Helvetica Neue", sans-serif;  /* the cover title */
  --reading: "Hanken Grotesk", "Roboto", "Helvetica Neue", sans-serif;       /* speaker notes */
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;              /* act labels */
  --bar: 56px;
  /* Motion curves, used here and in slides/slides.css */
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);   /* things arriving: answers at once, lands softly */
  --ease-in-out: cubic-bezier(0.5, 0, 0.1, 1);  /* things already on screen moving across it */
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);  /* bigger things arriving (rise boxes): a gentler start, a longer glide */
  --ease-pan: cubic-bezier(0.37, 0, 0.63, 1);  /* photo pans (deck.js: pan): a gentle, even in-out (sine), like a camera pan */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* No focus boxes anywhere in the shell (the owner's call, 16 November 2026). Keyboard focus shows the same change
   as hovering instead, set next to each control's :hover rule below. */
:focus-visible { outline: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0; font: 400 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

#app { height: 100%; display: flex; flex-direction: column; }
.top, .bottom { flex: none; }

/* ---------- top bar: contents + title on the left, views in the middle, full screen on the right ---------- */
.top { height: var(--bar); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.top .left { justify-self: start; display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand { font: 400 15px/1.5 var(--ui); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 24px; height: 100%; }
.tabs button { position: relative; height: 100%; color: var(--muted); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-current="page"] { color: var(--ink); }
.tabs button[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.tabs button:focus-visible { outline: none; color: var(--ink); }   /* no box around the tab; keyboard focus just darkens the label */
.tools { justify-self: end; display: flex; align-items: center; gap: 4px; }
.icon { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--ink); }
.icon:hover, .icon:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.brand:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.icon:disabled { color: var(--line); cursor: default; background: none; }
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }
[data-view="cover"] .top { display: none; }
#btn-audience { display: none; }
[data-view="present"] #btn-audience { display: inline-grid; }   /* the eye: Speaker Notes only */

/* ---------- views ---------- */
main { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; outline: none; }
.view { display: none; height: 100%; }
[data-view="cover"] .v-cover, [data-view="slides"] .v-slides, [data-view="present"] .v-present { display: block; }
/* audience window: the slide alone, letterboxed, no bars */
[data-view="audience"] .v-slides { display: block; padding: 0; }
[data-view="audience"] .top, [data-view="audience"] .bottom { display: none; }
[data-view="audience"] main { background: var(--letterbox); }
[data-view="audience"] .frame { box-shadow: none; }

/* cover */
.v-cover { overflow: auto; }
.cover { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 48px 24px; text-align: center; }
.cover-logo { width: 200px; height: 176px; color: var(--ink); }
.cover h1 { margin: 0; font: 600 clamp(34px, 5.2vw, 60px)/1.02 var(--display); font-variation-settings: "opsz" 14; letter-spacing: -.035em; text-wrap: balance; }
.cover .eyebrow:empty { display: none; }
.cover-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.pill { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; min-width: 148px; height: 44px; padding: 0 22px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 500; }
.pill.solid { background: var(--ink); color: var(--paper); border-width: 1px; }
.pill:hover, .pill:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.pill.solid:hover, .pill.solid:focus-visible { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }

/* stage */
.v-slides { padding: 24px; }
.fit { width: 100%; height: 100%; display: grid; place-items: center; }
.frame { position: relative; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }

/* speaker notes (presenter view) */
.v-present { overflow: auto; }
/* As wide as the window allows, but no wider than keeps the slide, its count and "Up next" within the window's height
   (the slide is two thirds of the width, 16:9; 260 px covers the top bar, paddings, count row and Up next). */
.p-wrap { max-width: max(1500px, min(2600px, calc((100vh - 260px) * 2.667 + 88px))); margin: 0 auto; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 20px; }
.p-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.p-tools[hidden] { display: none; }
.p-size, .p-timer { display: flex; align-items: center; gap: 6px; }
.p-size output { min-width: 28px; text-align: center; color: var(--muted); font-size: 13px; }
.p-time { font-size: 34px; line-height: 1; letter-spacing: -.02em; margin-right: 10px; }
.p-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.p-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.p-fit { height: auto; aspect-ratio: 16 / 9; }
/* under the slide, one row: Up next on the left; the count and the arrows on the right (the owner's layout, 18 November 2026) */
.p-meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 4px; }
.p-move { flex: none; display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; }
.p-next { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.p-next-title { margin: 0; font: 500 20px/1.2 var(--ui); letter-spacing: -.02em; }
.p-notes { --note: 19px; font-family: var(--ui); font-weight: 400; font-size: var(--note); line-height: 1.55; }
.p-notes p { margin: 0 0 .8em; white-space: pre-line; }
.p-notes .empty { color: var(--muted); }
/* step markers in the notes of a stepped slide ("[Step 2]" in deck.js): a small label on a hairline; the current
   step's notes at full strength, the others dimmed */
.p-notes .step-mark { display: flex; align-items: center; gap: 10px; margin: 1.1em 0 .7em; font: 500 12px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.p-notes .step-mark::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.p-notes .note-step:first-child .step-mark { margin-top: 0; }
.p-notes .note-step { transition: opacity 150ms ease; }
.p-notes .note-step + .note-step { margin-top: 1.5em; }   /* more air between steps (the owner's call, 18 November 2026) */
.p-notes.has-steps .note-step:not(.now) { opacity: .45; }

/* ---------- bottom bar ---------- */
/* Three columns: logo on the left, dots centred on the whole bar, count and arrows on the right. */
.bottom { position: relative; height: var(--bar); display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; gap: 12px; padding: 0 24px; }
.bottom-start { justify-self: start; display: flex; align-items: center; gap: 12px; }   /* restart, then contents (moved from the top bar, 18 November 2026) */
.bottom-end { justify-self: end; display: flex; align-items: center; gap: 12px; }
[data-view="cover"] .bottom, [data-view="present"] .bottom { display: none; }
.track { min-width: 0; display: flex; justify-content: safe center; align-items: center; gap: 12px; overflow: hidden; padding: 0 4px; }
.track .act { display: flex; flex: none; }
.sq { flex: none; width: 12px; height: 28px; display: flex; align-items: center; justify-content: center; }
.sq::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .15s, transform .15s; }
@media (max-width: 1100px) { .sq { width: 8px; } .sq::before { width: 5px; height: 5px; } .track { gap: 8px; } }
/* Dots before the current slide are darker. No focus outline on the dots: it drew bars beside them after a click. */
.sq.past::before { background: var(--muted); }
.sq:focus-visible { outline: none; }
/* The slide area takes focus when clicked; its outline drew a dark line under the top bar. */
#main:focus, #main:focus-visible { outline: none; }
.sq:hover::before, .sq:focus-visible::before { background: var(--ink); }
.sq[aria-current="true"]::before { background: var(--ink); transform: scale(1.375); }
.count { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.count b { color: var(--ink); font-weight: 500; }
.arrows { display: inline-flex; gap: 2px; }
.only-full { display: none; }
.tip { position: absolute; bottom: calc(100% - 6px); transform: translateX(-50%); padding: 5px 9px; border-radius: 5px; background: var(--ink); color: var(--paper); font-size: 12.5px; white-space: nowrap; pointer-events: none; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }

/* ---------- index overlay (I key) ---------- */
.index { position: fixed; inset: 0; z-index: 20; background: var(--paper); overflow: auto; padding: 0 24px 64px; }
.index[hidden] { display: none; }
.index-head { position: sticky; top: 0; height: var(--bar); display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid var(--line); margin: 0 -24px; padding: 0 24px; }
.index-body { max-width: 1100px; margin: 0 auto; }
.index-body h2 { margin: 36px 0 12px; font: 400 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.card { aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); }
.card:hover, .card:focus-visible { border-color: var(--ink); }
.card[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card .n { font: 400 12px/1 var(--ui); color: var(--muted); display: flex; gap: 8px; width: 100%; justify-content: space-between; }
.card .t { font: 600 16px/1.2 var(--ui); letter-spacing: -.015em; }

/* ---------- contents overlay ---------- */
.contents { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--ink) 60%, transparent); }
.contents[hidden] { display: none; }
.contents-card { width: min(920px, 100%); height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border-radius: 10px; }
.contents-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 32px 32px 0 40px; }
.contents-head h2 { margin: 0; font: 400 24px/1 var(--ui); letter-spacing: -.04em; }
.contents-search[hidden] { display: none; }
.contents-search { display: flex; align-items: center; gap: 12px; margin: 22px 40px 0; border-bottom: 1px solid var(--line); cursor: text; }
.contents-search:focus-within { border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.contents-search svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: square; }
.contents-search input { flex: 1; min-width: 0; padding: 14px 0; border: 0; outline: none; background: none; color: var(--ink); font: 400 17px var(--reading); }
.contents-search input::placeholder { color: var(--muted); }
.contents-list { overflow: auto; padding: 0 40px 32px; }
.c-act { margin: 0; padding: 30px 0 10px; border-bottom: 1px solid var(--line); }
.c-row { width: 100%; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; padding: 16px; border-bottom: 1px solid var(--line); text-align: left; }
.c-row .n { font: 400 13px var(--ui); color: var(--muted); }
.c-row .t { justify-self: start; font: 500 20px/1.2 var(--ui); letter-spacing: -.02em; padding: 1px 6px; }
.c-row:hover .t { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.c-row[aria-current="true"] { background: var(--current); }
.c-row[aria-current="true"] .t { padding: 4px 8px; }
.c-row:focus-visible { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.c-row:focus-visible .t { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.contents-empty { margin: 0; padding: 28px 40px 40px; color: var(--muted); }
@media (max-width: 760px) {
  .contents { padding: 12px; }
  .contents-head { padding: 22px 16px 0 20px; }
  .contents-head h2 { font-size: 32px; }
  .contents-search { margin: 14px 20px 0; }
  .contents-list { padding: 0 20px 24px; }
  .contents-empty { padding: 24px 20px 32px; }
  .c-row .t { font-size: 18px; }
}

/* ---------- password box (gate): opens from the cover when the hosted deck has a password ---------- */
.gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--ink) 60%, transparent); opacity: 0; transition: opacity 200ms var(--ease-out); }
.gate[hidden] { display: none; }
.gate.open { opacity: 1; }
.gate.closing { transition: opacity 150ms ease-in; }
.gate-card { position: relative; width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; padding: 40px 40px 36px; background: var(--paper); border-radius: 10px; text-align: center; box-shadow: 0 24px 64px color-mix(in srgb, var(--ink) 25%, transparent); transform: translateY(8px) scale(.98); transition: transform 300ms var(--ease-out); }
.gate.open .gate-card { transform: none; }
.gate.closing .gate-card { transform: scale(.98); transition: transform 150ms ease-in; }
.gate.wrong .gate-card { animation: gate-shake 320ms var(--ease-out); }
@keyframes gate-shake { 20% { translate: -6px 0; } 45% { translate: 5px 0; } 70% { translate: -3px 0; } 100% { translate: 0 0; } }
.gate-close { position: absolute; top: 12px; right: 12px; }
.gate-logo { width: 64px; height: 56px; color: var(--ink); }
.gate-card h2 { margin: 16px 0 0; font: 600 30px/1.1 var(--display); font-variation-settings: "opsz" 14; letter-spacing: -.03em; text-wrap: balance; }
.gate-blurb { margin: 8px 0 0; color: var(--muted); }
.gate-label { align-self: stretch; margin: 28px 0 8px; text-align: left; font-weight: 500; }
.gate-input { width: 100%; height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 400 16px var(--ui); outline: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
.gate-input:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.gate-input:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.gate.wrong .gate-input, .gate-input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.gate-error { align-self: stretch; min-height: 20px; margin: 8px 0 0; text-align: left; font-size: 13px; line-height: 20px; color: var(--error); }
.gate-submit { width: 100%; height: 48px; margin-top: 12px; }
.gate-submit:disabled { cursor: progress; opacity: .7; }
@media (max-width: 760px) { .gate-card { padding: 36px 20px 24px; } .gate-card h2 { font-size: 26px; } }

/* ---------- full screen (real, or the in-page fallback) ---------- */
#app.full .top { display: none; }
#app.full main { background: var(--letterbox); }
#app.full .v-slides { padding: 0; }
#app.full .frame { box-shadow: none; }
#app.full .bottom { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; --paper: #1b1c19; --ink: #f4f5f1; --muted: #a3a69f; --line: #4a4c46; background: #000; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity 150ms ease-in; }
#app.full.peek .bottom, #app.full .bottom:focus-within { opacity: 1; pointer-events: auto; transition: opacity 200ms var(--ease-out); }
#app.full .only-full { display: inline-grid; }
#app.full.idle { cursor: none; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .top { padding: 0 16px; grid-template-columns: auto 1fr auto; }
  .brand { display: none; }
  .tabs { gap: 18px; }
  .v-slides { padding: 12px; }
  .bottom { padding: 0 12px; }
  .track { visibility: hidden; }
  .p-grid { grid-template-columns: 1fr; gap: 24px; }
  .cover-logo { width: 140px; height: 123px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
