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

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

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul, address {
  margin: 0;
}

ol, ul { padding: 0; list-style: none; }

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

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; }

/* ===== 02. Design tokens ===== */
:root {
  --c-blue: #1657D6;
  --c-space: #10141C;
  --c-indy: #2B2A6E;
  --c-teal: #0C4A45;
  --c-wine: #6B1F35;
  --c-orange: #FF6A1F;
  --c-cyan: #35E0D0;
  --c-silver: #C6CEDB;
  --c-paper: #F6F8FC;
  --c-ink: #0B0E14;
  --c-muted: #5B6474;

  --hair: rgba(198, 206, 219, 0.28);
  --hair-soft: rgba(198, 206, 219, 0.14);
  --hair-ink: rgba(11, 14, 20, 0.12);

  --rail-w: 88px;
  --topbar-h: 76px;
  --pad: clamp(1.15rem, 3.2vw, 3.5rem);
  --gap: clamp(1rem, 2vw, 1.5rem);

  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 44px -30px rgba(11, 14, 20, 0.6);
  --shadow-lift: 0 24px 60px -36px rgba(11, 14, 20, 0.55);

  --font-head: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-body: 17px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ===== 03. Base & 中文排版 ===== */
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.78;
  letter-spacing: 0.01em;
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.03em;
  color: var(--c-ink);
}

h1 { font-size: clamp(2.2rem, 4.6vw, 4rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.15rem; line-height: 1.45; }
h4 { font-size: 1rem; }

p { max-width: 74ch; }

::selection { background: var(--c-cyan); color: var(--c-space); }

:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

.section--space :focus-visible,
.section--indy :focus-visible,
.section--teal :focus-visible,
.section--wine :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--c-cyan);
}

/* ===== 04. Skip link ===== */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 300;
  padding: 0.65rem 1.05rem;
  background: var(--c-cyan);
  color: var(--c-space);
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.22s var(--ease);
}

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

/* ===== 05. Layout ===== */
.shell {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  position: relative;
  padding-block: clamp(2.6rem, 6vw, 5.5rem);
}

.section--paper { background: var(--c-paper); color: var(--c-ink); }
.section--space { background: var(--c-space); color: rgba(246, 248, 252, 0.82); }
.section--indy  { background: var(--c-indy);  color: rgba(246, 248, 252, 0.86); }
.section--teal  { background: var(--c-teal);  color: rgba(246, 248, 252, 0.86); }
.section--wine  { background: var(--c-wine);  color: rgba(246, 248, 252, 0.9); }

.section--space h1, .section--space h2, .section--space h3,
.section--indy h1, .section--indy h2, .section--indy h3,
.section--teal h1, .section--teal h2, .section--teal h3,
.section--wine h1, .section--wine h2, .section--wine h3 {
  color: var(--c-paper);
}

.overlap-top {
  margin-top: calc(var(--topbar-h) * -1);
  padding-top: calc(var(--topbar-h) + clamp(1.6rem, 4vw, 3rem));
}

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

.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-9  { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.hairline {
  height: 1px;
  border: 0;
  background: var(--hair);
}

.tex-grid {
  background-image:
    linear-gradient(rgba(198, 206, 219, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 206, 219, 0.1) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* ===== 06. Typography helpers ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-blue);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
}

.section--space .eyebrow,
.section--indy .eyebrow,
.section--teal .eyebrow,
.section--wine .eyebrow,
.site-footer .eyebrow {
  color: var(--c-cyan);
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.85;
  color: var(--c-muted);
}

.section--space .lede,
.section--indy .lede,
.section--teal .lede,
.section--wine .lede {
  color: rgba(198, 206, 219, 0.86);
}

.num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.stat { display: block; }

.stat__value {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--c-orange);
}

.stat__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--c-muted);
}

.section--space .stat__label,
.section--indy .stat__label,
.section--teal .stat__label,
.section--wine .stat__label {
  color: rgba(198, 206, 219, 0.7);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.6rem;
  border: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: inherit;
}

.tag--accent { border-color: var(--c-orange); color: var(--c-orange); }
.tag--cyan   { border-color: var(--c-cyan);   color: var(--c-cyan); }

