/* FedM8 design standards site: the documentation shell shared by /design, /design/001 and /design/002.
   Each design page maps the --ds-* variables to its own tokens on body[data-design="..."].
   The Tweak panel sets token overrides inline on <body>, so tokens must live on body, not :root. */

:root {
  --ds-bg: #f6f6f3;
  --ds-surface: #ffffff;
  --ds-ink: #1d2420;
  --ds-muted: #59625d;
  --ds-line: #dfe2dc;
  --ds-accent: #2f3b34;
  --ds-accent-ink: #ffffff;
  --ds-soft: #eef0eb;
  --ds-focus: #2f6f4f;
  --ds-font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ds-font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ds-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ds-radius: 10px;
  --ds-top-h: 56px;
  --ds-dark: #0b1626;
}

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

body.ds {
  margin: 0;
  background: var(--ds-bg);
  color: var(--ds-ink);
  font: 400 14px/1.6 var(--ds-font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.ds[data-design="index"] {
  --pc-surface: var(--ds-surface); --pc-ink: var(--ds-ink); --pc-muted: var(--ds-muted); --pc-line: var(--ds-line);
  --pc-line-strong: #cfd3cc; --pc-accent: var(--ds-accent); --pc-accent-ink: var(--ds-accent-ink); --pc-soft: var(--ds-soft);
  --pc-act-ink: var(--ds-accent); --pc-font: var(--ds-font-sans);
}
body.ds img { max-width: 100%; height: auto; }
:where(body.ds) a { color: var(--ds-accent); text-underline-offset: 2px; }
body.ds code, body.ds pre, body.ds kbd { font-family: var(--ds-font-mono); }
/* Inline code may break inside a long name, so wide letter spacing (WCAG 1.4.12) cannot push the page sideways. */
body.ds :not(pre) > code { overflow-wrap: anywhere; }
:where(body.ds) :focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }

.ds-vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.ds-skip {
  position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 14px;
  background: var(--ds-accent); color: var(--ds-accent-ink) !important; border-radius: 6px; text-decoration: none;
}
.ds-skip:focus { top: 10px; }

/* ---------- Top bar ---------- */
.ds-top {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; gap: 20px;
  height: var(--ds-top-h); padding: 0 max(20px, calc((100vw - 1360px) / 2 + 20px));
  background: var(--ds-surface); border-bottom: 1px solid var(--ds-line);
}
.ds-brand {
  font: 700 18px/1 var(--ds-font-sans); letter-spacing: -0.4px; color: var(--ds-ink) !important;
  text-decoration: none; white-space: nowrap;
}
.ds-brand span { font-weight: 400; color: var(--ds-muted); }
.ds-switch { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ds-switch::-webkit-scrollbar { display: none; }
.ds-switch a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 6px;
  font-size: 13px; color: var(--ds-muted); text-decoration: none; white-space: nowrap;
}
.ds-switch a:hover { color: var(--ds-ink); background: var(--ds-soft); }
.ds-switch a[aria-current="page"] { color: var(--ds-ink); font-weight: 600; background: var(--ds-soft); }
.ds-top .ds-btn { margin-left: auto; }

/* ---------- Buttons used by the documentation chrome ---------- */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border: 1px solid var(--ds-accent); border-radius: 6px;
  background: var(--ds-accent); color: var(--ds-accent-ink); font: 600 13px/1 var(--ds-font-sans);
  cursor: pointer; text-decoration: none;
}
.ds-btn:hover { filter: brightness(1.08); }
.ds-btn--quiet { background: transparent; color: var(--ds-ink); border-color: var(--ds-line); }
.ds-btn--quiet:hover { background: var(--ds-soft); filter: none; }
.ds-btn[aria-pressed="true"], .ds-btn[aria-expanded="true"] { background: var(--ds-soft); color: var(--ds-ink); border-color: var(--ds-line); }

