/* ==========================================================================
   OK体育 · 全站共享样式表  /assets/site.css
   观察镜档案视觉：深空蓝底 + 左轨道刻度 + 荧光绿编号
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 20px);
}

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* ---------- 2. Tokens ---------- */
:root {
  --void: #0A1626;
  --scope: #10233A;
  --ink: #1B1207;
  --cream: #F4ECDD;
  --signal: #5BFFA0;
  --amber: #F5A524;
  --ember: #E2542C;
  --mist: #8FA3B8;
  --rule: #2A4A6B;
  --glass: rgba(244, 236, 221, 0.07);

  --rail-w: 88px;
  --topbar-h: 64px;
  --maxw: 1320px;
  --pad: clamp(18px, 4vw, 56px);

  --font-display: "Oswald", "Archivo Narrow", "Arial Narrow", "Source Han Sans SC",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas,
    "PingFang SC", "Microsoft YaHei", monospace;
  --font-index: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas,
    "PingFang SC", "Microsoft YaHei", monospace;

  --radius: 3px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. Base ---------- */
body {
  margin: 0;
  min-height: 100vh;
  padding-left: var(--rail-w);
  padding-top: var(--topbar-h);
  background-color: var(--void);
  background-image:
    radial-gradient(140% 90% at 82% -10%, rgba(16, 35, 58, 0.9) 0%, rgba(10, 22, 38, 0) 62%),
    radial-gradient(90% 70% at 4% 108%, rgba(27, 18, 7, 0.75) 0%, rgba(10, 22, 38, 0) 60%);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 { font-size: clamp(32px, 5.4vw, 64px); letter-spacing: 0.03em; }
h2 { font-size: clamp(24px, 3.4vw, 48px); }
h3 { font-size: clamp(20px, 2.2vw, 32px); }
h4 { font-size: 20px; }

::selection { background: var(--signal); color: var(--void); }

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

/* ---------- 4. Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}

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

.stack-sm > * + * { margin-top: 10px; }
.stack-md > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 36px; }

.rule {
  height: 1px;
  border: 0;
  background: var(--rule);
  opacity: 0.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
}

.lede {
  font-size: 16px;
  line-height: 1.85;
  color: var(--mist);
  max-width: 66ch;
}

.num {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--cream);
}

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  transform: translateY(-220%);
  padding: 10px 16px;
  background: var(--signal);
  color: var(--void);
  font-family: var(--font-index);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

/* ---------- 6. Header / Topbar ---------- */
.site-header { position: relative; z-index: 120; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 130;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-left: calc(var(--rail-w) + 20px);
  padding-right: 20px;
  background: linear-gradient(180deg, rgba(10, 22, 38, 0.97), rgba(10, 22, 38, 0.84));
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar__brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: var(--cream);
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 9px;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  vertical-align: middle;
}

.brand-line {
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* 滚动进度光条 */
.scroll-progress {
  position: fixed;
  top: calc(var(--topbar-h) - 2px);
  left: 0;
  z-index: 140;
  width: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--signal), var(--amber));
  box-shadow: 0 0 10px rgba(91, 255, 160, 0.5);
  transition: width 0.12s linear;
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { border-color: var(--signal); color: var(--signal); }
.btn:active { transform: translateY(1px); }

.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--void);
}

.btn--signal:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--void);
}

.btn--ghost {
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mist);
}

.btn--ghost:hover { color: var(--signal); }

.topbar__cta { white-space: nowrap; }

/* ---------- 8. Nav toggle (mobile) ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: rgba(244, 236, 221, 0.04);
  color: var(--cream);
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.nav-toggle:hover { border-color: var(--signal); color: var(--signal); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
  height: 12px;
}

.nav-toggle__bars i {
  display: block;
  height: 1px;
  width: 100%;
  background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 9. Rail navigation ---------- */
.rail {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 125;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 16px;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, rgba(16, 35, 58, 0.94), rgba(10, 22, 38, 0.99));
  border-right: 1px solid var(--rule);
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { width: 0; }

/* 右缘刻度短线 */
.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 9px;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    var(--rule) 0 1px,
    transparent 1px 12px
  );
  opacity: 0.5;
}

.rail__crosshair {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 4px 0 20px;
  border: 1px solid rgba(91, 255, 160, 0.35);
  border-radius: 50%;
}

.rail__crosshair::before,
.rail__crosshair::after {
  content: "";
  position: absolute;
  background: var(--signal);
  opacity: 0.75;
}

