/* ==========================================================================
   威利斯人棋牌电玩 · 共享样式 /assets/site.css
   目录：tokens / reset / typography / utilities / buttons / content components
        / media / tabs / accordion / reveal / header rail / footer / responsive
   ========================================================================== */

/* ---------- 1. tokens ---------- */
:root {
  --ink: #050A08;
  --felt-900: #0B3B2E;
  --felt-800: #0E4936;
  --felt-700: #145A43;
  --gold: #D4AF37;
  --gold-light: #F2D06B;
  --gold-grad: linear-gradient(135deg, #F2D06B, #D4AF37);
  --red: #6B1D1D;
  --cyan: #2EC4B6;
  --cream: #F5F0E6;
  --muted: #B8B8B8;
  --line: rgba(212, 175, 55, 0.18);
  --line-strong: rgba(212, 175, 55, 0.42);
  --line-soft: rgba(245, 240, 230, 0.08);
  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'JetBrains Mono', 'Roboto Mono', 'Menlo', monospace;
  --rail-w: 264px;
  --shell-max: 1120px;
  --radius: 10px;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(78rem 42rem at 14% -12%, rgba(20, 90, 67, 0.55), transparent 62%),
    radial-gradient(52rem 30rem at 102% 4%, rgba(46, 196, 182, 0.10), transparent 58%),
    radial-gradient(46rem 44rem at 88% 112%, rgba(107, 29, 29, 0.26), transparent 62%),
    repeating-linear-gradient(45deg, rgba(245, 240, 230, 0.014) 0 2px, transparent 2px 5px),
    var(--ink);
}

main { display: block; }

img { max-width: 100%; height: auto; }

ul,
ol { margin: 0; padding: 0; }

/* ---------- 3. typography ---------- */
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.3;
  color: var(--cream);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.2; }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: clamp(19px, 2vw, 24px); line-height: 1.4; }
h4 { font-size: 18px; }

p { margin: 0 0 1em; }

a {
  color: var(--cream);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover { color: var(--gold); }

strong { font-weight: 700; }

::selection { background: rgba(212, 175, 55, 0.3); color: var(--cream); }

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

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

.mono {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.prose { max-width: 70ch; }
.prose h2 { margin: 2.2em 0 0.6em; }
.prose h3 { margin: 1.6em 0 0.5em; }
.prose ul,
.prose ol { margin: 0 0 1.2em; padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--gold); }

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--gold-grad);
  color: #08170F;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  transition: top 0.22s var(--ease);
}
.skip-link:focus { top: 0; color: #08170F; }

/* ---------- 5. buttons & tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--gold {
  background: var(--gold-grad);
  color: #08170F;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.24);
}
.btn--gold:hover { color: #08170F; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(212, 175, 55, 0.36); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--gold);
}
.btn--ghost:hover { background: rgba(212, 175, 55, 0.12); border-color: var(--gold); color: var(--gold-light); }

.btn--cyan {
  background: linear-gradient(135deg, #2EC4B6, #1B8F87);
  color: #04120F;
}
.btn--cyan:hover { color: #04120F; transform: translateY(-2px); }

.btn--sm { padding: 7px 14px; font-size: 12px; }
.btn--block { width: 100%; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(46, 196, 182, 0.4);
  border-radius: 999px;
  background: rgba(46, 196, 182, 0.06);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  line-height: 1.6;
}
.tag--gold { border-color: var(--line-strong); background: rgba(212, 175, 55, 0.07); color: var(--gold); }
.tag--red { border-color: rgba(107, 29, 29, 0.9); background: rgba(107, 29, 29, 0.3); color: #E7AFAF; }

.mono-num {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.kv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.kv__k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: rgba(184, 184, 184, 0.72); }
.kv__v { color: var(--cream); font-size: 15px; }

/* ---------- 6. page head / breadcrumbs / section head ---------- */
.crumbs {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: rgba(212, 175, 55, 0.55); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current="page"] { color: var(--cream); }

.page-head { padding-top: clamp(26px, 4vw, 56px); }
.page-head__title { margin: 14px 0 12px; }
.page-head__lead { max-width: 64ch; margin: 0; color: var(--muted); font-size: 16px; }

.sec-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: clamp(22px, 3vw, 36px); }
.sec-head__index {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.sec-head__index::after {
  content: "";
  width: clamp(40px, 10vw, 96px);
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.7), transparent);
}
.sec-head__title { margin: 0; }
.sec-head__lead { margin: 0; max-width: 62ch; color: var(--muted); font-size: 15px; }

