/* Design system / componentbibliotheek: documentatie-layout */
.ds-hero { padding-block: clamp(40px, 6vw, 88px); position: relative; overflow: hidden; }
.ds-hero__grid { display: grid; gap: 32px; align-items: end; }
@media (min-width: 900px) { .ds-hero__grid { grid-template-columns: 1.3fr 1fr; gap: 64px; } }
.ds-hero h1 { font-size: var(--gg-fs-4xl); margin-top: 16px; }
.ds-hero p { color: var(--gg-on-dark-muted); max-width: 56ch; margin-top: 16px; font-size: var(--gg-fs-md); }
.ds-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-family: var(--gg-mono); font-size: var(--gg-fs-xs); color: var(--gg-on-dark-muted); border-top: 1px solid var(--gg-podium-line); padding-top: 20px; }
.ds-meta dt { color: var(--gg-violet); }
.ds-meta dd { margin: 0; color: var(--gg-on-dark); }

.ds-layout { display: grid; gap: 0; }
@media (min-width: 1100px) { .ds-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 56px; } }
.ds-nav { display: none; }
@media (min-width: 1100px) {
  .ds-nav { display: block; position: sticky; top: calc(var(--gg-header-h) + 24px); align-self: start; max-height: calc(100vh - var(--gg-header-h) - 48px); overflow-y: auto; padding: 32px 0; scrollbar-width: thin; }
}
.ds-nav p { font-family: var(--gg-mono); font-size: var(--gg-fs-2xs); letter-spacing: .08em; text-transform: uppercase; color: var(--gg-muted); margin: 18px 0 6px; }
.ds-nav p:first-child { margin-top: 0; }
.ds-nav a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 6px; font-size: var(--gg-fs-sm); color: var(--gg-ink-2); text-decoration: none; }
.ds-nav a:hover { background: var(--gg-surface); color: var(--gg-ink); }
.ds-nav a.is-active { background: var(--gg-surface); color: var(--gg-ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--gg-pink); }
.ds-mnav { position: sticky; top: var(--gg-header-h); z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--gg-line); padding: 8px 0; margin-inline: calc(var(--gg-gutter) * -1); padding-inline: var(--gg-gutter); }
@media (min-width: 1100px) { .ds-mnav { display: none; } }
.ds-mnav .gg-select { min-height: 44px; }

.ds-main { min-width: 0; padding-bottom: 96px; }
.ds-section { padding-top: 64px; scroll-margin-top: calc(var(--gg-header-h) + 72px); }
.ds-section + .ds-section { border-top: 1px solid var(--gg-line); margin-top: 64px; }
.ds-section > header { display: grid; gap: 10px; margin-bottom: 28px; max-width: 72ch; }
.ds-section > header h2 { font-size: var(--gg-fs-2xl); }
.ds-section > header p { color: var(--gg-muted); }
.ds-sub { font-size: var(--gg-fs-lg); margin: 40px 0 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ds-sub code { font-size: var(--gg-fs-xs); color: var(--gg-muted); font-weight: 400; }

.ds-specimen { border: 1px solid var(--gg-line); border-radius: var(--gg-r-lg); background: var(--gg-paper); overflow: hidden; }
.ds-specimen + .ds-specimen { margin-top: 16px; }
.ds-specimen__stage { padding: 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.ds-specimen__stage--surface { background: var(--gg-surface); }
.ds-specimen__stage--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); align-items: start; }
.ds-specimen__stage--block { display: block; }
.ds-specimen__stage.on-dark { border-radius: 0; }
.ds-specimen__cap { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--gg-line); background: var(--gg-surface); font-size: var(--gg-fs-xs); color: var(--gg-muted); }
.ds-specimen__cap code { color: var(--gg-ink); }
.ds-state { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.ds-state > .ds-label { font-family: var(--gg-mono); font-size: var(--gg-fs-2xs); letter-spacing: .06em; text-transform: uppercase; color: var(--gg-muted); }
.ds-label { font-family: var(--gg-mono); font-size: var(--gg-fs-2xs); letter-spacing: .06em; text-transform: uppercase; color: var(--gg-muted); }
.ds-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; width: 100%; }

