/* Workshop slides. Brand tokens only (tokens.css loads first); square corners, rules over
   boxes. The three parts keep one colour each everywhere: model ochre, harness teal,
   runtime graphite/ink. */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-read); -webkit-text-size-adjust: 100%; }
h1, h2, p, ol, ul, figure, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 9; background: var(--bg); padding: .6rem 1rem; }
button { font: inherit; }

/* layout: sidebar left on desktop, one sideways row on top on phones */
.shell { display: flex; flex-direction: column; min-height: 100%; }
.side { border-bottom: 1px solid var(--border); padding: .6rem 1rem 0; background: var(--bg); }
.side .home svg { width: 28px; height: 28px; align-self: center; }
.side .home { display: inline-flex; gap: .5rem; align-items: baseline; min-height: 40px; font: 600 .95rem/1.2 var(--font-ui); color: var(--fg); text-decoration: none; }
.side .home span { font: 500 .75rem/1 var(--font-data); color: var(--fg-muted); letter-spacing: var(--track-data); }
.side ol { display: flex; gap: 0 1.1rem; overflow-x: auto; scrollbar-width: none; padding-right: 3.5rem;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); }
.side ol::-webkit-scrollbar { display: none; }
.side li { flex: none; }
.side a[data-sec] { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; font: 500 .9rem/1.25 var(--font-ui);
  color: var(--fg-soft); text-decoration: none; border-bottom: 2px solid transparent; }
.side a[data-sec]:hover { color: var(--fg); }
.side a[aria-current] { color: var(--fg); border-bottom-color: var(--brand); }
@media (min-width: 900px) {
  .shell { flex-direction: row; height: 100vh; }
  .side { width: 17rem; flex: none; border-bottom: 0; border-right: 1px solid var(--border); padding: 1.4rem 1.2rem; overflow-y: auto; }
  .side .home { margin-bottom: 1rem; }
  .side ol { display: block; overflow: visible; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .side a[data-sec] { display: flex; white-space: normal; min-height: 40px; border-bottom: 0; border-left: 3px solid transparent; padding-left: .7rem; }
  .side a[aria-current] { border-left-color: var(--brand); background: var(--band); font-weight: 600; }
}

/* the deck */
.deck:focus, .slide:target, .slide:focus { outline: none; }
.deck { flex: 1; display: flex; flex-direction: column; min-width: 0; outline: none; }
.slide { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: clamp(1.5rem, 9vh, 6rem) clamp(1rem, 4vw, 4rem) clamp(1.25rem, 4vw, 3rem); overflow-y: auto; }
.slide[hidden] { display: none; }
.slide-in { width: 100%; max-width: 66rem; display: flex; flex-direction: column; gap: 1.4rem; }
.slide-in.has-aside .main { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
@media (min-width: 900px) { .slide-in.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2.5rem; align-items: start; } }
.controls { display: flex; align-items: center; justify-content: center; gap: 1.2rem; padding: .6rem 1rem 1rem; border-top: 1px solid var(--border); }
.controls button { min-width: 48px; min-height: 48px; border: 2px solid var(--brand); background: none; color: var(--brand); cursor: pointer; font-size: 1.2rem; border-radius: var(--radius); }
.controls button:hover:not(:disabled) { background: var(--brand); color: var(--on-brand); }
.controls button:disabled { opacity: .35; cursor: default; }
.controls button:focus-visible, .side a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.count { font: 500 .85rem/1 var(--font-data); color: var(--fg-muted); min-width: 8ch; text-align: center; }

/* type */
.eyebrow, .tag { font: 500 .8rem/1.3 var(--font-data); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--fg-muted); }
.big { font: 700 clamp(2.2rem, 6vw, 4.4rem)/1.08 var(--font-display); letter-spacing: var(--track-display); max-width: 18ch; }
h2 { font: 700 clamp(1.5rem, 3.4vw, 2.5rem)/1.15 var(--font-display); letter-spacing: var(--track-display); max-width: 26ch; }
h2, .parts figcaption { text-wrap: balance; }
h2.center { text-align: center; margin-inline: auto; }
.sub { text-wrap: pretty; font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--fg-soft); max-width: 46ch; }
.say { font-size: clamp(1.05rem, 1.9vw, 1.3rem); line-height: 1.55; max-width: 52ch; }
.note { font: 400 .95rem/1.5 var(--font-ui); color: var(--fg-soft); max-width: 60ch; }
b { font-weight: 600; }

