:root {
  --ink-deep: #0B2F2A;
  --indigo: #211B33;
  --wine: #641E26;
  --cinnabar: #C7352B;
  --gold: #E7B23B;
  --gold-deep: #A86F16;
  --celadon: #4F8C92;
  --rice: #F6E7C1;
  --paper: #FFF9EC;
  --charcoal: #15110F;
  --rail: 88px;
  --rail-gap: 16px;
  --content: 1440px;
  --gutter: clamp(16px, 3vw, 40px);
  --font-display: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --shadow-hard: 8px 8px 0 var(--charcoal);
  --ease: 160ms ease-out;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding-left: calc(var(--rail) + var(--rail-gap));
  background:
    radial-gradient(circle at 88% 6%, rgba(231, 178, 59, 0.15), transparent 28rem),
    linear-gradient(90deg, rgba(231, 178, 59, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(231, 178, 59, 0.035) 1px, transparent 1px),
    var(--ink-deep);
  background-size: auto, 64px 64px, 64px 64px, auto;
  color: var(--rice);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-synthesis: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

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

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--charcoal);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 9px 14px;
  border: 3px solid var(--charcoal);
  background: var(--gold);
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  transform: translateY(-180%);
  transition: transform var(--ease);
}

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

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: var(--rail);
  background:
    linear-gradient(180deg, rgba(231, 178, 59, 0.09), transparent 32%),
    linear-gradient(180deg, var(--indigo), var(--ink-deep) 62%);
  color: var(--rice);
  border-right: 3px solid var(--gold-deep);
  box-shadow: 6px 0 0 rgba(21, 17, 15, 0.72);
}

.header-spine {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-height: 100dvh;
  padding: 14px 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--rice);
}

.brand__seal {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid var(--gold);
  background: var(--cinnabar);
  color: var(--gold);
  box-shadow: 3px 3px 0 var(--charcoal);
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-3deg);
}

.brand__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.15;
}

.brand__number {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand__name {
  color: var(--rice);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.brand-tagline {
  display: none;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  min-height: 42px;
  padding: 4px 6px;
  border: 2px solid var(--gold-deep);
  background: rgba(21, 17, 15, 0.3);
  color: var(--rice);
  cursor: pointer;
  transition:
    background-color var(--ease),
    border-color var(--ease),
    color var(--ease);
}

.nav-toggle__box {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition:
    opacity var(--ease),
    transform var(--ease);
}

.nav-toggle__text {
  color: currentColor;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
}

.site-nav {
  display: block;
  min-width: 0;
}

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

.site-nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 4px;
  border: 2px solid transparent;
  color: var(--rice);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-align: center;
  transition:
    background-color var(--ease),
    border-color var(--ease),
    color var(--ease),
    transform var(--ease);
}

.site-nav__link:hover {
  border-color: var(--gold-deep);
  background: rgba(231, 178, 59, 0.08);
}

.site-nav__link[aria-current="page"],
.site-nav__link[aria-current="page"]:hover {
  border-color: var(--gold);
  background: var(--cinnabar);
  color: var(--paper);
  font-weight: 700;
  box-shadow: inset 4px 0 0 var(--gold);
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(231, 178, 59, 0.34);
}

.header-cta {
  width: 100%;
  padding: 8px 4px;
  font-size: 11px;
  line-height: 1.3;
}

.header-stamp {
  align-self: center;
  padding: 2px 5px;
  border: 2px solid var(--celadon);
  color: var(--celadon);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  transform: rotate(2deg);
}

.scroll-rail {
  position: absolute;
  z-index: 3;
  background: rgba(246, 231, 193, 0.14);
  pointer-events: none;
}

.scroll-rail__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--gold), var(--celadon));
  transform: scaleY(var(--scroll-progress, 0));
  transform-origin: top;
  transition: transform 80ms linear;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition:
    background-color var(--ease),
    border-color var(--ease),
    color var(--ease),
    box-shadow var(--ease),
    transform var(--ease);
}