/* regels */
.ds-rules { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 700px) { .ds-rules { grid-template-columns: 1fr 1fr; } }
.ds-rule { padding: 16px 18px; border-radius: var(--gg-r-md); font-size: var(--gg-fs-sm); line-height: 1.55; border: 1px solid var(--gg-line); }
.ds-rule strong { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: var(--gg-fs-sm); }
.ds-rule ul { padding-left: 18px; margin: 0; }
.ds-rule li + li { margin-top: 4px; }
.ds-rule--do { background: var(--gg-success-tint); border-color: var(--gg-success-line); }
.ds-rule--do strong { color: var(--gg-success); }
.ds-rule--dont { background: var(--gg-error-tint); border-color: var(--gg-error-line); }
.ds-rule--dont strong { color: var(--gg-error); }
.ds-rule--note { background: var(--gg-surface); }

/* kleuren */
.ds-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.ds-swatch { border: 1px solid var(--gg-line); border-radius: var(--gg-r-md); overflow: hidden; background: var(--gg-paper); }
.ds-swatch__chip { height: 88px; display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 12px; font-weight: 700; font-size: var(--gg-fs-sm); }
.ds-swatch__chip span { font-family: var(--gg-mono); font-size: var(--gg-fs-2xs); font-weight: 500; }
.ds-swatch__info { padding: 10px 12px; display: grid; gap: 2px; font-size: var(--gg-fs-xs); }
.ds-swatch__info b { font-size: var(--gg-fs-sm); }
.ds-swatch__info code { color: var(--gg-muted); }
.ds-ratio { display: inline-flex; gap: 6px; align-items: center; font-family: var(--gg-mono); font-size: var(--gg-fs-2xs); }
.ds-ratio__pass { color: var(--gg-success); font-weight: 600; }
.ds-ratio__fail { color: var(--gg-error); font-weight: 600; }
.ds-pairs { width: 100%; font-size: var(--gg-fs-sm); }
.ds-pairs th, .ds-pairs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gg-line); vertical-align: middle; }
.ds-pairs th { font-size: var(--gg-fs-xs); color: var(--gg-muted); font-weight: 500; }
.ds-pairs td:last-child { font-family: var(--gg-mono); font-size: var(--gg-fs-xs); }
.ds-pair-demo { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 36px; padding: 0 12px; border-radius: 6px; font-weight: 600; font-size: var(--gg-fs-sm); box-shadow: inset 0 0 0 1px rgba(17,17,20,.08); }
.ds-table-wrap { overflow-x: auto; border: 1px solid var(--gg-line); border-radius: var(--gg-r-lg); }

/* type */
.ds-type-row { display: grid; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--gg-line); align-items: baseline; }
@media (min-width: 800px) { .ds-type-row { grid-template-columns: 200px 1fr; } }
.ds-type-row .ds-label { line-height: 1.5; }
.ds-type-row .ds-label b { display: block; color: var(--gg-ink); font-weight: 600; }

/* tokens: spacing / radius / shadow / motion */
.ds-space { display: grid; gap: 8px; }
.ds-space__row { display: grid; grid-template-columns: 90px 60px 1fr; gap: 12px; align-items: center; font-family: var(--gg-mono); font-size: var(--gg-fs-xs); }
.ds-space__bar { height: 12px; background: var(--gg-pink-tint-2); border-left: 2px solid var(--gg-pink); }
.ds-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; width: 100%; }
.ds-tile { display: grid; gap: 8px; font-family: var(--gg-mono); font-size: var(--gg-fs-xs); }
.ds-tile__box { height: 96px; background: var(--gg-paper); border: 1px solid var(--gg-line-strong); }
.ds-motion { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; width: 100%; }
.ds-motion__track { height: 40px; border-radius: 8px; background: var(--gg-surface); position: relative; overflow: hidden; }
.ds-motion__dot { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 6px; background: var(--gg-ink); transition-property: transform; }
.ds-motion.is-run .ds-motion__dot { transform: translateX(calc(100% * 6)); }

