/* =========================================================
   BEPLAY赛场版 · 共享层 /assets/site.css
   冰原赛场 × 数据仪表盘
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, hr { margin: 0; }

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

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

a { color: inherit; text-decoration: none; }

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

hr { border: 0; }

summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ---------- 2. Tokens ---------- */
:root {
  --ice-deep: #071A22;
  --ice-steel: #0E2E3C;
  --ice-blue: #7FD8F5;
  --ice-white: #EAF6FB;
  --pine: #0E3B33;
  --grass: #1C6B55;
  --flare: #FF6A1A;
  --flare-soft: #FFB37A;
  --flare-ink: #B84A0C;
  --ink: #0A1016;
  --steel: #5B7683;

  --rail-w: 100px;
  --topbar-h: 62px;
  --wrap-max: 1240px;
  --r-card: 24px;
  --r-soft: 20px;
  --r-pill: 999px;
  --gap: clamp(16px, 2vw, 26px);
  --pad-block: clamp(40px, 6vw, 88px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-display: "Oswald", "Bebas Neue", "Arial Narrow", "Haettenschweiler", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --font-body: "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  background: var(--ice-deep);
  color: var(--ice-white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: 22px; line-height: 1.15; }

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

#main-content:focus-visible { outline-offset: 6px; }

/* ---------- 4. Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.stack { display: flex; flex-direction: column; gap: var(--gap); }

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(127, 216, 245, 0.55), rgba(127, 216, 245, 0.05) 70%, transparent);
}

.grid-12 {
  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; }

.surface-light {
  background: var(--ice-white);
  color: var(--ink);
  border-radius: 28px;
}

.surface-dark {
  background: var(--ice-steel);
  color: var(--ice-white);
  border-radius: 28px;
}

/* ---------- 5. Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice-blue);
}

.eyebrow__idx { color: var(--steel); }

.surface-light .eyebrow { color: #0E5C74; }
.surface-light .eyebrow__idx { color: var(--steel); }

.lede {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.7;
  max-width: 68ch;
  color: rgba(234, 246, 251, 0.88);
}

.surface-light .lede { color: #26333A; }

.prose { max-width: 72ch; }
.prose p { margin-bottom: 1.1em; }
.prose h2, .prose h3 { margin: 1.6em 0 0.5em; }
.prose a {
  color: #0E5C74;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.surface-dark .prose a,
body .prose a { color: var(--ice-blue); }
.surface-light .prose a { color: var(--flare-ink); }

.page-head {
  padding-block: clamp(36px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- 6. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--flare);
  color: #1A0A02;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

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

/* ---------- 7. Header / left rail ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  width: auto;
  z-index: 200;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: linear-gradient(180deg, #0E2E3C 0%, #071A22 100%);
  border-bottom: 1px solid rgba(127, 216, 245, 0.18);
  color: var(--ice-white);
}

.rail::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--ice-blue), var(--flare));
  opacity: 0.9;
}

.rail__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--pine);
  border: 1px solid rgba(127, 216, 245, 0.45);
  color: var(--ice-blue);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__ver {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--steel);
  white-space: nowrap;
}

.rail__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(127, 216, 245, 0.4);
  color: var(--ice-blue);
  font-size: 13px;
  font-weight: 600;
  flex: 0 0 auto;
}

.rail__toggle-bars {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ice-blue);
  transition: background 0.16s var(--ease);
}

.rail__toggle-bars::before,
.rail__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ice-blue);
  transition: transform 0.2s var(--ease);
}

.rail__toggle-bars::before { top: -6px; }
.rail__toggle-bars::after { top: 6px; }

.rail[data-open] .rail__toggle { border-color: var(--flare); color: var(--flare-soft); }
.rail[data-open] .rail__toggle-bars { background: transparent; }
.rail[data-open] .rail__toggle-bars::before { transform: translateY(6px) rotate(45deg); background: var(--flare-soft); }
.rail[data-open] .rail__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); background: var(--flare-soft); }

.rail__drawer {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 18px 44px;
  background: linear-gradient(160deg, #071A22 0%, #0E2E3C 60%, #0E3B33 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s linear;
}

.rail[data-open] .rail__drawer {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.rail__nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
}

.navlist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.navlist__item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 600;
  color: rgba(234, 246, 251, 0.82);
  border: 1px solid transparent;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.navlist__item:hover {
  background: rgba(127, 216, 245, 0.1);
  color: var(--ice-white);
}

.navlist__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--steel);
}

.navlist__label { white-space: nowrap; }

.navlist__item[aria-current="page"] {
  background: rgba(255, 106, 26, 0.14);
  border-color: rgba(255, 106, 26, 0.5);
  color: var(--flare-soft);
}

.navlist__item[aria-current="page"] .navlist__idx { color: var(--flare); }

.rail__quick-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: -6px;
}

.rail__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rail__quick .tag { font-size: 12px; }

.rail__foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(127, 216, 245, 0.16);
}

.rail__announce {
  font-size: 12px;
  line-height: 1.6;
  color: var(--steel);
}

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  transition: transform 0.16s var(--ease), background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

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

.btn--accent {
  background: var(--flare);
  color: #1A0A02;
}
.btn--accent:hover { background: var(--flare-soft); }

.btn--ghost {
  background: rgba(127, 216, 245, 0.06);
  border-color: rgba(127, 216, 245, 0.45);
  color: var(--ice-blue);
}
.btn--ghost:hover { background: rgba(127, 216, 245, 0.16); color: var(--ice-white); }

.btn--line {
  background: var(--ice-blue);
  color: #062029;
}
.btn--line:hover { background: #A6E6FA; }

.btn--ink {
  background: var(--pine);
  border-color: rgba(127, 216, 245, 0.3);
  color: var(--ice-white);
}
.btn--ink:hover { background: var(--grass); }

.surface-light .btn--ghost {
  border-color: rgba(14, 92, 116, 0.4);
  color: #0E5C74;
  background: transparent;
}
.surface-light .btn--ghost:hover { background: rgba(14, 92, 116, 0.1); color: #08465A; }

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

/* ---------- 9. Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(127, 216, 245, 0.42);
  background: rgba(127, 216, 245, 0.08);
  color: var(--ice-blue);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  white-space: nowrap;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.tag:hover { background: rgba(127, 216, 245, 0.2); color: var(--ice-white); }

.tag--live {
  background: var(--flare);
  border-color: var(--flare);
  color: #1A0A02;
  font-weight: 600;
}
.tag--live:hover { background: var(--flare-soft); border-color: var(--flare-soft); color: #1A0A02; }

.tag--quiet {
  background: transparent;
  border-color: rgba(91, 118, 131, 0.5);
  color: var(--steel);
}
.tag--quiet:hover { color: var(--ice-blue); border-color: rgba(127, 216, 245, 0.45); background: transparent; }

.tag--pine {
  background: var(--pine);
  border-color: transparent;
  color: var(--ice-white);
}
.tag--pine:hover { background: var(--grass); color: var(--ice-white); }

.surface-light .tag {
  border-color: rgba(14, 92, 116, 0.35);
  background: rgba(14, 92, 116, 0.07);
  color: #0E5C74;
}
.surface-light .tag:hover { background: rgba(14, 92, 116, 0.16); color: #08465A; }
.surface-light .tag--live { background: var(--flare); border-color: var(--flare); color: #1A0A02; }
.surface-light .tag--live:hover { background: var(--flare-soft); }

/* ---------- 10. Cards ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--ice-steel);
  border: 1px solid rgba(127, 216, 245, 0.16);
  color: var(--ice-white);
}

.card--light {
  background: #FFFFFF;
  border-color: rgba(10, 16, 22, 0.08);
  color: var(--ink);
}

.card--pine {
  background: var(--pine);
  border-color: rgba(127, 216, 245, 0.2);
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(234, 246, 251, 0.82);
}

.card--light .card__body,
.card--light .card__head { color: #26333A; }

/* ---------- 11. Index band ---------- */
.index-band {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
  mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}

.index-band__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.index-band::-webkit-scrollbar { height: 6px; }
.index-band::-webkit-scrollbar-thumb {
  background: rgba(127, 216, 245, 0.28);
  border-radius: 999px;
}

/* ---------- 12. Stats ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid rgba(127, 216, 245, 0.22);
}

.stat__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ice-blue);
}

.stat__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

.surface-light .stat { border-top-color: rgba(10, 16, 22, 0.12); }
.surface-light .stat__num { color: #0E5C74; }

/* ---------- 13. Segmented tabs ---------- */
.seg {
  display: grid;
  gap: 18px;
}

.seg__tablist {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-pill);
  background: rgba(14, 46, 60, 0.72);
  border: 1px solid rgba(127, 216, 245, 0.18);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.seg__tablist::-webkit-scrollbar { display: none; }

.seg__tab {
  flex: 0 0 auto;
  padding: 9px 17px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--ice-blue);
  white-space: nowrap;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.seg__tab:hover { background: rgba(127, 216, 245, 0.14); color: var(--ice-white); }

.seg__tab[aria-selected="true"] {
  background: var(--flare);
  color: #1A0A02;
}

.seg__tab[aria-selected="true"]:hover {
  background: var(--flare-soft);
  color: #1A0A02;
}

.seg__panel[hidden] { display: none; }

.surface-light .seg__tablist {
  background: rgba(14, 46, 60, 0.08);
  border-color: rgba(10, 16, 22, 0.1);
}
.surface-light .seg__tab { color: #0E5C74; }
.surface-light .seg__tab:hover { background: rgba(14, 92, 116, 0.12); color: #08465A; }

/* ---------- 14. Folds ---------- */
.fold {
  border: 1px solid rgba(127, 216, 245, 0.2);
  border-radius: var(--r-soft);
  background: rgba(14, 46, 60, 0.55);
  overflow: hidden;
}

.fold + .fold { margin-top: 10px; }

.fold__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--ice-white);
}

.fold__summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ice-blue);
  transition: transform 0.18s var(--ease);
}

