/* Game Dev Daily — shared styles.
   Lessons must not redefine these tokens. Use the classes documented in templates/lesson.html. */

:root {
  color-scheme: light;
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f1eee7;
  --ink: #1d1b18;
  --ink-2: #55514a;
  --ink-3: #857f74;
  --line: #e0dbd0;
  --good: #23803a;
  --bad: #c0362c;
  --warn: #a76a00;

  --t-pixel-art: #c2337f;
  --t-game-physics: #1f6fd6;
  --t-game-engine: #4a5a78;
  --t-game-history: #a35a00;
  --t-game-idea: #8a3fc9;
  --t-game-math: #2a7d35;
  --t-shaders-graphics: #c4431c;
  --t-game-design: #0f8275;

  --topic: #1f6fd6;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 44rem;
  --wide: 56rem;
  --gutter: 16px;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121316;
    --surface: #1a1c21;
    --surface-2: #23262d;
    --ink: #ecebe7;
    --ink-2: #b4b0a8;
    --ink-3: #807c74;
    --line: #30333b;
    --good: #5fcf7c;
    --bad: #ff7a6e;
    --warn: #f0b04a;

    --t-pixel-art: #f27db8;
    --t-game-physics: #6fb0ff;
    --t-game-engine: #a9b8d9;
    --t-game-history: #f0a94a;
    --t-game-idea: #c596ff;
    --t-game-math: #72d080;
    --t-shaders-graphics: #ff8f63;
    --t-game-design: #4fd1bf;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121316;
  --surface: #1a1c21;
  --surface-2: #23262d;
  --ink: #ecebe7;
  --ink-2: #b4b0a8;
  --ink-3: #807c74;
  --line: #30333b;
  --good: #5fcf7c;
  --bad: #ff7a6e;
  --warn: #f0b04a;

  --t-pixel-art: #f27db8;
  --t-game-physics: #6fb0ff;
  --t-game-engine: #a9b8d9;
  --t-game-history: #f0a94a;
  --t-game-idea: #c596ff;
  --t-game-math: #72d080;
  --t-shaders-graphics: #ff8f63;
  --t-game-design: #4fd1bf;
}

[data-topic="pixel-art"] { --topic: var(--t-pixel-art); }
[data-topic="game-physics"] { --topic: var(--t-game-physics); }
[data-topic="game-engine"] { --topic: var(--t-game-engine); }
[data-topic="game-history"] { --topic: var(--t-game-history); }
[data-topic="game-idea"] { --topic: var(--t-game-idea); }
[data-topic="game-math"] { --topic: var(--t-game-math); }
[data-topic="shaders-graphics"] { --topic: var(--t-shaders-graphics); }
[data-topic="game-design"] { --topic: var(--t-game-design); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

a { color: var(--topic); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--topic); outline-offset: 2px; border-radius: 4px; }

img, svg, canvas { max-width: 100%; }

/* ---------- Site header and footer (injected by site.js) ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand { white-space: nowrap; }
.site-nav a, .theme-toggle { white-space: nowrap; }
@media (max-width: 24rem) {
  .site-nav a { display: none; }
}
.brand-mark {
  width: 18px; height: 18px;
  flex: none;
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}
.brand-mark i { display: block; border-radius: 1px; }
.brand-mark i:nth-child(1) { background: var(--t-pixel-art); }
.brand-mark i:nth-child(2) { background: var(--t-game-physics); }
.brand-mark i:nth-child(3) { background: var(--t-game-math); }
.brand-mark i:nth-child(4) { background: var(--t-game-history); }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 6px 10px;
  border-radius: 6px;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }

.btn, .theme-toggle {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  min-height: 36px;
  cursor: pointer;
}
.btn:hover, .theme-toggle:hover { background: var(--surface-2); }
.btn[aria-pressed="true"] { border-color: var(--topic); color: var(--topic); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 24px var(--gutter) 48px;
  color: var(--ink-3);
  font-size: 0.875rem;
  text-align: center;
}
.site-footer a { color: var(--ink-2); }

/* ---------- Lesson layout ---------- */

main { display: block; }

.lesson article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
}

.lesson-head { margin-bottom: 32px; }

.topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--topic);
  text-decoration: none;
}
.topic-badge::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--topic);
  border-radius: 2px;
}

.lesson-head h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 12px 0 14px;
  text-wrap: balance;
}
.lede {
  font-size: 1.1875rem;
  color: var(--ink-2);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.lesson-meta li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--surface);
}

.lesson section { margin: 44px 0; }
.lesson section[data-section="hook"] { margin-top: 0; }
.lesson section[data-section="hook"] p:first-of-type { font-size: 1.125rem; }

.lesson h2 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 14px;
  text-wrap: balance;
}
.lesson h3 {
  font-size: 1.0625rem;
  margin: 28px 0 8px;
}
.lesson p { margin: 0 0 16px; text-wrap: pretty; }
.lesson ul, .lesson ol { padding-left: 1.3em; margin: 0 0 16px; }
.lesson li { margin: 6px 0; }
.lesson li::marker { color: var(--topic); }

