/**
 * Northwind design system — dark-first.
 *
 * The chart palette came first and the interface was built outward from it. The
 * series colours are a validated categorical set (lightness band, chroma floor,
 * colour-vision separation and contrast all checked against this exact surface),
 * and the UI accent is a neighbouring step of the same blue so nothing on the
 * page competes with the data.
 */

:root {
  color-scheme: dark;

  /* ── Surfaces ───────────────────────────────────────────────────────────── */
  --surface-0: #0b0e14;
  --surface-1: #111620;
  --surface-2: #161d2a;
  --surface-3: #1c2433;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* ── Ink ────────────────────────────────────────────────────────────────── */
  --text-primary: #f2f5fa;
  --text-secondary: #a9b6cc;
  --text-muted: #7b88a0;

  /* ── Accent ─────────────────────────────────────────────────────────────── */
  --accent: #4f8ff7;
  --accent-hover: #7dabfa;
  --accent-ink: #06101f;

  /* ── Chart palette (validated against --surface-1) ──────────────────────── */
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --chart-surface: #111620;
  --chart-grid: #1b2331;
  --chart-axis: #313a4c;

  /* ── Status (icon + label always; never colour alone) ───────────────────── */
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-serious: #ec835a;
  --status-critical: #d03b3b;

  --focus-ring: #7dabfa;
  --focus-radius: 4px;

  /* ── Type ───────────────────────────────────────────────────────────────── */
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --step--2: clamp(0.72rem, 0.7rem + 0.08vw, 0.76rem);
  --step--1: clamp(0.83rem, 0.81rem + 0.11vw, 0.89rem);
  --step-0: clamp(0.97rem, 0.95rem + 0.13vw, 1.05rem);
  --step-1: clamp(1.15rem, 1.09rem + 0.29vw, 1.33rem);
  --step-2: clamp(1.37rem, 1.26rem + 0.53vw, 1.69rem);
  --step-3: clamp(1.63rem, 1.44rem + 0.9vw, 2.15rem);
  --step-4: clamp(1.94rem, 1.64rem + 1.45vw, 2.73rem);
  --step-5: clamp(2.31rem, 1.85rem + 2.24vw, 3.47rem);

  /* ── Space ──────────────────────────────────────────────────────────────── */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.25rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;
  --space-3xl: 8rem;

  --shell: 78rem;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);
}

/* ── Base ──────────────────────────────────────────────────────────────────── */