.fold[open] .fold__summary::after { transform: rotate(45deg); }

.fold__body {
  padding: 0 20px 18px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(234, 246, 251, 0.82);
}

.surface-light .fold {
  background: #FFFFFF;
  border-color: rgba(10, 16, 22, 0.1);
}
.surface-light .fold__summary { color: var(--ink); }
.surface-light .fold__body { color: #26333A; }

/* ---------- 15. Figures ---------- */
.figure {
  position: relative;
  margin: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  background: linear-gradient(150deg, var(--ice-steel), var(--ice-deep));
  border: 1px solid rgba(127, 216, 245, 0.18);
}

.figure__img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.figure--wide .figure__img { aspect-ratio: 21 / 9; }
.figure--tall .figure__img { aspect-ratio: 4 / 5; }

.figure__cap {
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ice-white);
  background: rgba(7, 26, 34, 0.8);
  border-start-end-radius: 14px;
}

/* ---------- 16. Breadcrumb ---------- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--steel);
}

.crumb a { color: inherit; transition: color 0.16s var(--ease); }
.crumb a:hover { color: var(--ice-blue); }
.crumb__sep { opacity: 0.6; }

.surface-light .crumb { color: var(--steel); }
.surface-light .crumb a:hover { color: #0E5C74; }

/* ---------- 17. Footer ---------- */
.site-foot {
  position: relative;
  margin-top: var(--pad-block);
  background: linear-gradient(180deg, #071A22 0%, #0E2E3C 55%, #071A22 100%);
  color: var(--ice-white);
  border-top: 1px solid rgba(127, 216, 245, 0.18);
}

.site-foot::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ice-blue), rgba(127, 216, 245, 0.1) 45%, var(--flare));
}