strong { font-weight: 650; }

dfn { font-style: normal; font-weight: 650; border-bottom: 2px solid color-mix(in srgb, var(--topic) 45%, transparent); }

kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
}

/* ---------- Code ---------- */

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.55;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
  overflow-x: auto;
  tab-size: 2;
}
pre code { background: none; padding: 0; font-size: inherit; }
pre .c { color: var(--ink-3); font-style: italic; }   /* comment */
pre .k { color: var(--topic); font-weight: 600; }      /* keyword or the line that matters */

.code-tabs { margin: 0 0 16px; }
.code-tabs .tab-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: -1px;
  padding-left: 8px;
}
.code-tabs .tab-list button {
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 6px 12px;
  min-height: 36px;
  cursor: pointer;
}
.code-tabs .tab-list button[aria-selected="true"] {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  font-weight: 600;
}
.code-tabs pre { margin: 0; }
.code-tabs pre[hidden] { display: none; }
.code-tabs:not(.is-ready) pre[data-lang]::before {
  content: attr(data-lang);
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.code-tabs:not(.is-ready) pre + pre { margin-top: 8px; }

/* ---------- Demo figure ---------- */

figure { margin: 24px 0; }

.demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 60rem) {
  .demo.wide { margin-left: -6rem; margin-right: -6rem; }
}
.demo-stage {
  position: relative;
  background: var(--surface);
  line-height: 0;
}
.demo-stage canvas {
  display: block;
  width: 100%;
  outline-offset: -2px;
}
.demo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
@media (max-width: 34rem) {
  .demo-split { grid-template-columns: 1fr; }
}
.demo-label {
  position: absolute;
  left: 10px; top: 8px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  padding: 1px 6px;
  border-radius: 4px;
  pointer-events: none;
}
.demo-play {
  position: absolute;
  right: 8px; bottom: 8px;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
  min-height: 28px;
  cursor: pointer;
}
.demo-play:hover { color: var(--ink); }
.demo-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--bad);
  background: var(--surface);
}

.demo-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 12px 20px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  align-items: end;
}
.control { display: grid; gap: 4px; font-size: 0.875rem; color: var(--ink-2); min-width: 0; }
.control-head { display: flex; justify-content: space-between; gap: 8px; }
.control-name { font-weight: 600; color: var(--ink); }
.control output { font-family: var(--font-mono); font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.control input[type="range"] { width: 100%; accent-color: var(--topic); margin: 0; height: 28px; }
.control select {
  font: inherit; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  min-height: 36px;
  width: 100%;
}
.control.is-toggle { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.control.is-toggle input { width: 18px; height: 18px; accent-color: var(--topic); margin: 0; }
.control.is-readout { font-variant-numeric: tabular-nums; }
.control.is-readout .readout-value { font-family: var(--font-mono); color: var(--ink); font-size: 0.875rem; }

.demo figcaption, figure > figcaption {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-2);
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
/* Diagrams keep a readable size on phones and scroll sideways inside the figure instead of
   shrinking their text. Add class "compact" to a diagram that reads well at any width. */
figure.diagram { overflow-x: auto; }
figure.diagram svg { display: block; width: 100%; min-width: 33rem; height: auto; }
figure.diagram.compact svg { min-width: 0; }
figure.diagram > figcaption {
  border-top: 0; padding: 8px 0 0; text-align: left;
  position: sticky; left: 0;
}

/* ---------- Diagram classes (use in inline SVG) ---------- */

.d-stroke { stroke: var(--ink); fill: none; stroke-width: 1.5; }
.d-thin { stroke: var(--ink-3); fill: none; stroke-width: 1; }
.d-dash { stroke: var(--ink-3); fill: none; stroke-width: 1; stroke-dasharray: 4 4; }
.d-fill { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.d-box { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.25; }
.d-accent { stroke: var(--topic); fill: none; stroke-width: 2; }
.d-accent-fill { fill: var(--topic); }
.d-accent-soft { fill: color-mix(in srgb, var(--topic) 16%, var(--surface)); stroke: var(--topic); stroke-width: 1.25; }
.d-good { stroke: var(--good); fill: none; stroke-width: 2; }
.d-bad { stroke: var(--bad); fill: none; stroke-width: 2; }
.d-good-fill { fill: var(--good); }
.d-bad-fill { fill: var(--bad); }
.d-text { fill: var(--ink); font-family: var(--font-body); font-size: 13px; }
.d-muted { fill: var(--ink-3); font-family: var(--font-body); font-size: 12px; }
.d-label { fill: var(--topic); font-family: var(--font-body); font-size: 13px; font-weight: 650; }
.d-mono { fill: var(--ink); font-family: var(--font-mono); font-size: 12px; }

/* ---------- Callouts, exercise, takeaways ---------- */

.callout {
  border-left: 3px solid var(--topic);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px;
  margin: 0 0 16px;
}
.callout > :last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--warn); }
.callout-title {
  font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 4px !important;
}

section[data-section="exercise"] {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
section[data-section="exercise"] > :last-child { margin-bottom: 0; }

section[data-section="takeaways"] ul { list-style: none; padding: 0; }
section[data-section="takeaways"] li {
  position: relative;
  padding: 10px 0 10px 28px;
  margin: 0;
  border-top: 1px solid var(--line);
}
section[data-section="takeaways"] li:last-child { border-bottom: 1px solid var(--line); }
section[data-section="takeaways"] li::before {
  content: "";
  position: absolute;
  left: 4px; top: 1.15em;
  width: 10px; height: 10px;
  background: var(--topic);
  border-radius: 2px;
}

section[data-section="sources"] { font-size: 0.9375rem; color: var(--ink-2); }
section[data-section="sources"] h2 { font-size: 1.125rem; font-family: var(--font-body); }

table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; margin: 0 0 16px; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.table-wrap table { margin: 0; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Hub ---------- */

.hub main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.hero { padding: 56px 0 28px; }
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 1.4rem + 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  text-wrap: balance;
}
.hero p { font-size: 1.1875rem; color: var(--ink-2); margin: 0; max-width: 38rem; }

.hub h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin: 40px 0 4px;
}
.section-note { color: var(--ink-3); font-size: 0.9375rem; margin: 0 0 16px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--topic);
  border-radius: var(--radius);
  padding: 16px;
}
.card:hover { border-color: var(--topic); }
.card h3 { font-family: var(--font-head); font-size: 1.1875rem; line-height: 1.25; margin: 0; text-wrap: balance; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card p { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
.card .card-meta { margin-top: auto; padding-top: 6px; font-size: 0.8125rem; color: var(--ink-3); }
.card.is-empty { border-top-color: var(--line); border-style: dashed; }
.card.is-empty p { color: var(--ink-3); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.chip {
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  min-height: 34px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--topic); }
.chip.is-all::before { display: none; }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink-2); font-weight: 600; background: var(--surface-2); }

