/* ==========================================================================
   BSPORTS — /assets/site.css
   Shared shell: reset, tokens, typography, header, footer, buttons,
   breadcrumb, containers, grid and base components.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ink-deep: #081226;
  --panel: #0F2040;
  --teal: #2EF2D0;
  --teal-soft: #9BFBEA;
  --orange: #FF7A2F;
  --red: #FF3B4E;
  --yellow: #FFD166;
  --paper: #F3EEE4;
  --graphite: #1B2433;
  --steel: #72809B;

  --hairline: rgba(114, 128, 155, 0.24);
  --hairline-soft: rgba(114, 128, 155, 0.16);
  --edge-teal: rgba(46, 242, 208, 0.16);
  --edge-teal-strong: rgba(46, 242, 208, 0.34);

  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-sans: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "DIN Condensed", ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;

  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius-pill: 999px;
}

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

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

body {
  margin: 0;
  background: var(--ink-deep);
  color: var(--teal-soft);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
main:focus { outline: none; }

/* ---------- 3. Chinese typography ---------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.005em;
  color: #ffffff;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: #ffffff;
}
p { text-wrap: pretty; }

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -160%);
  padding: 12px 24px;
  background: var(--teal);
  color: var(--ink-deep);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  border-radius: 0 0 10px 10px;
  transition: transform 0.24s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline-offset: -4px;
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: clamp(10px, 1.5vw, 20px) var(--gutter) 0;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.header-rail {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.3vw, 18px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 8px;
  border: 1px solid var(--edge-teal);
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(15, 32, 64, 0.94), rgba(8, 18, 38, 0.9));
  box-shadow:
    0 26px 54px -34px rgba(0, 0, 0, 0.98),
    inset 0 1px 0 rgba(155, 251, 234, 0.1);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  transition: padding 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header[data-scrolled="true"] .header-rail {
  padding-block: 4px;
  border-color: var(--edge-teal-strong);
}

/* brand island */
.brand-island {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 7px 16px 7px 9px;
  border: 1px solid rgba(46, 242, 208, 0.26);
  border-radius: var(--radius-pill);
  background: rgba(46, 242, 208, 0.07);
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease);
}
.brand-island:hover,
.brand-island:focus-visible {
  background: rgba(46, 242, 208, 0.15);
  border-color: rgba(46, 242, 208, 0.55);
}
.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--teal);
  border-radius: 5px;
  background: linear-gradient(155deg, rgba(46, 242, 208, 0.32), transparent 64%);
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--teal);
  clip-path: polygon(0 100%, 0 36%, 100% 0, 100% 100%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text__name {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffffff;
}
.brand-text__note {
  margin-top: 4px;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: var(--steel);
  white-space: nowrap;
}

/* nav capsule */
.nav-capsule {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}
.nav-capsule__list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(114, 128, 155, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(8, 18, 38, 0.55);
}
.nav-capsule__item { display: flex; }
.nav-link {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--steel);
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link:hover {
  color: var(--teal-soft);
  background: rgba(46, 242, 208, 0.1);
}
.nav-link[aria-current="page"] {
  color: var(--ink-deep);
  background: var(--teal);
  font-weight: 700;
}
.nav-link[aria-current="page"]:hover {
  color: var(--ink-deep);
  background: var(--teal-soft);
}

/* actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--solid {
  background: var(--orange);
  border-color: var(--orange);
  color: #12090a;
}
.btn--solid:hover { background: #FF955F; border-color: #FF955F; }
.btn--ghost {
  background: rgba(46, 242, 208, 0.06);
  border-color: rgba(46, 242, 208, 0.38);
  color: var(--teal);
}
.btn--ghost:hover {
  background: rgba(46, 242, 208, 0.16);
  border-color: var(--teal);
}
.btn--line {
  border-color: rgba(114, 128, 155, 0.5);
  color: var(--teal-soft);
}
.btn--line:hover {
  border-color: var(--teal);
  color: #ffffff;
}
.btn--block { width: 100%; }

/* burger */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(46, 242, 208, 0.3);
  border-radius: var(--radius-pill);
  color: var(--teal);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.nav-toggle:hover { background: rgba(46, 242, 208, 0.12); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s var(--ease);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.26s var(--ease), top 0.26s var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.site-header[data-open="true"] .nav-toggle__bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* reading progress */
.scroll-meter {
  width: 100%;
  max-width: var(--shell);
  height: 2px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: rgba(114, 128, 155, 0.18);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.site-header[data-scrolled="true"] .scroll-meter { opacity: 1; }
.scroll-meter__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(46, 242, 208, 0.35), var(--teal) 58%, var(--teal-soft));
}

/* ---------- 6. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 140px);
  background: var(--ink-deep);
  color: var(--teal-soft);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--teal) 0 34%,
    var(--orange) 34% 47%,
    var(--red) 47% 54%,
    rgba(114, 128, 155, 0.35) 54% 100%
  );
}

.footer-body {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(44px, 5vw, 78px) var(--gutter) clamp(30px, 3.4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: clamp(26px, 3vw, 54px);
}

.footer-brand__name {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.16em;
  color: #ffffff;
  transition: color 0.24s var(--ease);
}
.footer-brand__name:hover { color: var(--teal); }
.footer-brand__line {
  margin-top: 12px;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--teal);
}
.footer-brand__note {
  margin-top: 14px;
  max-width: 30ch;
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--steel);
}

.footer-col__title {
  margin-bottom: 16px;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--teal);
}
.footer-col__list { display: grid; gap: 10px; }
.footer-link {
  position: relative;
  display: inline-block;
  font-size: 0.875rem;
  color: var(--steel);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  margin-top: -0.5px;
  background: var(--teal);
  transition: width 0.2s var(--ease);
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--teal-soft);
  padding-left: 14px;
}
.footer-link:hover::before,
.footer-link:focus-visible::before { width: 10px; }

.footer-contact__list { display: grid; gap: 12px; }
.footer-contact__row {
  display: grid;
  grid-template-columns: 3.4em minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 0.8125rem;
  line-height: 1.65;
}
.footer-contact__key {
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--steel);
}
.footer-contact__val {
  color: var(--teal-soft);
  word-break: break-word;
}
.footer-contact__note {
  margin-top: 14px;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--steel);
}

.footer-legal { border-top: 1px solid var(--hairline-soft); }
.footer-legal__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 20px var(--gutter) 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  font-size: 0.75rem;
  color: var(--steel);
}
.footer-legal__copy { color: var(--steel); }
.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}
.footer-legal__links a {
  color: var(--steel);
  transition: color 0.2s var(--ease);
}
.footer-legal__links a:hover,
.footer-legal__links a:focus-visible { color: var(--teal); }
.footer-legal__icp {
  margin-left: auto;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ---------- 7. Containers & sections ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 880px; }

.section { padding-block: clamp(56px, 7vw, 112px); }
.section--tight { padding-block: clamp(36px, 4.5vw, 64px); }
.section--panel { background: var(--panel); }
.section--paper {
  background: var(--paper);
  color: var(--graphite);
}
.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--graphite); }
.section--paper .eyebrow { color: #8A6A2A; }
.section--paper .chapter-num { color: #6E6455; }

.rule {
  height: 1px;
  border: 0;
  background: var(--hairline);
}

/* ---------- 8. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  padding-block: 18px 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--steel);
}
.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(114, 128, 155, 0.55);
}
.breadcrumb a { color: var(--steel); transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb [aria-current="page"] { color: var(--teal-soft); }

/* ---------- 9. Prose ---------- */
.prose {
  max-width: 68ch;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #C8D6E6;
}
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2em; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.prose h3 { margin-top: 1.6em; font-size: 1.25rem; }
.prose a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
.prose ul, .prose ol { padding-left: 1.3em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose strong { color: #ffffff; }
.prose blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--teal);
  color: var(--teal-soft);
}
.section--paper .prose { color: var(--graphite); }
.section--paper .prose strong { color: #000000; }
.section--paper .prose a { color: #0C6B5C; }

/* ---------- 10. Grid ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- 11. Editorial markers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--steel);
}

/* chapter index rail */
.chapter-index {
  position: sticky;
  top: 128px;
  display: grid;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
}
.chapter-index__link {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  gap: 10px;
  padding: 8px 12px;
  border-left: 1px solid rgba(114, 128, 155, 0.32);
  color: var(--steel);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.chapter-index__link:hover {
  color: var(--teal-soft);
  border-left-color: var(--teal);
}
.chapter-index__link[data-active="true"] {
  color: var(--teal);
  border-left-color: var(--teal);
  background: rgba(46, 242, 208, 0.08);
}
.chapter-index__num { opacity: 0.7; }

/* ---------- 12. Data components ---------- */
.score-focal {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  line-height: 0.84;
  letter-spacing: -0.04em;
  color: var(--teal);
  font-size: clamp(4rem, 13vw, 9rem);
}

.stat { display: grid; gap: 6px; }
.stat__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--teal);
}
.stat__label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--steel);
}
.section--paper .stat__value { color: #0C6B5C; }
.section--paper .stat__label { color: #5C5449; }

.panel {
  padding: clamp(18px, 2.2vw, 28px);
  background: linear-gradient(180deg, rgba(15, 32, 64, 0.94), rgba(8, 18, 38, 0.94));
  border: 1px solid var(--edge-teal);
}
.card {
  position: relative;
  padding: clamp(18px, 2.2vw, 26px);
  background: rgba(15, 32, 64, 0.55);
  border: 1px solid rgba(114, 128, 155, 0.2);
  border-top: 2px solid rgba(46, 242, 208, 0.5);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.card:hover {
  border-color: rgba(46, 242, 208, 0.34);
  background: rgba(15, 32, 64, 0.82);
}

.data-table {
  width: 100%;
  font-size: 0.875rem;
}
.data-table caption {
  padding-bottom: 12px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--steel);
}
.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--hairline-soft);
}
.data-table thead th {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--teal);
  border-bottom-color: rgba(46, 242, 208, 0.32);
  white-space: nowrap;
}
.data-table tbody tr:hover { background: rgba(46, 242, 208, 0.06); }
.data-table .is-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.section--paper .data-table th,
.section--paper .data-table td { border-bottom-color: rgba(27, 36, 51, 0.18); }
.section--paper .data-table thead th { color: #0C6B5C; border-bottom-color: rgba(12, 107, 92, 0.4); }
.section--paper .data-table tbody tr:hover { background: rgba(27, 36, 51, 0.05); }

/* ---------- 13. Tags / status ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(114, 128, 155, 0.42);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  white-space: nowrap;
}
.tag--live { border-color: rgba(46, 242, 208, 0.55); color: var(--teal); }
.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--teal);
}
.tag--red { border-color: rgba(255, 59, 78, 0.55); color: var(--red); }
.tag--yellow { border-color: rgba(255, 209, 102, 0.55); color: var(--yellow); }

/* ---------- 14. Media frames (page-level image slots) ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, rgba(15, 32, 64, 0.96), rgba(8, 18, 38, 0.96));
  border: 1px solid var(--edge-teal);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(46, 242, 208, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 242, 208, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.media-frame > img,
.media-frame > picture > img,
.media-frame > video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 8px 14px;
  background: rgba(8, 18, 38, 0.88);
  border-top: 1px solid rgba(46, 242, 208, 0.24);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--teal-soft);
}

/* ---------- 15. Diagonal band ---------- */
.diagonal-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--panel);
}
.diagonal-band::before {
  content: "";
  position: absolute;
  top: -14%;
  right: -6%;
  width: 60%;
  height: 132%;
  z-index: -1;
  transform: skewX(-14deg);
  background: repeating-linear-gradient(
    115deg,
    rgba(46, 242, 208, 0.13) 0 2px,
    transparent 2px 18px
  );
  pointer-events: none;
}