/* ===== 07. Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  background: none;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.btn--primary {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: #12151c;
}

.btn--primary:hover {
  background: var(--c-cyan);
  border-color: var(--c-cyan);
  color: var(--c-space);
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--hair);
  color: var(--c-paper);
}

.btn--ghost:hover {
  border-color: var(--c-cyan);
  color: var(--c-cyan);
}

.btn--quiet {
  border-color: var(--hair-ink);
  color: var(--c-ink);
}

.btn--quiet:hover {
  border-color: var(--c-blue);
  color: var(--c-blue);
}

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

/* ===== 08. Panels / data / media ===== */
.panel {
  padding: clamp(1.1rem, 2.2vw, 1.8rem);
  border: 1px solid var(--hair);
  background: rgba(246, 248, 252, 0.04);
  box-shadow: var(--shadow-panel);
}

.panel--paper {
  background: #fff;
  border-color: var(--hair-ink);
  color: var(--c-ink);
  box-shadow: var(--shadow-lift);
}

.panel--float {
  position: sticky;
  top: calc(var(--topbar-h) + 1.25rem);
}

.breadcrumbs {
  padding-block: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--c-silver);
}

.breadcrumbs a {
  color: var(--c-muted);
  text-decoration: none;
}

.breadcrumbs a:hover { color: var(--c-blue); }
.breadcrumbs [aria-current="page"] { color: var(--c-ink); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--hair-ink);
}

.data-table thead th {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  border-bottom-color: rgba(22, 87, 214, 0.4);
}

.data-table tbody tr:nth-child(even) { background: rgba(22, 87, 214, 0.05); }

.data-table th.num,
.data-table td.num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.section--space .data-table th,
.section--space .data-table td,
.section--indy .data-table th,
.section--indy .data-table td,
.section--teal .data-table th,
.section--teal .data-table td {
  border-bottom-color: var(--hair);
}

.media {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--hair);
  background: linear-gradient(140deg, var(--c-space) 0%, var(--c-indy) 58%, var(--c-teal) 100%);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
}

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

.media__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--c-paper);
  background: linear-gradient(to top, rgba(11, 14, 20, 0.85), rgba(11, 14, 20, 0));
}

/* ===== 09. Expandable groups ===== */
.expand { border-top: 1px solid var(--hair); }

.expand__trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: none;
  color: inherit;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.expand__trigger:hover { color: var(--c-blue); }

.expand__trigger::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--c-orange);
  transition: color 0.2s var(--ease);
}

.expand__trigger[aria-expanded="true"]::after {
  content: "\2013";
  color: var(--c-cyan);
}

.expand__panel {
  max-width: 70ch;
  padding: 0.95rem 0 1.35rem;
  color: var(--c-muted);
  border-bottom: 1px solid var(--hair);
}

.expand__panel[hidden] { display: none; }

.expand[data-open="true"] .expand__trigger { border-bottom-color: var(--c-cyan); }

.section--space .expand__panel,
.section--indy .expand__panel,
.section--teal .expand__panel,
.section--wine .expand__panel {
  color: rgba(198, 206, 219, 0.86);
}

/* ===== 10. Header ===== */
.site-header { position: relative; z-index: 60; }

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 80;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 0.5rem 1.15rem;
  background: var(--c-space);
  border-right: 1px solid var(--hair);
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--c-paper);
}

.rail__monogram {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--c-cyan);
  background: rgba(53, 224, 208, 0.07);
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.rail__wordmark {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: rgba(246, 248, 252, 0.62);
}

.rail__spine {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  margin: 1rem 0;
}

.rail__spine::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--hair) 15%, var(--hair) 85%, transparent);
}

.rail__dot {
  position: relative;
  width: 5px;
  height: 5px;
  background: var(--c-silver);
  opacity: 0.55;
}

.rail__dot:nth-child(2) { background: var(--c-orange); opacity: 0.9; }
.rail__dot:nth-child(3) { background: var(--c-cyan); opacity: 0.9; }

.rail__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.rail__meter {
  position: relative;
  width: 2px;
  height: 96px;
  background: rgba(198, 206, 219, 0.22);
  overflow: hidden;
}

.rail__meter-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to bottom, var(--c-cyan), var(--c-orange));
  transition: height 0.18s linear;
}

.rail__num {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: rgba(198, 206, 219, 0.55);
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 70;
  height: var(--topbar-h);
  background: linear-gradient(to bottom, rgba(16, 20, 28, 0.9), rgba(16, 20, 28, 0.4) 68%, rgba(16, 20, 28, 0));
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.site-header[data-scrolled="true"] .topbar {
  background: rgba(16, 20, 28, 0.95);
  border-bottom-color: var(--hair);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-inline: var(--pad);
}

.topbar__brand {
  display: none;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--c-paper);
}

.topbar__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--c-cyan);
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.topbar__text {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.6vw, 1.6rem);
}

