/* ==========================================================================
   IANA — Example Domains
   Shared design system: tokens, chrome, components, motion
   Mobile-first. Every page links this file and reuses these classes verbatim.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Noto+Sans:wght@400;500;600;700&display=swap");

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand / primary */
  --color-primary: #003b71;
  --color-primary-hover: #002a52;
  --color-secondary: oklch(0.6883 0.1016 217.3);
  --color-secondary-soft: #b4c8dd;
  --color-accent: oklch(0.795 0.083 175);
  --color-accent-warm: #f2de32;
  --color-rir-arin: #4d85c5;
  --color-rir-ripe: #f5872b;
  --color-rir-apnic: #8269ae;
  --color-rir-lacnic: #7cc142;
  --color-rir-afrinic: #e5d13f;

  /* Feedback */
  --color-live: #ff674f;
  --color-notice-bg: #fff1bb;
  --color-notice-border: #f2de32;
  --color-error-bg: #fae5e3;
  --color-error-border: #c87872;
  --color-error-text: #b9554d;
  --color-red: oklch(0.461 0.157 29);
  --color-success-bg: oklch(0.643 0.161 143.4);
  --color-success-fg: #0b2e1a;
  --color-success-border: oklch(0.5 0.12 143.4);

  /* Code surfaces */
  --color-code-bg: #111827;
  --color-code-fg: #e5e7eb;
  --color-code-border: #1f2937;

  /* Neutrals */
  --color-text: #333;
  --color-text-secondary: #666;
  --color-text-muted: #999;
  --color-text-inverse: #fafafc;
  --gray: oklch(0.6 0 0);
  --color-border: #ccc;
  --color-border-light: #ddd;
  --color-surface: #f0f0f0;
  --color-surface-faint: #fafafc;
  --color-title-band: #f3f4f5;
  --color-body-band: #edeff0;
  --color-background: oklch(0.95 0.005 220);
  --color-nav-link: rgb(46 83 105);
  --color-link: oklch(0.58 0.14 251);
  --color-link-hover: oklch(0.49 0.14 251);

  /* Tables */
  --color-table-line: #c8c8ce;
  --color-table-band: #eef0f4;
  --color-table-zebra: #f4f5f7;
  --color-table-count: #e0e0e4;
  --color-table-search: #f2f2f5;

  /* Semantic aliases */
  --color-bg: var(--color-background);
  --color-fg: var(--color-text);
  --color-muted: var(--color-text-muted);
  --color-surface-1: var(--color-surface-faint);
  --color-surface-2: var(--color-surface);
  --color-accent-line: var(--color-secondary-soft);

  /* Typography */
  --font-body: Noto, "Noto Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --font-arabic: s-arab, var(--font-body);
  --font-japanese: s-jpan, var(--font-body);

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-snug: 1.4;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.65;

  --baseline: 20px;

  /* Spacing scale (reference: 10 / 15 / 25 / 50) */
  --space-xs: 10px;
  --space-sm: 15px;
  --space-md: 25px;
  --space-lg: 50px;
  --space-xl: 80px;
  --space-2xl: 120px;

  /* Layout */
  --container-max: 1200px;
  --container-gutter: var(--space-md);
  --reg-col: 44%;
  --nav-drop: 75px;
  --nav-width: 250px;
  --header-height: 72px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-panel: 0 2px 4px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.14);

  /* Motion */
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 600ms;
  --duration-pulse: 1.5s;
  --duration-highlight: 1.4s;
  --duration-flash: 0.8s;
  --duration-marquee: 28s;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --z-header: 100;
  --z-dropdown: 200;
  --z-overlay: 300;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--baseline);
  color: var(--color-fg);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover,
