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

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

html.nav-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--stone);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 14% 6%, rgba(201, 162, 39, 0.10), transparent 46%),
    radial-gradient(circle at 88% 92%, rgba(22, 58, 47, 0.07), transparent 52%);
  background-attachment: fixed;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--crimson); }
button { font: inherit; }
table { border-collapse: collapse; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(43, 43, 43, 0.55);
  border-radius: 1px;
}

/* ============ 2. Tokens ============ */
:root {
  --crimson: #7A0F1E;
  --crimson-deep: #4E0A14;
  --crimson-ink: #3A0710;
  --gold: #C9A227;
  --gold-light: #E6C766;
  --green: #163A2F;
  --moss: #3E5C4B;
  --cream: #F7F1E7;
  --paper: #FFFCF5;
  --sand: #D8CFC0;
  --stone: #2B2B2B;
  --ink-soft: #5C574E;
  --clay: #A44A3F;

  --rail-w: 272px;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 56px);

  --font-display: "Songti SC", "Source Han Serif SC", "Noto Serif SC", STSong, "SimSun", Georgia, serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --line: 2px solid var(--stone);
  --shadow-hard: 9px 9px 0 rgba(43, 43, 43, 0.13);
  --shadow-gold: 7px 7px 0 rgba(201, 162, 39, 0.30);
}

/* ============ 3. Skip link ============ */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  display: inline-block;
  padding: 11px 18px;
  background: var(--gold);
  color: var(--stone);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid var(--stone);
  box-shadow: 4px 4px 0 rgba(43, 43, 43, 0.4);
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* ============ 4. Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(96deg, #4E0A14 0%, #7A0F1E 62%, #4E0A14 100%);
  color: #F3E6D2;
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 8px 26px rgba(78, 10, 20, 0.24);
}

.site-header__brandbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(14px, 4vw, 22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--gold);
  background: linear-gradient(160deg, #8D1425 0%, #3A0710 100%);
  box-shadow: inset 0 0 0 3px rgba(43, 43, 43, 0.25);
}
.brand__mark::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid var(--gold-light);
  transform: rotate(45deg);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(230, 199, 102, 0.32);
  pointer-events: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0.07em;
  color: var(--cream);
  white-space: nowrap;
}
.brand__meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__support { display: none; }

.header-cta {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--stone);
  background: var(--gold);
  border: 2px solid var(--stone);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.header-cta:hover {
  background: var(--gold-light);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.36);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 12px;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav-toggle:hover { background: rgba(201, 162, 39, 0.16); color: var(--cream); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s ease, top 0.22s ease, opacity 0.22s ease;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* 导航（移动端抽屉） */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(88vw, 360px);
  padding: 18px 18px 26px;
  overflow-y: auto;
  background: linear-gradient(180deg, #4E0A14 0%, #2E0710 100%);
  border-left: 2px solid var(--gold);
  box-shadow: -22px 0 54px rgba(0, 0, 0, 0.45);
  transform: translateX(102%);
  transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header[data-open] .site-nav { transform: translateX(0); }

.site-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.36);
}
.site-nav__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav-close:hover { background: var(--gold); color: var(--stone); }

.site-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-nav__item { margin: 0; }

.site-nav__link {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: #EADCC6;
  border: 2px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.site-nav__link:hover {
  background: rgba(201, 162, 39, 0.14);
  color: #FFF8EA;
}

.site-nav__num {
  min-width: 28px;
  padding: 2px 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.5);
}

.site-nav__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
}

.site-nav__link[aria-current="page"] {
  background: rgba(201, 162, 39, 0.18);
  border-color: var(--gold);
  color: #FFF6E4;
}
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -2px;
  width: 5px;
  background: var(--gold);
}