.site-foot__inner {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  padding-block: clamp(40px, 6vw, 72px);
}

.site-foot__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.brand--foot {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.brand--foot .brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 19px;
}

.brand--foot .brand__name { font-size: 19px; }

.site-foot__addr {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(234, 246, 251, 0.7);
  max-width: 34ch;
}

.site-foot__metaline {
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--steel);
  max-width: 36ch;
}

.site-foot__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.footcol {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footcol__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice-blue);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(127, 216, 245, 0.2);
}

.footcol__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footcol__list a {
  font-size: 15px;
  color: rgba(234, 246, 251, 0.78);
  transition: color 0.16s var(--ease), padding-inline-start 0.16s var(--ease);
}

.footcol__list a:hover {
  color: var(--flare-soft);
  padding-inline-start: 4px;
}

.site-foot__base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(127, 216, 245, 0.16);
}

.site-foot__contact {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ice-blue);
}

.site-foot__legal {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--steel);
}

/* ---------- 18. Reveal ---------- */
html[data-reveal="on"] [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}

html[data-reveal="on"] [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}

/* ---------- 19. Breakpoints ---------- */
@media (max-width: 1023px) {
  body { padding-top: var(--topbar-h); }
  html { scroll-padding-top: calc(var(--topbar-h) + 12px); }
  html[data-nav-open] { overflow: hidden; }
}

