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

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

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

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

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

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

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

input, textarea, select { font: inherit; }

/* ===== tokens ===== */
:root {
  --ink-900: #04121F;
  --ink-800: #0A2540;
  --ink-700: #12324B;
  --cyan: #19E3D1;
  --cyan-soft: #7FF3E6;
  --orange: #FF6B2C;
  --orange-soft: #FFB27A;
  --neon: #3DFF88;
  --text: #EAF4F9;
  --muted: #8FA9BC;

  --line: rgba(25, 227, 209, 0.18);
  --line-soft: rgba(143, 169, 188, 0.22);
  --panel: rgba(18, 50, 75, 0.72);

  --radius-l: 28px;
  --radius-m: 20px;
  --radius-s: 12px;

  --shell: 1240px;
  --header-h: 78px;
  --scorebar-h: 56px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-lift: 0 18px 40px rgba(2, 10, 18, 0.55);
}

/* ===== base ===== */
body {
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

::selection {
  background: rgba(25, 227, 209, 0.32);
  color: #ffffff;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 300;
  padding: 10px 20px;
  border-radius: 0 0 14px 14px;
  background: var(--cyan);
  color: #04121F;
  font-size: 14px;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

/* ===== layout utilities ===== */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.divider-tick {
  height: 9px;
  border-top: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg, rgba(25, 227, 209, 0.32) 0 1px, transparent 1px 14px);
  opacity: 0.75;
}

.frame-ticked {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.frame-ticked::before,
.frame-ticked::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  border: 2px solid var(--cyan);
  opacity: 0.85;
}

.frame-ticked::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: var(--radius-l);
}

.frame-ticked::after {
  right: -1px;
  bottom: -1px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: var(--radius-l);
}

/* ===== typography ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.tag--cyan { color: var(--cyan); border-color: rgba(25, 227, 209, 0.45); }
.tag--orange { color: var(--orange-soft); border-color: rgba(255, 107, 44, 0.45); background: rgba(255, 107, 44, 0.1); }
.tag--live { color: var(--neon); border-color: rgba(61, 255, 136, 0.45); background: rgba(61, 255, 136, 0.08); }

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.78;
}

.prose > *:first-child { margin-top: 0; }

.prose p { margin-bottom: 1.1em; }

.prose h2 {
  margin: 2em 0 0.6em;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.28;
}

.prose h3 {
  margin: 1.6em 0 0.5em;
  font-size: 20px;
  font-weight: 700;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.15em;
  list-style: disc;
}

.prose li { margin-bottom: 0.4em; }

.prose strong { color: var(--cyan-soft); font-weight: 700; }

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(25, 227, 209, 0.45);
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--cyan-soft); }

/* ===== breadcrumb ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li::after {
  content: "/";
  margin: 0 9px;
  color: rgba(143, 169, 188, 0.4);
}

.breadcrumb li:last-child::after { content: ""; margin: 0; }

.breadcrumb a { color: var(--muted); transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--cyan-soft); }

/* ===== buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn-accent {
  border-color: rgba(255, 107, 44, 0.7);
  color: var(--orange-soft);
  background: rgba(255, 107, 44, 0.08);
}

.btn-accent:hover {
  border-color: var(--orange);
  color: #FFF3EC;
  background: linear-gradient(120deg, rgba(255, 107, 44, 0.95), rgba(255, 178, 122, 0.8));
  box-shadow: 0 12px 28px rgba(255, 107, 44, 0.26);
}

.btn-cyan {
  border-color: rgba(25, 227, 209, 0.5);
  color: var(--cyan);
  background: rgba(25, 227, 209, 0.08);
}

.btn-cyan:hover {
  border-color: var(--cyan-soft);
  color: #04121F;
  background: linear-gradient(120deg, #19E3D1, #7FF3E6);
  box-shadow: 0 12px 28px rgba(25, 227, 209, 0.24);
}

.btn-solid {
  background: linear-gradient(120deg, #7FF3E6, #19E3D1);
  color: #04121F;
  font-weight: 800;
}

.btn-solid:hover {
  box-shadow: 0 14px 32px rgba(25, 227, 209, 0.3);
}

.btn-quiet {
  border-color: var(--line-soft);
  color: var(--text);
  background: rgba(143, 169, 188, 0.06);
}

.btn-quiet:hover {
  border-color: var(--cyan);
  color: var(--cyan-soft);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

/* ===== media containers (page stage) ===== */
.media {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(143, 169, 188, 0.14);
  border-radius: var(--radius-m);
  background: linear-gradient(150deg, #12324B, #04121F 72%);
  isolation: isolate;
}

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

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(234, 244, 249, 0.035) 0 1px, transparent 1px 4px),
    radial-gradient(120% 85% at 18% 0%, rgba(25, 227, 209, 0.16), transparent 62%);
}

