/* The Enterprise Context Problem — deck styles. Paper & Ink system shared with the Synapse showreel (videos/synapse-showreel/frame.md). */

@font-face { font-family: "Gelasio"; font-weight: 400; font-style: normal; src: url("../assets/fonts/gelasio-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-weight: 400; font-style: italic; src: url("../assets/fonts/gelasio-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-weight: 500; font-style: normal; src: url("../assets/fonts/gelasio-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-weight: 500; font-style: italic; src: url("../assets/fonts/gelasio-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-weight: 600; font-style: normal; src: url("../assets/fonts/gelasio-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-weight: 600; font-style: italic; src: url("../assets/fonts/gelasio-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; src: url("../assets/fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; src: url("../assets/fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; src: url("../assets/fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; src: url("../assets/fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Chivo Mono"; font-weight: 400; src: url("../assets/fonts/chivo-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Chivo Mono"; font-weight: 500; src: url("../assets/fonts/chivo-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #F7F4F3; --paper-deep: #F2EEEB; --sheet: #FFFFFF;
  --ink: #141210; --ink-soft: #242424; --graphite: #4E4D4D; --stone: #918B86; --pebble: #BFB9B4; --mist: #CECAC8;
  --cobalt: #2B59D1; --cobalt-soft: #CFDAF5; --cobalt-mist: #EDF2FE;
  --success: #1A8759; --lock: #C55010; --label: #7A7571;
  --serif: "Gelasio", Georgia, serif; --sans: "Manrope", system-ui, sans-serif; --mono: "Chivo Mono", ui-monospace, monospace;
  --shadow: 0 8px 28px #14121024, 0 2px 6px #14121014;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink-soft); overflow: hidden; }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; }

/* ---------- stage: authored at 1920×1080, scaled to fit ---------- */
#viewport { position: fixed; inset: 0; display: grid; place-items: center; background: var(--paper); }
#stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: 0 0; background: var(--paper); overflow: hidden; }
#field { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; pointer-events: none; }
#grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.05; mix-blend-mode: multiply;
  background-image: radial-gradient(#4E4D4D 0.7px, transparent 0.8px); background-size: 5px 5px; }
#blank { position: absolute; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease); z-index: 50; }
body.is-blank #blank { opacity: 1; }

.slide { position: absolute; inset: 0; padding: 104px 128px; opacity: 0; visibility: hidden; pointer-events: none; }
.slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.notes { display: none; }

/* ---------- type ---------- */
.kicker { font-family: var(--mono); font-size: 22px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--label); display: flex; align-items: center; gap: 18px; }
.kicker .num { color: var(--cobalt); }
.kicker .rule { width: 56px; height: 2px; background: var(--pebble); }
.h1 { font-family: var(--serif); font-weight: 500; font-size: 84px; line-height: 1.06; letter-spacing: -0.02em; color: var(--ink); margin: 28px 0 0; max-width: 1500px; }
.h1 em, .hero em, .h2 em { font-style: italic; color: var(--cobalt); }
.hero { font-family: var(--serif); font-weight: 500; font-size: 132px; line-height: 0.98; letter-spacing: -0.03em; color: var(--ink); margin: 0; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: 60px; line-height: 1.1; letter-spacing: -0.015em; color: var(--ink); margin: 0; }
.sub { font-size: 38px; line-height: 1.35; color: var(--graphite); margin: 28px 0 0; max-width: 1300px; }
.body { font-size: 32px; line-height: 1.4; color: var(--graphite); }
.label { font-family: var(--mono); font-size: 20px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.mono { font-family: var(--mono); }
.cobalt { color: var(--cobalt); }
.ink { color: var(--ink); }
.muted { color: var(--stone); }
.ok { color: var(--success); }
.lockc { color: var(--lock); }

/* ---------- components ---------- */
.sheet { background: var(--sheet); border-radius: 16px; box-shadow: var(--shadow); }
.card { background: var(--sheet); border-radius: 16px; box-shadow: var(--shadow); padding: 32px 36px; }
.chip { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 20px; letter-spacing: 0.06em; color: var(--ink-soft);
  background: var(--sheet); border: 1.5px solid var(--mist); border-radius: 999px; padding: 9px 18px; white-space: nowrap; }
.chip.live { border-color: var(--cobalt); color: var(--cobalt); background: var(--cobalt-mist); }
.chip.next { border-style: dashed; color: var(--graphite); background: transparent; }
.chip.lock { border-color: var(--lock); color: var(--lock); }
.chip.okc { border-color: var(--success); color: var(--success); }
.tag { font-family: var(--mono); font-size: 16px; letter-spacing: 0.16em; text-transform: uppercase; padding: 6px 12px; border-radius: 6px; }
.tag.today { color: var(--success); background: #1A87591A; }
.tag.next { color: var(--cobalt); background: var(--cobalt-mist); }
.dotlive { width: 12px; height: 12px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 0 0 6px var(--cobalt-soft); display: inline-block; }
.hl { position: relative; }
.hl::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: 4px; height: 0.38em; background: var(--cobalt-soft); z-index: -1; transform-origin: 0 50%; transform: scaleX(var(--hl, 0)); }

/* system "monolith" node */
.sys { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sys .box { width: 92px; height: 92px; border-radius: 14px; background: var(--sheet); border: 2px solid var(--ink-soft); display: grid; place-items: center; box-shadow: var(--shadow); position: relative; }
.sys .box i { width: 44px; height: 6px; background: var(--ink-soft); border-radius: 3px; box-shadow: 0 14px 0 var(--pebble), 0 -14px 0 var(--pebble); }
.sys .name { font-family: var(--mono); font-size: 19px; letter-spacing: 0.08em; color: var(--ink-soft); white-space: nowrap; text-transform: uppercase; }
.sys .lockbadge { position: absolute; right: -14px; top: -14px; width: 36px; height: 36px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--lock); display: grid; place-items: center; opacity: 0; }
.padlock { width: 16px; height: 13px; background: var(--lock); border-radius: 3px; position: relative; margin-top: 6px; }
.padlock::before { content: ""; position: absolute; left: 3px; top: -9px; width: 10px; height: 10px; border: 2.5px solid var(--lock); border-bottom: none; border-radius: 6px 6px 0 0; box-sizing: border-box; }

/* agent node */
.agent { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.agent .core { width: 120px; height: 120px; border-radius: 50%; background: var(--sheet); border: 2.5px solid var(--cobalt); display: grid; place-items: center; box-shadow: 0 0 0 14px var(--cobalt-mist), var(--shadow); }
.agent .core span { width: 30px; height: 30px; border-radius: 50%; background: var(--cobalt); }

/* host icon */
.host { width: 72px; height: 72px; border-radius: 18px; background: var(--sheet); box-shadow: var(--shadow); display: grid; place-items: center; }
.host img { width: 40px; height: 40px; }

/* chat */
.chat { padding: 36px 40px; display: flex; flex-direction: column; gap: 22px; }
.chat .who { font-family: var(--mono); font-size: 18px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.bub { font-size: 30px; line-height: 1.4; color: var(--ink-soft); }
.bub.user { align-self: flex-end; background: var(--paper-deep); padding: 18px 26px; border-radius: 22px 22px 6px 22px; max-width: 92%; }
.bub.ai { padding: 4px 0; }
.toolcall { font-family: var(--mono); font-size: 20px; color: var(--graphite); background: var(--paper); border: 1.5px solid var(--mist); border-radius: 10px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; }
.toolcall b { color: var(--cobalt); font-weight: 500; }
.stamp { font-family: var(--mono); font-size: 18px; letter-spacing: 0.16em; padding: 6px 12px; border: 2px solid currentColor; border-radius: 6px; display: inline-block; text-transform: uppercase; }

/* code / terminal */
.term { background: var(--sheet); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.term .bar { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 22px; border-bottom: 1.5px solid var(--paper-deep); }
.term .bar i { width: 13px; height: 13px; border-radius: 50%; background: var(--mist); }
.term .bar span { margin-left: 14px; font-family: var(--mono); font-size: 17px; color: var(--stone); letter-spacing: 0.06em; }
.term pre { margin: 0; padding: 28px 34px; font-family: var(--mono); font-size: 25px; line-height: 1.62; color: var(--ink-soft); white-space: pre; }
.term .p { color: var(--cobalt); }
.term .c { color: var(--stone); }
.term .k { color: var(--cobalt); }
.term .s { color: var(--success); }
.term .ln { display: block; min-height: 1.62em; }
.caret { display: inline-block; width: 0.55em; height: 1.1em; background: var(--cobalt); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* lines drawn in SVG */
svg.wires { position: absolute; inset: 0; width: 1920px; height: 1080px; overflow: visible; pointer-events: none; }
svg.wires .w { fill: none; stroke: var(--stone); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; }
svg.wires .w.ink { stroke: var(--ink-soft); stroke-dasharray: none; }
svg.wires .w.live { stroke: var(--cobalt); stroke-dasharray: none; stroke-width: 3; }
svg.wires .w.lock { stroke: var(--lock); }

/* nav affordance (auto-hides) */
#nav { position: fixed; right: 22px; bottom: 20px; display: flex; gap: 8px; align-items: center; opacity: 0; transition: opacity 0.4s; z-index: 60; }
body.show-nav #nav { opacity: 1; }
#nav button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--mist); background: var(--sheet); color: var(--ink-soft); font-size: 18px; cursor: pointer; display: grid; place-items: center; }
#nav button:hover { border-color: var(--cobalt); color: var(--cobalt); }
#nav .count { font-family: var(--mono); font-size: 13px; color: var(--stone); letter-spacing: 0.1em; padding: 0 8px; }
#progress { position: fixed; left: 0; bottom: 0; height: 3px; background: var(--cobalt); width: 0; transition: width 0.6s var(--ease); opacity: 0; z-index: 60; }
body.show-nav #progress { opacity: 0.8; }

/* overview / jump list */
#overview { position: fixed; inset: 0; background: #F7F4F3F2; z-index: 70; display: none; padding: 56px 72px; overflow: auto; }
body.show-overview #overview { display: block; }
#overview h3 { font-family: var(--mono); font-weight: 400; font-size: 14px; letter-spacing: 0.16em; color: var(--label); text-transform: uppercase; margin: 0 0 24px; }
#overview ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
#overview li { background: var(--sheet); border-radius: 12px; padding: 16px 18px; cursor: pointer; border: 1.5px solid transparent; font-size: 16px; line-height: 1.35; color: var(--ink-soft); }
#overview li:hover, #overview li.cur { border-color: var(--cobalt); }
#overview li small { display: block; font-family: var(--mono); font-size: 12px; color: var(--stone); letter-spacing: 0.1em; margin-bottom: 6px; }

/* help */
#help { position: fixed; left: 24px; bottom: 20px; font-family: var(--mono); font-size: 12px; color: var(--stone); letter-spacing: 0.06em; z-index: 60; opacity: 0; transition: opacity 0.4s; }
body.show-nav #help { opacity: 1; }

/* ---------- presenter view ---------- */
body.presenter { overflow: hidden; background: #ECE7E4; }
body.presenter #viewport, body.presenter #nav, body.presenter #progress, body.presenter #help { display: none; }
#presenter { display: none; position: fixed; inset: 0; padding: 22px; gap: 18px; grid-template-columns: 1.55fr 1fr; grid-template-rows: auto 1fr auto; font-family: var(--sans); }
body.presenter #presenter { display: grid; }
#presenter .pv-top { grid-column: 1 / 3; display: flex; align-items: center; gap: 22px; }
#presenter .pv-clock { font-family: var(--mono); font-size: 44px; color: var(--ink); letter-spacing: 0.02em; }
#presenter .pv-clock.over { color: var(--lock); }
#presenter .pv-btn { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; border: 1.5px solid var(--mist); background: var(--sheet); border-radius: 999px; padding: 9px 16px; cursor: pointer; color: var(--ink-soft); }
#presenter .pv-btn:hover { border-color: var(--cobalt); color: var(--cobalt); }
#presenter .pv-section { margin-left: auto; text-align: right; }
#presenter .pv-section b { display: block; font-size: 20px; color: var(--ink); }
#presenter .pv-section span { font-family: var(--mono); font-size: 13px; color: var(--label); letter-spacing: 0.08em; }
#presenter .pv-bar { grid-column: 1 / 3; display: flex; gap: 4px; height: 30px; }
#presenter .pv-bar div { position: relative; border-radius: 6px; background: var(--sheet); overflow: hidden; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--graphite); display: flex; align-items: center; padding-left: 10px; white-space: nowrap; }
#presenter .pv-bar div.cur { outline: 2px solid var(--cobalt); }
#presenter .pv-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--cobalt-soft); z-index: -0; }
#presenter .pv-bar div span { position: relative; }
#presenter .pv-main { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
#presenter .pv-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
#presenter .frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
#presenter .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
#presenter .frame .cap { position: absolute; left: 12px; top: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--label); z-index: 2; background: #F7F4F3E0; padding: 4px 8px; border-radius: 5px; }
#presenter .pv-meta { display: flex; align-items: baseline; gap: 16px; }
#presenter .pv-meta b { font-family: var(--mono); font-size: 18px; color: var(--cobalt); }
#presenter .pv-meta span { font-size: 18px; color: var(--ink); }
#presenter .pv-meta em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 14px; color: var(--label); letter-spacing: 0.08em; }
#presenter .pv-notes { flex: 1; min-height: 0; overflow: auto; background: var(--sheet); border-radius: 12px; padding: 22px 26px; font-size: 22px; line-height: 1.5; color: var(--ink-soft); }
#presenter .pv-notes p { margin: 0 0 12px; }
#presenter .pv-notes ul { margin: 0 0 12px; padding-left: 22px; }
#presenter .pv-notes .say { font-family: var(--serif); font-style: italic; color: var(--ink); }
#presenter .pv-notes .cue { font-family: var(--mono); font-size: 15px; color: var(--cobalt); letter-spacing: 0.06em; }
#presenter .pv-notes .src { font-family: var(--mono); font-size: 13px; color: var(--stone); }
#presenter .pv-steps { font-family: var(--mono); font-size: 13px; color: var(--label); letter-spacing: 0.08em; }

/* highlighter: a soft cobalt band from cap height to just under the baseline, swept left→right via --mk */
.mark { background-image: linear-gradient(var(--cobalt-soft), var(--cobalt-soft)); background-repeat: no-repeat;
  background-position: 0 62%; background-size: calc(var(--mk, 1) * 100%) 66%; border-radius: 6px;
  padding: 0 0.14em; margin: 0 -0.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