.rail__crosshair::before { left: 50%; top: -5px; bottom: -5px; width: 1px; transform: translateX(-0.5px); }
.rail__crosshair::after { top: 50%; left: -5px; right: -5px; height: 1px; transform: translateY(-0.5px); }

.rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  margin-block: auto;
}

.rail__item { width: 100%; }

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 6px;
  color: var(--mist);
  text-decoration: none;
  border-radius: 2px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.rail__link:hover { color: var(--cream); background: rgba(244, 236, 221, 0.06); }

.rail__idx {
  font-family: var(--font-index);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--rule);
  transition: color 0.2s var(--ease);
}

.rail__label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.14em;
}

.rail__link[aria-current="page"] {
  color: var(--signal);
  background: rgba(91, 255, 160, 0.08);
}

.rail__link[aria-current="page"] .rail__idx {
  color: var(--signal);
  text-shadow: 0 0 10px rgba(91, 255, 160, 0.6);
}

.rail__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
}

.rail__foot {
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
  display: flex;
  justify-content: center;
}

.rail__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  color: var(--mist);
  font-family: var(--font-index);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 0.25s var(--ease), color 0.2s var(--ease);
}

.rail__top[data-visible] { opacity: 1; }
.rail__top:hover { color: var(--signal); }

.rail__top-icon {
  font-size: 14px;
  line-height: 1;
  color: var(--signal);
}

.rail__top-text { writing-mode: vertical-rl; text-orientation: mixed; line-height: 1; }

/* ---------- 10. Main / layout skeletons ---------- */
#main-content {
  display: block;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(48px, 7vw, 96px); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(24px, 3vw, 44px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.grid { display: grid; gap: 24px; }

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ---------- 11. Prose ---------- */
.prose {
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(244, 236, 221, 0.86);
}

.prose > * + * { margin-top: 1.15em; }

.prose h2,
.prose h3 {
  color: var(--cream);
  margin-top: 1.8em;
  letter-spacing: 0.03em;
}

.prose h3 { font-size: 24px; }

.prose a {
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 255, 160, 0.4);
}

.prose a:hover { border-bottom-color: var(--signal); }

.prose ul,
.prose ol { list-style: square; padding-left: 1.3em; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.45em; }
.prose strong { color: var(--cream); }

.prose blockquote {
  border-left: 2px solid var(--signal);
  padding-left: 18px;
  color: var(--mist);
}