/* ---------- 16. Responsive ---------- */
@media (max-width: 1180px) {
  .brand-text__note { display: none; }
  .nav-link { padding: 7px 11px; font-size: 0.78rem; letter-spacing: 0.03em; }
  .btn { padding: 9px 15px; font-size: 0.8125rem; }
}

@media (max-width: 1080px) {
  html { scroll-padding-top: 100px; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn--ghost { display: none; }

  .nav-capsule {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    justify-content: stretch;
    padding: 10px;
    border: 1px solid rgba(46, 242, 208, 0.24);
    border-radius: 22px;
    background: rgba(8, 18, 38, 0.98);
    box-shadow: 0 32px 64px -32px rgba(0, 0, 0, 1);
  }
  .site-header[data-open="true"] .nav-capsule { display: block; }
  .nav-capsule__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 0;
    border: 0;
    background: none;
  }
  .nav-link {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9375rem;
  }
  .chapter-index { position: static; }
}

@media (max-width: 980px) {
  .footer-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

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

@media (max-width: 720px) {
  .site-header { padding-inline: 12px; }
  .header-rail { padding: 6px; gap: 6px; }
  .brand-island { padding: 6px 12px 6px 8px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-text__name { font-size: 0.9375rem; letter-spacing: 0.1em; }
  .btn--solid { padding: 9px 13px; font-size: 0.78rem; }
  .footer-legal__inner { gap: 8px 18px; }
}

@media (max-width: 640px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer-body { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-legal__icp { margin-left: 0; }
}

@media (max-width: 480px) {
  .nav-toggle { padding: 9px 11px; }
  .nav-toggle__label { display: none; }
  .brand-text__name { font-size: 0.875rem; }
  .footer-contact__row { grid-template-columns: 3em minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-meter__fill { transition: none !important; }
  .footer-link:hover,
  .footer-link:focus-visible { padding-left: 0; }
}
