/* ==========================================================================
   B体育最新版 · 赛后数据作战室 Site Kit
   /assets/site.css : reset / tokens / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body, h1, h2, h3, h4, h5, p, figure, blockquote, ul, ol, 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 { font: inherit; color: inherit; background: none; border: 0; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: rgba(55, 240, 176, 0.28); color: var(--paper); }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #07120F;
  --ink-2: #0E1714;
  --ink-3: #14211D;
  --line: #1E2E28;
  --red: #E23A32;
  --red-bright: #FF6B5E;
  --mint: #37F0B0;
  --mint-soft: #8FF7D2;
  --paper: #F3F6F0;
  --mist: #9FB0A8;
  --amber: #F2B33D;
  --screen: #5B8CFF;

  --shell-w: 1280px;
  --shell-pad: clamp(1.05rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  --font-display: "Helvetica Neue", "Arial Narrow", Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono",
    Consolas, "Liberation Mono", monospace;
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  background-color: var(--ink);
  background-image:
    radial-gradient(92% 60% at 50% -10%, rgba(55, 240, 176, 0.07), transparent 62%),
    radial-gradient(70% 48% at 100% 0%, rgba(91, 140, 255, 0.05), transparent 60%),
    linear-gradient(rgba(30, 46, 40, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 46, 40, 0.3) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  background-position: 0 0, 0 0, center top, center top;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1024px) {
  body { font-size: 17px; line-height: 1.8; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* ---------- 4. Utilities ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.section {
  padding-block: clamp(2.6rem, 6vw, 5.5rem);
  border-top: 1px solid var(--line);
}

.page-head {
  padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.6rem);
}

.rule {
  height: 1px;
  border: 0;
  margin: clamp(1.5rem, 3vw, 2.6rem) 0;
  background: linear-gradient(90deg, var(--line), rgba(30, 46, 40, 0.15));
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 5. Type scale ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 6vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

.label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--mist);
}

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(243, 246, 240, 0.88);
}

.prose > * + * { margin-top: 1.1em; }

.prose h2,
.prose h3 {
  color: var(--paper);
  margin-top: 1.9em;
}

.prose h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.prose h3 { font-size: 1.15rem; }

.prose a {
  color: var(--mint-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  list-style: disc;
  color: rgba(243, 246, 240, 0.86);
}

.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.45em; }

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

.prose blockquote {
  border-left: 2px solid var(--red);
  padding-left: 1rem;
  color: var(--mint-soft);
  font-size: 1.02rem;
}

.prose figure { margin-inline: 0; }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.05rem;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn--ghost {
  color: var(--paper);
  background: rgba(55, 240, 176, 0.04);
  border-color: var(--line);
}

.btn--ghost:hover {
  color: var(--mint);
  border-color: rgba(55, 240, 176, 0.6);
  background: rgba(55, 240, 176, 0.09);
}

.btn--primary {
  color: var(--paper);
  background: var(--red);
  border-color: var(--red);
}

.btn--primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
}

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

/* ---------- 7. Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
}

@media (min-width: 900px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .grid--5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .grid--8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
}

/* ---------- 8. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 0.6rem 1rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #04120C;
  background: var(--mint);
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-color: var(--paper);
}

/* ---------- 9. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background-image: linear-gradient(180deg, rgba(14, 23, 20, 0.97), rgba(7, 18, 15, 0.92));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}

.read-progress {
  position: relative;
  height: 2px;
  background: rgba(30, 46, 40, 0.9);
  overflow: hidden;
}

.read-progress__bar {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--mint) 0%, var(--mint-soft) 46%, var(--red) 100%);
  transition: transform 0.12s linear;
}

.status-bar {
  background: rgba(14, 23, 20, 0.92);
  border-bottom: 1px solid var(--line);
  max-height: 44px;
  overflow: hidden;
  visibility: visible;
  transition: max-height 0.26s var(--ease), visibility 0.26s var(--ease),
    opacity 0.26s var(--ease);
}

.status-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 34px;
  padding-block: 0.2rem;
}

.status-bar__note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(55, 240, 176, 0.14);
  animation: pulse-dot 2.8s ease-in-out infinite;
  flex: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(55, 240, 176, 0.14); }
  50% { opacity: 0.5; box-shadow: 0 0 0 5px rgba(55, 240, 176, 0.05); }
}

.utility-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 1.6rem);
}

.utility-nav__item { display: block; }

.utility-nav__link {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
  padding-block: 0.15rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.utility-nav__link:hover {
  color: var(--paper);
  border-bottom-color: var(--mint);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.5rem);
  padding-block: clamp(0.85rem, 1.9vw, 1.4rem);
  transition: padding 0.26s var(--ease);
}

.masthead__gauge {
  justify-self: start;
  width: clamp(40px, 9vw, 110px);
  height: 14px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 8px);
  opacity: 0.9;
}

.brand {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  text-align: center;
}

.brand__lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  flex: none;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  transition: width 0.26s var(--ease), height 0.26s var(--ease);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.35rem, 3.1vw, 2.15rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
  transition: font-size 0.26s var(--ease);
}

.brand__edition {
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: var(--mist);
  max-height: 2rem;
  overflow: hidden;
  transition: opacity 0.22s var(--ease), max-height 0.26s var(--ease),
    transform 0.22s var(--ease);
}

.brand:hover .brand__name { color: var(--mint-soft); }
.brand:hover .brand__mark { border-color: var(--red-bright); color: var(--red-bright); }

.masthead__side {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.masthead__cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 38px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(20, 33, 29, 0.72);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover { border-color: rgba(55, 240, 176, 0.55); color: var(--mint); }

.nav-toggle__bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.18s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* 导航 */
.primary-nav {
  border-top: 1px solid var(--line);
  background: rgba(7, 18, 15, 0.4);
}

