/* ===========================================================
   九游会入口 · 东南亚足球数据档案
   共享样式 /assets/site.css
   目录型内容地图 · 侧边轨道导航 · 复古出版色体系
   =========================================================== */

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

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

html[data-navlock="true"] { overflow: hidden; }

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. tokens ---------- */
:root {
  --deep: #0A1A33;
  --deep-soft: #122A4D;
  --cream: #F6F0E4;
  --electric: #2B6DF6;
  --mist: #9FC0FF;
  --gold: #F3A03C;
  --tropic: #17A97F;
  --ink: #1F1712;
  --paper: #E7DECB;
  --ember: #E2542B;
  --slate: #5B6B85;

  --rule: rgba(31, 23, 18, 0.18);
  --rule-strong: rgba(31, 23, 18, 0.42);
  --rail-line: rgba(159, 192, 255, 0.2);

  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: 272px;
  --bar-h: 58px;
  --shell: 1180px;
  --gutter: 32px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-print: 5px 5px 0 rgba(31, 23, 18, 0.12);
}

:root[data-rail="collapsed"] { --rail-w: 84px; }

/* ---------- 3. base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    linear-gradient(to right, rgba(10, 26, 51, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 26, 51, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  min-height: 100vh;
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.24;
  color: var(--ink);
}

h1 { font-size: clamp(30px, 5.2vw, 54px); letter-spacing: 0.07em; }
h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: 0.03em; }
h3 { font-size: clamp(17px, 1.8vw, 20px); letter-spacing: 0.02em; }

p { max-width: 72ch; }

a { color: var(--electric); }
a:not([class]) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:not([class]):hover { color: var(--ember); }

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

/* ---------- 4. focus & motion ---------- */
:focus-visible {
  outline: 3px solid var(--electric);
  outline-offset: 2px;
}

.rail :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--gold);
}

/* ---------- 5. skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 220;
  padding: 11px 18px;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 6. header shell ---------- */
.site-header {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

/* ---- mobile bar ---- */
.mobilebar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background-color: var(--deep);
  background-image: linear-gradient(90deg, rgba(43, 109, 246, 0.28), rgba(10, 26, 51, 0) 62%);
  border-bottom: 3px solid var(--gold);
  pointer-events: auto;
}
.mobilebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.mobilebar__brand .brand__name { font-size: 15px; letter-spacing: 0.08em; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(243, 160, 60, 0.6);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars i:nth-child(2) { width: 72%; }
.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; width: 100%; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---- rail ---- */
.rail {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(86vw, 336px);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 22px;
  background-color: var(--deep);
  background-image:
    radial-gradient(rgba(159, 192, 255, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(43, 109, 246, 0.3), rgba(10, 26, 51, 0) 46%);
  background-size: 6px 6px, 100% 100%;
  border-right: 1px solid rgba(159, 192, 255, 0.18);
  color: var(--mist);
  transform: translateX(-104%);
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.site-header[data-open="true"] .rail { transform: translateX(0); }

.rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--rail-line);
}

.rail__fold {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(159, 192, 255, 0.32);
  color: var(--mist);
  cursor: pointer;
  flex: none;
}
.rail__fold:hover { border-color: var(--gold); color: var(--gold); }
.rail__fold-mark {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 7px solid currentColor;
  transition: transform 0.24s var(--ease);
}
:root[data-rail="collapsed"] .rail__fold-mark { transform: rotate(180deg); }
.rail__fold-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* ---- brand ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
}
.brand__mark {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--deep);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  border: 1px solid rgba(31, 23, 18, 0.85);
  box-shadow: 2px 2px 0 rgba(31, 23, 18, 0.5);
}
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.1em;
  color: #fff;
  white-space: nowrap;
}
.brand__desc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
  white-space: nowrap;
}

/* ---- rail nav ---- */
.railnav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 0 12px;
}
.railnav__cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(159, 192, 255, 0.55);
  padding: 0 12px 10px;
}
.railnav__list { display: flex; flex-direction: column; gap: 2px; }

.railnav__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 12px;
  color: var(--mist);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.04em;
  border-left: 3px solid transparent;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.railnav__link:hover {
  background: rgba(159, 192, 255, 0.12);
  color: #fff;
}
.railnav__link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(43, 109, 246, 0.42), rgba(43, 109, 246, 0));
  color: #fff;
  border-left-color: var(--gold);
}
.railnav__num {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(159, 192, 255, 0.6);
}
.railnav__link[aria-current="page"] .railnav__num { color: var(--gold); }