/* logo */
.ds-logo-stage { display: grid; place-items: center; min-height: 200px; padding: 32px; border-radius: var(--gg-r-lg); }
.ds-logo-stage img { max-height: 48px; width: auto; }
.ds-logo-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.ds-logo-grid figure { display: grid; gap: 8px; }
.ds-logo-grid figcaption { font-size: var(--gg-fs-xs); color: var(--gg-muted); }
.ds-clear { position: relative; display: inline-block; padding: 32px; background: repeating-linear-gradient(45deg, var(--gg-pink-tint) 0 6px, transparent 6px 12px); outline: 1px dashed var(--gg-pink); }
.ds-clear > span { display: block; background: var(--gg-paper); padding: 0; }
.ds-dont-logo { position: relative; }
.ds-dont-logo::after { content: ""; position: absolute; inset: 8px; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--gg-error) 50%, transparent calc(50% + 1px)); opacity: .7; pointer-events: none; }

/* iconen */
.ds-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; width: 100%; }
.ds-icon { display: grid; justify-items: center; gap: 8px; padding: 16px 6px 10px; border-radius: var(--gg-r-md); background: var(--gg-surface); font-family: var(--gg-mono); font-size: 10px; color: var(--gg-muted); text-align: center; word-break: break-word; }
.ds-icon .gg-icon { color: var(--gg-ink); }

/* demo-helpers */
.ds-force-hover.gg-btn--primary { --_bg: var(--gg-pink-hover); --_bd: var(--gg-pink-hover); }
.ds-force-active.gg-btn--primary { --_bg: var(--gg-pink-pressed); --_bd: var(--gg-pink-pressed); transform: translateY(1px) scale(.99); }
.ds-force-hover.gg-btn--secondary { --_bg: var(--gg-ink); --_fg: #fff; }
.ds-force-active.gg-btn--secondary { --_bg: #000; --_fg: #fff; }
.ds-force-hover.gg-btn--tertiary { color: var(--gg-pink-strong); text-decoration-color: currentColor; }
.ds-force-hover.gg-btn--icon { --_bg: var(--gg-surface); }
.ds-force-hover.gg-btn--ink { --_bg: var(--gg-ink-2); }
.ds-force-focus { outline: 2px solid var(--gg-focus); outline-offset: 2px; }
.ds-force-hover.gg-input { border-color: var(--gg-ink-2); }
.ds-force-focus.gg-input { outline: none; border-color: var(--gg-ink); box-shadow: 0 0 0 1px var(--gg-ink), 0 0 0 4px var(--gg-surface-2); }
.ds-force-hover.gg-chip { border-color: var(--gg-ink); }
.ds-w-280 { width: 100%; max-width: 280px; }
.ds-w-360 { width: 100%; max-width: 360px; }
.ds-w-440 { width: 100%; max-width: 440px; }
.ds-w-560 { width: 100%; max-width: 560px; }
.ds-cols-2 { display: grid; gap: 24px; width: 100%; }
@media (min-width: 900px) { .ds-cols-2 { grid-template-columns: 1fr 1fr; } }
.ds-buybar-demo { position: relative; height: 120px; width: 100%; max-width: 420px; border-radius: var(--gg-r-lg); overflow: hidden; background: var(--gg-surface); border: 1px solid var(--gg-line); }
.ds-buybar-demo .gg-buybar { position: absolute; display: flex; transform: none; }
.ds-header-demo { width: 100%; border: 1px solid var(--gg-line); border-radius: var(--gg-r-lg); overflow: hidden; }
.ds-anatomy { counter-reset: an; display: grid; gap: 8px; padding-left: 0; list-style: none; font-size: var(--gg-fs-sm); }
.ds-anatomy li { counter-increment: an; display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.ds-anatomy li::before { content: counter(an); width: 22px; height: 22px; border-radius: 50%; background: var(--gg-ink); color: #fff; font-family: var(--gg-mono); font-size: 11px; display: grid; place-items: center; }
.ds-cols-2 > .ds-specimen + .ds-specimen { margin-top: 0; }
.ds-cols-2 { align-items: start; }