.primary-nav__inner { padding-block: 0.1rem; }

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 2.2vw, 1.9rem);
}

.primary-nav__item { display: block; }

.primary-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.7rem 0.25rem 0.75rem;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--mist);
  transition: color 0.2s var(--ease);
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.4rem;
  height: 1px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}

.primary-nav__link:hover { color: var(--paper); }
.primary-nav__link:hover::after { transform: scaleX(1); }

.primary-nav__link[aria-current="page"] { color: var(--paper); }

.primary-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  height: 2px;
  background: var(--red);
}

/* 滚动压缩态 */
.site-header[data-scrolled="true"] .status-bar {
  max-height: 0;
  visibility: hidden;
  opacity: 0;
}

.site-header[data-scrolled="true"] .masthead { padding-block: 0.5rem; }

.site-header[data-scrolled="true"] .brand__name { font-size: 1.25rem; }

.site-header[data-scrolled="true"] .brand__mark {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
}

.site-header[data-scrolled="true"] .brand__edition {
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
}

.site-header[data-scrolled="true"] .primary-nav__link { padding-block: 0.55rem 0.6rem; }

.site-header[data-nav-open="true"] .nav-toggle {
  border-color: var(--mint);
  color: var(--mint);
}

/* ---------- 10. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

.breadcrumb__link {
  color: var(--mint-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.breadcrumb__link:hover {
  color: var(--mint);
  border-bottom-color: rgba(55, 240, 176, 0.5);
}

.breadcrumb__sep {
  color: rgba(159, 176, 168, 0.5);
  font-family: var(--font-mono);
}

.breadcrumb [aria-current="page"] { color: var(--paper); }

/* ---------- 11. Section marker ---------- */
.section-marker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  margin-bottom: clamp(1.2rem, 2.5vw, 2rem);
}

.section-marker__index {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 200;
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: rgba(159, 176, 168, 0.34);
}

.section-marker__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-marker__note {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--mist);
  margin-left: auto;
}

/* ---------- 12. Stats ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--paper);
}

.stat__value--red { color: var(--red); }
.stat__value--mint { color: var(--mint); }

.stat__unit {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--mist);
}

/* ---------- 13. Data window ---------- */
.data-window {
  position: relative;
  background-image: linear-gradient(180deg, rgba(20, 33, 29, 0.94), rgba(14, 23, 20, 0.94));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(243, 246, 240, 0.03),
    0 22px 48px -36px rgba(0, 0, 0, 0.95);
}

.data-window::before,
.data-window::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  pointer-events: none;
}

.data-window::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--mint);
  border-left: 1px solid var(--mint);
}

.data-window::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--red);
  border-bottom: 1px solid var(--red);
}

.data-window__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.85rem clamp(0.85rem, 2vw, 1.15rem);
  border-bottom: 1px solid var(--line);
}

.data-window__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--mint-soft);
}

.data-window__meta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.data-window__body { padding: clamp(0.85rem, 2vw, 1.2rem); }

/* ---------- 14. Figure frame ---------- */
.figure-frame {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-3);
}

.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(180deg, rgba(7, 18, 15, 0) 42%, rgba(7, 18, 15, 0.76) 100%);
}

.figure-frame__img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06);
}

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

.figure-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.7rem 0.9rem;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
}

/* ---------- 15. Pills ---------- */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.82rem;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
  background: rgba(20, 33, 29, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.pill:hover {
  color: var(--paper);
  border-color: rgba(55, 240, 176, 0.5);
}

.pill[aria-pressed="true"] {
  color: var(--mint);
  border-color: var(--mint);
  background: rgba(55, 240, 176, 0.1);
}

.pill--red[aria-pressed="true"] {
  color: var(--red-bright);
  border-color: var(--red);
  background: rgba(226, 58, 50, 0.12);
}

/* ---------- 16. Tabs ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
}

.tab {
  appearance: none;
  padding: 0.6rem 0.9rem;
  margin-bottom: -1px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.tab:hover { color: var(--paper); }

.tab[aria-selected="true"] {
  color: var(--mint);
  border-bottom-color: var(--mint);
  background-image: linear-gradient(180deg, rgba(55, 240, 176, 0.09), transparent);
}

.tab-panel { padding-top: 1.2rem; }
.tab-panel[hidden] { display: none; }

/* ---------- 17. Index rail ---------- */
.index-rail {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border-left: 1px solid var(--line);
  position: sticky;
  top: clamp(110px, 14vh, 165px);
}

.index-rail__link {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-left: -1px;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
  border-left: 2px solid transparent;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease),
    background 0.22s var(--ease);
}

