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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-11); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-12); }

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

code, kbd, pre, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

:not(pre) > code {
  font-size: 0.875em;
  padding: 0.1em 0.38em;
  border-radius: var(--radius-1);
  background: var(--gray-3);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

kbd {
  font-size: var(--text-xs);
  padding: 0.1em 0.45em;
  border-radius: var(--radius-1);
  border: 1px solid var(--border-default);
  border-bottom-width: 2px;
  background: var(--surface-raised);
}

h1, h2, h3, h4 { margin: 0; letter-spacing: var(--tracking-tight); line-height: var(--leading-snug); font-weight: var(--weight-semibold); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.container { width: 100%; max-width: calc(var(--content-width) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--space-4)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-3)); }
.stack > *, .cluster > * { min-width: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--accent-11);
  font-weight: var(--weight-medium);
}

.display { font-size: var(--text-display); line-height: var(--leading-tight); letter-spacing: -0.045em; font-weight: var(--weight-semibold); }
.heading-1 { font-size: var(--text-3xl); line-height: 1.15; }
.heading-2 { font-size: var(--text-xl); }
.heading-3 { font-size: var(--text-lg); }
.lead { font-size: var(--text-lg); color: var(--text-secondary); max-width: 62ch; }
.muted { color: var(--text-muted); }
.small { font-size: var(--text-sm); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-2);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.button:active { transform: translateY(1px); }
.button-primary { background: var(--accent-9); color: var(--accent-contrast); }
.button-primary:hover { background: var(--accent-10); color: var(--accent-contrast); }
.button-secondary { background: var(--surface-raised); color: var(--text-primary); border-color: var(--border-default); box-shadow: var(--shadow-1); }
.button-secondary:hover { border-color: var(--border-strong); color: var(--text-primary); }
.button-ghost { background: transparent; color: var(--text-secondary); }
.button-ghost:hover { background: var(--gray-3); color: var(--text-primary); }
.button-small { height: 30px; padding: 0 var(--space-3); font-size: var(--text-xs); }
.button svg { width: 16px; height: 16px; flex: none; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-2);
  border: 1px solid var(--border-subtle);
  background: var(--surface-raised);
  color: var(--text-secondary);
  cursor: pointer;
}
.icon-button:hover { color: var(--text-primary); border-color: var(--border-default); }
.icon-button svg { width: 16px; height: 16px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  border: 1px solid var(--border-subtle);
  background: var(--gray-3);
  color: var(--text-secondary);
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge-plain::before { display: none; }
.badge-accent { background: var(--accent-3); border-color: var(--accent-6); color: var(--accent-11); }
.badge-pass { background: var(--pass-3); border-color: var(--pass-7); color: var(--pass-11); }
.badge-fail { background: var(--fail-3); border-color: var(--fail-7); color: var(--fail-11); }
.badge-warn { background: var(--warn-3); border-color: var(--warn-7); color: var(--warn-11); }

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-3);
  padding: var(--space-5);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.card-interactive { transition: border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
.card-interactive:hover { border-color: var(--border-default); box-shadow: var(--shadow-2); }

.feature-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-2);
  background: var(--accent-3);
  color: var(--accent-11);
  border: 1px solid var(--accent-5);
}
.feature-icon svg { width: 18px; height: 18px; }

.grid { display: grid; gap: var(--grid-gap, var(--space-4)); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 260px)), 1fr)); }
.grid > * { min-width: 0; }

.terminal {
  border-radius: var(--radius-3);
  background: var(--surface-code);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  min-width: 0;
  color: var(--code-text);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 8px 8px 14px;
  background: var(--surface-code-bar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--code-muted);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span { width: 10px; height: 10px; border-radius: 50%; background: #343b47; }
.terminal-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminal pre {
  margin: 0;
  padding: var(--space-4);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
}
.terminal .prompt { color: var(--code-muted); user-select: none; }
.terminal .comment { color: var(--code-muted); }
.terminal .key { color: var(--code-key); }
.terminal .string { color: var(--code-string); }
.terminal .number { color: var(--code-number); }
.terminal .keyword { color: var(--code-keyword); }
.terminal .pass { color: var(--pass-9); }
.terminal .fail { color: var(--fail-9); }

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}
.copy-button:hover { background: rgba(255, 255, 255, 0.09); }
.copy-button[data-state="copied"] { color: var(--pass-9); border-color: rgba(60, 196, 119, 0.4); }
.copy-button svg { width: 13px; height: 13px; }

.tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-2); background: var(--gray-3); border: 1px solid var(--border-subtle); width: fit-content; max-width: 100%; overflow-x: auto; }
.tab {
  height: 30px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-1);
  background: transparent;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-1); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-3); background: var(--surface-raised); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.table th {
  text-align: left;
  font-weight: var(--weight-medium);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  padding: 10px var(--space-4);
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.table td { padding: 12px var(--space-4); border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .numeric { text-align: right; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-3);
  background: var(--surface-sunken);
}

.callout {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-2);
  border: 1px solid var(--warn-7);
  background: var(--warn-3);
  color: var(--text-primary);
  font-size: var(--text-sm);
}
.callout svg { flex: none; width: 18px; height: 18px; color: var(--warn-11); margin-top: 2px; }
.callout-info { border-color: var(--accent-6); background: var(--accent-2); }
.callout-info svg { color: var(--accent-11); }

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface-page) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.navbar-inner { display: flex; align-items: center; gap: var(--space-4); height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--weight-semibold); color: var(--text-primary); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--text-primary); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav-links { display: none; gap: var(--space-1); margin-left: var(--space-4); }
.nav-links a { padding: 6px 10px; border-radius: var(--radius-1); color: var(--text-secondary); text-decoration: none; font-size: var(--text-sm); }
.nav-links a:hover { color: var(--text-primary); background: var(--gray-3); }
.navbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
@media (min-width: 820px) { .nav-links { display: flex; } }

.section { padding-block: var(--space-8); }
.section-header { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-6); max-width: 720px; }
.divider { height: 1px; background: var(--border-subtle); border: 0; margin: 0; }

.timeline { position: relative; display: flex; flex-direction: column; }
.timeline-entry { display: grid; grid-template-columns: 1fr; gap: var(--space-3); padding: var(--space-5) 0; border-top: 1px solid var(--border-subtle); }
.timeline-entry:first-child { border-top: 0; padding-top: 0; }
.timeline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.timeline-version { font-family: var(--font-mono); font-size: var(--text-lg); font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
.timeline-date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }
@media (min-width: 820px) {
  .timeline-entry { grid-template-columns: 200px 1fr; gap: var(--space-6); }
  .timeline-meta { flex-direction: column; align-items: flex-start; position: sticky; top: 80px; align-self: start; }
}
.change-group { display: flex; flex-direction: column; gap: var(--space-2); }
.change-group + .change-group { margin-top: var(--space-4); }
.change-group-title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--text-muted); font-weight: var(--weight-medium); }
.change-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.change-item { display: flex; gap: var(--space-3); align-items: baseline; font-size: var(--text-sm); color: var(--text-secondary); min-width: 0; }
.change-item > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.change-hash { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); flex: none; }
.change-scope { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }

.swatch-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.swatch { aspect-ratio: 1; border-radius: var(--radius-1); border: 1px solid rgba(0, 0, 0, 0.06); }

.footer { border-top: 1px solid var(--border-subtle); padding-block: var(--space-6); color: var(--text-muted); font-size: var(--text-sm); }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