@media (max-width: 1023px) and (min-width: 640px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5 { grid-column: span 3; }
  .col-6, .col-7, .col-8, .col-9, .col-12 { grid-column: span 6; }
}

@media (max-width: 639px) {
  body { font-size: 16px; }
  .grid-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 { grid-column: span 2; }
  .site-foot__base { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 640px) {
  .site-foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .figure--wide-mobile .figure__img { aspect-ratio: 21 / 9; }
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .rail {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--rail-w);
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    padding: 20px 14px 22px;
    background: linear-gradient(180deg, #0E2E3C 0%, #071A22 46%, #0E3B33 100%);
    border-bottom: 0;
    border-inline-end: 1px solid rgba(127, 216, 245, 0.18);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .rail::-webkit-scrollbar { display: none; }

  .rail::after {
    inset-inline-start: 0;
    inset-block: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(180deg, var(--ice-blue), rgba(127, 216, 245, 0.12) 55%, var(--flare));
  }

  .rail__top {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    width: 100%;
  }

  .brand {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  .brand__text { align-items: center; }

  .brand__mark {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    font-size: 19px;
  }

  .brand__name { font-size: 12px; letter-spacing: 0.04em; }

  .brand__ver {
    font-size: 10px;
    color: var(--flare-soft);
  }

  .rail__toggle { display: none; }

  .rail__drawer {
    display: contents;
  }

  .rail__nav { flex: 1 1 auto; gap: 0; }

  .rail__quick-title,
  .rail__quick { display: none; }

  .navlist { gap: 8px; }

  .navlist__item {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 11px 4px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.02em;
  }

  .navlist__idx { font-size: 10px; letter-spacing: 0.06em; }

  .navlist__item[aria-current="page"] {
    background: rgba(255, 106, 26, 0.14);
    border-color: rgba(255, 106, 26, 0.35);
  }

  .rail__foot {
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
  }

  .rail__announce { font-size: 10.5px; line-height: 1.55; }

  .rail .btn {
    font-size: 12px;
    padding: 10px 6px;
    letter-spacing: 0;
  }

  .site-foot__inner {
    grid-template-columns: minmax(220px, 4fr) minmax(0, 8fr);
    align-items: start;
  }
}

@media (min-width: 1200px) {
  :root { --rail-w: 104px; }
  .site-foot__cols { gap: 32px; }
}

/* ---------- 20. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html[data-reveal="on"] [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .rail__drawer { transition: none; }
}