.button--gold {
  border-color: var(--charcoal);
  background: var(--gold);
  color: var(--charcoal);
  box-shadow: 4px 4px 0 var(--wine);
}

.button--gold:hover {
  background: #f2c25e;
  box-shadow: 6px 6px 0 var(--wine);
  transform: translate(-2px, -2px);
}

.button--ghost {
  border-color: var(--gold-deep);
  background: transparent;
  color: var(--rice);
  box-shadow: 4px 4px 0 rgba(21, 17, 15, 0.78);
}

.button--ghost:hover {
  border-color: var(--gold);
  background: rgba(231, 178, 59, 0.08);
  color: var(--paper);
  transform: translate(-2px, -2px);
}

.page-main {
  position: relative;
  min-height: 60vh;
}

.content-wrap,
.section__inner {
  width: min(calc(100% - (var(--gutter) * 2)), var(--content));
  margin-inline: auto;
}

.content-wrap {
  padding-block: clamp(28px, 5vw, 64px);
}

.section {
  position: relative;
  padding-block: clamp(44px, 7vw, 96px);
  background: var(--ink-deep);
  color: var(--rice);
}

.section--wine {
  background:
    linear-gradient(135deg, rgba(231, 178, 59, 0.08), transparent 32%),
    var(--wine);
  color: var(--paper);
}

.section--indigo {
  background:
    radial-gradient(circle at 88% 12%, rgba(79, 140, 146, 0.2), transparent 26rem),
    var(--indigo);
  color: var(--rice);
}