/* ---------- 7. grid / panel / rule ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }

.split-asym {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}

.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 90, 67, 0.42), rgba(11, 59, 46, 0.3));
  box-shadow: var(--shadow);
}
.panel--ink {
  background: linear-gradient(180deg, rgba(5, 10, 8, 0.72), rgba(11, 59, 46, 0.2));
}

.rule { display: flex; align-items: center; gap: 12px; color: rgba(212, 175, 55, 0.6); }
.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
}
.rule__dot { width: 6px; height: 6px; background: var(--gold-grad); transform: rotate(45deg); }

/* ---------- 8. media containers (供页面阶段放图) ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(20, 90, 67, 0.5), rgba(5, 10, 8, 0.92));
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 18% 0%, rgba(46, 196, 182, 0.12), transparent 62%);
}
.media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cream);
  background: linear-gradient(0deg, rgba(5, 10, 8, 0.92), transparent);
}
.media__tag { position: absolute; top: 14px; left: 14px; z-index: 2; }

/* ---------- 9. tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  padding: 8px 16px;
  border: 1px solid rgba(245, 240, 230, 0.16);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.tab:hover { color: var(--cream); border-color: var(--line-strong); }
.tab.is-active,
.tab[aria-selected="true"] { color: #08170F; background: var(--gold-grad); border-color: transparent; }

.panel-tab { display: none; }
.panel-tab.is-active { display: block; }

/* ---------- 10. accordion ---------- */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.acc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 59, 46, 0.3);
  overflow: hidden;
}
.acc__btn {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.acc__btn:hover { color: var(--gold); background: rgba(212, 175, 55, 0.05); }
.acc__icon { position: relative; flex: 0 0 auto; width: 16px; height: 16px; margin-left: auto; }
.acc__icon::before,
.acc__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.acc__icon::before { width: 14px; height: 1.5px; }
.acc__icon::after { width: 1.5px; height: 14px; }
.acc[data-open] .acc__icon::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.acc__panel { padding: 0 18px 18px; color: var(--muted); font-size: 15px; }
.acc:not([data-open]) .acc__panel { display: none; }

/* ---------- 11. reveal ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.has-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 12. header rail ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(7, 32, 25, 0.99), rgba(5, 12, 10, 0.98));
  border-bottom: 1px solid var(--line);
}

.rail__brand { flex: 1 1 auto; min-width: 0; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #0B1F17;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(242, 208, 107, 0.5), 0 6px 18px rgba(0, 0, 0, 0.45);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
}
.brand__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand__name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--cream);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.brand:hover .brand__name { color: var(--gold); }
.brand__sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.08);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.rail__toggle:hover { background: rgba(212, 175, 55, 0.18); color: var(--gold-light); }
.rail__bars { display: flex; flex-direction: column; gap: 4px; width: 16px; }
.rail__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.rail[data-open] .rail__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.rail[data-open] .rail__bars i:nth-child(2) { opacity: 0; transform: scaleX(0.4); }
.rail[data-open] .rail__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.rail__nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(84vw, 340px);
  padding: 26px 20px 30px;
  overflow-y: auto;
  background: linear-gradient(180deg, #08251C, #050A08);
  border-right: 1px solid rgba(212, 175, 55, 0.24);
  box-shadow: 18px 0 40px rgba(0, 0, 0, 0.6);
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform 0.26s var(--ease), visibility 0.26s var(--ease);
}
.rail[data-open] .rail__nav { transform: translateX(0); visibility: visible; }

.rail__nav-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.rail__nav-title .mono { font-size: 10px; color: var(--gold); }

.rail__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px 11px 16px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: var(--gold-grad);
  transform: translateY(-50%);
  transition: height 0.22s var(--ease);
}
.nav-link:hover { color: var(--cream); background: rgba(245, 240, 230, 0.04); }
.nav-link:hover::before { height: 56%; }
.nav-link__no { font-size: 11px; letter-spacing: 0.08em; color: rgba(184, 184, 184, 0.65); }
.nav-link__label { white-space: nowrap; }
.nav-link[aria-current="page"] {
  color: var(--gold);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0));
}
.nav-link[aria-current="page"]::before { height: 70%; }
.nav-link[aria-current="page"] .nav-link__no { color: var(--gold); }

.rail__cta { width: 100%; }

.rail__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.rail__meta-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rail__meta-row .mono { font-size: 10px; letter-spacing: 0.16em; color: rgba(184, 184, 184, 0.6); }
.rail__meta-val { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--cyan); }

.rail__scrim {
  position: fixed;
  inset: 0;
  z-index: 125;
  background: rgba(3, 8, 6, 0.74);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease);
}
.rail[data-open] .rail__scrim { opacity: 1; pointer-events: auto; }

.rail__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  background: rgba(245, 240, 230, 0.07);
}
.rail__progress-fill {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transition: width 0.1s linear;
}

/* ---------- 13. footer ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  background: linear-gradient(180deg, #050A08, #03110C 55%, #050A08);
  overflow: hidden;
}
.site-foot__beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 120% at 12% 0%, rgba(20, 90, 67, 0.55), transparent 62%),
    radial-gradient(50% 100% at 92% 8%, rgba(107, 29, 29, 0.26), transparent 60%);
}
.site-foot__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.7fr;
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(34px, 5vw, 64px);
}
.site-foot__intro { min-width: 0; }
.site-foot__brand {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.site-foot__tag { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.site-foot__mono {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(46, 196, 182, 0.75);
}
.site-foot__col { min-width: 0; }
.site-foot__h {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(184, 184, 184, 0.7);
}
.site-foot__list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.site-foot__list a {
  position: relative;
  display: inline-block;
  color: var(--cream);
  font-size: 14px;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.site-foot__list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transform: translateY(-50%);
  transition: width 0.2s var(--ease);
}
.site-foot__list a:hover { color: var(--gold); padding-left: 14px; }
.site-foot__list a:hover::before { width: 9px; }

.site-foot__meta { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.site-foot__meta li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.site-foot__meta .mono { font-size: 10px; letter-spacing: 0.16em; color: rgba(184, 184, 184, 0.6); min-width: 44px; }
.site-foot__val { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--cream); }
.site-foot__note { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.site-foot__status { margin: 0; min-height: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--cyan); }

.site-foot__base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-block: 18px;
  border-top: 1px solid var(--line-soft);
}
.site-foot__copy,
.site-foot__icp { margin: 0; font-size: 12px; color: var(--muted); }
.site-foot__icp { font-family: var(--mono); letter-spacing: 0.06em; }

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 16px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease),
              background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), visibility 0.24s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: rgba(212, 175, 55, 0.12); border-color: var(--gold); color: var(--gold-light); }
.to-top__arrow {
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid currentColor;
}

/* ---------- 14. desktop rail ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    height: 100vh;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 20px;
    padding: 30px 22px 22px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #08251C, #050D0A 70%, #050A08);
  }

  .rail__toggle { display: none; }

  .rail__nav {
    position: static;
    transform: none;
    visibility: visible;
    flex: 1 1 auto;
    min-height: 0;
    width: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow-y: auto;
  }

  .rail__scrim { display: none; }

  .rail__progress {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    background: rgba(245, 240, 230, 0.06);
  }
  .rail__progress-fill {
    width: 100%;
    height: var(--progress, 0%);
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--cyan));
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
    transition: height 0.1s linear;
  }
}

/* ---------- 15. tablet / mobile ---------- */
@media (max-width: 980px) {
  .site-foot__inner { grid-template-columns: 1fr 1fr; }
  .site-foot__intro { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .split-asym { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 72px; }
  .grid--3 { grid-template-columns: 1fr; }
  .media--tall { aspect-ratio: 4 / 5; }
  .site-foot__inner { grid-template-columns: 1fr; }
  .site-foot__base { flex-direction: column; align-items: flex-start; }
  .to-top { margin-left: 0; }
  .brand__sub { display: none; }
}

/* ---------- 16. 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;
  }
  .has-js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .to-top { transform: none; }
}
