/* Design system page. Loaded only on /studio/design-system/. */

.sg-nav [id], .section[id] { scroll-margin-top: 9.5rem; }
.sg-nav { position: sticky; top: 4.5rem; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--rule); }
.sg-nav ul { display: flex; gap: var(--s-4); list-style: none; margin: 0; padding: 0.85rem 0; overflow-x: auto; font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .08em; text-transform: uppercase; }
.sg-nav a { color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.sg-nav a:hover { color: var(--accent); }

.swatches { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 40rem) { .swatches { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .swatches { grid-template-columns: repeat(3, 1fr); } }
.sw { background: var(--surface); padding: 0; display: flex; flex-direction: column; }
.sw__chip { height: 4.5rem; border-bottom: 1px solid var(--rule); }
.sw__meta { padding: 0.7rem 0.85rem; font-family: var(--font-mono); font-size: var(--step--2); line-height: 1.5; }
.sw__token { color: var(--ink); display: block; }
.sw__hex { color: var(--ink-3); display: flex; justify-content: space-between; gap: 0.5rem; }

.specimen { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: var(--s-5); }
.specimen + .specimen { margin-top: var(--s-4); }
.specimen__meta { font-family: var(--font-mono); font-size: var(--step--2); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--s-3); display: flex; gap: var(--s-4); flex-wrap: wrap; }
.specimen__sample { overflow: hidden; }

.scale-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s-4); align-items: baseline; padding-block: 0.65rem; border-top: 1px solid var(--rule); }
.scale-row code { font-family: var(--font-mono); font-size: var(--step--2); color: var(--ink-3); }
.scale-bar { background: var(--accent); height: 0.7rem; border-radius: 1px; }

.grid-demo { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.grid-demo span { background: var(--accent-bg); border: 1px solid var(--accent); height: 3rem; border-radius: 1px; }

.construction { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-5); align-self: start; }
.construction svg { width: 100%; max-width: 24rem; margin-inline: auto; display: block; }

.dont { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-4); background: var(--surface); }
.dont__demo { height: 5.5rem; display: grid; place-items: center; background: var(--paper-2); border-radius: var(--radius); margin-bottom: var(--s-3); overflow: hidden; }
.dont__label { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.matrix td.pass { color: var(--good); }
.matrix td.fail { color: var(--accent); font-weight: 600; }

.comp { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: var(--s-5); }
.comp__title { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-4); }
.comp__row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