body {
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

.shell {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
}

@media (min-width: 48em) {
  .shell {
    width: min(100% - 4rem, var(--shell));
  }
}

.section {
  padding-block: var(--space-2xl);
}

.section--tight {
  padding-block: var(--space-xl);
}

.section--raised {
  background: var(--surface-1);
  border-block: 1px solid var(--border);
}

/* ── Typography ────────────────────────────────────────────────────────────── */

.h1,
.h2,
.h3 {
  font-weight: 620;
  letter-spacing: -0.028em;
  line-height: 1.08;
}

.h1 {
  font-size: var(--step-5);
}
.h2 {
  font-size: var(--step-3);
  line-height: 1.14;
}
.h3 {
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.kicker {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 54ch;
}

.muted {
  color: var(--text-secondary);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.measure {
  max-width: 64ch;
}

/* ── Topbar ────────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface-0) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: 4rem;
  flex-wrap: wrap;
}

@media (min-width: 48em) {
  .topbar__inner {
    width: min(100% - 4rem, var(--shell));
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 640;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
}

.logo__mark {
  display: block;
  width: 1.5rem;
  color: var(--accent);
}

.topbar__toggle {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.topbar__bars {
  display: grid;
  gap: 4px;
  width: 1.15rem;
}

.topbar__bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
}

.topbar__nav {
  display: none;
  width: 100%;
  padding-bottom: var(--space-m);
}

.topbar__nav[data-open='true'] {
  display: block;
}

.topbar__nav ul {
  list-style: none;
  margin: 0 0 var(--space-s);
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

/* Scoped to the list so the buttons in the same nav keep their own colours. */
.topbar__nav ul a {
  display: inline-block;
  padding: 0.4rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--step--1);
  transition: color 0.15s var(--ease);
}

.topbar__nav ul a:hover,
.topbar__nav ul a[aria-current='page'] {
  color: var(--text-primary);
}

.topbar__actions {
  display: flex;
  gap: var(--space-2xs);
  flex-wrap: wrap;
}

@media (min-width: 64em) {
  .topbar__toggle {
    display: none;
  }
  .topbar__nav {
    display: flex !important;
    width: auto;
    align-items: center;
    gap: var(--space-l);
    padding-bottom: 0;
  }
  .topbar__nav ul {
    display: flex;
    gap: var(--space-m);
    margin: 0;
  }
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-size: var(--step--1);
  font-weight: 580;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.btn:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn--sm {
  padding: 0.5rem 0.85rem;
  font-size: var(--step--2);
}

.btn--lg {
  padding: 0.85rem 1.5rem;
  font-size: var(--step-0);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--step--1);
  font-weight: 550;
  text-decoration: none;
}

.arrow-link::after {
  content: '→';
  transition: transform 0.15s var(--ease);
}

.arrow-link:hover::after {
  transform: translateX(3px);
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: var(--space-2xl) var(--space-xl);
  overflow: hidden;
  isolation: isolate;
}

/* A faint field of the accent, so the top of the page is not flat black. */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% 0 auto;
  height: 60rem;
  z-index: -1;
  background:
    radial-gradient(60rem 30rem at 22% 12%, rgba(79, 143, 247, 0.16), transparent 70%),
    radial-gradient(44rem 24rem at 82% 0%, rgba(25, 158, 112, 0.1), transparent 70%);
}

.hero__grid {
  display: grid;
  gap: var(--space-xl);
}

.hero__title {
  max-width: 17ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-l);
}

.hero__note {
  margin-top: var(--space-s);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ── Page head ─────────────────────────────────────────────────────────────── */

.page-head {
  padding-block: var(--space-xl) var(--space-l);
  border-bottom: 1px solid var(--border);
}

.page-head__title {
  margin-top: var(--space-2xs);
  max-width: 20ch;
}

.page-head .lede {
  margin-top: var(--space-s);
}

.crumbs {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-bottom: var(--space-s);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs li + li::before {
  content: '/';
  margin-right: 0.4rem;
  color: var(--border-strong);
}

.crumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--text-primary);
}

/* ── Cards and grids ───────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: var(--space-m);
}

@media (min-width: 44em) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 62em) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-m);
}

.card--link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.card--link:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: inherit;
}

.card__title {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card__body {
  color: var(--text-secondary);
  margin-top: var(--space-2xs);
  font-size: var(--step--1);
}

.section-head {
  display: grid;
  gap: var(--space-xs);
  margin-bottom: var(--space-l);
  max-width: 62ch;
}

.section-head--split {
  max-width: none;
}

@media (min-width: 55em) {
  .section-head--split {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* ── Feature list ──────────────────────────────────────────────────────────── */

.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2xs);
}

.checks li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: var(--step--1);
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 0.5rem;
  height: 0.28rem;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* ── Spec table ────────────────────────────────────────────────────────────── */

.spec-table {
  font-size: var(--step--1);
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.spec-table th {
  color: var(--text-muted);
  font-weight: 400;
  width: 42%;
}

.spec-table td {
  font-family: var(--font-mono);
  font-size: 0.94em;
}

/* ── Status dot ────────────────────────────────────────────────────────────── */

.status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--status-good);
  flex: none;
}

.status-dot[data-tone='warning'] {
  background: var(--status-warning);
}
.status-dot[data-tone='critical'] {
  background: var(--status-critical);
}

/* ── Code ──────────────────────────────────────────────────────────────────── */

.code {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: 0.55rem var(--space-s);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--text-muted);
}