/* ---- rail foot ---- */
.rail__foot {
  margin-top: auto;
  padding: 16px 4px 0;
  border-top: 1px solid var(--rail-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rail__foot .btn { width: 100%; }
.rail__note {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.65;
  letter-spacing: 0.06em;
  color: rgba(159, 192, 255, 0.55);
  max-width: none;
}

/* ---- collapsed rail ---- */
:root[data-rail="collapsed"] .brand__text,
:root[data-rail="collapsed"] .railnav__label,
:root[data-rail="collapsed"] .railnav__cap,
:root[data-rail="collapsed"] .rail__note,
:root[data-rail="collapsed"] .rail__foot .btn,
:root[data-rail="collapsed"] .rail__fold-text { display: none; }

:root[data-rail="collapsed"] .rail__head { justify-content: center; }
:root[data-rail="collapsed"] .railnav__link { justify-content: center; padding: 12px 4px; }
:root[data-rail="collapsed"] .railnav__num { font-size: 13px; }

/* ---- scrim ---- */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 26, 51, 0.66);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s var(--ease), visibility 0.24s linear;
}
.scrim[data-visible="true"] { opacity: 1; visibility: visible; }

/* ---- scroll progress ---- */
.scrollbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 78;
  background: rgba(31, 23, 18, 0.14);
  pointer-events: none;
}
.scrollbar__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--electric), var(--gold) 68%, var(--ember));
}

/* ---- to top ---- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 76;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--deep);
  color: var(--mist);
  border: 1px solid var(--electric);
  box-shadow: 3px 3px 0 rgba(43, 109, 246, 0.45);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s linear;
}
.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.to-top__text { white-space: nowrap; }

/* ---------- 7. footer ---------- */
.site-footer {
  position: relative;
  margin-top: 96px;
  background-color: var(--deep);
  background-image:
    radial-gradient(rgba(159, 192, 255, 0.16) 1px, transparent 1px),
    linear-gradient(to right, rgba(159, 192, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(159, 192, 255, 0.05) 1px, transparent 1px);
  background-size: 6px 6px, 52px 52px, 52px 52px;
  color: var(--mist);
  border-top: 5px solid var(--gold);
}

.footer__grid {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 54px var(--gutter) 34px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 34px 28px;
}

.footer__brand { min-width: 0; }
.footer__tagline {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.03em;
  color: rgba(159, 192, 255, 0.72);
  max-width: 32ch;
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rail-line);
}
.footer__list li + li { margin-top: 9px; }
.footer__link {
  font-size: 15px;
  letter-spacing: 0.03em;
  color: rgba(159, 192, 255, 0.9);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.footer__link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--gold);
}

.footer__band {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 22px var(--gutter) 26px;
  border-top: 1px solid rgba(159, 192, 255, 0.18);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 26px;
}
.footer__key {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3px;
}
.footer__contact {
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(159, 192, 255, 0.92);
  max-width: none;
  overflow-wrap: anywhere;
}

.footer__base {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 20px var(--gutter) 40px;
  border-top: 3px double rgba(159, 192, 255, 0.24);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-items: baseline;
}
.footer__copy,
.footer__icp,
.footer__note,
.footer__legal,
.footer__update {
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: rgba(159, 192, 255, 0.72);
  max-width: none;
}
.footer__icp {
  font-family: var(--font-mono);
  color: var(--mist);
}
.footer__legal { flex: 1 1 100%; }
.footer__update { flex: 1 1 100%; color: rgba(159, 192, 255, 0.55); }

