:root {
  --red: #C8102E;
  --red-deep: #7A0A1C;
  --gold: #D6A53A;
  --gold-bright: #F4C95D;
  --ink: #15100E;
  --paper: #FBF6EC;
  --sand: #F1E3C8;
  --jade: #2C8C7D;
  --muted: #A58A5C;
  --line: #E4D9C8;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "STKaiti", "KaiTi", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-numeric: "DIN Alternate", "Bebas Neue", "Noto Sans SC", "PingFang SC", sans-serif;
  --container: 1280px;
  --gutter: 32px;
  --border: 3px;
  --radius: 10px;
  --shadow-hard: 8px 8px 0 var(--ink);
  --shadow-soft: 4px 4px 0 rgba(21, 16, 14, 0.85);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 84% -12%, rgba(214, 165, 58, 0.15), transparent 34%),
    linear-gradient(90deg, rgba(21, 16, 14, 0.028) 1px, transparent 1px),
    linear-gradient(rgba(21, 16, 14, 0.028) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.45em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.8rem, 7vw, 6rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--red-deep);
}

strong,
b {
  font-weight: 800;
  color: var(--ink);
}

small {
  font-size: 13px;
}

ul,
ol {
  padding-left: 1.2em;
}

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

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

button {
  cursor: pointer;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(36px, 6vw, 80px);
}

/* ---------- header command bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(214, 165, 58, 0.065) 1px, transparent 1px),
    linear-gradient(rgba(214, 165, 58, 0.065) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 0 rgba(21, 16, 14, 0.22);
}

.command-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 10px var(--gutter);
}

.brand-seal {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  color: var(--paper);
  text-decoration: none;
}

.brand-seal:hover {
  color: var(--gold-bright);
}

.brand-seal:hover .brand-name {
  color: var(--gold-bright);
}

.brand-seal:hover .seal-mark {
  transform: rotate(0deg);
}

.seal-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--gold);
  border-radius: 6px;
  background: var(--red);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--gold);
  transform: rotate(-3deg);
  transition: transform 0.18s var(--ease);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand-name {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-tag {
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

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

.nav-index {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.nav-index li {
  flex: 0 0 auto;
}

.nav-index a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.nav-index a::before {
  content: attr(data-index);
  color: var(--gold);
  font-family: var(--font-numeric);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-index a:hover {
  border-color: rgba(214, 165, 58, 0.4);
  background: rgba(214, 165, 58, 0.14);
  color: var(--gold-bright);
}

.nav-index a[aria-current="page"] {
  border-color: var(--gold);
  background: var(--red);
  color: #fff;
  box-shadow: 3px 3px 0 rgba(214, 165, 58, 0.45);
}

.nav-index a[aria-current="page"]::before {
  color: var(--gold-bright);
}

.command-side {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(214, 165, 58, 0.55);
  border-radius: 999px;
  background: rgba(214, 165, 58, 0.06);
  color: var(--sand);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 3px rgba(44, 140, 125, 0.22);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s, color 0.16s, border-color 0.16s;
}

.btn:hover {
  color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-primary {
  border-color: var(--gold);
  background: var(--red);
  color: #fff;
  box-shadow: 4px 4px 0 var(--gold);
}

.btn-primary:hover {
  background: var(--red-deep);
  color: #fff;
  box-shadow: 6px 6px 0 var(--gold);
}

.btn-primary:active {
  box-shadow: 2px 2px 0 var(--gold);
}

.btn-ghost {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.btn-gold {
  border-color: var(--ink);
  background: var(--gold);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-cta {
  padding: 9px 14px;
  font-size: 13.5px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: transparent;
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 3px 3px 0 rgba(214, 165, 58, 0.3);
}

.nav-toggle:hover {
  background: rgba(214, 165, 58, 0.14);
  color: var(--gold-bright);
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 13px;
}

.nav-toggle-bars span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}

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

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

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

.command-rail {
  padding: 5px 0;
  border-top: 1px solid rgba(214, 165, 58, 0.22);
  background: rgba(0, 0, 0, 0.16);
}

.rail-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  color: var(--sand);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.rail-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
}

.rail-kicker {
  color: var(--gold);
  font-weight: 700;
}

.rail-label [data-chapter-label] {
  color: var(--paper);
  font-weight: 800;
}

.rail-meter {
  flex: 1;
  min-width: 60px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(251, 246, 236, 0.14);
}

.rail-meter > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.1s linear;
}

.rail-index {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-numeric);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 80px;
  border-top: 6px solid var(--gold);
  background-color: var(--red-deep);
  background-image:
    linear-gradient(90deg, rgba(244, 201, 93, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(244, 201, 93, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--paper);
}

.site-footer::before,
.site-footer::after {
  position: absolute;
  z-index: 0;
  border: 3px solid rgba(244, 201, 93, 0.18);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.site-footer::before {
  top: -120px;
  right: -110px;
  width: 320px;
  height: 320px;
}

.site-footer::after {
  bottom: -160px;
  left: -90px;
  width: 280px;
  height: 280px;
}

.footer-top,
.footer-contact,
.footer-bottom {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.05fr 1.95fr;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}

.footer-brand {
  border: 3px solid var(--gold);
  border-radius: 12px;
  background: rgba(21, 16, 14, 0.22);
  padding: 26px;
  box-shadow: 8px 8px 0 var(--ink);
}

.footer-seal {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border: 2px solid var(--paper);
  border-radius: 6px;
  background: var(--gold);
  color: var(--red-deep);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-3deg);
}

.footer-name {
  margin: 0 0 4px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.footer-line {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.footer-copy {
  margin: 0;
  color: rgba(251, 246, 236, 0.82);
  font-size: 14px;
  line-height: 1.7;
}

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

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

.footer-col-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(244, 201, 93, 0.35);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(251, 246, 236, 0.9);
  font-size: 14px;
  text-decoration: none;
}

.footer-links a::before {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: var(--gold);
  content: "";
  transform: rotate(45deg);
}

.footer-links a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 20px 32px;
  align-items: start;
  padding-top: 28px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(244, 201, 93, 0.28);
}

.footer-contact-title {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1;
  gap: 10px 26px;
  margin: 0;
}

.contact-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: rgba(251, 246, 236, 0.9);
  font-size: 13px;
}

.contact-item dt {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.contact-item dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.contact-value {
  color: var(--paper);
  font-weight: 700;
}

.copy-chip {
  padding: 2px 8px;
  border: 1px solid rgba(244, 201, 93, 0.6);
  border-radius: 999px;
  background: transparent;
  color: var(--gold-bright);
  font-size: 11px;
  line-height: 1.5;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.copy-chip:hover {
  border-color: var(--paper);
  background: var(--gold);
  color: var(--ink);
}

.copy-chip.is-copied {
  border-color: var(--paper);
  background: var(--jade);
  color: var(--ink);
  font-weight: 800;
}

.footer-note {
  grid-column: 2;
  grid-row: 2 / span 2;
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid rgba(244, 201, 93, 0.4);
  color: rgba(251, 246, 236, 0.68);
  font-size: 12.5px;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 22px;
  border-top: 1px solid rgba(244, 201, 93, 0.28);
  color: rgba(251, 246, 236, 0.62);
  font-size: 12px;
}

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

.footer-icp {
  color: rgba(251, 246, 236, 0.8);
  font-family: var(--font-numeric);
  letter-spacing: 0.04em;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}

.back-to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.back-to-top:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---------- shared page components ---------- */
.page-title {
  margin-bottom: 0.3em;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-family: var(--font-numeric);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  width: 26px;
  height: 3px;
  background: var(--red);
  content: "";
}