.code pre {
  margin: 0;
  padding: var(--space-s);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  line-height: 1.7;
  color: var(--text-secondary);
}

.code .tok-key {
  color: var(--series-1);
}
.code .tok-str {
  color: var(--series-3);
}
.code .tok-com {
  color: var(--text-muted);
  font-style: italic;
}
.code .tok-num {
  color: var(--series-2);
}

/* ── Logos ─────────────────────────────────────────────────────────────────── */

.logos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-l);
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.logos li {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  font-size: var(--step-0);
}

/* ── Quote ─────────────────────────────────────────────────────────────────── */

.quote {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-m);
  margin: 0;
}

.quote p {
  font-size: var(--step-2);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.quote footer {
  margin-top: var(--space-s);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ── Metric row ────────────────────────────────────────────────────────────── */

.metrics {
  display: grid;
  gap: var(--space-m);
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 44em) {
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

.metrics__value {
  font-size: var(--step-4);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1;
}

.metrics__label {
  color: var(--text-muted);
  font-size: var(--step--1);
  margin-top: var(--space-3xs);
}

/* ── Prose ─────────────────────────────────────────────────────────────────── */

.prose {
  max-width: 68ch;
  color: var(--text-secondary);
}

.prose > * + * {
  margin-top: var(--space-s);
}

.prose h2 {
  color: var(--text-primary);
  font-size: var(--step-2);
  font-weight: 620;
  letter-spacing: -0.02em;
  margin-top: var(--space-l);
}

.prose h3 {
  color: var(--text-primary);
  font-size: var(--step-1);
  font-weight: 600;
  margin-top: var(--space-m);
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Accordion ─────────────────────────────────────────────────────────────── */

.accordion {
  border-top: 1px solid var(--border);
}

.accordion__item {
  border-bottom: 1px solid var(--border);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding: var(--space-s) 0;
  text-align: left;
  font-size: var(--step-0);
  font-weight: 550;
  color: var(--text-primary);
}

.accordion__icon {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  position: relative;
}

.accordion__icon::before,
.accordion__icon::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: var(--accent);
  transition: transform 0.2s var(--ease);
}

.accordion__icon::after {
  transform: rotate(90deg);
}

.accordion__trigger[aria-expanded='true'] .accordion__icon::after {
  transform: rotate(0);
}

.accordion__panel {
  padding-bottom: var(--space-m);
  color: var(--text-secondary);
  font-size: var(--step--1);
  max-width: 68ch;
}

.accordion__panel[hidden] {
  display: none;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */

.field {
  display: grid;
  gap: 0.35rem;
}

.field__label {
  font-size: var(--step--1);
  color: var(--text-secondary);
  font-weight: 520;
}

.field__hint {
  font-size: var(--step--2);
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--step--1);
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field[data-invalid='true'] input,
.field[data-invalid='true'] select,
.field[data-invalid='true'] textarea {
  border-color: var(--status-critical);
}

.field__error {
  font-size: var(--step--2);
  color: #ef8b8b;
}

.field__error:empty {
  display: none;
}

.form-grid {
  display: grid;
  gap: var(--space-m);
}

@media (min-width: 40em) {
  .form-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid .span-2 {
    grid-column: 1 / -1;
  }
}

.form-status {
  padding: var(--space-xs) var(--space-s);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  font-size: var(--step--1);
}

.form-status[data-tone='error'] {
  border-color: var(--status-critical);
}

.form-status[data-tone='success'] {
  border-color: var(--status-good);
}

.form-status:empty {
  display: none;
}

/* ── CTA band ──────────────────────────────────────────────────────────────── */

.cta {
  border-top: 1px solid var(--border);
  padding-block: var(--space-2xl);
  background:
    radial-gradient(48rem 22rem at 50% 0%, rgba(79, 143, 247, 0.13), transparent 70%),
    var(--surface-0);
  text-align: center;
}

.cta__inner {
  display: grid;
  justify-items: center;
  gap: var(--space-s);
}

.cta .hero__actions {
  justify-content: center;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface-1);
  padding-block: var(--space-xl) var(--space-m);
  margin-top: var(--space-3xl);
}

.footer__inner {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
  display: grid;
  gap: var(--space-l);
}

@media (min-width: 48em) {
  .footer__inner {
    width: min(100% - 4rem, var(--shell));
    grid-template-columns: 1.6fr repeat(3, 1fr);
  }
}

.footer__mark {
  display: block;
  width: 1.75rem;
  color: var(--accent);
  margin-bottom: var(--space-s);
}

.footer__tagline {
  color: var(--text-primary);
  max-width: 28ch;
  font-size: var(--step-0);
}

.footer__meta {
  margin-top: var(--space-2xs);
  font-size: var(--step--2);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer__heading {
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  font-family: var(--font-mono);
}

.footer__group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.3rem;
  font-size: var(--step--1);
}

.footer__group a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer__group a:hover {
  color: var(--text-primary);
}

.footer__legal {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: var(--space-m);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-m);
  justify-content: space-between;
  align-items: center;
  font-size: var(--step--2);
  color: var(--text-muted);
}

.footer__legal p {
  max-width: 74ch;
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

/* ── Charts (shared chrome) ────────────────────────────────────────────────── */

.chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart__tick {
  fill: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.chart__bar-label {
  fill: var(--text-secondary);
  font-size: 12px;
}

.chart__bar-value {
  fill: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-mono);
}

.chart__bar rect {
  cursor: default;
}

.chart__bar:hover path,
.chart__bar:focus-visible path {
  fill: var(--accent-hover);
}

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

.spark {
  width: 6rem;
  height: 1.75rem;
  overflow: visible;
}

/* Legend — always present for two or more series. */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-m);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--step--2);
  color: var(--text-secondary);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend__key {
  flex: none;
  background: var(--key);
}

.legend__key--line {
  width: 0.9rem;
  height: 2px;
  border-radius: 1px;
}

.legend__key--rect {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
}

/* Table view — the non-visual route to every value a chart shows. */
.data-table {
  font-size: var(--step--2);
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.data-table caption {
  text-align: left;
  padding-bottom: var(--space-2xs);
  color: var(--text-muted);
  font-size: var(--step--2);
}

.data-table th,
.data-table td {
  padding: 0.4rem 0.6rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.data-table thead th,
.data-table tbody th {
  text-align: left;
  color: var(--text-secondary);
  font-weight: 500;
}

.data-table thead th {
  background: var(--surface-2);
}

.table-wrap {
  max-height: 18rem;
  overflow: auto;
  margin-top: var(--space-s);
}

.table-wrap[hidden] {
  display: none;
}

/* ── Changelog ─────────────────────────────────────────────────────────────── */

.release {
  display: grid;
  gap: var(--space-s);
  padding-block: var(--space-l);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 48em) {
  .release {
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: var(--space-l);
  }
}

.release__version {
  font-family: var(--font-mono);
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--text-primary);
}

.release__date {
  font-size: var(--step--2);
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.release__tag {
  display: inline-block;
  margin-top: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.1rem 0.55rem;
}

/* ── Diagrams ──────────────────────────────────────────────────────────────── */

.diagram {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* Wide technical drawings scroll inside their own frame rather than forcing the
   page to scroll sideways on a phone. */
@media (max-width: 46em) {
  figure:has(.diagram) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .diagram {
    min-width: 38rem;
  }
}

/* ── Compliance grid ───────────────────────────────────────────────────────── */

.compliance {
  display: grid;
  gap: var(--space-s);
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 44em) {
  .compliance {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 68em) {
  .compliance {
    grid-template-columns: repeat(3, 1fr);
  }
}

.compliance li {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-s);
  background: var(--surface-1);
}

.compliance__name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.compliance__detail {
  color: var(--text-secondary);
  font-size: var(--step--1);
  margin-top: 0.2rem;
}
