/* Week 2: inside an agent. A plain, conventional page: white cards on a light grey ground, one
   orange accent, and terminal-dark code blocks for the raw API requests the week reads. */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #111827;
  --ink-2: #5b6474;
  --line: #e3e6eb;
  --line-strong: #c9ced6;
  --link: #c2410c;
  --pink: #e8590c; /* the accent; deck.css calls it --pink */
  --pink-soft: #fff0e6;
  --display: "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(12px, 3vw, 28px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f141c;
    --panel: #171d27;
    --ink: #e8ebf0;
    --ink-2: #a3acba;
    --line: #2a3240;
    --line-strong: #3a4454;
    --link: #ff9a5c;
    --pink: #ff8a4c;
    --pink-soft: #3a2418;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f141c;
  --panel: #171d27;
  --ink: #e8ebf0;
  --ink-2: #a3acba;
  --line: #2a3240;
  --line-strong: #3a4454;
  --link: #ff9a5c;
  --pink: #ff8a4c;
  --pink-soft: #3a2418;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.04rem;
  line-height: 1.6;
}
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.9em; }

.page {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--gutter);
}
.panel {
  grid-column: span 12;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.half { grid-column: span 6; }
.hero { padding-top: clamp(28px, 5vw, 48px); padding-bottom: clamp(28px, 5vw, 48px); }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { margin: 0 0 12px; font-size: clamp(1.2rem, 2.4vw, 1.45rem); }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.label { margin: 0 0 8px; color: var(--pink); font-weight: 600; font-size: 0.95rem; }
.facts { font-weight: 600; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--pink);
  border-radius: 8px;
  background: var(--pink);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}
.btn.quiet { background: var(--panel); border-color: var(--line-strong); color: var(--ink); }
.btn:hover { filter: brightness(0.95); }
.parts { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: part; }
.parts li { display: grid; grid-template-columns: 2.2em 1fr; gap: 4px 12px; }
.parts li::before {
  counter-increment: part;
  content: counter(part);
  grid-row: span 2;
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--pink);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.parts strong { font-weight: 600; }
.parts span { color: var(--ink-2); }
.links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.links a { display: grid; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.links a:hover { border-color: var(--pink); }
.links span { color: var(--ink-2); font-size: 0.95rem; }
.part-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.part-cards a { display: grid; align-content: start; gap: 6px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.part-cards a:hover { border-color: var(--pink); }
.part-cards .num { color: var(--pink); font-size: 0.9rem; font-weight: 600; }
.part-cards strong { font-size: 1.1rem; }
.part-cards span:last-child { color: var(--ink-2); font-size: 0.95rem; }
.prompt { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.prompt code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.92rem; color: var(--ink); }
.prompt .btn { flex: none; padding: 6px 14px; font-size: 0.9rem; }
.checks { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 28px; color: var(--ink-2); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--pink); font-weight: 700; }
.checks strong { color: var(--ink); font-weight: 600; }
.warn { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--pink); border-left-width: 5px; border-radius: 8px; background: var(--pink-soft); }
.warn p { margin: 0; font-size: 0.95rem; }
.panel code { font-family: var(--mono); font-size: 0.9em; }
footer { max-width: 1120px; margin: 8px auto 36px; padding: 0 var(--gutter); color: var(--ink-2); font-size: 0.9rem; }
footer a { color: inherit; }