a:focus-visible {
  color: var(--color-link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

p,
ul,
ol,
dl,
figure,
blockquote,
pre,
table {
  margin: 0 0 var(--space-sm);
}

ul,
ol {
  padding-left: var(--space-md);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-light);
  margin: var(--space-md) 0;
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.925em;
}

code {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

pre {
  background: var(--color-surface-faint);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  overflow-x: auto;
  line-height: var(--line-height-base);
}

pre code {
  background: none;
  border: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--space-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-size: var(--font-size-lg);
}

h4 {
  font-size: var(--font-size-md);
}

h5,
h6 {
  font-size: var(--font-size-base);
}

.lead {
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  max-width: 62ch;
}

.small {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}

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

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

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

.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;
}

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100px;
  z-index: calc(var(--z-header) + 10);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

.skip-link:focus {
  top: var(--space-sm);
  color: var(--color-text-inverse);
}

/* --------------------------------------------------------------------------
   4. Layout: container, grid, flex, stack
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.container-narrow {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

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

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.flex-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.flex-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.stack > * + * {
  margin-top: var(--space-sm);
}

.stack-md > * + * {
  margin-top: var(--space-md);
}

.stack-lg > * + * {
  margin-top: var(--space-lg);
}

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

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

.title-band {
  background: var(--color-title-band);
  border-bottom: 1px solid var(--color-border-light);
  padding-block: var(--space-md);
}

.body-band {
  background: var(--color-body-band);
  padding-block: var(--space-lg);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding: 0.55em 1.25em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-text-inverse);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-secondary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--color-surface);
  color: var(--color-text);
}

.btn-sm {
  min-height: 36px;
  padding: 0.35em 0.85em;
  font-size: var(--font-size-sm);
}

.btn-lg {
  min-height: 52px;
  padding: 0.75em 1.6em;
  font-size: var(--font-size-md);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   6. Surfaces: card, panel, badge, callouts
   -------------------------------------------------------------------------- */

.card {
  background: var(--color-surface-faint);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.card__title {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}

.card__body {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.card__footer {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.panel {
  background: var(--color-surface-faint);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  padding: var(--space-md);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.15em 0.6em;
  border-radius: var(--radius-pill);
  background: var(--color-table-count);
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-live {
  background: var(--color-notice-bg);
  color: var(--color-red);
  border: 1px solid var(--color-notice-border);
}

.badge-live::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  color: var(--color-live);
  background: currentColor;
  animation: pulse var(--duration-pulse) var(--ease-in-out) infinite;
}

.notice {
  background: var(--color-notice-bg);
  border: 1px solid var(--color-notice-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice-error {
  background: var(--color-error-bg);
  border-color: var(--color-error-border);
  color: var(--color-error-text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-table-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-faint);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  padding: 0.65em 0.85em;
  text-align: left;
  border-bottom: 1px solid var(--color-table-line);
  vertical-align: top;
}

.table thead th {
  background: var(--color-table-band);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  white-space: nowrap;
}

.table tbody tr:nth-child(even) {
  background: var(--color-table-zebra);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------------------------
   7. Site chrome — header / nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-surface-faint);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: var(--header-height);
  position: relative;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--color-primary);
  min-width: 0;
  padding-block: var(--space-xs);
}

.site-brand:hover,
.site-brand:focus-visible {
  color: var(--color-primary-hover);
  text-decoration: none;
}

.site-brand__mark {
  font-family: var(--font-body);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  line-height: 1;
}

.site-brand__tag {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Primary navigation — always visible at every width.
   On small screens it wraps to its own full-width row under the brand;
   from 900px up it sits inline to the right of the brand. No toggle needed. */
.site-nav {
  display: block;
  width: 100%;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-faint);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: var(--space-xs) 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

.site-nav__item {
  margin: 0;
}

.site-nav__link {
  display: block;
  padding: 0.5em 0.75em;
  min-height: 44px;
  color: var(--color-nav-link);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--color-primary);
  background: var(--color-surface);
  text-decoration: none;
}

.site-nav__link[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-secondary);
  font-weight: var(--font-weight-semibold);
}

/* --------------------------------------------------------------------------
   8. Site chrome — footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  margin-top: auto;
  padding-block: var(--space-lg) 0;
}

.site-footer a {
  color: var(--color-secondary-soft);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-text-inverse);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-md);
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-inverse);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-tagline {
  margin: 0;
  color: var(--color-secondary-soft);
  line-height: var(--line-height-relaxed);
  max-width: 36ch;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
}

.footer-links a {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.footer-contact {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-secondary-soft);
  line-height: var(--line-height-relaxed);
}

.footer-contact a {
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  padding-block: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-copy {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-secondary-soft);
}

.footer-meta {
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--color-secondary-soft);
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   9. Page components — shared by index.html and checker.html
   -------------------------------------------------------------------------- */

/* Title band extras */
.title-figure {
  margin: 0 0 var(--space-sm);
}

.title-figure img {
  display: block;
  width: 234px;
  max-width: 100%;
  height: auto;
}

/* On-this-page anchor rail */
.on-this-page__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-xs);
}

.on-this-page__list a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.on-this-page__list a:hover,
.on-this-page__list a:focus-visible {
  background: var(--color-surface);
  text-decoration: underline;
}

.on-this-page__list a::before {
  content: "\2193";
  opacity: 0.55;
}

/* Code snippets */
.snippet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xs);
}

