/* ============================================================
   YOBET体育 · 全站共享样式
   视觉语言：曜石黑基地 / 竞技红焦点 / 速度线 / 斜切角 / 大数字
   ============================================================ */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* 色彩 */
  --c-bg: #0B0B0F;
  --c-bg2: #14141A;
  --c-bg3: #1D1D27;
  --c-accent: #E01414;
  --c-accent-hot: #FF3B30;
  --c-gold: #F5B83D;
  --c-gold-dim: #C9912A;
  --c-text: #F5F5F5;
  --c-text-dim: #A0A0B8;
  --c-line: #E84949;

  /* 字体 */
  --f-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-data: "Inter", "Roboto", system-ui, sans-serif;
  --f-ui: "Inter", system-ui, sans-serif;

  /* 布局 */
  --header-h: 80px;
  --content-w: 1280px;
  --page-pad: 24px;
  --radius: 2px;

  /* 几何 */
  --clip-angle: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));

  /* 阴影 */
  --shadow-1: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.5);
}

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

html {
  min-width: 320px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--c-bg);
  background-image:
    radial-gradient(ellipse at 15% -10%, rgba(224, 20, 20, 0.07), transparent 45%),
    linear-gradient(rgba(245, 245, 245, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 245, 245, 0.015) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.06; }
h2 { font-size: clamp(24px, 3.2vw, 36px); }
h3 { font-size: clamp(18px, 2.2vw, 22px); }
h4 { font-size: 17px; }

p { margin: 0; }

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

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

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

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

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

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

a, button {
  -webkit-tap-highlight-color: rgba(224, 20, 20, 0.25);
}

::selection {
  background: var(--c-accent);
  color: var(--c-text);
}

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 2px;
}

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

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.main-content,
main {
  flex: 1;
  width: 100%;
}

.section {
  padding: 72px 0;
  position: relative;
}

.layout-editorial {
  display: grid;
  grid-template-columns: minmax(0, 26%) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (max-width: 960px) {
  .section {
    padding: 48px 0;
  }
  .layout-editorial {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ---------- 4. Heading Components ---------- */
.heading-block {
  position: relative;
  margin-bottom: 28px;
  padding-left: 18px;
  border-left: 4px solid var(--c-accent);
}

.heading-block-title {
  font-family: var(--f-head);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.2;
}

.heading-block-sub {
  display: block;
  margin-top: 8px;
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}

.page-title {
  position: relative;
  margin-bottom: 24px;
  padding-left: 20px;
}

.page-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: linear-gradient(180deg, var(--c-accent), var(--c-gold));
}

.page-title-en {
  display: block;
  font-family: var(--f-data);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 10px;
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 11, 15, 0.96);
  border-bottom: 1px solid rgba(232, 73, 73, 0.35);
}

.header-stripe {
  height: 4px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-hot) 30%, var(--c-gold) 62%, transparent 100%);
}

.header-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  height: calc(var(--header-h) - 4px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-inner .brand {
  margin-right: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 2000;
  background: var(--c-accent);
  color: var(--c-text);
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  text-decoration: none;
  clip-path: var(--clip-angle);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

.skip-link:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 2px var(--c-gold)) drop-shadow(0 0 6px var(--c-gold));
}

/* ---------- 6. Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, rgba(245, 245, 245, 0.16) 0%, transparent 38%, transparent 62%, rgba(245, 245, 245, 0.06) 100%),
    var(--c-accent);
  clip-path: var(--clip-angle);
  font-family: var(--f-data);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--c-text);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1;
}

.brand-name {
  font-family: var(--f-head);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--c-text);
}

.brand-name em {
  font-style: normal;
  color: var(--c-accent-hot);
}

.brand-sub {
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--c-text-dim);
  white-space: nowrap;
}

/* ---------- 7. Navigation & Header CTA ---------- */
.site-nav {
  font-family: var(--f-ui);
}

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

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 10px 12px 12px;
  font-family: var(--f-ui);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--c-text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--c-text);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"]::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 10px;
  margin: 0 6px 0 0;
  background: var(--c-accent);
  transform: skewX(-18deg);
  vertical-align: -1px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 20px;
  background: var(--c-accent);
  color: var(--c-text);
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  clip-path: var(--clip-angle);
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-cta::after {
  content: '';
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--c-text);
  transition: transform 0.2s ease;
}

.header-cta:hover {
  background: var(--c-accent-hot);
  transform: translateY(-1px);
}

.header-cta:hover::after {
  transform: translateX(3px);
}

.header-cta:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 2px var(--c-gold)) drop-shadow(0 0 6px var(--c-gold));
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  background: var(--c-bg2);
  border: 1px solid var(--c-line);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: var(--c-bg3);
  border-color: var(--c-accent);
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  background: var(--c-bg2);
}

.footer-slant {
  height: 10px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-hot) 55%, var(--c-gold) 100%);
  clip-path: polygon(0 0, calc(100% - 84px) 0, 100% 100%, 0 100%);
}