/* ---------- 8. layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--tight { --shell: 880px; }

.page-head {
  padding: 46px 0 26px;
  border-bottom: 4px double var(--rule-strong);
}
.page-head__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 14px;
}
.page-head__note {
  margin-top: 14px;
  font-size: 15px;
  color: var(--slate);
  max-width: 62ch;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 6px 0 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.section-head__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ember);
  flex: none;
}

.lead {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  max-width: 64ch;
}

/* ---------- 9. breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before {
  content: "⁄";
  color: var(--rule-strong);
}
.breadcrumb a { color: var(--slate); text-decoration: none; }
.breadcrumb a:hover { color: var(--electric); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 10. buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease),
              background-color 0.16s var(--ease), color 0.16s var(--ease),
              border-color 0.16s var(--ease);
}
.btn:hover { transform: translate(-1px, -1px); }
.btn--gold {
  background: var(--gold);
  border-color: rgba(31, 23, 18, 0.85);
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(31, 23, 18, 0.55);
}
.btn--gold:hover { box-shadow: 5px 5px 0 rgba(31, 23, 18, 0.55); }
.btn--electric {
  background: var(--electric);
  border-color: var(--electric);
  color: #fff;
  box-shadow: 3px 3px 0 rgba(10, 26, 51, 0.38);
}
.btn--electric:hover { box-shadow: 5px 5px 0 rgba(10, 26, 51, 0.38); }
.btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--cream); }
.btn--sm { padding: 8px 13px; font-size: 13px; letter-spacing: 0.08em; }
.btn--block { width: 100%; }

/* ---------- 11. tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
}
.tag--gold { background: var(--gold); border-color: rgba(31, 23, 18, 0.85); }
.tag--blue { background: var(--electric); border-color: var(--electric); color: #fff; }
.tag--green { background: var(--tropic); border-color: rgba(31, 23, 18, 0.85); }
.tag--ember { background: var(--ember); border-color: var(--ember); color: #fff; }

/* ---------- 12. cards ---------- */
.card {
  position: relative;
  padding: 20px;
  background: var(--cream);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-print);
}
.card--paper { background: var(--paper); }
.card--deep {
  background: var(--deep);
  color: var(--mist);
  border-color: var(--deep);
  box-shadow: 5px 5px 0 rgba(43, 109, 246, 0.35);
}
.card--deep h2,
.card--deep h3 { color: #fff; }
.card--deep p { color: rgba(159, 192, 255, 0.9); }

/* ---------- 13. media containers ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--paper);
  border: 1px solid var(--rule-strong);
}
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(10, 26, 51, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 26, 51, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.7;
  pointer-events: none;
}
.media img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 6px 11px;
  background: var(--deep);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

/* ---------- 14. data table ---------- */
.datatable {
  width: 100%;
  background: var(--cream);
  font-size: 15px;
}
.datatable caption {
  text-align: left;
  padding-bottom: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.datatable th,
.datatable td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.datatable thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--deep);
  border-bottom: 2px solid var(--rule-strong);
}
.datatable tbody tr { transition: background-color 0.14s var(--ease); }
.datatable tbody tr:hover { background: var(--paper); }
.datatable td.num,
.datatable th.num { text-align: right; }

/* ---------- 15. expander ---------- */
.expander { border-top: 1px solid var(--rule); }
.expander__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 2px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
  cursor: pointer;
}
.expander__btn:hover { color: var(--electric); }
.expander__sign {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
}
.expander__sign::before,
.expander__sign::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--electric);
  transform: translate(-50%, -50%);
}
.expander__sign::before { width: 14px; height: 2px; }
.expander__sign::after { width: 2px; height: 14px; transition: transform 0.24s var(--ease), opacity 0.24s var(--ease); }
.expander__btn[aria-expanded="true"] .expander__sign::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.expander__panel {
  height: 0;
  overflow: hidden;
  transition: height 0.3s var(--ease);
}
.expander__inner { padding: 0 2px 22px; }
.expander__inner p { font-size: 15px; color: var(--ink); }
.expander__inner p + p { margin-top: 10px; }

/* ---------- 16. reveal ---------- */
html[data-reveal-on="true"] [data-reveal] {
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
html[data-reveal-on="true"] [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
}

/* ---------- 17. desktop breakpoint ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .mobilebar { display: none; }
  .scrim { display: none; }
  .rail {
    width: var(--rail-w);
    transform: none;
  }
}

/* ---------- 18. tablet / mobile ---------- */
@media (max-width: 1023px) {
  body { padding-top: var(--bar-h); }
  .rail {
    padding-top: calc(var(--bar-h) + 18px);
    box-shadow: 12px 0 32px rgba(10, 26, 51, 0.42);
  }
  .rail__fold { display: none; }

  :root[data-rail="collapsed"] .brand__text { display: flex; }
  :root[data-rail="collapsed"] .railnav__label { display: inline; }
  :root[data-rail="collapsed"] .railnav__cap { display: block; }
  :root[data-rail="collapsed"] .rail__note { display: block; }
  :root[data-rail="collapsed"] .rail__foot .btn { display: inline-flex; }
  :root[data-rail="collapsed"] .railnav__link { justify-content: flex-start; padding: 11px 12px; }
  :root[data-rail="collapsed"] .railnav__num { font-size: 11px; }
}

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__band { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  :root { --gutter: 18px; --bar-h: 54px; }
  .site-footer { margin-top: 64px; }
  .page-head { padding: 32px 0 20px; }
  .footer__band { grid-template-columns: 1fr; }
  .to-top { right: 14px; bottom: 16px; }
  .expander__btn { font-size: 16px; }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 40px;
  }
  .brand__desc { font-size: 10px; letter-spacing: 0.08em; }
}

/* ---------- 19. 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;
  }
  .rail { transition: none; }
  html[data-reveal-on="true"] [data-reveal]:not(.is-in) {
    opacity: 1;
    transform: none;
  }
}