/* ---------- Page layout ---------- */
.ds-layout {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 44px;
  max-width: 1360px; margin: 0 auto; padding: 28px 20px 80px;
}
.ds-toc { position: sticky; top: calc(var(--ds-top-h) + 24px); align-self: start; max-height: calc(100vh - var(--ds-top-h) - 48px); overflow: auto; }
.ds-toc-title { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-muted); }
.ds-toc ol { list-style: none; margin: 0; padding: 0; }
.ds-toc a {
  display: block; padding: 6px 10px; border-left: 2px solid transparent; font-size: 13px; line-height: 1.4;
  color: var(--ds-muted); text-decoration: none;
}
.ds-toc a:hover { color: var(--ds-ink); background: var(--ds-soft); }
.ds-toc a[aria-current="true"] { color: var(--ds-ink); font-weight: 600; border-left-color: var(--ds-accent); background: var(--ds-soft); }
.ds-main { min-width: 0; }

/* ---------- Text ---------- */
.ds-hero { padding: 8px 0 32px; border-bottom: 1px solid var(--ds-line); }
.ds-eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-muted); }
.ds-h1 { margin: 0 0 12px; font: 600 42px/1.1 var(--ds-font-serif); letter-spacing: -0.8px; color: var(--ds-ink); }
.ds-h2 { margin: 0 0 10px; font: 600 28px/1.2 var(--ds-font-serif); letter-spacing: -0.4px; color: var(--ds-ink); }
.ds-h3 { margin: 28px 0 10px; font: 650 16px/1.4 var(--ds-font-sans); color: var(--ds-ink); }
.ds-lead { margin: 0 0 20px; max-width: 72ch; font-size: 15px; line-height: 1.65; color: var(--ds-muted); }
.ds-note { margin: 14px 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--ds-line); font-size: 13px; color: var(--ds-muted); max-width: 80ch; }
.ds-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--ds-line);
  border-radius: 999px; background: var(--ds-soft); font-size: 11px; font-weight: 500; color: var(--ds-muted); white-space: nowrap;
}
.ds-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 24px; margin: 20px 0 0; }
.ds-facts div { min-width: 0; }
.ds-facts dt { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); }
.ds-facts dd { margin: 4px 0 0; font-size: 14px; color: var(--ds-ink); }

/* ---------- Sections and grids ---------- */
.ds-section { padding: 44px 0 8px; scroll-margin-top: calc(var(--ds-top-h) + 16px); }
.ds-section + .ds-section { border-top: 1px solid var(--ds-line); margin-top: 28px; }
.ds-hero { scroll-margin-top: calc(var(--ds-top-h) + 16px); }
.ds-stack > * + * { margin-top: 16px; }
.ds-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ds-grid { display: grid; gap: 20px; }
.ds-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Swatches ---------- */
.ds-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; margin: 16px 0; }
.ds-swatch { margin: 0; overflow: hidden; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); }
.ds-chip { display: block; height: 72px; border-bottom: 1px solid var(--ds-line); background: transparent; }
.ds-swatch figcaption { display: grid; gap: 2px; padding: 10px 12px 12px; }
.ds-swatch b { font-size: 13px; font-weight: 600; color: var(--ds-ink); }
.ds-swatch code { font-size: 11.5px; color: var(--ds-muted); word-break: break-all; }
.ds-hex {
  justify-self: start; padding: 2px 6px; margin-left: -6px; border: 0; border-radius: 4px; background: transparent;
  font: 500 12px/1.5 var(--ds-font-mono); color: var(--ds-ink); cursor: pointer; text-align: left;
}
button.ds-hex:hover { background: var(--ds-soft); }
.ds-use { font-size: 12px; line-height: 1.45; color: var(--ds-muted); }

