.deck {
  --accent: #c4613b;
  --accent-deep: #94401f;
  --accent-soft: #f8e4d9;
  --accent-ink: #fff;
  --sys: #5a6e80;
  --usr: #1c7ed6;
  --asst: #c4613b;
  --tool: #00a29c;
  --meta: #7048e8;
}

/* Title: a context window with one skill loaded, the rest on disk */
.title-slide { flex-direction: row; align-items: center; gap: clamp(28px, 6vw, 80px); }
.title-slide h1 { font-size: clamp(2.4rem, 4.4vw + 0.5rem, 4.6rem); max-width: 11ch; }
.title-slide .lead { font-size: clamp(1.05rem, 0.8vw + 0.8rem, 1.3rem); max-width: 46ch; }
.hero-ctx { flex: none; width: min(100%, 380px); display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; font-size: 0.72em; }
.hc-win, .hc-disk { border: 2px solid var(--ink); border-radius: 12px; background: var(--panel); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.hc-disk { border-style: dashed; border-color: var(--muted); background: transparent; align-self: end; }
.hc-label { font-family: var(--mono); font-size: 0.85em; color: var(--muted); }
.hc-row { border-radius: 6px; padding: 6px 8px; font-weight: 600; }
.hc-row.sys { background: var(--ink); color: #fff; }
.hc-row.user { background: #dbeafb; }
.hc-row.skill { background: var(--accent); color: #fff; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: hc-in 2.8s ease-in-out infinite alternate; }
.hc-list { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.hc-list i { width: 16px; height: 10px; border-radius: 2px; background: var(--accent-soft); border: 1px solid var(--accent); }
.hc-list i.on { background: var(--accent); }
.hc-list span { width: 100%; font-family: var(--mono); font-size: 0.85em; color: var(--muted); }
.hc-free { min-height: 70px; border-radius: 6px; background: repeating-linear-gradient(-45deg, transparent 0 7px, var(--paper) 7px 14px); }
.hc-file { font-family: var(--mono); padding: 6px 8px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--panel); color: var(--muted); }
.hc-file.run { border-color: var(--tool); color: #00756e; }
@keyframes hc-in { 0%, 30% { opacity: 0.55; transform: translateX(10px); } 70%, 100% { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .title-slide { flex-direction: column-reverse; align-items: stretch; }
  .hero-ctx { width: min(100%, 360px); margin: 0 auto; }
  .hc-free { min-height: 24px; }
}

/* Shared local helpers */
.track .fill { display: block; transition: width 0.25s; }
.seg { gap: 6px; }
.demo .note { font-size: 0.82em; }
.stats .stat b { font-size: 1.1em; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.76em; color: var(--muted); }
.role { display: inline-block; font-family: var(--mono); font-size: 0.72em; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--line); color: var(--ink); white-space: nowrap; }
.r-system .role { background: var(--sys); color: #fff; }
.r-user .role { background: var(--usr); color: #fff; }
.r-assistant .role { background: var(--asst); color: #fff; }
.r-tool .role { background: var(--tool); color: #fff; }
.r-meta .role { background: var(--meta); color: #fff; }
.tk { font-family: var(--mono); font-size: 0.74em; color: var(--muted); white-space: nowrap; }
mark { background: #ffe8a3; color: inherit; border-radius: 3px; padding: 0 2px; }
.qz-q { color: var(--ink); }

/* Agent loop */
.lp-cycle { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.lp-node { border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; text-align: center; transition: border-color 0.2s, background 0.2s; }
.lp-node small { font-size: 0.72em; color: var(--muted); }
.lp-node.on { border-color: var(--accent); background: var(--accent-soft); }
.lp-arrows { display: flex; flex-direction: column; font-family: var(--mono); font-size: 0.68em; color: var(--muted); text-align: center; }
.lp-msgs { display: flex; flex-direction: column; gap: 3px; max-height: 236px; overflow-y: auto; }
.lp-msg { display: grid; grid-template-columns: 6.6em minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 0.8em; padding: 3px 6px; border-radius: 6px; }
.lp-msg .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-msg .role { text-align: center; }
.lp-msg.new { background: var(--accent-soft); }
.lp-ctx { display: flex; align-items: center; gap: 10px; }
.lp-ctx .track { height: 12px; }
.lp-ctx-n { font-family: var(--mono); font-size: 0.75em; white-space: nowrap; }
@media (max-width: 480px) {
  .lp-msg { grid-template-columns: minmax(0, 1fr) auto; }
  .lp-msg .role { grid-column: 1 / -1; justify-self: start; }
  .lp-msg .txt { white-space: normal; }
}

/* Prompt stuffing */
.st-bar { display: flex; height: 26px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.st-bar i, .sw { flex: none; }
.st-bar i.base, .sw.base { background: var(--sys); }
.st-bar i.rel, .sw.rel { background: var(--ok); }
.st-bar i.irr, .sw.irr { background: repeating-linear-gradient(-45deg, var(--block) 0 4px, #e57f9e 4px 8px); }

/* Progressive disclosure */
.ds-user { font-size: 0.88em; padding: 6px 8px; border-radius: 8px; background: var(--paper); }
.ds-user .role { background: var(--usr); color: #fff; margin-right: 6px; }
.ds-files { display: flex; flex-direction: column; gap: 4px; }
.ds-file { display: grid; grid-template-columns: minmax(0, 1fr) auto 9.5em; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 6px; border: 1.5px dashed var(--line); font-size: 0.82em; transition: background 0.2s; }
.ds-file .nm { font-family: var(--mono); overflow-wrap: anywhere; }
.ds-file .st { font-size: 0.85em; color: var(--muted); text-align: right; }
.ds-file.ctx { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.ds-file.ctx .st { color: var(--accent-deep); font-weight: 700; }
.ds-file.ran { border-style: solid; border-color: var(--tool); background: var(--ok-soft); }
.ds-file.ran .st { color: #00756e; font-weight: 700; }
.ds-bar { display: flex; gap: 2px; height: 16px; }
.ds-bar i { border-radius: 3px; background: var(--line); min-width: 4px; }
.ds-bar i.ctx { background: var(--accent); }
.ds-bar i.ran { background: repeating-linear-gradient(-45deg, var(--tool) 0 3px, #c8ece9 3px 6px); }
.ds-sum { font-size: 0.82em; color: var(--muted); }
.ds-sum b { color: var(--ink); font-family: var(--mono); }
@media (max-width: 480px) { .ds-file { grid-template-columns: minmax(0, 1fr) auto; } .ds-file .st { grid-column: 1 / -1; text-align: left; } }

/* Calculator */
.cc-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.cc-sliders .label { font-size: 0.74em; }
@media (max-width: 560px) { .cc-sliders { grid-template-columns: 1fr; } }
.cc-rows { display: flex; flex-direction: column; gap: 6px; }
.cc-row { display: grid; grid-template-columns: 10em minmax(0, 1fr) 8.5em; gap: 8px; align-items: center; font-size: 0.82em; }
.cc-track { height: 16px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.cc-track i { display: block; height: 100%; background: var(--accent); }
.cc-row.all .cc-track i { background: var(--block); }
.cc-row.meta .cc-track i { background: var(--sys); }
.cc-row.meta { color: var(--muted); }
.cc-row.over .cc-v { color: var(--block); font-weight: 700; }
.cc-v { font-family: var(--mono); font-size: 0.9em; text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
  .cc-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cc-track { grid-column: 1 / -1; grid-row: 2; }
}

/* Skill selection */
.pk-qs, .wc-qs { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-list { display: flex; flex-direction: column; gap: 5px; }
.pk-sk { display: grid; grid-template-columns: 8.4em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 8px; border: 1.5px solid var(--line); font-size: 0.8em; line-height: 1.4; }
.pk-sk code { font-size: 0.86em; background: none; padding: 0; font-weight: 700; }
.pk-sk em { font-style: normal; font-family: var(--mono); font-size: 0.8em; font-weight: 700; color: #fff; background: var(--ok); border-radius: 4px; padding: 1px 6px; }
.pk-sk.chosen { border-color: var(--ok); background: var(--ok-soft); }
.pk-sk.maybe { border-color: var(--accent); border-style: dashed; }
.pk-sk.maybe em { background: var(--accent); }
@media (max-width: 520px) { .pk-sk { grid-template-columns: minmax(0, 1fr) auto; } .pk-sk > span { grid-column: 1 / -1; grid-row: 2; } }

/* Message trace */
.tr-list { display: flex; flex-direction: column; gap: 5px; max-height: 330px; overflow-y: auto; }
.tr-msg { border-left: 3px solid var(--line); padding: 3px 0 3px 8px; }
.tr-msg.r-system { border-color: var(--sys); }
.tr-msg.r-user { border-color: var(--usr); }
.tr-msg.r-assistant { border-color: var(--asst); }
.tr-msg.r-tool { border-color: var(--tool); }
.tr-msg.r-meta { border-color: var(--meta); }
.tr-msg.new { background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.tr-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.tr-msg pre { margin: 0; font-family: var(--mono); font-size: 0.72em; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.tr-total { font-size: 0.8em; color: var(--muted); }
.tr-total b { color: var(--ink); font-family: var(--mono); }

/* Frontmatter */
.fm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 40px); }
.fm-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tech.dark { background: var(--ink); }
.fm { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 0.88em; }
.fm dt { font-family: var(--mono); font-weight: 700; font-size: 0.86em; color: var(--accent-deep); max-width: 15em; }
.fm dd { margin: 0; }
@media (max-width: 760px) {
  .fm-cols { grid-template-columns: 1fr; }
  .fm { grid-template-columns: 1fr; gap: 0; }
  .fm dd { margin-bottom: 8px; }
}

/* Render demo */
.rd-in { font: inherit; font-family: var(--mono); font-size: 0.85em; padding: 8px 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--panel); color: var(--ink); width: 100%; }
.rd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rd-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rd-pre { margin: 0; font-family: var(--mono); font-size: 0.72em; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); min-height: 8.5em; }
.rd-pre.out { background: var(--panel); border-color: var(--accent); }
.rd-pre mark.cmd { background: #d6f0ee; }
.rd-err { color: var(--block); font-weight: 700; }
@media (max-width: 560px) { .rd-cols { grid-template-columns: 1fr; } }

/* Exec demo */
.ex-term { margin: 0; font-family: var(--mono); font-size: 0.74em; line-height: 1.5; background: var(--ink); color: #e3ecf3; border-radius: 8px; padding: 10px 12px; min-height: 7.2em; white-space: pre-wrap; overflow-wrap: anywhere; }
.ex-term .pr { color: var(--value); }
.ex-term .dim { color: #8aa0b4; }

/* Which mechanism */
.wc-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.wc-card { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; font-size: 0.8em; transition: background 0.2s, border-color 0.2s; }
.wc-card b { font-size: 1.12em; }
.wc-card i { font-style: normal; color: var(--muted); }
.wc-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent); }
@media (max-width: 1000px) { .wc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .wc-grid { grid-template-columns: 1fr 1fr; } }

/* Where skills live */
.where { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.5vw, 32px); }
.wh-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; font-size: 0.9em; }
.wh-col h3 { font-size: 1.1em; border-bottom: 3px solid var(--accent); padding-bottom: 6px; }
.wh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.wh-list li { display: flex; flex-direction: column; gap: 1px; }
.wh-list li > code:first-child { align-self: flex-start; }
.wh-list span { font-size: 0.88em; color: var(--muted); }
.wh-who { font-size: 0.95em; }
@media (max-width: 900px) { .where { grid-template-columns: 1fr; } }

/* Audit */
.au-files { display: flex; flex-direction: column; gap: 8px; }
.au-file { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.au-name { font-family: var(--mono); font-size: 0.72em; font-weight: 700; padding: 4px 10px; background: var(--ink); color: #fff; }
.au-lines { display: flex; flex-direction: column; }
.au-line { font: inherit; font-family: var(--mono); font-size: 0.72em; text-align: left; line-height: 1.35; padding: 3px 10px; border: 0; border-left: 4px solid transparent; background: var(--panel); color: var(--ink); cursor: pointer; overflow-wrap: anywhere; touch-action: manipulation; }
.au-line:hover { background: var(--accent-soft); }
.au-line.bad { border-left-color: var(--block); background: var(--block-soft); }
.au-line.fine { border-left-color: var(--ok); }
.au-count { font-size: 0.86em; margin-right: auto; }

/* Linter */
.ln-field { display: flex; flex-direction: column; gap: 3px; }
.ln-name, .ln-desc { font: inherit; font-family: var(--mono); font-size: 0.8em; padding: 7px 10px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--panel); color: var(--ink); width: 100%; resize: vertical; }
.ln-head { display: flex; align-items: center; gap: 10px; }
.ln-score { font-size: 0.9em; white-space: nowrap; }
.ln-score b { font-size: 1.3em; }
.ln-head .track { height: 10px; }
.ln-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 0.8em; }
.ln-list li { padding-left: 1.6em; position: relative; }
.ln-list li::before { position: absolute; left: 0; font-weight: 700; }
.ln-list li.ok::before { content: "✓"; color: var(--ok); }
.ln-list li.warn::before { content: "!"; color: var(--accent-deep); left: 0.3em; }
.ln-list li.err::before { content: "✕"; color: var(--block); }
.ln-list li.warn, .ln-list li.err { font-weight: 600; }