.index-rail__link:hover { color: var(--paper); }

.index-rail__link[data-active="true"] {
  color: var(--mint);
  border-left-color: var(--mint);
  background-image: linear-gradient(90deg, rgba(55, 240, 176, 0.1), transparent);
}

.index-rail__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

/* ---------- 18. Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 340px;
  pointer-events: none;
  background-image:
    radial-gradient(70% 100% at 16% 0%, rgba(226, 58, 50, 0.1), transparent 70%),
    radial-gradient(60% 100% at 84% 0%, rgba(55, 240, 176, 0.08), transparent 72%);
}

.site-footer > * { position: relative; }

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.55fr);
  gap: clamp(1.8rem, 5vw, 4.5rem);
  padding-block: clamp(2.4rem, 5vw, 4.2rem);
}

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.footer__tagline {
  margin-top: 0.55rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--mint);
}

.footer__blurb {
  margin-top: 0.75rem;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.8;
  color: var(--mist);
}

.footer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}

.footer__chip {
  padding: 0.28rem 0.6rem;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--mist);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(20, 33, 29, 0.5);
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem clamp(1rem, 3vw, 2.2rem);
}

.footer__col-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--paper);
}

.footer__col-title::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--red);
  flex: none;
}

.footer__list { display: flex; flex-direction: column; gap: 0.1rem; }

.footer__link {
  display: inline-block;
  padding: 0.26rem 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--mist);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer__link:hover {
  color: var(--paper);
  transform: translateX(3px);
}

.footer__contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.4rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer__contact-item { min-width: 0; }

.footer__contact-label {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--mist);
  margin-bottom: 0.35rem;
}

.footer__contact-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.footer__contact-value--text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--mint-soft);
  letter-spacing: 0.02em;
}

.footer__note {
  grid-column: 1 / -1;
  max-width: 78ch;
  font-size: 12px;
  line-height: 1.75;
  color: var(--mist);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-block: 1.35rem;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
}

.footer__legal { font-variant-numeric: tabular-nums; }

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
}

.footer__legal-link {
  color: var(--mint-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer__legal-link:hover {
  color: var(--mint);
  border-bottom-color: rgba(55, 240, 176, 0.5);
}

.footer__icp {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: rgba(159, 176, 168, 0.85);
}

/* ---------- 19. Responsive ---------- */
@media (max-width: 980px) {
  .footer__top { grid-template-columns: minmax(0, 1fr); }
}

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

@media (max-width: 860px) {
  html { scroll-padding-top: 96px; }

  .masthead { padding-block: 0.72rem; }

  .masthead__gauge { display: none; }

  .brand__name { font-size: clamp(1.2rem, 5vw, 1.6rem); }

  .brand__edition { letter-spacing: 0.2em; font-size: 10px; }

  .brand__mark { width: 1.55rem; height: 1.55rem; font-size: 0.72rem; }

  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--ink-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 44px -30px rgba(0, 0, 0, 0.95);
    transition: max-height 0.32s var(--ease), visibility 0.32s var(--ease);
  }

  .primary-nav[data-open="true"] {
    max-height: min(76vh, 34rem);
    overflow-y: auto;
    visibility: visible;
  }

  .primary-nav__inner { padding-block: 0.35rem; }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav__link {
    display: block;
    padding: 0.9rem 0.15rem;
    font-size: 13px;
    letter-spacing: 0.18em;
    border-bottom: 1px solid var(--line);
  }

  .primary-nav__link::after {
    display: none;
  }

  .primary-nav__link[aria-current="page"] {
    color: var(--mint);
    border-left: 2px solid var(--red);
    padding-left: 0.7rem;
  }

  .primary-nav__item:last-child .primary-nav__link { border-bottom: 0; }

  .index-rail {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 0.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .index-rail__link {
    margin-left: 0;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 0.45rem 0.6rem;
  }

  .index-rail__link[data-active="true"] {
    border-left-color: transparent;
    border-bottom-color: var(--mint);
    background-image: none;
  }
}

@media (max-width: 640px) {
  .masthead__cta { display: none; }

  .status-bar__note .label { letter-spacing: 0.12em; }

  .utility-nav { gap: 0.85rem; }

  .section-marker__note { margin-left: 0; }
}

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

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

/* ---------- 20. Motion preferences ---------- */
@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;
  }

  .status-dot { animation: none; }
  .read-progress__bar { transition: none; }
}