/* ---------- Sample frames ---------- */
.ds-specimen {
  position: relative; margin: 16px 0; padding: 40px 24px 24px; border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius); background: var(--ds-surface); overflow: hidden;
}
.ds-specimen::before {
  content: "Sample"; position: absolute; top: 10px; left: 12px; z-index: 2;
  max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border: 1px solid var(--ds-line); border-radius: 999px; background: var(--ds-bg);
  font: 600 10.5px/1.5 var(--ds-font-sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ds-muted);
}
.ds-specimen[data-label]::before { content: attr(data-label); }
.ds-specimen--flush { padding: 40px 0 0; }
.ds-specimen--canvas { background: var(--ds-bg); }
.ds-specimen--dark { background: var(--ds-dark); border-color: #1d2c42; }
.ds-specimen--dark::before { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #d5dde8; }

.ds-browser { overflow: hidden; border: 1px solid var(--ds-line); border-radius: 10px; background: var(--ds-surface); box-shadow: 0 6px 24px rgba(20, 28, 24, .06); }
.ds-browser-bar {
  position: relative; display: flex; align-items: center; height: 38px; padding: 0 12px 0 70px;
  background: #ecedea; border-bottom: 1px solid var(--ds-line);
}
.ds-browser-bar::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 44px; height: 10px; transform: translateY(-50%);
  background:
    radial-gradient(circle at 5px 5px, #d36b5f 4.5px, transparent 5px),
    radial-gradient(circle at 22px 5px, #d9b04f 4.5px, transparent 5px),
    radial-gradient(circle at 39px 5px, #6aa76a 4.5px, transparent 5px);
}
.ds-url {
  margin: 0 auto; min-width: min(46%, 420px); max-width: 100%; padding: 4px 14px; overflow: hidden;
  border: 1px solid var(--ds-line); border-radius: 999px; background: #fff;
  font-size: 12px; color: var(--ds-muted); text-align: center; white-space: nowrap; text-overflow: ellipsis;
}
.ds-browser-body { overflow: auto; max-height: 820px; }

.ds-phone {
  position: relative; box-sizing: content-box; width: 375px; max-width: calc(100% - 20px); height: 812px; margin: 0 auto; overflow: auto;
  border: 10px solid #1f2622; border-radius: 42px; background: var(--ds-surface);
  box-shadow: 0 12px 40px rgba(20, 28, 24, .14); scrollbar-width: thin;
}

/* ---------- Code ---------- */
.ds-code { position: relative; margin: 14px 0; border-radius: 8px; background: #1f2522; color: #e7ece8; }
/* The top padding is the Copy button's row, so the button never sits on a line of code (WCAG 1.4.10 and 1.4.12: nothing hidden at narrow widths or wide spacing). */
.ds-code pre { margin: 0; padding: 44px 18px 16px; overflow: auto; font-size: 12.5px; line-height: 1.6; tab-size: 2; }
.ds-code code { white-space: pre; }
.ds-copy {
  position: absolute; top: 8px; right: 8px; min-height: 30px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 6px; background: rgba(255, 255, 255, .08); color: #e7ece8; font: 600 12px/1 var(--ds-font-sans); cursor: pointer;
}
.ds-copy:hover { background: rgba(255, 255, 255, .16); }

/* ---------- Do / Don't ---------- */
.ds-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.ds-do, .ds-dont { padding: 14px 18px 8px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); }
.ds-do { border-top: 3px solid #2f7a4a; }
.ds-dont { border-top: 3px solid #b0463c; }
.ds-do h3, .ds-dont h3 { margin: 0 0 6px; font: 650 14px/1.4 var(--ds-font-sans); color: var(--ds-ink); }
.ds-do h3::before { content: "\2713  "; color: #2f7a4a; }
.ds-dont h3::before { content: "\2715  "; color: #b0463c; }
.ds-do ul, .ds-dont ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ds-muted); }
.ds-do li, .ds-dont li { margin: 0 0 6px; }

/* ---------- Tables and type rows ---------- */
.ds-table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 13px; }
.ds-table th { padding: 8px 10px; border-bottom: 1px solid var(--ds-line); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-align: left; text-transform: uppercase; color: var(--ds-muted); }
.ds-table td { padding: 9px 10px; border-bottom: 1px solid var(--ds-line); vertical-align: top; }
.ds-table code { font-size: 12px; }
.ds-type-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--ds-line); }
.ds-type-meta { font: 400 12px/1.5 var(--ds-font-mono); color: var(--ds-muted); }
.ds-type-meta b { display: block; margin-bottom: 2px; font: 600 12.5px/1.4 var(--ds-font-sans); color: var(--ds-ink); }
.ds-type-sample { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Tweak panel (built by design-site.js) ---------- */
.ds-tweak {
  position: fixed; top: calc(var(--ds-top-h) + 12px); right: 16px; z-index: 120;
  width: 340px; max-height: calc(100vh - var(--ds-top-h) - 28px); overflow: auto;
  padding: 16px; border: 1px solid var(--ds-line); border-radius: 12px; background: var(--ds-surface);
  box-shadow: 0 18px 60px rgba(20, 28, 24, .18);
}
.ds-tweak[hidden] { display: none; }
.ds-tweak h2 { margin: 0 0 4px; font: 650 15px/1.3 var(--ds-font-sans); }
.ds-tweak p { margin: 0 0 12px; font-size: 12px; color: var(--ds-muted); }
.ds-tweak-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--ds-line); }
.ds-tweak-row label { grid-column: 2; font: 500 12px/1.3 var(--ds-font-mono); color: var(--ds-ink); }
.ds-tweak-row input[type="color"] { grid-row: span 2; width: 34px; height: 34px; padding: 0; border: 1px solid var(--ds-line); border-radius: 6px; background: none; cursor: pointer; }
.ds-tweak-row input[type="text"] { grid-column: 2; width: 100%; min-height: 30px; padding: 3px 8px; border: 1px solid var(--ds-line); border-radius: 5px; font: 12px/1.4 var(--ds-font-mono); color: var(--ds-ink); background: #fff; }
.ds-tweak-row.is-changed label::after { content: " \00b7 changed"; color: var(--ds-focus); font-family: var(--ds-font-sans); }
.ds-tweak-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- Toast ---------- */
.ds-toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 150; transform: translate(-50%, 12px); opacity: 0;
  padding: 9px 16px; border-radius: 999px; background: var(--ds-ink); color: var(--ds-surface);
  font-size: 13px; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.ds-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Index page ---------- */
.ds-index { max-width: 1120px; margin: 0 auto; padding: 40px 20px 80px; }
.ds-index .ds-hero { border-bottom: 0; padding-bottom: 12px; }
.ds-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 24px 0 8px; }
.ds-card {
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ds-line); border-radius: 14px;
  background: var(--ds-surface); color: var(--ds-ink) !important; text-decoration: none; transition: box-shadow .15s ease, border-color .15s ease;
}
.ds-card:hover { border-color: #c5cbc4; box-shadow: 0 10px 30px rgba(20, 28, 24, .08); }
.ds-card-preview { position: relative; height: 176px; overflow: hidden; border-bottom: 1px solid var(--ds-line); }
.ds-card-body { display: grid; gap: 6px; padding: 18px 20px 20px; }
.ds-card-id { font: 600 11px/1 var(--ds-font-mono); letter-spacing: .06em; color: var(--ds-muted); }
.ds-card-title { margin: 0; font: 600 22px/1.2 var(--ds-font-serif); }
.ds-card-text { margin: 0; font-size: 13.5px; color: var(--ds-muted); }
.ds-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ds-card-go { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ds-accent); }
.ds-card--soon { border-style: dashed; background: transparent; }
.ds-card--soon .ds-card-preview { display: grid; place-items: center; color: var(--ds-muted); font-size: 13px; background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--ds-soft) 10px 20px); }