.numeric {
  font-family: var(--font-numeric);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.breadcrumb {
  margin: 0 0 18px;
  color: rgba(21, 16, 14, 0.64);
  font-size: 13px;
}

.breadcrumb ol,
.breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.breadcrumb li + li::before {
  color: var(--gold);
  content: "›";
  font-weight: 800;
}

.breadcrumb a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

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

.grid-12 > .span-3 {
  grid-column: span 3;
}

.grid-12 > .span-4 {
  grid-column: span 4;
}

.grid-12 > .span-5 {
  grid-column: span 5;
}

.grid-12 > .span-6 {
  grid-column: span 6;
}

.grid-12 > .span-7 {
  grid-column: span 7;
}

.grid-12 > .span-8 {
  grid-column: span 8;
}

.grid-12 > .span-12 {
  grid-column: span 12;
}

.panel {
  padding: clamp(18px, 3vw, 28px);
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-hard);
}

.panel--sand {
  background: var(--sand);
}

.panel--ink {
  background: var(--ink);
  color: var(--paper);
}

.panel--ink h1,
.panel--ink h2,
.panel--ink h3,
.panel--ink h4,
.panel--ink h5,
.panel--ink h6 {
  color: var(--paper);
}

.panel--ink a {
  color: var(--gold-bright);
}

.card {
  position: relative;
  padding: 20px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s;
}

.card:hover {
  border-color: var(--gold);
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}