.footer-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 52px var(--page-pad) 40px;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
}

.footer-brand .brand {
  margin-bottom: 20px;
}

.footer-about {
  max-width: 440px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-text-dim);
}

.footer-trust {
  max-width: 440px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed rgba(201, 145, 42, 0.4);
  font-family: var(--f-ui);
  font-size: 12px;
  line-height: 1.7;
  color: var(--c-gold-dim);
}

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

.footer-contact .footer-contact-item {
  margin-bottom: 14px;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text);
  line-height: 1;
}

.footer-heading::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--c-accent);
  flex-shrink: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  display: inline-block;
  font-size: 14px;
  color: var(--c-text-dim);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: var(--c-gold);
  padding-left: 6px;
}

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

.footer-contact-label {
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-gold-dim);
}

.footer-contact-value {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--c-text-dim);
  word-break: break-all;
}

.footer-contact-note {
  font-family: var(--f-ui);
  font-size: 11px;
  line-height: 1.5;
  color: var(--c-text-dim);
}

.footer-bottom {
  background: var(--c-bg);
  border-top: 1px solid rgba(232, 73, 73, 0.25);
}

.footer-bottom-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 18px var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: var(--f-ui);
  font-size: 12px;
  color: var(--c-text-dim);
}

.footer-rights,
.footer-icp {
  margin: 0;
}

/* ---------- 9. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: transparent;
  border: 1px solid var(--c-line);
  color: var(--c-text);
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--c-accent);
  border-color: var(--c-accent);
}

.btn-primary:hover {
  background: var(--c-accent-hot);
  border-color: var(--c-accent-hot);
  transform: translateY(-1px);
}

.btn-outline:hover {
  background: rgba(224, 20, 20, 0.08);
  border-color: var(--c-accent);
}

.btn-ghost {
  border-color: rgba(160, 160, 184, 0.35);
}

.btn-ghost:hover {
  border-color: var(--c-gold-dim);
  color: var(--c-gold);
}

/* ---------- 10. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  font-family: var(--f-ui);
  font-size: 12px;
  color: var(--c-text-dim);
}

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

.breadcrumbs li + li::before {
  content: '▸';
  margin: 0 6px 0 2px;
  font-size: 10px;
  color: var(--c-accent);
}

.breadcrumbs a {
  color: var(--c-text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--c-accent-hot);
}

.breadcrumbs [aria-current="page"] {
  color: var(--c-text);
  font-weight: 500;
}

/* ---------- 11. Chapter Index ---------- */
.chapter-index {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 4px 0;
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow: auto;
}

.chapter-index-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}

.chapter-index-title::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--c-accent);
  flex-shrink: 0;
}

.chapter-index-list {
  display: flex;
  flex-direction: column;
}

.chapter-index-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-left: 2px solid rgba(232, 73, 73, 0.25);
  font-family: var(--f-body);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--c-text-dim);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chapter-index-link:hover {
  color: var(--c-text);
  border-left-color: var(--c-accent);
}

.chapter-index-link[data-active] {
  color: var(--c-text);
  border-left-color: var(--c-accent);
  background: linear-gradient(90deg, rgba(224, 20, 20, 0.1), transparent);
}

.chapter-index-num {
  font-family: var(--f-data);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-gold-dim);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.chapter-index-link[data-active] .chapter-index-num {
  color: var(--c-accent);
}

/* ---------- 12. Chapter Content ---------- */
.chapter {
  padding: 32px 0;
  border-top: 1px solid rgba(232, 73, 73, 0.2);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.chapter:first-of-type {
  border-top: none;
}

.chapter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-family: var(--f-data);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.chapter-label::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--c-accent);
}

.chapter-title {
  font-family: var(--f-head);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
}

.chapter-note {
  max-width: 360px;
  font-family: var(--f-ui);
  font-size: 12px;
  line-height: 1.8;
  color: var(--c-text-dim);
}

/* ---------- 13. Stats ---------- */
.stat-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  padding: 24px 20px 20px;
  background: var(--c-bg2);
  border: 1px solid rgba(232, 73, 73, 0.2);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--c-accent), var(--c-accent-hot));
}

.stat-card:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

.stat-card-label {
  display: block;
  margin-bottom: 14px;
  font-family: var(--f-ui);
  font-size: 12px;
  color: var(--c-text-dim);
  letter-spacing: 0.06em;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--f-data);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-text);
}

.stat-unit {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--c-accent);
}

.stat-gold {
  color: var(--c-gold);
}

.stat-gold .stat-unit {
  color: var(--c-gold-dim);
}

