/* ==========================================================================
   云开平台 V3.1 — 共享样式 /assets/site.css
   云端记分牌：侧轨导航 + 顶部第三栏 + 堆叠面板
   ========================================================================== */

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

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

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

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

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

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

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

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

h1, h2, h3, h4 { line-height: 1.2; }

/* --- 2. Tokens ----------------------------------------------------------- */
:root {
  --ink: #111820;
  --void: #0B1F33;
  --void-deep: #050F1A;
  --cloud: #E7ECF2;
  --paper: #F7F9FC;

  --orange: #F26A2E;
  --orange-deep: #7A2D0F;
  --signal: #2EC4B6;
  --signal-deep: #0D4D47;
  --mint: #7BC9A6;
  --mint-deep: #0D4A37;
  --gold: #D9A441;
  --gold-lt: #F2C14E;
  --gold-deep: #7A5A12;
  --indigo: #322A5E;
  --indigo-deep: #1B1638;
  --wine: #6E2B3A;
  --wine-deep: #4A1C26;
  --teal-deep: #0F3D3E;

  --rail-w: 84px;
  --topbar-h: 56px;
  --bw: 2px;

  --shadow-panel: 8px 8px 0 rgba(11, 31, 51, 0.16);
  --shadow-soft: 0 10px 30px rgba(11, 31, 51, 0.10);

  --font-display: "Inter Tight", "HarmonyOS Sans SC", "PingFang SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --font-body: "HarmonyOS 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;

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

/* --- 3. Base typography & page frame ------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--cloud);
  background-image:
    linear-gradient(180deg, rgba(11, 31, 51, 0.05) 0, rgba(11, 31, 51, 0) 220px);
  padding-top: var(--topbar-h);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.is-nav-open { overflow: hidden; }

main { display: block; }

#main-content {
  display: block;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
  outline: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}

p { max-width: 68ch; }

strong { font-weight: 700; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

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

/* --- 4. Skip link -------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--gold-lt);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  border: var(--bw) solid var(--ink);
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: translateY(-200%);
  transition: transform 0.18s var(--ease);
}

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

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 95;
  pointer-events: none;
  background: linear-gradient(90deg, var(--signal) 0%, var(--orange) 70%, var(--gold-lt) 100%);
  transition: width 0.09s linear;
}

/* --- 5a. Side rail (desktop) --------------------------------------------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 80;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--paper);
  background: linear-gradient(180deg, var(--void) 0%, var(--void) 58%, var(--teal-deep) 100%);
  border-right: var(--bw) solid var(--void-deep);
}

.rail__close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  z-index: 3;
  border: var(--bw) solid rgba(247, 249, 252, 0.3);
  border-radius: 2px;
  color: var(--paper);
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.rail__close:hover {
  border-color: var(--signal);
  background: rgba(46, 196, 182, 0.14);
}

.rail__close-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.rail__close-bar:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.rail__close-bar:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

.rail__brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0 14px;
  border-bottom: var(--bw) solid rgba(247, 249, 252, 0.14);
}

.rail__logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: var(--void);
  background: linear-gradient(150deg, var(--gold-lt) 0%, var(--gold) 100%);
  border: var(--bw) solid var(--void-deep);
  border-radius: 3px;
  box-shadow: 3px 3px 0 var(--void-deep);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.rail__logo:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--void-deep);
}

.rail__wordmark {
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--paper);
}

.rail__ver {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--signal);
}

.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

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

.rail__list {
  display: flex;
  flex-direction: column;
}

.rail-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 13px 6px 15px;
  color: rgba(247, 249, 252, 0.72);
  border-bottom: 1px solid rgba(247, 249, 252, 0.10);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.rail-link:hover {
  color: var(--paper);
  background: rgba(46, 196, 182, 0.12);
}

.rail-link__idx {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--mint);
}

.rail-link__label {
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.rail-link[aria-current="page"] {
  color: var(--void);
  background: linear-gradient(160deg, var(--signal) 0%, #1E9F94 100%);
}

.rail-link[aria-current="page"] .rail-link__idx { color: var(--void); }

.rail__free {
  flex: 0 0 auto;
  padding: 10px 7px 14px;
  border-top: var(--bw) solid rgba(247, 249, 252, 0.14);
}

.rail__free-link {
  display: block;
  padding: 9px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.06em;
  color: #07231C;
  background: var(--mint);
  border: var(--bw) solid var(--void-deep);
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--void-deep);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.rail__free-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--void-deep);
}

/* --- 5b. Scrim ----------------------------------------------------------- */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(5, 15, 26, 0.64);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.nav-scrim[data-visible] {
  opacity: 1;
  pointer-events: auto;
}

/* --- 5c. Top third bar --------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--paper);
  background: var(--void);
  border-bottom: var(--bw) solid var(--void-deep);
  transition: box-shadow 0.2s var(--ease);
}

html[data-scrolled="true"] .topbar {
  box-shadow: 0 6px 0 rgba(5, 15, 26, 0.22);
}

.nav-toggle {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  color: var(--paper);
  border: var(--bw) solid rgba(247, 249, 252, 0.28);
  border-radius: 2px;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--signal);
  background: rgba(46, 196, 182, 0.14);
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.topbar__label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(247, 249, 252, 0.46);
  padding-right: 12px;
  border-right: 1px solid rgba(247, 249, 252, 0.16);
  white-space: nowrap;
}

.league-strip {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.league-strip::-webkit-scrollbar { display: none; }

.league-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  color: rgba(247, 249, 252, 0.78);
  background: transparent;
  border: var(--bw) solid rgba(247, 249, 252, 0.22);
  border-radius: 2px;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.league-chip:hover {
  color: var(--paper);
  border-color: var(--signal);
}

.league-chip[aria-pressed="true"] {
  color: #06231F;
  background: var(--signal);
  border-color: var(--signal);
}

.topbar__free {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  color: #07231C;
  background: var(--mint);
  border: var(--bw) solid var(--void-deep);
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--void-deep);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.topbar__free:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--void-deep);
}

/* --- 6. Footer ----------------------------------------------------------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 44px) 28px;
  color: var(--paper);
  background:
    linear-gradient(180deg, var(--void) 0%, var(--void) 74%, var(--indigo) 100%);
  border-top: var(--bw) solid var(--void-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px clamp(20px, 3vw, 48px);
  max-width: 1240px;
  margin-inline: auto;
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.footer-brand__tag {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--signal);
}

.footer-brand__note {
  margin-top: 14px;
  max-width: 36ch;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(247, 249, 252, 0.62);
}

.footer-free {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.footer-col__title {
  padding-bottom: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
  border-bottom: 1px solid rgba(247, 249, 252, 0.16);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col__list a {
  display: inline-block;
  font-size: 14px;
  color: rgba(247, 249, 252, 0.78);
  transition: color 0.16s var(--ease), transform 0.16s var(--ease);
}

.footer-col__list a:hover {
  color: var(--signal);
  transform: translateX(2px);
}

.footer-contact {
  max-width: 1240px;
  margin: 36px auto 0;
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px 32px;
  border-top: var(--bw) solid rgba(247, 249, 252, 0.16);
}

.footer-contact__item { min-width: 0; }

.footer-contact__label {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.footer-contact__value {
  display: block;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  word-break: break-word;
  color: rgba(247, 249, 252, 0.82);
}

.footer-bottom {
  max-width: 1240px;
  margin: 28px auto 0;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 1px solid rgba(247, 249, 252, 0.16);
}

.footer-bottom__copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(247, 249, 252, 0.52);
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12px;
}

.footer-bottom__links a {
  color: rgba(247, 249, 252, 0.72);
  transition: color 0.16s var(--ease);
}

.footer-bottom__links a:hover { color: var(--signal); }

/* --- 6b. Back to top ----------------------------------------------------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 65;
  width: 52px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #FFFFFF;
  background: var(--orange);
  border: var(--bw) solid var(--orange-deep);
  border-radius: 3px;
  box-shadow: 4px 4px 0 var(--orange-deep);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.15s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top:hover { box-shadow: 6px 6px 0 var(--orange-deep); }

.to-top__glyph {
  font-size: 15px;
  line-height: 1;
}

.to-top__text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

/* --- 7. Layout helpers --------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 44px);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 36px);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.2vw, 28px);
}

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

/* --- 8. Panels ----------------------------------------------------------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 30px);
  color: var(--ink);
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: 3px;
  box-shadow: var(--shadow-panel);
}

.panel--tint {
  background: var(--cloud);
}

.panel--void {
  color: var(--paper);
  background: var(--void);
  border-color: var(--void-deep);
  box-shadow: 8px 8px 0 rgba(5, 15, 26, 0.42);
}

.panel--indigo {
  color: var(--paper);
  background: var(--indigo);
  border-color: var(--indigo-deep);
  box-shadow: 8px 8px 0 rgba(27, 22, 56, 0.44);
}

.panel--teal {
  color: var(--paper);
  background: var(--teal-deep);
  border-color: #082928;
  box-shadow: 8px 8px 0 rgba(8, 41, 40, 0.44);
}

.panel--wine {
  color: var(--paper);
  background: var(--wine);
  border-color: var(--wine-deep);
  box-shadow: 8px 8px 0 rgba(74, 28, 38, 0.44);
}

.panel--void p,
.panel--indigo p,
.panel--teal p,
.panel--wine p { color: rgba(247, 249, 252, 0.78); }

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: var(--bw) solid currentColor;
  border-bottom-color: rgba(17, 24, 32, 0.16);
}

.panel--void .panel__head,
.panel--indigo .panel__head,
.panel--teal .panel__head,
.panel--wine .panel__head {
  border-bottom-color: rgba(247, 249, 252, 0.2);
}

.panel__index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--orange);
  margin-bottom: 10px;
}

.panel--void .panel__index,
.panel--indigo .panel__index,
.panel--teal .panel__index,
.panel--wine .panel__index { color: var(--gold-lt); }

.panel__head .panel__index { margin-bottom: 0; }

/* --- 9. Section heads ---------------------------------------------------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  margin-bottom: 22px;
}

.section-head__title {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.section-head__note {
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(17, 24, 32, 0.64);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}

.lede {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.78;
  color: rgba(17, 24, 32, 0.78);
}

/* --- 10. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn--primary {
  color: #FFFFFF;
  background: var(--orange);
  border-color: var(--orange-deep);
  box-shadow: 4px 4px 0 var(--orange-deep);
}

.btn--primary:hover,
.btn--primary:active { box-shadow: 6px 6px 0 var(--orange-deep); }

.btn--signal {
  color: #06231F;
  background: var(--signal);
  border-color: var(--signal-deep);
  box-shadow: 4px 4px 0 var(--signal-deep);
}

.btn--signal:hover,
.btn--signal:active { box-shadow: 6px 6px 0 var(--signal-deep); }

.btn--gold {
  color: #2B1D00;
  background: linear-gradient(135deg, var(--gold-lt) 0%, var(--gold) 100%);
  border-color: var(--gold-deep);
  box-shadow: 4px 4px 0 var(--gold-deep);
}

.btn--gold:hover,
.btn--gold:active { box-shadow: 6px 6px 0 var(--gold-deep); }

.btn--free {
  color: #07231C;
  background: var(--mint);
  border-color: var(--mint-deep);
  box-shadow: 4px 4px 0 var(--mint-deep);
}

.btn--free:hover,
.btn--free:active { box-shadow: 6px 6px 0 var(--mint-deep); }

.btn--ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--ink);
  box-shadow: 4px 4px 0 rgba(17, 24, 32, 0.22);
}

.btn--ghost:hover {
  background: rgba(46, 196, 182, 0.14);
  box-shadow: 6px 6px 0 rgba(17, 24, 32, 0.3);
}

/* --- 11. Tags ------------------------------------------------------------ */
.tag {
  --tag-c: #3B4757;
  --tag-bg: rgba(59, 71, 87, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--tag-c);
  background: var(--tag-bg);
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.tag--free   { --tag-c: #0D5C43; --tag-bg: rgba(123, 201, 166, 0.20); }
.tag--gold   { --tag-c: #7A5A12; --tag-bg: rgba(242, 193, 78, 0.22); }
.tag--signal { --tag-c: #0D6B63; --tag-bg: rgba(46, 196, 182, 0.18); }
.tag--wine   { --tag-c: #6E2B3A; --tag-bg: rgba(110, 43, 58, 0.10); }
.tag--indigo { --tag-c: #322A5E; --tag-bg: rgba(50, 42, 94, 0.10); }
.tag--orange { --tag-c: #A03D13; --tag-bg: rgba(242, 106, 46, 0.14); }

.tag--onDark {
  --tag-c: #FFFFFF;
  --tag-bg: rgba(247, 249, 252, 0.10);
  border-color: rgba(247, 249, 252, 0.42);
}

.panel--void .tag--free,
.panel--indigo .tag--free,
.panel--teal .tag--free,
.panel--wine .tag--free,
.site-footer .tag--free {
  --tag-c: #A9E8CE;
  --tag-bg: rgba(123, 201, 166, 0.16);
}

.panel--void .tag--gold,
.panel--indigo .tag--gold,
.panel--teal .tag--gold,
.panel--wine .tag--gold,
.site-footer .tag--gold {
  --tag-c: #F2C14E;
  --tag-bg: rgba(242, 193, 78, 0.16);
}

/* --- 12. Breadcrumb ------------------------------------------------------ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(17, 24, 32, 0.58);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: rgba(17, 24, 32, 0.32);
}

.breadcrumb a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 0.16s var(--ease);
}

.breadcrumb a:hover { color: var(--orange); }

/* --- 13. Media frame ----------------------------------------------------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 16 / 10);
  background-color: var(--cloud);
  background-image:
    repeating-linear-gradient(90deg, rgba(46, 196, 182, 0.16) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(0deg, rgba(11, 31, 51, 0.10) 0 1px, transparent 1px 16px);
  border: var(--bw) solid var(--ink);
  border-radius: 3px;
  box-shadow: 6px 6px 0 rgba(11, 31, 51, 0.14);
}

.media-frame > img,
.media-frame > svg,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-frame__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(17, 24, 32, 0.55);
}

.panel--void .media-frame,
.panel--indigo .media-frame,
.panel--teal .media-frame,
.panel--wine .media-frame {
  border-color: rgba(247, 249, 252, 0.4);
  box-shadow: 6px 6px 0 rgba(5, 15, 26, 0.4);
}

/* --- 14. Breakpoints ----------------------------------------------------- */
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  .footer-contact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

  .topbar {
    left: var(--rail-w);
    padding: 0 20px;
  }

  .scroll-progress { left: var(--rail-w); }

  .nav-toggle { display: none; }

  .nav-scrim { display: none; }
}

@media (min-width: 1000px) {
  .grid--asym {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--asym {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    column-gap: clamp(24px, 3vw, 40px);
  }
}

@media (max-width: 1099px) {
  .topbar__label { display: none; }
}

@media (max-width: 899px) {
  /* 侧轨转为抽屉 */
  .rail {
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.22s var(--ease);
    border-right: var(--bw) solid var(--void-deep);
    box-shadow: 12px 0 0 rgba(5, 15, 26, 0.24);
  }

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

  .rail__close { display: block; }

  .rail__brand {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 56px 16px 18px;
    text-align: left;
  }

  .rail__logo {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .rail__wordmark {
    writing-mode: horizontal-tb;
    font-size: 16px;
    letter-spacing: 0.06em;
  }

  .rail__ver { margin-left: auto; font-size: 10px; }

  .rail-link {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(247, 249, 252, 0.12);
  }

  .rail-link__idx {
    width: 24px;
    font-size: 11px;
  }

  .rail-link__label {
    writing-mode: horizontal-tb;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .rail-link[aria-current="page"] {
    color: var(--void);
    background: linear-gradient(90deg, var(--signal) 0%, #26B0A4 100%);
  }

  .rail__free { padding: 16px 18px 22px; }

  .rail__free-link {
    padding: 12px 10px;
    font-size: 14px;
    letter-spacing: 0.04em;
  }

  .to-top {
    width: 46px;
    height: 46px;
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 480px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar__free { padding: 6px 9px; font-size: 12px; }
  .league-chip { padding: 5px 10px; font-size: 12px; }
  .panel { box-shadow: 5px 5px 0 rgba(11, 31, 51, 0.16); }
  .media-frame { --ratio: 4 / 3; }
}

/* --- 15. 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;
    scroll-behavior: auto !important;
  }
}