.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--3x4 { aspect-ratio: 3 / 4; }

.media__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(143, 169, 188, 0.62);
}

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 14px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(180deg, rgba(4, 18, 31, 0), rgba(4, 18, 31, 0.88));
}

.badge-sq {
  display: grid;
  place-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(140deg, #19E3D1, #0A2540);
  color: #04121F;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: none;
}

/* ===== header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(4, 18, 31, 0.97), rgba(4, 18, 31, 0.86));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 6px;
  pointer-events: none;
  opacity: 0.5;
  background-image: repeating-linear-gradient(90deg, rgba(25, 227, 209, 0.38) 0 1px, transparent 1px 12px);
}

.header-bar {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-glyph {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(140deg, #19E3D1, #0A2540 68%);
  box-shadow: inset 0 0 0 1px rgba(127, 243, 230, 0.42);
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.brand-mark:hover .brand-glyph {
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: inset 0 0 0 1px rgba(127, 243, 230, 0.9), 0 10px 24px rgba(25, 227, 209, 0.28);
}

.brand-glyph::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  background: rgba(4, 18, 31, 0.82);
  transform: translateY(-50%);
}

.brand-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(4, 18, 31, 0.82);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-tick {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  height: 52px;
  overflow: hidden;
  white-space: nowrap;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 12px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.nav-block {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--cyan-soft);
  border-color: var(--line);
  background: rgba(25, 227, 209, 0.06);
  transform: translateY(-1px);
}

.nav-link[aria-current="page"] {
  color: var(--cyan);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(25, 227, 209, 0.9);
}

.nav-note {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 8;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-700);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-link:hover .nav-note,
.nav-link:focus-visible .nav-note {
  opacity: 1;
  transform: translate(-50%, 0);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(25, 227, 209, 0.06);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  background: rgba(25, 227, 209, 0.12);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease);
}

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

/* ===== score strip ===== */
.score-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: var(--scorebar-h);
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(10, 37, 64, 0.98), rgba(4, 18, 31, 0.98));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.score-strip__inner {
  max-width: var(--shell);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-strip__lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  animation: livePulse 2s var(--ease) infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 255, 136, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(61, 255, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 255, 136, 0); }
}

.score-strip__list {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.score-strip__list::-webkit-scrollbar { display: none; }

.score-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border: 1px solid rgba(143, 169, 188, 0.18);
  border-radius: 999px;
  background: rgba(18, 50, 75, 0.86);
  font-size: 12.5px;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.score-chip:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.chip-league {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip-team { color: var(--text); font-weight: 600; }

.chip-score {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--orange);
}

.chip-min {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon);
}

.score-strip__link {
  flex: none;
  padding: 7px 15px;
  border: 1px solid rgba(25, 227, 209, 0.42);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cyan);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.score-strip__link:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04121F;
}

/* ===== footer ===== */
.site-footer {
  position: relative;
  margin-top: 0;
  padding: 60px 0 calc(var(--scorebar-h) + 42px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-900) 0%, #061626 58%, #04121F 100%);
}

.footer-frame {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.footer-tagline {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

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

.footer-contact li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.fc-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 62px;
}

.fc-value {
  color: var(--text);
  word-break: break-all;
}

.copy-btn {
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

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

.copy-btn[data-copied="true"] {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(61, 255, 136, 0.08);
}

.footer-note {
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-links li + li { margin-top: 9px; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-links a::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--ink-700);
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--cyan-soft);
  transform: translateX(2px);
}

.footer-links a:hover::before {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(25, 227, 209, 0.8);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding-top: 22px;
  font-size: 12px;
  color: var(--muted);
}

.footer-copy {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.footer-legal a:hover { color: var(--cyan); }

.footer-icp {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: rgba(143, 169, 188, 0.75);
}

/* ===== toc ===== */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
}

.toc__title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0 7px 14px;
  border-left: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.toc a:hover {
  color: var(--cyan-soft);
  border-left-color: var(--cyan-soft);
}

.toc a.is-active {
  color: var(--cyan);
  border-left-color: var(--cyan);
  padding-left: 18px;
}

.toc__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.75;
}