.section--paper {
  background:
    linear-gradient(90deg, rgba(168, 111, 22, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px, auto;
  color: var(--charcoal);
}

.section--paper .chapter-head__no {
  color: var(--wine);
}

.section--paper .chapter-head__desc {
  color: #4f4539;
}

.chapter-head {
  display: grid;
  grid-template-columns: minmax(86px, 0.32fr) minmax(0, 1.68fr);
  gap: clamp(16px, 3vw, 36px);
  align-items: start;
  padding-bottom: clamp(20px, 3vw, 34px);
  border-bottom: 3px solid var(--gold-deep);
}

.chapter-head__no {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.08em;
  font-variant-numeric: tabular-nums;
}

.chapter-head__eyebrow {
  margin-bottom: 8px;
  color: var(--celadon);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chapter-head__title {
  color: inherit;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.chapter-head__desc {
  max-width: 64ch;
  margin-top: 14px;
  color: rgba(246, 231, 193, 0.8);
  font-size: 16px;
  line-height: 1.75;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
  margin-top: 30px;
}

.data-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  padding: 22px 20px 18px;
  border: 3px solid var(--gold-deep);
  background:
    linear-gradient(135deg, rgba(231, 178, 59, 0.07), transparent 44%),
    rgba(21, 17, 15, 0.36);
  box-shadow: 6px 6px 0 var(--charcoal);
}

.data-card__value {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.data-card__label {
  color: rgba(246, 231, 193, 0.84);
  font-size: 14px;
  line-height: 1.55;
}

.data-card__stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 5px;
  border: 1px solid currentColor;
  color: var(--celadon);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  transform: rotate(2deg);
}

.ledger-list {
  list-style: none;
  margin-top: 24px;
  border-top: 2px solid var(--gold-deep);
}

.ledger-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 2px solid rgba(231, 178, 59, 0.22);
}

.ledger-row__index {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.ledger-row__body {
  min-width: 0;
  font-size: 15px;
  line-height: 1.65;
}

.ledger-row__value {
  color: var(--celadon);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.tag--gold {
  background: rgba(231, 178, 59, 0.08);
  color: var(--gold);
}

.tag--red {
  background: rgba(199, 53, 43, 0.12);
  color: #ef8d7e;
}

.tag--celadon {
  background: rgba(79, 140, 146, 0.12);
  color: var(--celadon);
}

.timestamp {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.breadcrumbs {
  padding-top: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  list-style: none;
  color: rgba(246, 231, 193, 0.72);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "›";
  color: var(--gold-deep);
}

.breadcrumbs__link {
  border-bottom: 1px solid transparent;
  color: var(--rice);
  transition:
    color var(--ease),
    border-color var(--ease);
}

.breadcrumbs__link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.breadcrumbs__current {
  color: var(--gold);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.media-frame {
  overflow: hidden;
  border: 3px solid var(--gold-deep);
  background: var(--indigo);
  box-shadow: var(--shadow-hard);
}

.media-frame__inner {
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(231, 178, 59, 0.18), transparent 46%),
    repeating-linear-gradient(45deg, rgba(231, 178, 59, 0.08) 0 2px, transparent 2px 14px),
    var(--ink-deep);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.media-frame__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__caption {
  padding: 12px 14px;
  border-top: 2px solid rgba(231, 178, 59, 0.3);
  color: rgba(246, 231, 193, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--gold-deep);
  background:
    radial-gradient(circle at 8% 4%, rgba(231, 178, 59, 0.1), transparent 22rem),
    var(--indigo);
  color: var(--rice);
  box-shadow: 0 -8px 0 rgba(21, 17, 15, 0.72);
}

.site-footer::before {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(231, 178, 59, 0.055) 31px 32px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(231, 178, 59, 0.035) 31px 32px);
  content: "";
  pointer-events: none;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.45fr 0.8fr 0.8fr 1.2fr;
  gap: clamp(24px, 4vw, 64px);
  width: min(calc(100% - (var(--gutter) * 2)), var(--content));
  margin-inline: auto;
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
}

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

.footer-brand__mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--rice);
}

.footer-brand__seal {
  display: grid;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 2px solid var(--gold);
  background: var(--cinnabar);
  color: var(--gold);
  box-shadow: 4px 4px 0 var(--charcoal);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-3deg);
}

.footer-brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.footer-brand__name {
  color: var(--rice);
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.footer-brand__tagline {
  color: var(--gold);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.footer-brand__note {
  max-width: 32ch;
  margin-top: 18px;
  color: rgba(246, 231, 193, 0.72);
  font-size: 14px;
  line-height: 1.7;
}

.footer-coins {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.footer-coin {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--gold-deep);
  border-radius: 50%;
  background: rgba(231, 178, 59, 0.08);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

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

.footer-column__title {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px dashed rgba(231, 178, 59, 0.3);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.1em;
}

.footer-column__list {
  display: grid;
  gap: 9px;
  list-style: none;
}

.footer-link {
  display: inline-block;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
  color: rgba(246, 231, 193, 0.86);
  font-size: 14px;
  line-height: 1.6;
  transition:
    color var(--ease),
    border-color var(--ease),
    background-color var(--ease);
}

.footer-link:hover {
  border-color: var(--gold);
  color: var(--paper);
  background: rgba(231, 178, 59, 0.08);
}

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

.footer-contact__list {
  display: grid;
  gap: 12px;
}

.footer-contact__row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 13px;
  line-height: 1.65;
}

.footer-contact__row dt {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: 0.06em;
}

.footer-contact__row dd {
  min-width: 0;
  color: rgba(246, 231, 193, 0.82);
  overflow-wrap: anywhere;
}

.footer-contact__note {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--celadon);
  background: rgba(79, 140, 146, 0.1);
  color: rgba(246, 231, 193, 0.72);
  font-size: 12px;
  line-height: 1.7;
}

.footer-ledger {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  width: min(calc(100% - (var(--gutter) * 2)), var(--content));
  margin-inline: auto;
  padding: 18px 0 24px;
  border-top: 2px solid rgba(231, 178, 59, 0.28);
  background: linear-gradient(90deg, rgba(231, 178, 59, 0.06), transparent 58%);
}

.footer-ledger__legal {
  color: rgba(246, 231, 193, 0.68);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

.footer-ledger__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-left: auto;
}

.footer-legal-link {
  border-bottom: 1px solid transparent;
  color: rgba(246, 231, 193, 0.84);
  font-size: 12px;
  line-height: 1.6;
  transition:
    color var(--ease),
    border-color var(--ease);
}

.footer-legal-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.to-top {
  appearance: none;
  padding: 8px 12px;
  border: 2px solid var(--gold-deep);
  background: var(--charcoal);
  color: var(--gold);
  box-shadow: 3px 3px 0 rgba(231, 178, 59, 0.3);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition:
    background-color var(--ease),
    border-color var(--ease),
    color var(--ease),
    box-shadow var(--ease),
    transform var(--ease);
}

.to-top:hover {
  border-color: var(--gold);
  background: var(--cinnabar);
  color: var(--paper);
  box-shadow: 5px 5px 0 rgba(21, 17, 15, 0.7);
  transform: translate(-2px, -2px);
}

@media (min-width: 901px) {
  .scroll-rail {
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
  }
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1.35fr 0.8fr 0.8fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  body {
    padding-left: 0;
  }

  .site-header {
    position: sticky;
    top: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    border-right: 0;
    border-bottom: 3px solid var(--gold-deep);
    box-shadow: 0 6px 0 rgba(21, 17, 15, 0.66);
  }

  .header-spine {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 10px 14px;
    overflow: visible;
  }

  .brand {
    flex: 1 1 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 9px;
  }

  .brand__seal {
    width: 38px;
    height: 38px;
    font-size: 23px;
  }

  .brand__stack {
    align-items: flex-start;
  }

  .brand__number {
    font-size: 13px;
  }

  .brand__name {
    font-size: 12px;
  }

  .brand-tagline {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    order: 2;
    margin-left: 0;
  }

  .site-header[data-open] .nav-toggle {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--charcoal);
  }

  .site-header[data-open] .nav-toggle__bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .site-header[data-open] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .site-header[data-open] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 12px;
    left: 12px;
    display: none;
    max-height: calc(100dvh - 110px);
    padding: 12px;
    overflow-y: auto;
    border: 3px solid var(--gold-deep);
    background:
      linear-gradient(135deg, rgba(231, 178, 59, 0.08), transparent 34%),
      var(--indigo);
    box-shadow: 8px 8px 0 var(--charcoal);
  }

  .site-header[data-open] .site-nav,
  .site-nav[data-open] {
    display: block;
  }

  .site-nav__list {
    gap: 8px;
    margin-top: 0;
  }

  .site-nav__link {
    justify-content: flex-start;
    min-height: 48px;
    padding: 10px 14px;
    border-color: rgba(246, 231, 193, 0.16);
    font-size: 15px;
    text-align: left;
  }

  .header-actions {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    order: 3;
  }

  .header-cta {
    width: auto;
    max-width: 86px;
    min-height: 38px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .header-stamp {
    display: none;
  }

  .scroll-rail {
    top: auto;
    right: 0;
    bottom: -3px;
    left: 0;
    width: auto;
    height: 3px;
  }

  .scroll-rail__bar {
    background: linear-gradient(90deg, var(--gold), var(--celadon));
    transform: scaleX(var(--scroll-progress, 0));
    transform-origin: left;
  }

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

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

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

  .footer-ledger__links {
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .header-spine {
    padding-inline: 10px;
  }

  .brand__name {
    display: none;
  }

  .header-cta {
    max-width: 76px;
    padding-inline: 6px;
    font-size: 9px;
  }

  .chapter-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chapter-head__no {
    font-size: clamp(56px, 16vw, 88px);
  }

  .ledger-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .ledger-row__value {
    grid-column: 2;
    white-space: normal;
  }

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

  .footer-brand,
  .footer-contact {
    grid-column: auto;
  }

  .footer-brand__seal {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }

  .footer-contact__row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

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

  .to-top {
    align-self: flex-start;
  }
}

@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;
  }
}