/* the throughline: model / harness / runtime */
.parts { align-self: center; width: min(100%, 26rem); }
.parts--sm { width: min(70%, 15rem); }
.aside .parts--sm { width: 100%; }
@media (max-width: 899px) { .aside { display: flex; justify-content: center; } .aside .parts--sm { width: min(70%, 15rem); } }
.parts--sm .p-t { font-size: 19px; }
.parts figcaption { font: 400 .85rem/1.4 var(--font-ui); color: var(--fg-muted); text-align: center; margin-top: .3rem; }
.parts svg { width: 100%; height: auto; display: block; }
.p-runtime { fill: var(--band); stroke: var(--fg); stroke-width: 7; }
.p-harness { fill: none; stroke: var(--teal); stroke-width: 26; }
.p-model { fill: var(--ochre); }
.p-runtime.off { stroke-opacity: .15; stroke-width: 3; fill-opacity: .3; }
.p-harness.off { stroke-opacity: .18; }
.p-model.off { fill-opacity: .25; }
.p-t { font: 600 15px var(--font-ui); text-anchor: middle; fill: var(--ink); }
.p-t--h { fill: var(--paper); }
.p-t--r { text-anchor: start; fill: var(--fg); }
.p-t.off { opacity: .6; }
.p-t.off, .p-t--h.off { fill: var(--fg-muted); opacity: 1; }
.legend { display: grid; gap: .7rem; font-size: clamp(1rem, 1.7vw, 1.15rem); }
.legend li { position: relative; padding-left: 2rem; }
.legend .sw { position: absolute; left: 0; top: .3rem; transform: none; }
.sw { flex: none; width: 1rem; height: 1rem; transform: translateY(.15rem); }
.sw-model { background: var(--ochre); border-radius: 50%; }
.sw-harness { border: 4px solid var(--teal); border-radius: 50%; }
.sw-runtime { border: 2px solid var(--fg-soft); background: var(--band); }