.snippet__lang {
  margin: 0;
  font-size: var(--font-size-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

.code-block {
  margin: 0;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--color-code-bg);
  color: var(--color-code-fg);
  border: 1px solid var(--color-code-border);
  overflow-x: auto;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.code-block code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

.copy-btn {
  min-height: 44px;
  min-width: 6rem;
}

/* Guardrail cards */
.guard-card ul {
  margin: 0;
  padding-left: var(--space-md);
  display: grid;
  gap: var(--space-sm);
}

/* Closing CTA row */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

/* Further reading */
.reading-list {
  display: grid;
  gap: var(--space-md);
}

.reading-list h3 {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-size-md);
}

.reading-list p {
  margin: 0;
}

/* Live HTTP response block */
.http-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-xs);
}

/* Checker form */
.checker-form {
  display: grid;
  gap: var(--space-xs);
}

.checker-label {
  font-weight: var(--font-weight-semibold);
}

.checker-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: stretch;
}

.checker-input {
  flex: 1 1 16rem;
  min-height: 44px;
  min-width: 0;
  padding: var(--space-xs) var(--space-sm);
  font: inherit;
  font-family: var(--font-mono);
  color: var(--color-fg);
  background: var(--color-surface-faint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.checker-input::placeholder {
  color: var(--color-text-muted);
  font-family: inherit;
}

.checker-input:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.checker-form .btn {
  min-height: 44px;
}

/* Sample-name chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.chip-row .btn,
.chip {
  min-height: 44px;
  min-width: 44px;
}

/* Checker result */
.result-panel {
  display: grid;
  gap: var(--space-sm);
}

.result-heading {
  margin: 0;
  font-size: var(--font-size-base);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}

.result-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.result-name {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  word-break: break-all;
}

.result-verdict {
  margin: 0;
  font-size: var(--font-size-md);
}

.result-rfc {
  margin: 0;
}

.result-panel .badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Status pills — one badge language for every page */
.badge--reserved,
.badge[data-status="RESERVED"] {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.badge--special,
.badge[data-status="SPECIAL-USE"] {
  background: var(--color-notice-bg);
  color: var(--color-text);
  border: 1px solid var(--color-notice-border);
}

.badge--open {
  background: var(--color-success-bg);
  color: var(--color-success-fg);
}

.badge[data-status="NOT RESERVED"] {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.badge[data-status="INVALID"] {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border: 1px solid var(--color-error-border);
}

/* Checker cross-links */
.crosslinks {
  display: grid;
  gap: var(--space-md);
}

.crosslinks figure {
  margin: 0;
  display: grid;
  gap: var(--space-sm);
  justify-items: start;
}

.crosslinks img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.crosslinks a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.crosslinks .link-row,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  align-items: center;
}

/* --------------------------------------------------------------------------
   10. Motion — keyframes + reusable classes
   -------------------------------------------------------------------------- */

@keyframes pulse {
  0% {
    color: var(--color-live);
  }
  50% {
    color: rgb(111, 42, 33);
  }
  100% {
    color: var(--color-live);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.85);
  }
}

@keyframes search-highlight-fade {
  0%,
  20% {
    background-color: rgb(255, 235, 59);
  }
  100% {
    background-color: rgb(255, 249, 196);
  }
}

@keyframes copy-check-flash {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  20% {
    opacity: 1;
    transform: scale(1.15);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  75% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Reusable motion utilities */
.pulse {
  color: var(--color-live);
  animation: pulse var(--duration-pulse) var(--ease-in-out) infinite;
}

.pulse-dot {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--color-live);
  animation: pulse-dot var(--duration-pulse) var(--ease-in-out) infinite;
}

.search-highlight {
  animation: search-highlight-fade var(--duration-highlight) var(--ease-out) forwards;
  border-radius: 2px;
  padding: 0 0.15em;
}

.copy-check-flash {
  animation: copy-check-flash var(--duration-flash) var(--ease-spring) forwards;
}

.reveal {
  opacity: 0;
  animation: reveal var(--duration-slow) var(--ease-out) forwards;
}

.fade-up {
  opacity: 0;
  animation: fade-up var(--duration-slow) var(--ease-out) forwards;
}

.fade-in {
  opacity: 0;
  animation: fade-in var(--duration-slow) var(--ease-out) forwards;
}

.marquee {
  overflow: hidden;
  white-space: nowrap;
}

.marquee__track {
  display: inline-flex;
  gap: var(--space-lg);
  animation: marquee var(--duration-marquee) linear infinite;
  will-change: transform;
}

.delay-1 {
  animation-delay: 80ms;
}
.delay-2 {
  animation-delay: 160ms;
}
.delay-3 {
  animation-delay: 240ms;
}
.delay-4 {
  animation-delay: 320ms;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .fade-up,
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   11. Responsive — mobile-first, scale up
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  :root {
    --container-gutter: var(--space-md);
  }

  h1 {
    font-size: var(--font-size-3xl);
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  :root {
    --container-gutter: 40px;
    --header-height: 88px;
  }

  .site-header__inner {
    gap: var(--space-md);
    flex-wrap: nowrap;
  }

  .site-nav {
    width: auto;
    border-top: 0;
    background: transparent;
    margin-left: auto;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-xs);
    padding: 0;
  }

  .site-nav__link {
    padding: 0.5em 0.75em;
    border-bottom-width: 2px;
  }

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-lg);
  }
}

@media (min-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   12. Dark mode (differentiator — tokens only, components follow)
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #9ec9f5;
    --color-primary-hover: #c5e0fa;
    --color-secondary: oklch(0.75 0.1 217.3);
    --color-secondary-soft: #3a5570;
    --color-text: #e8eaed;
    --color-text-secondary: #b0b6bd;
    --color-text-muted: #8a919a;
    --color-text-inverse: #0c1218;
    --color-bg: #0f1419;
    --color-background: #0f1419;
    --color-body-band: #141a21;
    --color-title-band: #1a222b;
    --color-surface: #1c242e;
    --color-surface-faint: #182029;
    --color-border: #3a4552;
    --color-border-light: #2a333e;
    --color-nav-link: #c5d4e3;
    --color-link: #8eb8f0;
    --color-link-hover: #b3d1f7;
    --color-notice-bg: #3a3418;
    --color-notice-border: #6b6120;
    --color-error-bg: #3a2220;
    --color-error-border: #7a403c;
    --color-error-text: #e2a29c;
    --color-table-band: #1e2731;
    --color-table-zebra: #161d25;
    --color-table-line: #2f3945;
    --color-table-count: #2a333e;
    --shadow-panel: 0 2px 4px rgba(0, 0, 0, 0.45);
  }

  .site-header {
    background: var(--color-surface-faint);
  }

  .site-footer {
    background: #0a2036;
  }

  .site-footer a {
    color: #a8c4de;
  }

  .site-footer a:hover,
  .site-footer a:focus-visible {
    color: #ffffff;
  }

  .footer-tagline,
  .footer-contact,
  .footer-copy,
  .footer-meta {
    color: #a8c4de;
  }

  .footer-heading {
    color: var(--color-text);
  }

  .btn-primary {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-text-inverse);
  }

  .btn-secondary {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
  }
}