.site-nav__item--feature { margin: 8px 0; }
.site-nav__link--feature {
  padding: 16px 12px;
  background: var(--green);
  border-color: var(--moss);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.26);
}
.site-nav__link--feature:hover {
  background: #1C4A3B;
  border-color: var(--gold);
}
.site-nav__link--feature .site-nav__label { color: #F2E9D8; font-size: 17px; }
.site-nav__link--feature[aria-current="page"] { background: #1C4A3B; }

.site-nav__foot {
  margin-top: auto;
  padding-top: 14px;
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(201, 162, 39, 0.3);
}
.site-nav__note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(234, 220, 198, 0.72);
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(43, 43, 43, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.site-header[data-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* 阅读进度 */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  overflow: hidden;
  background: rgba(201, 162, 39, 0.18);
}
.read-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}

/* ============ 5. Footer ============ */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  background: linear-gradient(180deg, #4E0A14 0%, #3A0710 62%, #2E0710 100%);
  color: #EFE2CD;
  border-top: 3px solid var(--gold);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(230, 199, 102, 0.45);
}

.site-footer__top {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(38px, 6vw, 74px) var(--gutter) clamp(30px, 4vw, 50px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 44px);
}

.site-footer__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.site-footer__name {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: 0.07em;
  color: var(--cream);
}
.site-footer__intro {
  max-width: 34ch;
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(239, 226, 205, 0.82);
}
.site-footer__hours {
  padding-left: 11px;
  border-left: 3px solid var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold-light);
}

.site-footer__col-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--cream);
  border-bottom: 1px solid rgba(201, 162, 39, 0.36);
}
.site-footer__col-num {
  padding: 2px 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.5);
}

.site-footer__list {
  list-style: none;
  display: grid;
  gap: 2px;
}

.site-footer__link {
  display: inline-block;
  padding: 6px 0;
  font-size: 14.5px;
  color: rgba(239, 226, 205, 0.82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.site-footer__link:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

.site-footer__contact {
  padding: 18px 18px 20px;
  background: var(--green);
  border: 2px solid rgba(201, 162, 39, 0.5);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
}
.site-footer__contact .site-footer__col-title { border-bottom-color: rgba(230, 199, 102, 0.36); }

.site-footer__contact-item {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(230, 199, 102, 0.24);
}
.site-footer__contact-item:last-child { border-bottom: 0; }
.site-footer__contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.site-footer__contact-val {
  font-size: 14px;
  line-height: 1.65;
  color: #F4EADA;
  word-break: break-word;
}
.site-footer__note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(239, 226, 205, 0.68);
}

.site-footer__base {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gutter) 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(239, 226, 205, 0.7);
  border-top: 1px solid rgba(201, 162, 39, 0.28);
}
.site-footer__legal { color: rgba(239, 226, 205, 0.78); }
.site-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer__legal-link {
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}
.site-footer__legal-link:hover { border-bottom-color: var(--gold-light); }
.site-footer__icp { color: rgba(239, 226, 205, 0.55); }

/* ============ 6. Layout helpers ============ */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }
.container--wide { max-width: 1440px; }

.section { padding-block: clamp(48px, 7vw, 104px); }
.section--tight { padding-block: clamp(28px, 4vw, 58px); }
.section--green { background: var(--green); color: var(--cream); }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 34px);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============ 7. Typography blocks ============ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crimson);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--gold);
}

.section-title {
  margin: 0.42em 0 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.16;
  letter-spacing: 0.015em;
  color: var(--stone);
  text-wrap: balance;
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.85;
  color: var(--ink-soft);
}

.section--green .eyebrow { color: var(--gold-light); }
.section--green .section-title { color: var(--cream); }
.section--green .lede { color: rgba(247, 241, 231, 0.82); }

.rule {
  height: 0;
  margin: clamp(24px, 4vw, 46px) 0;
  border: 0;
  border-top: 2px solid var(--stone);
}
.rule--gold { border-top-color: var(--gold); }

/* ============ 8. Buttons & marks ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  color: var(--stone);
  background: var(--paper);
  border: 2px solid var(--stone);
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(43, 43, 43, 0.2);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(43, 43, 43, 0.24);
}
.btn--primary {
  color: var(--cream);
  background: var(--crimson);
  border-color: var(--crimson-deep);
}
.btn--primary:hover { background: #8C1224; }
.btn--gold {
  color: var(--stone);
  background: var(--gold);
  border-color: var(--stone);
}
.btn--gold:hover { background: var(--gold-light); }
.btn--ghost {
  background: transparent;
  box-shadow: none;
}
.btn--ghost:hover {
  background: rgba(201, 162, 39, 0.16);
  box-shadow: none;
  transform: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--crimson);
  border: 2px solid currentColor;
}
.badge--gold { color: var(--gold-light); }

.index-chip {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 34px;
  padding: 0 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  background: var(--stone);
  border: 2px solid var(--stone);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
}
.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px rgba(62, 92, 75, 0.2);
  animation: status-pulse 3.4s ease-in-out infinite;
}
.status-dot--gold {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.24);
}
.section--green .status { color: var(--gold-light); }

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ============ 9. Cards & image frames ============ */
.card {
  padding: clamp(20px, 3vw, 34px);
  background: var(--paper);
  border: var(--line);
  box-shadow: var(--shadow-hard);
}
.card--wide { grid-column: 1 / -1; }
.card--green {
  color: var(--cream);
  background: var(--green);
  border-color: var(--stone);
  box-shadow: 9px 9px 0 rgba(22, 58, 47, 0.26);
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: var(--line);
  background: linear-gradient(152deg, #1F4D3E 0%, #7A0F1E 118%);
  box-shadow: var(--shadow-hard);
}
.media-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(230, 199, 102, 0.5);
  pointer-events: none;
}
.media-frame::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 122px;
  height: 122px;
  border: 2px solid rgba(230, 199, 102, 0.55);
  transform: rotate(45deg);
  pointer-events: none;
}
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

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