/* ---------- 14. Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--c-text-dim);
  background: var(--c-bg2);
  border: 1px solid rgba(232, 73, 73, 0.3);
}

.tag-red {
  background: rgba(224, 20, 20, 0.12);
  border-color: rgba(224, 20, 20, 0.45);
  color: var(--c-accent-hot);
}

.tag-gold {
  background: rgba(245, 184, 61, 0.1);
  border-color: rgba(201, 145, 42, 0.45);
  color: var(--c-gold);
}

/* ---------- 15. Media ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(-45deg, rgba(245, 245, 245, 0.02) 0 10px, transparent 10px 20px),
    var(--c-bg2);
  border: 1px solid rgba(232, 73, 73, 0.25);
}

.media-frame[data-ratio="hero"] { aspect-ratio: 21 / 9; }
.media-frame[data-ratio="landscape"] { aspect-ratio: 16 / 10; }
.media-frame[data-ratio="square"] { aspect-ratio: 1 / 1; }
.media-frame[data-ratio="portrait"] { aspect-ratio: 3 / 4; }
.media-frame[data-ratio="sport"] { aspect-ratio: 4 / 5; }

.media-frame img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame[data-placeholder]::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  border-left: 26px solid transparent;
  border-bottom: 15px solid rgba(224, 20, 20, 0.6);
  pointer-events: none;
}

.figure-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--f-ui);
  font-size: 12px;
  color: var(--c-text-dim);
}

.figure-caption::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--c-accent);
  flex-shrink: 0;
}

/* ---------- 16. Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  padding: 24px 22px;
  background: var(--c-bg2);
  border: 1px solid rgba(232, 73, 73, 0.2);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
  transform: scaleX(0.2);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--c-accent);
  box-shadow: var(--shadow-2);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-title {
  font-family: var(--f-head);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--c-text);
}

.card-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text-dim);
}

/* ---------- 17. Accordion ---------- */
.accordion-item {
  margin-bottom: 12px;
  background: var(--c-bg2);
  border: 1px solid rgba(232, 73, 73, 0.2);
  transition: border-color 0.2s ease;
}

.accordion-item:focus-within {
  border-color: var(--c-accent);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  font-family: var(--f-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text);
  text-align: left;
  transition: background 0.2s ease;
}

.accordion-trigger:hover {
  background: rgba(224, 20, 20, 0.05);
}

.accordion-trigger::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--c-accent);
  border-bottom: 2px solid var(--c-accent);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(225deg) translateY(-1px);
}

.accordion-panel {
  padding: 0 20px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-text-dim);
}

.accordion-panel:not([data-open]) {
  display: none;
}

/* ---------- 18. Tabs ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--c-line);
}

.tab-btn {
  position: relative;
  padding: 12px 20px;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--c-text-dim);
  transition: color 0.2s ease;
}

.tab-btn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--c-accent);
  transform: scaleX(0);
  transition: transform 0.22s ease;
}

.tab-btn:hover {
  color: var(--c-text);
}

.tab-btn[data-active] {
  color: var(--c-text);
  font-weight: 600;
}

.tab-btn[data-active]::after {
  transform: scaleX(1);
}

/* ---------- 19. Status Bar / Misc ---------- */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--page-pad);
  background: rgba(20, 20, 26, 0.9);
  border-bottom: 1px solid rgba(232, 73, 73, 0.2);
  font-family: var(--f-ui);
  font-size: 12px;
  color: var(--c-text-dim);
}

.status-bar::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--c-accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.hr {
  height: 1px;
  margin: 32px 0;
  border: 0;
  background: linear-gradient(90deg, var(--c-line), transparent);
}

.speed-lines {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.speed-lines::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0 12px,
    rgba(245, 245, 245, 0.02) 12px 13px,
    transparent 13px 26px
  );
}

/* ---------- 20. Responsive ---------- */
@media (max-width: 960px) {
  :root {
    --header-h: 68px;
  }

  .header-cta {
    display: none;
  }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: calc(100vh - var(--header-h) - 16px);
    overflow-y: auto;
    background: rgba(20, 20, 26, 0.98);
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    font-family: var(--f-body);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
  }

  .nav-item {
    border-bottom: 1px solid rgba(232, 73, 73, 0.12);
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 15px 24px 17px;
    font-size: 15px;
  }

  .nav-link::after {
    left: 24px;
    right: auto;
    width: 24px;
    bottom: 4px;
    transform: scaleX(0);
    transform-origin: left;
  }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after {
    transform: scaleX(1);
  }

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

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

  .chapter-index {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(232, 73, 73, 0.2);
  }

  .chapter-index-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .chapter-index-link {
    border-left: none;
    padding: 6px 10px;
    background: var(--c-bg2);
    border: 1px solid rgba(232, 73, 73, 0.2);
  }

  .chapter-index-link[data-active] {
    background: rgba(224, 20, 20, 0.12);
    border-color: var(--c-accent);
  }

  .chapter-index-num {
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  :root {
    --page-pad: 16px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 420px) {
  .brand-sub {
    display: none;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
}

/* ---------- 21. Focus & Reduced Motion ---------- */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 2px;
}

.header-cta:focus-visible,
.skip-link:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 2px var(--c-gold)) drop-shadow(0 0 6px var(--c-gold));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