/* Card previews: tiny drawn layouts in each design's colors (no images). */
.pv-001 { background: #eef3f8; }
.pv-001 .pv-bar { position: absolute; inset: 0 0 auto; height: 34px; background: #060d18; }
.pv-001 .pv-bar::after { content: ""; position: absolute; left: 16px; top: 11px; width: 62px; height: 12px; border-radius: 3px; background: #c4a35a; }
.pv-001 .pv-title { position: absolute; left: 16px; top: 52px; width: 58%; height: 16px; border-radius: 3px; background: #0c1626; }
.pv-001 .pv-line { position: absolute; left: 16px; top: 78px; width: 44%; height: 8px; border-radius: 3px; background: #9aa7b6; }
.pv-001 .pv-btn { position: absolute; left: 16px; top: 100px; width: 86px; height: 26px; border-radius: 6px; background: #060d18; }
.pv-001 .pv-btn2 { position: absolute; left: 110px; top: 100px; width: 70px; height: 26px; border-radius: 6px; border: 1.5px solid #c4a35a; }
.pv-001 .pv-panel { position: absolute; right: 16px; top: 50px; width: 34%; height: 104px; border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(6, 13, 24, .1); }
.pv-001 .pv-panel::before { content: ""; position: absolute; left: 12px; top: 14px; width: 60%; height: 9px; border-radius: 3px; background: #c4a35a; }
.pv-001 .pv-panel::after { content: ""; position: absolute; left: 12px; top: 32px; right: 12px; height: 52px; border-radius: 6px; background: #eef3f8; }

.pv-002 { background: #f5f3ec; }
.pv-002 .pv-bar { position: absolute; inset: 0 0 auto; height: 30px; background: #fffef9; border-bottom: 1px solid #d9ded0; }
.pv-002 .pv-bar::after { content: ""; position: absolute; left: 14px; top: 9px; width: 52px; height: 12px; border-radius: 3px; background: #29372e; }
.pv-002 .pv-rail { position: absolute; left: 12px; top: 44px; width: 64px; bottom: 12px; }
.pv-002 .pv-rail::before { content: ""; position: absolute; inset: 0 0 auto; height: 14px; border-radius: 4px; background: #e4ead8; }
.pv-002 .pv-rail::after { content: ""; position: absolute; left: 6px; right: 14px; top: 24px; height: 52px; background: repeating-linear-gradient(#cdd5c3 0 6px, transparent 6px 14px); }
.pv-002 .pv-title { position: absolute; left: 92px; top: 46px; width: 46%; height: 14px; border-radius: 3px; background: #29372e; }
.pv-002 .pv-line { position: absolute; left: 92px; top: 68px; width: 34%; height: 7px; border-radius: 3px; background: #a7b29c; }
.pv-002 .pv-card { position: absolute; left: 92px; top: 86px; width: 40%; height: 72px; border: 1px solid #d9ded0; border-radius: 8px; background: #fffef9; }
.pv-002 .pv-card::after { content: ""; position: absolute; left: 10px; bottom: 10px; width: 60px; height: 20px; border-radius: 5px; background: #526547; }
.pv-002 .pv-chat { position: absolute; right: 14px; top: 46px; width: 26%; bottom: 14px; border: 1px solid #d9ded0; border-radius: 8px; background: #fffef9; }
.pv-002 .pv-chat::before { content: ""; position: absolute; left: 8px; right: 8px; top: 10px; height: 36px; border-radius: 6px; background: #eef1e7; }
.pv-002 .pv-chat::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 8px; height: 18px; border: 1px solid #cbd4bf; border-radius: 5px; }

.ds-howto { counter-reset: step; list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.ds-howto li { position: relative; padding: 12px 14px 12px 50px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); font-size: 14px; }
.ds-howto li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 14px; top: 12px;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ds-soft);
  font: 700 12px/1 var(--ds-font-sans); color: var(--ds-ink);
}
.ds-footer { max-width: 1360px; margin: 0 auto; padding: 24px 20px 40px; border-top: 1px solid var(--ds-line); font-size: 12px; color: var(--ds-muted); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1000px) {
  .ds-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .ds-toc {
    position: sticky; top: var(--ds-top-h); z-index: 60; max-height: none; margin: 0 -20px 20px; padding: 8px 20px;
    overflow-x: auto; background: var(--ds-bg); border-bottom: 1px solid var(--ds-line); scrollbar-width: none;
  }
  .ds-toc::-webkit-scrollbar { display: none; }
  .ds-toc-title { display: none; }
  .ds-toc ol { display: flex; gap: 4px; width: max-content; }
  .ds-toc a { border-left: 0; border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
  .ds-toc a[aria-current="true"] { border-left: 0; }
  .ds-grid--3, .ds-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .ds-top { gap: 10px; }
  .ds-brand span { display: none; }
  .ds-h1 { font-size: 32px; }
  .ds-h2 { font-size: 24px; }
  .ds-grid--2, .ds-grid--3, .ds-grid--4, .ds-rules { grid-template-columns: minmax(0, 1fr); }
  .ds-type-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ds-specimen { padding: 40px 14px 16px; }
  .ds-table { display: block; overflow-x: auto; }
  .ds-tweak { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 70vh; }
  .ds-phone { max-width: calc(100% - 12px); border-width: 6px; border-radius: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-card, .ds-toast { transition: none; }
  html { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