.divider {
  position: relative;
  height: 3px;
  margin: 32px 0;
  border: 0;
  background: var(--ink);
}

.divider::after {
  position: absolute;
  top: 6px;
  left: 0;
  width: 96px;
  height: 3px;
  background: var(--gold);
  content: "";
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--sand);
  box-shadow: 6px 6px 0 var(--ink);
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--square {
  aspect-ratio: 1 / 1;
}

.media-frame--portrait {
  aspect-ratio: 4 / 5;
}

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

.media-frame > picture {
  display: block;
}

.media-frame::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42px;
  height: 42px;
  background: var(--gold);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  content: "";
  pointer-events: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.tag--jade {
  border-color: var(--jade);
  background: var(--jade);
  color: var(--ink);
}

.tag--red {
  border-color: var(--ink);
  background: var(--red);
  color: var(--paper);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.chip:hover {
  background: var(--sand);
}

.chip[aria-pressed="true"],
.chip.is-active {
  border-color: var(--ink);
  background: var(--red);
  color: var(--paper);
  box-shadow: 2px 2px 0 var(--gold);
}

.toc {
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--sand);
  box-shadow: 6px 6px 0 var(--ink);
}

.toc-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.toc ol,
.toc ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.toc a {
  display: block;
  padding: 6px 8px;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  border-left-color: var(--gold);
  background: rgba(200, 16, 46, 0.08);
}

.toc a[aria-current="true"] {
  border-left-color: var(--gold);
  background: var(--red);
  color: var(--paper);
}

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

.accordion-item {
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}

.accordion-item > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--sand);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.accordion-item > summary::-webkit-details-marker {
  display: none;
}

.accordion-item[open] > summary {
  border-bottom: 3px solid var(--ink);
  background: var(--gold);
}

.accordion-body {
  padding: 16px 18px;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .status-badge {
    display: none;
  }

  .nav-index a {
    padding: 8px;
    font-size: 13px;
  }
}

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

@media (max-width: 900px) {
  .command-bar {
    flex-wrap: nowrap;
    gap: 10px;
    padding-block: 10px;
  }

  .command-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 10px var(--gutter) 18px;
    border-bottom: 3px solid var(--gold);
    background-color: var(--ink);
    background-image:
      linear-gradient(90deg, rgba(214, 165, 58, 0.065) 1px, transparent 1px),
      linear-gradient(rgba(214, 165, 58, 0.065) 1px, transparent 1px);
    background-size: 24px 24px;
    box-shadow: 0 10px 0 rgba(21, 16, 14, 0.22);
  }

  .command-nav[data-open] {
    display: block;
  }

  .nav-index {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100vh - 160px);
    overflow-x: visible;
    overflow-y: auto;
    padding: 0;
  }

  .nav-index a {
    padding: 12px 14px;
    border: 1px solid rgba(214, 165, 58, 0.2);
    border-radius: 8px;
    font-size: 16px;
  }

  .nav-index a::before {
    font-size: 12px;
  }

  .command-side {
    margin-left: auto;
  }

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

  .rail-index {
    display: none;
  }

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

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

  .grid-12 > .span-7,
  .grid-12 > .span-8,
  .grid-12 > .span-12,
  .grid-12 > .span-5,
  .grid-12 > .span-6 {
    grid-column: span 6;
  }

  .grid-12 > .span-3,
  .grid-12 > .span-4 {
    grid-column: span 3;
  }
}

@media (max-width: 760px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 42px;
  }

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

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

  .footer-note {
    grid-column: 1;
    grid-row: auto;
    padding-top: 12px;
    padding-left: 0;
    border-top: 3px solid rgba(244, 201, 93, 0.4);
    border-left: 0;
  }

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

@media (max-width: 620px) {
  :root {
    --gutter: 20px;
  }

  .command-bar {
    padding-inline: 16px;
    gap: 8px;
  }

  .seal-mark {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

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

  .brand-tag {
    display: none;
  }

  .btn-cta {
    padding: 8px 10px;
    font-size: 12px;
    box-shadow: 3px 3px 0 var(--gold);
  }

  .nav-toggle {
    padding: 8px 9px;
  }

  .nav-toggle-label {
    display: none;
  }

  .rail-inner {
    gap: 10px;
    font-size: 10px;
  }

  .rail-kicker {
    display: none;
  }

  .grid-12 {
    grid-template-columns: 1fr;
  }

  .grid-12 > [class*="span-"] {
    grid-column: 1 / -1;
  }

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

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

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

@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;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .card:hover,
  .back-to-top:hover,
  .brand-seal:hover .seal-mark {
    transform: none;
  }
}