.nav__list a {
  position: relative;
  display: inline-block;
  padding: 0.4rem 0.1rem;
  color: rgba(246, 248, 252, 0.76);
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--c-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav__list a:hover { color: #ffffff; }
.nav__list a:hover::after { transform: scaleX(1); }

.nav__list a[aria-current="page"] { color: #ffffff; }

.nav__list a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--c-cyan);
}

.nav__drawer { display: none; }

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.quick {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.quick a {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--hair);
  color: rgba(198, 206, 219, 0.85);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.quick a:hover {
  background: var(--c-cyan);
  border-color: var(--c-cyan);
  color: var(--c-space);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--hair);
  background: rgba(246, 248, 252, 0.06);
  color: var(--c-paper);
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: var(--c-cyan);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

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

/* ===== 11. Footer ===== */
.site-footer {
  position: relative;
  background: var(--c-space);
  color: rgba(246, 248, 252, 0.72);
}

.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--c-blue) 0 28%,
    var(--c-indy) 28% 52%,
    var(--c-teal) 52% 76%,
    var(--c-wine) 76% 100%
  );
}

.footer__inner {
  padding-block: clamp(2.4rem, 5vw, 4rem) clamp(1.4rem, 3vw, 2.2rem);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(220px, 3fr) 9fr;
  gap: calc(var(--gap) * 1.6);
  padding-bottom: clamp(1.8rem, 3.5vw, 2.8rem);
}

.footer__brand { max-width: 34ch; }

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--c-paper);
}

.footer__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--c-cyan);
  background: rgba(53, 224, 208, 0.08);
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
}

.footer__name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.footer__desc {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: rgba(198, 206, 219, 0.7);
}

.footer__tagline {
  margin-top: 0.9rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--c-orange);
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(246, 248, 252, 0.88);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.footer__coltitle {
  margin-bottom: 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--c-cyan);
}

.footer__links li + li { margin-top: 0.55rem; }

.footer__links a {
  position: relative;
  display: inline-block;
  color: rgba(246, 248, 252, 0.74);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

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

.footer__links a:hover {
  color: var(--c-paper);
  transform: translateX(4px);
}

.footer__links a:hover::before { opacity: 1; }

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: clamp(1.2rem, 2.4vw, 1.8rem);
  border-top: 1px solid var(--hair);
  font-size: 0.8rem;
  color: rgba(198, 206, 219, 0.66);
}

.footer__copy { max-width: none; }

.footer__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-style: normal;
}

.footer__sep { color: rgba(198, 206, 219, 0.35); }

/* ===== 12. Reveal ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ===== 13. Responsive ===== */
@media (min-width: 900px) {
  body { padding-left: var(--rail-w); }
}

@media (max-width: 1100px) {
  .quick { display: none; }
  .footer__top { grid-template-columns: minmax(200px, 4fr) 8fr; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
}

@media (max-width: 899px) {
  :root { --topbar-h: 62px; }

  body { padding-left: 0; padding-top: var(--topbar-h); }

  .rail { display: none; }

  .skip-link { left: 0.5rem; }

  .topbar { left: 0; }

  .topbar__brand { display: inline-flex; }

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

  .topbar__inner { justify-content: space-between; gap: 0.75rem; }

  .nav {
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1.4rem;
    padding: 1.4rem var(--pad) 2.6rem;
    overflow-y: auto;
    background: rgba(16, 20, 28, 0.985);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s linear;
  }

  .nav[data-open="true"] {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__list a {
    padding: 0.95rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--hair);
  }

  .nav__list a::after { bottom: -1px; }

  .nav__drawer {
    display: block;
    padding-top: 1.2rem;
    border-top: 1px solid var(--hair);
  }

  .nav__drawer-title {
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    color: var(--c-cyan);
  }

  .nav__list--sub { gap: 0.2rem; }

  .nav__list--sub a {
    padding: 0.5rem 0;
    font-size: 0.92rem;
    border-bottom: 0;
    color: rgba(198, 206, 219, 0.86);
  }

  .nav__drawer .btn { margin-top: 1.1rem; }

  .nav__drawer-meta {
    margin-top: 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: rgba(198, 206, 219, 0.6);
  }

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

  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 {
    grid-column: 1 / -1;
  }

  .panel--float { position: static; }

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

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

@media (max-width: 599px) {
  .topbar__actions .btn { display: none; }
  .topbar__text { font-size: 0.88rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 1.8rem; }
}

/* ===== 14. Reduced motion ===== */
@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;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .rail__meter-bar { transition: none; }
}