.search {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 40px;
  width: 100%;
  max-width: 24rem;
  margin: 0 0 16px;
}

.archive { list-style: none; padding: 0; margin: 0; }
.archive-day { margin: 0 0 8px; }
.archive-date {
  font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3); margin: 24px 0 4px;
}
.archive-item {
  display: grid;
  grid-template-columns: auto 11rem 1fr auto;
  gap: 4px 14px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.archive-item .topic-badge { font-size: 0.75rem; }
.archive-item a.title { color: var(--ink); font-weight: 600; text-decoration: none; }
.archive-item a.title:hover { text-decoration: underline; }
.archive-item .summary { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.9375rem; }
.archive-item .mins { color: var(--ink-3); font-size: 0.8125rem; white-space: nowrap; }
@media (max-width: 40rem) {
  .archive-item { grid-template-columns: auto 1fr auto; }
  .archive-item .done-toggle { grid-row: 1 / span 2; }
  .archive-item .topic-badge { grid-column: 2 / -1; }
}
.empty-note { color: var(--ink-3); padding: 24px 0; }

/* ---------- Reading progress ---------- */

.lesson-meta li.is-done {
  color: var(--good);
  border-color: var(--good);
  font-weight: 600;
}

.read-panel {
  margin: 56px 0 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-3);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.read-panel[data-done="true"] { border-left-color: var(--good); }
.read-panel .read-status { margin: 0 0 12px; font-weight: 600; }
.read-panel[data-done="true"] .read-status { color: var(--good); }
.read-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.read-toggle { min-height: 40px; padding: 8px 16px; font-weight: 600; }
.read-panel[data-done="false"] .read-toggle {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.read-panel[data-done="false"] .read-toggle:hover { background: var(--ink-2); border-color: var(--ink-2); }
.read-link { font-size: 0.9375rem; color: var(--ink-2); }
.read-note { margin: 12px 0 0 !important; font-size: 0.875rem; color: var(--warn); }

.progress-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 14px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.progress-line strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-bar {
  flex: 1 1 10rem;
  max-width: 20rem;
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span { display: block; height: 100%; width: 0; background: var(--good); border-radius: 999px; }
.progress-warning { flex-basis: 100%; color: var(--warn); font-size: 0.875rem; }

.filter-label {
  font-size: 0.75rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3);
  align-self: center;
  margin-right: 4px;
  min-width: 3.2rem;
}
.chip .count { color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 400; }

.card .card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.card .done-mark { color: var(--good); font-weight: 600; }
.card.is-done { border-top-color: var(--good); }

.done-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  margin: -4px 0 0 -6px;
  cursor: pointer;
  align-self: start;
}
.done-toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--good); cursor: pointer; }
.archive-item.is-done a.title { color: var(--ink-2); }
.archive-item.is-done .summary { color: var(--ink-3); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .card, .chip, .btn, .theme-toggle { transition: border-color 0.15s, background-color 0.15s; }
}

@media print {
  .site-header, .site-footer, .demo-controls, .demo-play { display: none; }
  body { background: #fff; }
}
