@charset "utf-8";

:root {
  color-scheme: light dark;
  --paper: #f5f1ea;
  --surface: #fffdf9;
  --ink: #171615;
  --muted: #5d5a56;
  --line: #d8d0c5;
  --signal: #d9041f;
  --signal-deep: #a90a1c;
  --pale-red: #f7dedf;
  --route-bg: #1b1b1a;
  --route-ink: #f7f3ed;
  --route-muted: #c4beb5;
  --content: 1200px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171818;
    --surface: #202221;
    --ink: #f3f0e9;
    --muted: #b9b5ad;
    --line: #41413e;
    --signal: #ff4654;
    --signal-deep: #ff6974;
    --pale-red: #452529;
    --route-bg: #0c0d0d;
    --route-ink: #f7f3ed;
    --route-muted: #c4beb5;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

h1[id], h2[id], h3[id] { scroll-margin-top: 1.5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.5rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.skip-link:focus-visible { transform: translateY(0); }

.masthead,
main,
.site-footer {
  width: min(calc(100% - 3rem), var(--content));
  margin-inline: auto;
}

.masthead {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name, .footer-brand { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.095em; }
.brand-name span, .footer-brand span { color: var(--signal); }

.primary-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(1rem, 2.7vw, 2.4rem);
  margin-left: auto;
}

.primary-nav a,
.site-footer nav a,
.back-top {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.primary-nav a { text-decoration: none; }
.primary-nav a:hover, .site-footer a:hover { color: var(--signal-deep); }
.language-switch { display: inline-flex; gap: 0.2rem; padding: 0.22rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; }
.language-switch a, .language-switch span { padding: 0.28rem 0.5rem; border-radius: 999px; text-decoration: none; }
.language-switch [aria-current="page"] { background: var(--ink); color: var(--paper); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(4.5rem, 9vw, 8.5rem) 0 clamp(4rem, 7vw, 6.25rem);
  animation: arrive 500ms ease-out both;
}

.hero-copy { max-width: 650px; }
.eyebrow { margin: 0 0 1.35rem; color: var(--muted); font-size: 0.71rem; font-weight: 800; letter-spacing: 0.14em; line-height: 1.5; }
.signal-dot { display: inline-block; width: 0.62rem; height: 0.62rem; margin-right: 0.45rem; border-radius: 50%; background: var(--signal); vertical-align: -0.01em; }

h1, h2, h3, p { margin-top: 0; }

h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.045em; }
h1 { max-width: 760px; margin-bottom: 1.35rem; font-size: clamp(3rem, 6.3vw, 6.1rem); line-height: 0.99; }
h1 span, h2 span { color: var(--signal-deep); }
.hero-lede { max-width: 630px; margin-bottom: 1.75rem; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.6rem; }
.button { display: inline-flex; align-items: center; gap: 1.15rem; min-height: 48px; padding: 0.72rem 1.05rem; text-decoration: none; font-size: 0.9rem; font-weight: 750; }
.button-primary { background: var(--signal); color: #fff; }
.button-primary:hover { background: var(--signal-deep); }
.text-link { color: var(--signal-deep); font-size: 0.9rem; font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.hero-note { margin: 1.75rem 0 0; color: var(--muted); font-size: 0.78rem; }
.hero-note strong { color: var(--ink); }

.route-figure { margin: 0; padding: 1.1rem 1.15rem 1.25rem; background: var(--route-bg); color: var(--route-ink); box-shadow: 13px 13px 0 var(--pale-red); }
.route-figure figcaption { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid #4e4b47; color: var(--route-muted); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; }
.route-list { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.route-list::before { position: absolute; top: 1.7rem; bottom: 1.7rem; left: 1.15rem; width: 1px; background: #625c54; content: ""; }
.route-list li { position: relative; display: grid; grid-template-columns: 2.35rem minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; min-height: 82px; border-bottom: 1px solid #373633; }
.route-index { z-index: 1; display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border: 1px solid #746d63; border-radius: 50%; background: var(--route-bg); color: #e4ddd4; font-size: 0.67rem; font-weight: 800; }
.route-copy { display: grid; gap: 0.22rem; }
.route-copy strong { font-size: 0.92rem; letter-spacing: 0.01em; }
.route-copy small { color: var(--route-muted); font-size: 0.7rem; line-height: 1.45; }
.route-tag, .endpoint-tags span { padding: 0.26rem 0.38rem; border: 1px solid #615a51; color: var(--route-muted); font-size: 0.57rem; font-weight: 800; letter-spacing: 0.09em; white-space: nowrap; }
.endpoint-tags { display: grid; gap: 0.3rem; }
.route-foot { display: flex; align-items: center; gap: 0.6rem; margin: 1rem 0 0; color: var(--route-muted); font-size: 0.7rem; line-height: 1.5; }
.route-line { width: 1.3rem; height: 2px; flex: 0 0 auto; background: var(--signal); }

.fact-ribbon { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; }
.fact-ribbon b { margin-right: 0.45rem; color: var(--signal-deep); font-size: 1rem; }

.section-block { padding: clamp(5rem, 9vw, 8rem) 0; }
.section-heading { display: grid; grid-template-columns: 1fr 0.7fr; column-gap: 3rem; align-items: end; margin-bottom: 3rem; }
.section-heading .eyebrow { grid-column: 1 / -1; }
h2 { margin-bottom: 0; font-size: clamp(2.6rem, 5vw, 4.7rem); line-height: 1.02; }
.section-heading > p:last-child { max-width: 390px; margin-bottom: 0.3rem; color: var(--muted); font-size: 0.94rem; }
.component-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.component-list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) minmax(5.5rem, 0.28fr); align-items: start; gap: 1rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.component-number { padding-top: 0.1rem; color: var(--signal-deep); font-size: 0.73rem; font-weight: 800; letter-spacing: 0.08em; }
.component-list h3 { margin: 0 0 0.35rem; font-size: 1.02rem; letter-spacing: 0.015em; }
.component-list h3 span { color: var(--signal-deep); }
.component-list p { max-width: 760px; margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.component-kind { justify-self: end; padding-top: 0.15rem; color: var(--muted); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; }

.boundary-section { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 7vw, 7rem); padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4.5rem); background: var(--pale-red); }
.boundary-intro .eyebrow { color: var(--signal-deep); }
.boundary-intro h2 { margin-bottom: 1.1rem; font-size: clamp(2.5rem, 4.3vw, 4.2rem); }
.boundary-intro > p:last-child { max-width: 390px; margin-bottom: 0; color: var(--muted); }
.boundary-columns { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 3vw, 3rem); }
.boundary-columns article { border-top: 2px solid var(--signal); padding-top: 0.9rem; }
.boundary-index, .status-key { color: var(--signal-deep); font-size: 0.65rem; font-weight: 850; letter-spacing: 0.1em; }
.boundary-columns h3 { margin: 1rem 0 0.75rem; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.boundary-columns p { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.83rem; line-height: 1.7; }
code { padding: 0.12em 0.3em; background: color-mix(in srgb, var(--surface) 70%, transparent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.87em; }

.status-section { display: grid; grid-template-columns: minmax(150px, 0.32fr) 1fr; gap: clamp(2rem, 5vw, 5rem); margin: clamp(5rem, 9vw, 8rem) 0; padding: clamp(1.5rem, 4vw, 3.5rem); border: 1px solid var(--line); background: var(--surface); }
.status-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.status-label { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.66rem; font-weight: 850; letter-spacing: 0.1em; }
.status-square { width: 0.65rem; height: 0.65rem; background: var(--signal); }
.status-version { color: var(--signal-deep); font-family: var(--serif); font-size: 1.6rem; line-height: 1; }
.status-content h2 { max-width: 680px; margin-bottom: 2rem; font-size: clamp(2.3rem, 4vw, 3.8rem); }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; padding: 1.4rem 0 1.8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status-grid p { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.status-content > .text-link { display: inline-block; margin-top: 1.5rem; }

.site-footer { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1.3rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); }
.footer-brand { text-decoration: none; white-space: nowrap; }
.site-footer p { margin: 0; color: var(--muted); font-size: 0.72rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.site-footer nav a, .back-top { font-size: 0.72rem; }
.back-top { white-space: nowrap; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 900px) {
  .masthead { gap: 1rem; }
  .primary-nav { gap: 1rem; }
  .primary-nav a { font-size: 0.75rem; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(310px, 0.8fr); gap: 2rem; }
  .boundary-section { grid-template-columns: 1fr; }
  .boundary-intro { max-width: 720px; }
  .site-footer { grid-template-columns: auto 1fr auto; }
  .back-top { grid-column: 3; }
}

@media (max-width: 760px) {
  .masthead, main, .site-footer { width: min(calc(100% - 2rem), var(--content)); }
  .masthead { min-height: 72px; flex-wrap: wrap; gap: 0.5rem; padding: 0.7rem 0; }
  .brand-mark { width: 36px; height: 36px; }
  .primary-nav { order: 3; width: 100%; justify-content: space-between; gap: 0.7rem; padding-top: 0.55rem; border-top: 1px solid var(--line); }
  .primary-nav a { font-size: 0.7rem; }
  .language-switch { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 3rem; padding: 4.2rem 0 3.5rem; }
  h1 { font-size: clamp(3rem, 14vw, 5rem); }
  .route-figure { max-width: none; box-shadow: 7px 7px 0 var(--pale-red); }
  .fact-ribbon { justify-content: flex-start; flex-wrap: wrap; gap: 0.55rem 1.2rem; font-size: 0.68rem; }
  .section-heading { grid-template-columns: 1fr; gap: 1.25rem; }
  .section-heading .eyebrow { margin-bottom: 0; }
  .section-heading > p:last-child { max-width: 540px; }
  .component-list li { grid-template-columns: 2rem minmax(0, 1fr); gap: 0.6rem; }
  .component-kind { grid-column: 2; justify-self: start; margin-top: -0.15rem; }
  .boundary-section { margin-inline: -0.35rem; padding: 2rem 1.25rem; }
  .boundary-columns { grid-template-columns: 1fr; gap: 1.5rem; }
  .status-section { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.25rem; }
  .status-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .status-grid > div + div { padding-top: 1rem; border-top: 1px solid var(--line); }
  .site-footer { grid-template-columns: 1fr auto; align-items: start; gap: 0.85rem; }
  .site-footer p { grid-column: 1 / -1; grid-row: 2; }
  .site-footer nav { grid-column: 1 / -1; grid-row: 3; }
  .back-top { grid-column: 2; grid-row: 1; }
}

@media (max-width: 380px) {
  .route-figure { padding-inline: 0.8rem; }
  .route-list li { grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.55rem; }
  .route-list::before { left: 1rem; }
  .route-index { width: 2rem; height: 2rem; }
  .route-copy small { font-size: 0.64rem; }
  .endpoint-tags span, .route-tag { font-size: 0.52rem; }
}