/* ---------- 12. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-block: 18px 0;
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.breadcrumbs a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.breadcrumbs a:hover { color: var(--signal); border-bottom-color: var(--signal); }

.breadcrumbs__sep { color: var(--rule); }

.breadcrumbs [aria-current="page"] { color: var(--cream); }

/* ---------- 13. Cards ---------- */
.card {
  position: relative;
  padding: 24px;
  background: var(--scope);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.card:hover {
  border-color: rgba(91, 255, 160, 0.5);
  box-shadow: 0 18px 44px -28px rgba(91, 255, 160, 0.45);
}

.card--glass {
  background: var(--glass);
  border-color: rgba(244, 236, 221, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card__index {
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--signal);
}

.card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: var(--cream);
}

.card__meta {
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.card p + p { margin-top: 0.8em; }

/* ---------- 14. Code chip / tags ---------- */
.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgba(91, 255, 160, 0.3);
  border-radius: 2px;
  background: rgba(91, 255, 160, 0.08);
  color: var(--signal);
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.code-chip:hover { background: rgba(91, 255, 160, 0.18); }

.code-chip[data-copied="true"] {
  background: var(--signal);
  color: var(--void);
  border-color: var(--signal);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid var(--rule);
  font-family: var(--font-index);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist);
  background: rgba(244, 236, 221, 0.04);
}

.tag--amber { color: var(--amber); border-color: rgba(245, 165, 36, 0.45); background: rgba(245, 165, 36, 0.1); }
.tag--ember { color: var(--ember); border-color: rgba(226, 84, 44, 0.45); background: rgba(226, 84, 44, 0.1); }
.tag--signal { color: var(--signal); border-color: rgba(91, 255, 160, 0.4); background: rgba(91, 255, 160, 0.09); }

/* ---------- 15. Table ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: rgba(16, 35, 58, 0.55);
}

.table {
  min-width: 640px;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

.table thead th {
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  background: rgba(10, 22, 38, 0.7);
  position: sticky;
  top: 0;
}

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

.table tbody tr:hover { background: rgba(91, 255, 160, 0.05); }

.table td.num, .table .num { color: var(--signal); font-variant-numeric: tabular-nums; }

/* ---------- 16. Media frame ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--scope);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame--placeholder {
  background-color: var(--scope);
  background-image:
    repeating-linear-gradient(135deg, rgba(42, 74, 107, 0.4) 0 1px, transparent 1px 14px),
    linear-gradient(180deg, rgba(16, 35, 58, 0.9), rgba(10, 22, 38, 0.95));
}

.media-frame__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 85% at 50% 42%, transparent 38%, rgba(10, 22, 38, 0.82) 100%),
    linear-gradient(180deg, rgba(10, 22, 38, 0.35), rgba(10, 22, 38, 0.75));
}

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(10, 22, 38, 0), rgba(10, 22, 38, 0.9));
}

/* ---------- 17. Motion helpers ---------- */
[data-reveal].is-visible {
  animation: ok-rise 0.55s var(--ease) both;
}

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

/* ---------- 18. Footer ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 110px);
  background: var(--ink);
  border-top: 1px solid var(--rule);
  color: var(--cream);
}

.footer__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 76px) var(--pad) 34px;
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) 2fr;
  gap: clamp(32px, 5vw, 84px);
}

.footer__brand { min-width: 0; }

.footer__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 10px;
}

.footer__mark::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 10px;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  vertical-align: middle;
}

.footer__tagline {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(244, 236, 221, 0.82);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 2px solid var(--rule);
}

.footer__contact {
  font-family: var(--font-index);
  font-size: 13px;
  line-height: 1.9;
  color: var(--mist);
  word-break: break-word;
}

.footer__note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(143, 163, 184, 0.72);
  max-width: 42ch;
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer__group-title {
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.footer__links { display: flex; flex-direction: column; gap: 11px; }

.footer__links a {
  position: relative;
  display: inline-block;
  padding-left: 13px;
  font-size: 14px;
  color: rgba(244, 236, 221, 0.78);
  text-decoration: none;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer__links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--signal);
  opacity: 0.35;
  transition: width 0.2s var(--ease), opacity 0.2s var(--ease);
}

.footer__links a:hover { color: var(--signal); }
.footer__links a:hover::before { width: 10px; opacity: 1; }

.footer__base {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 20px var(--pad) 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  font-family: var(--font-index);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.footer__legal { color: rgba(143, 163, 184, 0.85); }
.footer__copy { color: rgba(143, 163, 184, 0.7); }

/* ---------- 19. Responsive ---------- */
@media (max-width: 1023px) {
  :root { --topbar-h: 58px; }

  body { padding-left: 0; }

  .topbar { padding-left: 16px; padding-right: 14px; }

  .nav-toggle { display: inline-flex; }

  .rail {
    width: min(78vw, 300px);
    padding: 24px 0 18px;
    align-items: stretch;
    transform: translateX(-102%);
    transition: transform 0.3s var(--ease);
    box-shadow: 26px 0 60px rgba(0, 0, 0, 0.55);
  }

  .rail[data-open] { transform: translateX(0); }

  .rail::after { display: none; }

  .rail__crosshair { margin: 0 auto 22px; }

  .rail__list {
    align-items: stretch;
    gap: 4px;
    padding-inline: 14px;
    margin-block: 0;
  }

  .rail__link {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 12px;
  }

  .rail__label {
    writing-mode: horizontal-tb;
    font-size: 15px;
    letter-spacing: 0.1em;
  }

  .rail__idx { width: 22px; font-size: 12px; }

  .rail__link[aria-current="page"]::before { top: 6px; bottom: 6px; }

  .rail__foot { justify-content: flex-start; padding-inline: 14px; }

  .rail__top { flex-direction: row; gap: 8px; padding: 12px; }
  .rail__top-text { writing-mode: horizontal-tb; }

  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid--12 > [class*="col-"] { grid-column: span 6; }

  .footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .brand-line { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }

  .grid--12 { grid-template-columns: minmax(0, 1fr); }
  .grid--12 > [class*="col-"] { grid-column: span 1; }

  .section__head { flex-direction: column; align-items: flex-start; }

  .card { padding: 20px; }

  .footer__nav { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .footer__base { flex-direction: column; align-items: flex-start; }

  .topbar__cta { display: none; }
}

/* ---------- 20. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal].is-visible { animation: none; }
}