.media-frame__label {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: var(--stone);
}

/* ============ 10. Index list / breadcrumb / toc ============ */
.index-list {
  list-style: none;
  display: grid;
  border-top: var(--line);
}
.index-list__item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 6px 18px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(43, 43, 43, 0.22);
}
.index-list__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--crimson);
}
.section--green .index-list { border-top-color: rgba(230, 199, 102, 0.45); }
.section--green .index-list__item { border-bottom-color: rgba(230, 199, 102, 0.22); }
.section--green .index-list__num { color: var(--gold-light); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.breadcrumb a {
  color: var(--crimson);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--crimson-deep);
  text-decoration: underline;
}
.breadcrumb__sep { color: var(--gold); }

.toc {
  display: grid;
  gap: 2px;
  border-left: 2px solid var(--sand);
}
.toc__link {
  display: block;
  margin-left: -2px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.toc__link:hover {
  color: var(--crimson);
  background: rgba(201, 162, 39, 0.08);
}
.toc__link.is-active {
  color: var(--crimson-deep);
  font-weight: 600;
  background: rgba(201, 162, 39, 0.14);
  border-left-color: var(--gold);
}

/* ============ 11. Tabs ============ */
.tabs { border-top: var(--line); }
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  border-bottom: var(--line);
}
.tabs__tab {
  appearance: none;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(43, 43, 43, 0.2);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.tabs__tab:hover { background: rgba(201, 162, 39, 0.14); color: var(--stone); }
.tabs__tab[aria-selected="true"] {
  color: var(--cream);
  background: var(--crimson);
}
.tabs__panel { padding: 22px 0; }
.tabs__panel[hidden] { display: none; }

/* ============ 12. Responsive ============ */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand__name { font-size: 16px; }
}

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}

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

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    border-bottom: 0;
    border-right: 2px solid rgba(201, 162, 39, 0.42);
    background: linear-gradient(180deg, #7A0F1E 0%, #4E0A14 58%, #3A0710 100%);
    box-shadow: 12px 0 38px rgba(78, 10, 20, 0.16);
  }

  .site-header__brandbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 28px 22px 20px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.3);
  }

  .brand__name { font-size: 20px; }
  .brand__meta { font-size: 10px; }

  .site-header__support {
    display: block;
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(234, 220, 198, 0.72);
  }

  .header-cta {
    display: inline-flex;
    align-self: stretch;
    margin-top: 18px;
  }

  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    transform: none;
    width: auto;
    flex: 1;
    padding: 18px 14px 24px;
    overflow-y: auto;
    background: transparent;
    border-left: 0;
    box-shadow: none;
  }

  .site-nav__head {
    padding-bottom: 8px;
    padding-inline: 6px;
    border-bottom: 0;
  }
  .nav-close { display: none; }

  .site-nav__link { padding: 12px; }
  .site-nav__link--feature { padding: 16px 14px; }

  .nav-scrim { display: none; }

  .read-progress {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 3px;
    height: auto;
    background: rgba(201, 162, 39, 0.18);
  }
  .read-progress__bar {
    transform: scaleY(var(--progress, 0));
    transform-origin: top center;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  }

  .site-footer__top { grid-template-columns: 1.5fr 0.8fr 0.8fr 1.1fr; }
  .site-footer__legal-links { margin-left: auto; }
}

/* ============ 13. 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;
  }
  .status-dot { animation: none; }
}