/* flows, stacks, comparisons */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font: 500 clamp(.95rem, 1.6vw, 1.1rem)/1.3 var(--font-ui); }
.node { border: 2px solid var(--border-strong); padding: .55rem .85rem; background: var(--bg-raised); }
.arrow { color: var(--accent); font-weight: 700; }
.step { display: inline-flex; align-items: center; gap: .6rem; }
.compare .flow, .compare .flow .step { flex-direction: column; align-items: flex-start; gap: .3rem; } .compare .flow .arrow { transform: rotate(90deg); margin-left: 1rem; }
@media (max-width: 599px) { .flow, .flow .step { flex-direction: column; align-items: flex-start; gap: .3rem; } .flow .arrow { transform: rotate(90deg); margin-left: 1rem; } }
.loopsvg { width: min(100%, 30rem); height: auto; }
.lp { fill: none; stroke: var(--teal); stroke-width: 4; } .lp-out { stroke: var(--fg-muted); stroke-dasharray: 6 5; }
.ah { fill: var(--teal); } .ah-out { fill: var(--ochre); }
.lp-done { stroke: var(--ochre); }
.ln-answer { fill: var(--bg-raised); stroke: var(--ochre); stroke-width: 4; }
.lt-small { font-size: 12px; font-weight: 500; }
.lt-left { text-anchor: end; font-weight: 700; fill: var(--fg); }
.loopsvg .lt-s { font-size: 16px; }
.ln-model { fill: var(--ochre); } .ln-code { fill: var(--bg-raised); stroke: var(--teal); stroke-width: 4; }
.lt { font: 600 15px var(--font-ui); text-anchor: middle; fill: var(--ink); } .lt-code, .lt-s { fill: var(--fg); } .lt-s { font-weight: 500; font-size: 14px; fill: var(--fg-soft); }
.stack { display: grid; gap: .5rem; }
.layer { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: .2rem 1rem; padding: .8rem 1rem; border-left: 6px solid; background: var(--bg-raised); }
.layer b { font: 600 1.05rem/1.3 var(--font-ui); }
.layer em { grid-column: 2; font: 400 .85rem/1.3 var(--font-ui); color: var(--fg-muted); font-style: normal; }
.layer-sys { border-color: var(--teal); }
.layer-user { border-color: var(--ochre); }
.layer-out { border-color: var(--fg-muted); }
@media (max-width: 599px) { .layer { grid-template-columns: 1fr; } .layer em { grid-column: 1; } }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.compare > div { border-top: 3px solid var(--border-strong); padding-top: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.q { font: 600 1.1rem/1.4 var(--font-voice); }
.res { font: 600 1rem/1.3 var(--font-ui); padding: .35rem .6rem; align-self: flex-start; }
.res-yes { background: var(--terracotta); color: var(--paper); }
.res-no { background: var(--teal-deep); color: var(--paper); }
.res-plain { background: var(--band); color: var(--fg); border: 1px solid var(--border-strong); }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem; }
.kind { border-top: 3px solid var(--ochre); padding-top: .7rem; display: grid; align-content: start; gap: .3rem; }
.kind span, .steps3 li { color: var(--fg-soft); }
.steps3 { display: grid; gap: .8rem; counter-reset: s; font-size: clamp(1rem, 1.8vw, 1.2rem); }
.steps3 li { counter-increment: s; position: relative; padding-left: 2.6rem; }
.steps3 li::before { content: "0" counter(s); position: absolute; left: 0; top: .2rem; font: 500 .85rem/1.6 var(--font-data); color: var(--fg-muted); }
.steps3 b { color: var(--fg); }
.checks { display: grid; gap: .5rem; font-size: clamp(1rem, 1.7vw, 1.15rem); }
.checks li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .8rem; text-wrap: pretty; }
.checks b { color: var(--brand); }
@media (max-width: 599px) { .checks li { grid-template-columns: 1fr; gap: 0; } }
.keybox { align-self: flex-start; border: 2px dashed var(--terracotta); padding: .8rem 1.2rem; }
.key { font: 500 1.2rem/1 var(--font-data); letter-spacing: .1em; }
.profile { align-self: flex-start; display: grid; gap: .25rem; border-left: 6px solid var(--ochre); padding: .8rem 1.1rem; background: var(--bg-raised); font-family: var(--font-ui); }
.profile em { color: var(--fg-muted); font-size: .85rem; font-style: normal; }
.json { font: 500 clamp(.9rem, 1.6vw, 1.05rem)/1.6 var(--font-data); background: var(--bg-raised); border-left: 6px solid var(--teal); padding: .9rem 1.1rem; overflow-x: auto; }
.bars { display: grid; gap: .6rem; }
.bar { position: relative; padding: .5rem 0 .2rem; }
.bar span { display: block; height: 1.1rem; width: max(var(--w), .6rem); background: var(--terracotta); }
.bars--grow .bar span { background: var(--teal); }
.bar b { font: 500 .9rem/1.3 var(--font-ui); color: var(--fg-soft); }
.loop { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font: 500 1rem/1.3 var(--font-ui); padding-bottom: .4rem; }
.back { flex-basis: 100%; color: var(--teal-deep); font-weight: 600; }
.window { display: grid; gap: .3rem; max-width: 30rem; border: 2px solid var(--fg-soft); padding: .5rem; font: 500 .95rem/1.3 var(--font-ui); }
.cw { padding: .45rem .7rem; }
.cw-sys { background: var(--teal); color: var(--paper); }
.cw-tools { background: var(--teal-deep); color: var(--paper); }
.cw-msg { background: var(--ochre); color: var(--ink); }
.cw-call { background: var(--band); border-left: 4px solid var(--teal); }
.cw-more { color: var(--fg-muted); text-align: right; }
.cols { border-collapse: collapse; width: 100%; font: 500 clamp(.85rem, 1.5vw, 1rem)/1.4 var(--font-data); }
.cols th, .cols td { text-align: left; padding: .45rem .6rem; border: 1px solid var(--border-strong); }
.cols th { font-size: .8rem; color: var(--fg-muted); background: var(--bg-raised); font-weight: 500; }
.who { border-collapse: collapse; width: 100%; font: 400 clamp(.85rem, 1.5vw, 1rem)/1.4 var(--font-ui); }
.who th, .who td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.who thead th { font: 500 .8rem/1.3 var(--font-data); text-transform: uppercase; letter-spacing: var(--track-label); color: var(--fg-muted); }
.who thead th:nth-child(2) { color: var(--accent-fill); } .who thead th:nth-child(3) { color: var(--brand); }
@media (max-width: 599px) { .who { font-size: .9rem; } .who th, .who td { padding: .45rem .3rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Section title slides: the step's name, one line, and the throughline with its part lit. */
.slide:has(.is-title) { align-items: center; }
.title-slide { display: grid; gap: 2rem; align-items: center; }
.title-text { display: grid; gap: 1rem; }
.kicker { font: 500 clamp(.9rem, 1.6vw, 1.05rem)/1 var(--font-data); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--brand); padding-left: .8rem; border-left: 4px solid var(--brand); }
.parts--md { width: min(100%, 24rem); justify-self: center; }
@media (min-width: 900px) { .title-slide { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 3rem; } }
@media (max-width: 599px) { .parts--md { width: min(80%, 17rem); } }
/* A short fade between slides, unless the person asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .slide:not([hidden]) .slide-in { animation: slide-in .32s ease-out; }
  @keyframes slide-in { from { opacity: 0; transform: translateY(8px); } }
}

/* The corner throughline on every slide without its own diagram. */
.slide { position: relative; }
.badge { position: absolute; top: 1rem; right: clamp(1rem, 3vw, 2rem); width: 76px; pointer-events: none; }
.badge .p-runtime { stroke-width: 10; }
.badge .p-harness { stroke-width: 30; }
.badge .p-runtime.on { stroke-width: 18; }
.badge .p-runtime.off { stroke-opacity: .35; stroke-width: 6; }
.badge .p-harness.off { stroke-opacity: .35; }
.badge .p-model.off { fill-opacity: .45; }
@media (max-width: 599px) { .badge { width: 50px; top: .7rem; right: 1rem; } }

/* A screenshot beside its explanation. */
.shot { display: grid; gap: 1.5rem; align-items: start; }
.shot img { width: 100%; max-width: 20rem; height: auto; border: 1px solid var(--border); border-radius: var(--radius); justify-self: center; }
.shot-text { display: grid; gap: 1rem; }
@media (min-width: 900px) { .shot { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 2.5rem; } }

/* Step 8: rounds within a turn, and a conversation as a stack of turns. */
.rounds, .turns { display: grid; gap: .5rem; }
.round, .turn { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.r-label, .t-label { font: 500 .8rem/1.2 var(--font-data); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--fg-muted); min-width: 8.5rem; }
.t-label { min-width: 5rem; }
.turn { padding: .45rem .6rem; border: 1px solid var(--border); background: var(--bg-raised); }
.turn-now { border: 2px solid var(--teal); }
.turn-base { background: none; border-style: dashed; }
.chip { font: 500 .85rem/1.2 var(--font-ui); padding: .3rem .55rem; white-space: nowrap; }
.chip-base { background: var(--teal); color: var(--paper); }
.chip-you { background: var(--ochre); color: var(--ink); }
.chip-call { border: 2px solid var(--teal); color: var(--fg); }
.chip-res { background: var(--band); color: var(--fg); }
.chip-ans { background: var(--brand); color: var(--on-brand); }
.chip-more { color: var(--fg-muted); }
@media (max-width: 599px) { .r-label, .t-label { min-width: 100%; } }

/* Step 8: what one turn sends, and turns stacking up. */
.turn-one { display: grid; gap: 1.5rem; align-items: center; }
.turn-one .loopsvg { width: min(100%, 26rem); }
@media (min-width: 900px) { .turn-one { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.stacks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; align-items: start; }
.sent { display: flex; flex-direction: column; gap: .25rem; max-width: 16rem; }
.sent-h { font: 500 .78rem/1.2 var(--font-data); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--fg-muted); margin-bottom: .2rem; }
.s-chip { font: 500 .85rem/1.2 var(--font-ui); padding: .3rem .5rem; }
.s-base { background: var(--teal); color: var(--paper); }
.s-you { background: var(--ochre); color: var(--ink); }
.s-call { border: 2px solid var(--teal); color: var(--fg); padding: .2rem .45rem; }
.s-res { background: var(--band); color: var(--fg); }
.s-ans { background: var(--brand); color: var(--on-brand); }
.s-back { font: 600 .8rem/1.2 var(--font-ui); color: var(--fg-soft); margin-top: .25rem; }
.s-old { display: flex; align-items: center; gap: .4rem; opacity: .7; }
.s-old span { font: 500 .72rem/1 var(--font-data); color: var(--fg-muted); min-width: 3.2rem; }
.s-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.s-bar { display: block; height: 8px; }
.s-bar.s-res { background: var(--fg-muted); opacity: .4; }
.s-bar.s-call { border: 0; background: var(--teal); padding: 0; opacity: .6; }
@media (max-width: 599px) { .stacks { gap: .4rem; } .s-chip { font-size: .72rem; padding: .25rem .3rem; } .s-old span { min-width: 0; font-size: .62rem; } .s-old { flex-direction: column; align-items: stretch; } .sent-h { font-size: .66rem; } }

/* Step 8: the full window, compaction, memories. */
.full { display: grid; gap: 1.5rem; align-items: start; }
.full-text { display: grid; gap: 1rem; }
@media (min-width: 900px) { .full { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 2.5rem; } }
.s-note { font: 500 .72rem/1.2 var(--font-ui); color: var(--fg); font-style: normal; }
.s-sum { background: var(--teal-deep); color: var(--paper); }
.s-gone { font: 400 .75rem/1.3 var(--font-ui); color: var(--fg-soft); margin-top: .3rem; }
.s-gone s { color: var(--brand); }
.compact { display: grid; gap: 1rem; align-items: start; }
.compact .mid { font: 500 .9rem/1.3 var(--font-ui); color: var(--fg-soft); text-align: center; align-self: center; }
.arr { display: block; font-size: 1.8rem; color: var(--accent); line-height: 1; }
.arr-r { display: none; }
@media (min-width: 900px) { .compact { grid-template-columns: minmax(0, 1fr) 9rem minmax(0, 1fr); } .arr-r { display: block; } .arr-d { display: none; } }
.files { font: 500 clamp(.8rem, 1.5vw, .95rem)/1.7 var(--font-data); border-left: 6px solid var(--ochre); background: var(--bg-raised); padding: .8rem 1.1rem; white-space: pre-wrap; align-self: start; }
.files em { font: 400 .85em var(--font-ui); color: var(--fg-muted); font-style: normal; }

/* Step 8: many agents, one folder you own. */
.hub { display: grid; gap: .4rem; justify-items: center; font: 500 clamp(.95rem, 1.6vw, 1.1rem)/1.3 var(--font-ui); }
.hub-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.hub-arrow { font-size: 1.8rem; line-height: 1; color: var(--accent); }
.node-wide { border-color: var(--ochre); border-width: 3px; }
@media (max-width: 899px) { .full--textfirst .full-text { order: -1; } }

/* Step 9: the harness lives inside the runtime. */
.rt { border: 3px solid var(--fg); padding: .9rem 1rem 1rem; display: grid; gap: .7rem; max-width: 40rem; }
.rt-h { font: 500 .78rem/1.3 var(--font-data); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--fg-soft); }
.layer-model { border-color: var(--ochre); } .layer-harness { border-color: var(--teal); } .layer-runtime { border-color: var(--fg); }
.who tbody th span { display: block; font: 400 .8rem/1.3 var(--font-ui); color: var(--fg-muted); white-space: nowrap; }
#start-3 .say { font-size: clamp(1rem, 1.6vw, 1.15rem); }
#start-3 .q { font-size: 1rem; }
#start-3 .slide-in { gap: .9rem; }