/* ===== reveal & to-top ===== */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal.reveal--armed {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  will-change: opacity, transform;
}

.reveal.reveal--armed.is-in {
  opacity: 1;
  transform: none;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: calc(var(--scorebar-h) + 18px);
  z-index: 75;
  display: grid;
  place-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(127, 243, 230, 0.5);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(25, 227, 209, 0.92), rgba(10, 37, 64, 0.96));
  color: #04121F;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--cyan-soft);
  box-shadow: 0 14px 30px rgba(25, 227, 209, 0.3);
}

.to-top__arrow {
  display: block;
  width: 11px;
  height: 11px;
  border-left: 2.5px solid #04121F;
  border-top: 2.5px solid #04121F;
  transform: rotate(45deg) translate(2px, 2px);
}

/* ===== responsive ===== */
@media (max-width: 1180px) {
  .nav-link { padding: 9px 12px; font-size: 14px; }
  .brand-tick { display: none; }
}

@media (max-width: 1080px) {
  :root { --header-h: 70px; }

  .header-bar { gap: 12px; }

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

  .nav-block {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 65;
    display: block;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    padding: 0 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 24px 24px;
    background: linear-gradient(180deg, #0A2540, #04121F);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.5);
    transition: max-height 0.3s var(--ease), padding 0.3s var(--ease), visibility 0.3s;
  }

  .nav-block[data-open="true"] {
    max-height: 76vh;
    overflow-y: auto;
    visibility: visible;
    padding: 14px 18px 20px;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 13px 16px;
    border-color: rgba(143, 169, 188, 0.14);
    border-radius: 16px;
    background: rgba(18, 50, 75, 0.5);
    font-size: 16px;
  }

  .nav-link[aria-current="page"] {
    border-color: rgba(25, 227, 209, 0.42);
    background: rgba(25, 227, 209, 0.1);
  }

  .nav-link[aria-current="page"]::after { display: none; }

  .nav-note { display: none; }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .footer-brand { grid-column: 1 / -1; }

  .footer-tagline,
  .footer-note { max-width: 60ch; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }

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

  .section-title { font-size: clamp(24px, 5vw, 32px); }

  .toc {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

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

  .toc__title { display: none; }

  .toc a {
    flex: none;
    padding: 7px 14px;
    border-left: 0;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    font-size: 13px;
  }

  .toc a.is-active {
    padding-left: 14px;
    border-color: var(--cyan);
    background: rgba(25, 227, 209, 0.1);
  }
}

@media (max-width: 700px) {
  :root { --scorebar-h: 50px; }

  .shell,
  .header-bar,
  .score-strip__inner,
  .footer-frame { padding-left: 18px; padding-right: 18px; }

  .header-cta { display: none; }

  .score-strip__lead { display: none; }

  .score-strip__inner { gap: 12px; }

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

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

  .to-top {
    right: 14px;
    bottom: calc(var(--scorebar-h) + 14px);
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 640px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 17px; }
  .brand-glyph { width: 34px; height: 34px; border-radius: 10px; }
  .brand-glyph::after { width: 10px; height: 10px; }
  .header-bar { padding-top: 10px; padding-bottom: 10px; }
}

@media (max-width: 560px) {
  .grid-12 { grid-template-columns: minmax(0, 1fr); }

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

  .score-chip { padding: 5px 11px; font-size: 12px; }
}

/* ===== 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;
  }

  .reveal,
  .reveal.reveal--armed {
    opacity: 1 !important;
    transform: none !important;
  }

  .to-top { transform: none !important; }

  .btn:hover,
  .nav-link:hover,
  .score-chip:hover,
  .footer-links a:hover { transform: none; }
}