/* Site navigation (lib/nav.js) */
.site-nav { grid-column: 1 / -1; display: grid; gap: 12px; }
.nav-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.nav-brand { color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.nav-main ul a { color: var(--ink-2); font-weight: 500; text-decoration: none; }
.nav-main ul a:hover, .nav-main ul a.is-here, .nav-main ul a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-nav .nav-sub { flex-wrap: nowrap; gap: 6px; padding-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
.nav-sub li { flex: none; }
.nav-sub a { display: inline-block; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-sub a:hover { border-color: var(--pink); }
.nav-sub a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* The deck frame (lib/deck.css styles the rest) */
.deck-head h1 { text-shadow: none; }
.deck-frame { border: 1px solid var(--line-strong); border-radius: 10px; background: #0f1729; box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12); }
.deck-head kbd { border: 1px solid var(--line-strong); border-radius: 4px; }
.deck-bar .btn { box-shadow: none; }
.deck-bar .btn[disabled] { box-shadow: none; }

@media (max-width: 860px) {
  .half { grid-column: span 12; }
  .part-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .part-cards { grid-template-columns: 1fr; }
}

/* ---- Slides (1920×1080). Fixed colours: slides look the same on every screen. ---- */
.deck-stage section.w2 {
  --s-bg: #f6f7f9;
  --s-ink: #111827;
  --s-ink2: #5b6474;
  --s-line: #dfe3e9;
  --s-acc: #e8590c;
  --s-acc-soft: #fff0e6;
  --s-teal: #1f8a7a;
  --s-teal-soft: #d5ede8;
  --s-card: #ffffff;
  --s-code: #0f1729;
  background: var(--s-bg);
  color: var(--s-ink);
  font-family: "Inter", system-ui, sans-serif;
  padding: 88px 120px 72px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.w2 .strip {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--s-line);
  padding-bottom: 12px;
  color: var(--s-ink2);
  font-family: "JetBrains Mono", monospace;
  font-size: 22px;
  font-weight: 700;
}
.w2 .strip b { color: var(--s-acc); }
.w2 h1, .w2 h2, .w2 h3 { font-family: "Inter", sans-serif; font-weight: 700; letter-spacing: -0.015em; }
.w2 h2 { font-size: 66px; line-height: 1.08; }
.w2 h3 { font-size: 38px; line-height: 1.15; }
.w2 .lead { font-size: 34px; line-height: 1.4; color: var(--s-ink2); max-width: 1500px; }
.w2 .small { font-size: 26px; line-height: 1.4; color: var(--s-ink2); }
.w2 .src { margin-top: auto; font-size: 20px; color: var(--s-ink2); font-family: "JetBrains Mono", monospace; }
.w2 .acc { color: var(--s-acc); }
.w2 .teal { color: var(--s-teal); }
.w2 .mono, .w2 code { font-family: "JetBrains Mono", monospace; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.w2 .row { display: flex; gap: 40px; align-items: stretch; }
.w2 .col { display: flex; flex-direction: column; gap: 24px; }
.w2 .grow { flex: 1; min-width: 0; }
.w2 .card {
  background: var(--s-card);
  border: 2px solid var(--s-line);
  border-radius: 18px;
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.w2 .card.hot { border-color: var(--s-acc); box-shadow: inset 0 10px 0 var(--s-acc); padding-top: 38px; }
.w2 .card.cool { border-color: var(--s-teal); box-shadow: inset 0 10px 0 var(--s-teal); padding-top: 38px; }
.w2 .card p { font-size: 30px; }
.w2 .card h3 { font-size: 40px; }
.w2 .pill {
  display: inline-block;
  padding: 4px 18px;
  border: 2px solid var(--s-line);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  font-weight: 700;
  background: var(--s-card);
  align-self: flex-start;
}
.w2 .pill.hot { background: var(--s-acc); color: #ffffff; border-color: var(--s-acc); }
.w2 .pill.cool { background: var(--s-teal); color: #ffffff; border-color: var(--s-teal); }
.w2 .code {
  background: var(--s-code);
  color: #e6edf3;
  border-radius: 10px;
  padding: 28px 36px;
  font-family: "JetBrains Mono", monospace;
  font-size: 25px;
  line-height: 1.5;
  white-space: pre;
  overflow: hidden;
  flex: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
.w2 .code.big { font-size: 30px; }
.w2 .code.tiny { font-size: 21px; }
.w2 .code .k { color: #7cc4ff; }
.w2 .code .s { color: #ffd479; }
.w2 .code .n { color: #ff9e7a; }
.w2 .code .c { color: #7d8aa6; }
.w2 .code .t { color: #c792ea; }
.w2 .code .hl { background: rgba(255, 106, 61, 0.35); border-radius: 4px; outline: 2px solid #ff6a3d; }
.w2 .code .dim { opacity: 0.45; }
.w2 table.tbl { border-collapse: collapse; width: 100%; font-size: 28px; }
.w2 .tbl th, .w2 .tbl td { text-align: left; padding: 12px 18px; border-bottom: 2px solid var(--s-line); vertical-align: top; }
.w2 .tbl th { font-family: "Inter", sans-serif; font-size: 26px; color: var(--s-ink2); border-bottom: 3px solid var(--s-ink); font-weight: 600; }
.w2 .tbl td.num, .w2 .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.w2 .tbl tr.hot td { background: var(--s-acc-soft); }
.w2 .tbl code { font-family: "JetBrains Mono", monospace; font-size: 0.9em; }
.w2 .tbl.tight th, .w2 .tbl.tight td { padding: 8px 18px; }
.w2 ul.list { display: flex; flex-direction: column; gap: 16px; padding-left: 1.1em; }
.w2 ul.list li { font-size: 32px; line-height: 1.35; }
.w2 ul.list li::marker { color: var(--s-acc); }
.w2 .big-num { font-family: "Inter", sans-serif; font-weight: 700; font-size: 140px; line-height: 1; letter-spacing: -0.03em; }

/* Dark variants: cover and part dividers */
.deck-stage section.w2.dark {
  --s-bg: #111827;
  --s-ink: #f3f4f6;
  --s-ink2: #a3acba;
  --s-line: #2a3240;
  --s-card: #1a2230;
  justify-content: flex-end;
}
.w2.dark h1 { font-size: 132px; line-height: 1.02; }
.w2.dark .kicker { font-family: "JetBrains Mono", monospace; font-size: 30px; color: var(--s-acc); font-weight: 700; }

/* Slide 26: the speed race and the prefill/decode demos (driven by race.js) */
.w2 .race { display: flex; flex-direction: column; gap: 10px; }
.w2 .race-row { display: grid; grid-template-columns: 400px 1fr 110px 160px 140px; align-items: center; gap: 18px; font-size: 26px; }
.w2 .race-row p { font-size: inherit; margin: 0; line-height: 1.2; }
.w2 .race-row.race-head { font-size: 22px; color: var(--s-ink2); font-weight: 600; border-bottom: 3px solid var(--s-ink); padding-bottom: 6px; }
.w2 .race-name span { color: var(--s-ink2); font-family: "JetBrains Mono", monospace; font-size: 22px; }
.w2 .race-row.hot .race-name span { color: var(--pink); font-weight: 700; }
.w2 .race-num { text-align: right; font-variant-numeric: tabular-nums; }
.w2 .race-row p.race-price { color: var(--s-ink2); font-size: 22px; }
.w2 .race-clock { font-family: "JetBrains Mono", monospace; color: var(--pink); }
.w2 .race-lane { position: relative; height: 42px; border-radius: 8px; background: #eef0f3; overflow: hidden; }
.w2 .race-wait { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(-45deg, #cfd4dc 0 10px, #dde1e7 10px 20px); background-size: 28px 28px; animation: race-stripes 0.8s linear infinite; }
.w2 .race-row.done-wait .race-wait { animation: none; background: #d8dce2; }
.w2 .race-text { position: absolute; inset: 0; display: flex; justify-content: flex-end; align-items: center; padding: 0 12px; overflow: hidden; white-space: nowrap;
  font-family: "JetBrains Mono", monospace; font-size: 20px; color: #7a2e05; font-variant-ligatures: none;
  -webkit-mask-image: linear-gradient(to right, transparent 120px, #000 40%); mask-image: linear-gradient(to right, transparent 120px, #000 40%); }
.w2 .race-text span { flex: none; }
.w2 .race-count { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); background: var(--pink); color: #fff; border-radius: 6px; padding: 2px 10px; font: 700 20px "Inter", sans-serif; font-variant-numeric: tabular-nums; }
.w2 .race-count:empty { display: none; }
.w2 .race-row.streaming .race-lane { background: #fff0e6; box-shadow: inset 0 0 0 2px var(--pink); }
.w2 .race-text span::after { content: "▌"; color: var(--pink); animation: race-caret 0.6s steps(1) infinite; }
.w2 .race-row:not(.streaming) .race-text span::after { content: ""; }
@keyframes race-stripes { to { background-position: 28px 0; } }
@keyframes race-caret { 50% { opacity: 0; } }

.w2 .prefill-demo, .w2 .decode-demo { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: 6px; }
.w2 .prefill-demo i, .w2 .decode-demo i { width: 22px; height: 22px; border-radius: 5px; background: #e3e6eb; }
.deck-stage section.is-current .prefill-demo i { animation: prefill-flash 2.4s ease-in-out infinite; }
.deck-stage section.is-current .decode-demo i { animation: decode-step 2.4s steps(1) infinite; }
@keyframes prefill-flash { 0%, 15% { background: #e3e6eb; } 25%, 85% { background: #1f8a7a; } 100% { background: #e3e6eb; } }
@keyframes decode-step { 0% { background: #e3e6eb; } 100% { background: #e3e6eb; } }
.w2 .decode-demo i:nth-child(1) { animation-name: d1 !important; } .w2 .decode-demo i:nth-child(2) { animation-name: d2 !important; }
.w2 .decode-demo i:nth-child(3) { animation-name: d3 !important; } .w2 .decode-demo i:nth-child(4) { animation-name: d4 !important; }
.w2 .decode-demo i:nth-child(5) { animation-name: d5 !important; } .w2 .decode-demo i:nth-child(6) { animation-name: d6 !important; }
.w2 .decode-demo i:nth-child(7) { animation-name: d7 !important; } .w2 .decode-demo i:nth-child(8) { animation-name: d8 !important; }
@keyframes d1 { 0%, 9% { background: #e3e6eb; } 10%, 90% { background: var(--pink); } }
@keyframes d2 { 0%, 19% { background: #e3e6eb; } 20%, 90% { background: var(--pink); } }
@keyframes d3 { 0%, 29% { background: #e3e6eb; } 30%, 90% { background: var(--pink); } }
@keyframes d4 { 0%, 39% { background: #e3e6eb; } 40%, 90% { background: var(--pink); } }
@keyframes d5 { 0%, 49% { background: #e3e6eb; } 50%, 90% { background: var(--pink); } }
@keyframes d6 { 0%, 59% { background: #e3e6eb; } 60%, 90% { background: var(--pink); } }
@keyframes d7 { 0%, 69% { background: #e3e6eb; } 70%, 90% { background: var(--pink); } }
@keyframes d8 { 0%, 79% { background: #e3e6eb; } 80%, 90% { background: var(--pink); } }
@media (prefers-reduced-motion: reduce) { .w2 .race-wait, .deck-stage section.is-current .prefill-demo i, .deck-stage section.is-current .decode-demo i { animation: none !important; } }

/* Entrance effects for every slide (classes set by effects.js). Screen only, and only for viewers
   who have not asked for reduced motion; print and reduced motion show the final state. */
.w2 .fx-loop-count { font: 700 30px "JetBrains Mono", monospace; fill: var(--pink); }
.w2 .fx-dot { fill: var(--pink); filter: drop-shadow(0 0 10px rgba(232, 89, 12, 0.7)); }
.w2 .fx-tokens span { border-radius: 6px; }
@media screen and (prefers-reduced-motion: no-preference) {
  .deck-stage section.w2 .fx-p { animation: fx-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 85ms + 60ms); }
  .deck-stage section.w2 .fx-bar { transform-origin: left center; animation: fx-grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--j, var(--i, 0)) * 85ms + 350ms); }
  .deck-stage section.w2 .fx-code { animation: fx-wipe 1.1s ease-out both; animation-delay: calc(var(--i, 0) * 85ms + 250ms); }
  .deck-stage section.w2 svg .fx-s { animation: fx-fade 0.55s ease-out both; animation-delay: var(--d, 0s); }
  .deck-stage section.w2 svg .fx-draw { stroke-dasharray: 1; animation: fx-draw 1.2s ease-in-out both; animation-delay: var(--d, 0s); }
  .deck-stage section.w2 .fx-stamp { animation: fx-stamp 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: calc(var(--j) * 85ms + 350ms); }
  .deck-stage section.w2 .fx-late { animation: fx-fade 0.4s ease-out both; animation-delay: calc(var(--j) * 85ms + 700ms); }
  .deck-stage section.w2 .fx-cell { animation: fx-pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both; animation-delay: calc(var(--j) * 110ms + 250ms); }
  .deck-stage section.w2 .fx-hit { animation-name: fx-pop, fx-hit; animation-duration: 0.45s, 1.4s; animation-delay: calc(var(--j) * 110ms + 250ms), calc(var(--j) * 110ms + 700ms); }
  .deck-stage section.w2 .fx-tokens span { opacity: 0; }
  .deck-stage section.w2 .fx-tokens span.on { opacity: 1; transition: background-color 0.6s; }
  .deck-stage section.w2 .fx-tokens span.new { background: rgba(232, 89, 12, 0.45); transition: none; }
  .deck-stage section.w2.dark h1 { animation: fx-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .deck-stage section.w2.dark .kicker { animation: fx-fade 0.8s ease-out both; }
}
@keyframes fx-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes fx-wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fx-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fx-stamp { from { opacity: 0; transform: scale(1.8) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes fx-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes fx-hit { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 138, 122, 0); } 40% { box-shadow: 0 0 0 10px rgba(31, 138, 122, 0.35); } }

/* More effects (effects.js): progress bar, title underline, card lift, cover tokens, tokenizer
   chips, sampling draws, HTTP packets, glowing role markers, the context-window gauge. */
.deck-frame .fx-progress { position: absolute; left: 0; bottom: 0; height: 5px; width: 0; background: linear-gradient(90deg, #f59f00, var(--pink, #e8590c)); transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); z-index: 2; pointer-events: none; }
.deck-stage section.w2 h2 { position: relative; }
.deck-stage section.w2 h2::after { content: ""; position: absolute; left: 0; bottom: -8px; height: 5px; width: 120px; border-radius: 3px; background: var(--s-acc); }
.deck-stage section.w2 .card { transition: translate 0.25s ease, box-shadow 0.25s ease; }
.deck-stage section.w2 .card:hover { translate: 0 -6px; box-shadow: 0 16px 34px rgba(17, 24, 39, 0.12); }

.deck-stage > section > .fx-float { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.w2 .fx-float span { position: absolute; bottom: -60px; font-family: "JetBrains Mono", monospace; color: rgba(232, 89, 12, 0.22); white-space: nowrap; font-variant-ligatures: none; }
.w2 .fx-chips span { border-radius: 6px; padding: 0 1px; }
.w2 .fx-chips .c0 { background: rgba(232, 89, 12, 0.16); } .w2 .fx-chips .c1 { background: rgba(31, 138, 122, 0.16); }
.w2 .fx-chips .c2 { background: rgba(245, 159, 0, 0.2); } .w2 .fx-chips .c3 { background: rgba(91, 100, 116, 0.14); }
.w2 .fx-draws { font: 24px "JetBrains Mono", monospace; color: var(--s-ink2); margin-top: 6px; white-space: nowrap; overflow: hidden; font-variant-ligatures: none; }
.w2 .fx-draws b { font-family: "Inter", sans-serif; color: var(--s-ink); }
.w2 .fx-wire { position: relative; flex: 0 0 110px; align-self: stretch; }
.w2 .fx-wire::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 3px dashed #c9ced6; }
.w2 .fx-wire .pk { position: absolute; left: 0; padding: 2px 10px; border-radius: 999px; font: 700 20px "JetBrains Mono", monospace; color: #fff; opacity: 0; }
.w2 .fx-wire .out { top: calc(50% - 44px); background: var(--s-acc); }
.w2 .fx-wire .back { top: calc(50% + 12px); background: #1f8a7a; }
.w2 .fx-gauge { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.w2 .fx-gauge .bar { display: flex; height: 40px; border-radius: 8px; overflow: hidden; border: 2px solid var(--s-line); background: #fff; }
.w2 .fx-gauge i { display: block; height: 100%; }
.w2 .fx-gauge .in { background: #9aa3b2; } .w2 .fx-gauge .out { background: var(--s-acc); }
.w2 .fx-gauge p { display: flex; justify-content: space-between; font-size: 24px; color: var(--s-ink2); }
.w2 div.fx-pick { border-radius: 8px; }

@media screen and (prefers-reduced-motion: no-preference) {
  .deck-stage > section.w2.fx-fwd { animation: fx-from-right 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .deck-stage > section.w2.fx-back { animation: fx-from-left 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .deck-stage section.w2 h2::after { animation: fx-underline 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
  .w2 .fx-float span { animation: fx-drift linear infinite; }
  .deck-stage section.w2 .fx-chips span { opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
  .deck-stage section.w2 .fx-chips span.on { opacity: 1; transform: none; }
  .w2 div.fx-pick { animation: fx-pick 0.6s ease-out; }
  .w2 .fx-wire .out { animation: fx-packet-out 3.2s ease-in-out 0.8s infinite; }
  .w2 .fx-wire .back { animation: fx-packet-back 3.2s ease-in-out 0.8s infinite; }
  .deck-stage section.w2 .fx-glow { animation: fx-glow 0.9s ease-out both; animation-delay: calc(var(--k) * 110ms + 1.1s); border-radius: 4px; }
  .deck-stage section.w2 .fx-gauge i { animation: fx-grow 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; transform-origin: left center; }
  .deck-stage section.w2 .fx-gauge .in { animation-delay: 0.5s; }
  .deck-stage section.w2 .fx-gauge .out { animation-delay: 1.4s; }
  .deck-stage section#oct6 img { animation: fx-zoom 9s ease-in-out infinite alternate; transform-origin: 30% 20%; }
}
@media screen and (prefers-reduced-motion: reduce) { .w2 .fx-float, .w2 .fx-wire .pk { display: none; } }
@keyframes fx-from-right { from { opacity: 0.2; transform: translateX(70px); } to { opacity: 1; transform: none; } }
@keyframes fx-from-left { from { opacity: 0.2; transform: translateX(-70px); } to { opacity: 1; transform: none; } }
@keyframes fx-underline { from { width: 0; } to { width: 120px; } }
@keyframes fx-drift { from { transform: translateY(0) rotate(-4deg); opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } to { transform: translateY(-1200px) rotate(4deg); opacity: 0; } }
@keyframes fx-pick { from { background: rgba(232, 89, 12, 0.45); } to { background: rgba(232, 89, 12, 0); } }
@keyframes fx-packet-out { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 40% { left: calc(100% - 80px); opacity: 1; } 48%, 100% { left: calc(100% - 80px); opacity: 0; } }
@keyframes fx-packet-back { 0%, 50% { left: calc(100% - 60px); opacity: 0; } 58% { opacity: 1; } 90% { left: 0; opacity: 1; } 100% { left: 0; opacity: 0; } }
@keyframes fx-glow { 0% { background: transparent; } 30% { background: rgba(232, 89, 12, 0.55); box-shadow: 0 0 14px rgba(232, 89, 12, 0.6); } 100% { background: transparent; box-shadow: none; } }
@keyframes fx-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }

/* Homework 2 results page */
.results .table-wrap { overflow-x: auto; }
.results table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.results th, .results td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.results th { color: var(--ink-2); font-weight: 600; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.results td.c, .results th.c { text-align: center; }
.results .yes { color: #1f8a7a; font-weight: 700; }
.results .part { color: #b7791f; font-weight: 700; }
.results .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 4px; }
.results .stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.results .stat b { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--pink); }
.results .stat span { color: var(--ink-2); font-size: 0.92rem; }
.results .harness { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); }
.results .harness:first-of-type { border-top: 0; padding-top: 4px; }
.results .harness h3 { margin: 0; font-size: 1.1rem; }
.results .harness .meta { color: var(--ink-2); font-size: 0.92rem; margin: 0; }
.results .harness ul { margin: 2px 0 0; padding-left: 1.2em; }
.results .harness li { margin-bottom: 4px; }
.results ol.tests { margin: 0 0 12px; padding-left: 1.3em; }
@media (max-width: 640px) { .results .stats { grid-template-columns: 1fr; } }

/* Reading page (week-2/reading) */
.reading h3 { margin: 22px 0 8px; font-size: 1.08rem; }
.reading ul { margin: 0 0 12px; padding-left: 1.2em; }
.reading li { margin-bottom: 6px; }
.reading .table-wrap { overflow-x: auto; }
.reading table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 0.95rem; }
.reading th, .reading td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.reading th { color: var(--ink-2); font-weight: 600; border-bottom: 2px solid var(--ink); }
.reading pre { margin: 6px 0 14px; padding: 14px 16px; overflow-x: auto; border-radius: 8px; background: #0f1729; color: #e6edf3; font: 0.86rem/1.5 var(--mono); }
.reading .src { color: var(--ink-2); font-size: 0.92rem; }
.reading .toc { columns: 2; gap: 24px; margin: 0; padding-left: 1.2em; }
@media (max-width: 640px) { .reading .toc { columns: 1; } }
