@import url("../fonts/fonts.css");

/* ==========================================================================
   MARAVI UK FRANCHISOR
   "Instrument and ledger" — paper, ink, hessian, sealing wax.
   A distinct franchise prospectus in the Maravi editorial system.
   ========================================================================== */

:root {
  --ink: #16201b;
  --ink-soft: #44524b;
  --ink-faint: #5a665f;
  --paper: #f4efe4;
  --paper-2: #ece5d6;
  --paper-3: #e3dac7;
  --hessian: #b79a6e;
  --hessian-pale: #d8c6a6;
  --wax: #7a2b25;
  --wax-deep: #5e1f1b;
  --bottle: #1e3a2c;
  --line: rgba(22, 32, 27, 0.18);
  --line-soft: rgba(22, 32, 27, 0.09);
  --line-light: rgba(244, 239, 228, 0.24);
  --font-display: "Spectral", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --measure: 36rem;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.12vw, 1.06rem);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.14'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
  text-decoration-color: var(--hessian);
  text-underline-offset: 0.24em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--wax);
}

p {
  margin: 0 0 1.15em;
}

p:last-child {
  margin-bottom: 0;
}

::selection {
  background: var(--wax);
  color: var(--paper);
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
  color: var(--wax);
}

h1 {
  font-size: clamp(3.1rem, 7vw, 6rem);
  line-height: 0.94;
}

h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}

.wrap--narrow {
  max-width: 900px;
}

.section {
  padding-block: clamp(4rem, 8vw, 7.5rem);
  position: relative;
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.section--rule {
  border-top: 1px solid var(--line-soft);
}

.section--paper2 {
  background: var(--paper-2);
}

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

.section--ink a {
  text-decoration-color: var(--hessian);
}

.section--ink .eyebrow,
.section--ink .ledger__label,
.section--ink .ledger__num {
  color: var(--hessian-pale);
}

.section--ink .lede,
.section--ink .body-copy,
.section--ink p {
  color: rgba(244, 239, 228, 0.82);
}

.double-rule {
  border-top: 3px double var(--line);
}

/* ledger section: hanging numeral rail + content */

.ledger {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10.5rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: start;
}

.ledger__rail {
  position: sticky;
  top: 7rem;
  padding-right: 1.5rem;
  border-right: 1px solid var(--line-soft);
  min-height: 3rem;
}

.ledger__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--wax);
  margin-bottom: 0.55rem;
}

.ledger__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.6;
}

.ledger__body {
  max-width: 54rem;
}

.ledger__body--wide {
  max-width: none;
}

/* ---------- type utilities ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wax);
  margin: 0 0 1.4rem;
}

.eyebrow--faint {
  color: var(--ink-faint);
}

.lede {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.22rem, 1.7vw, 1.55rem);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  max-width: 42rem;
}

.body-copy {
  max-width: var(--measure);
}

.body-copy--wide {
  max-width: 46rem;
}

.body-copy p + p {
  margin-top: 1.15em;
}

.dropcap::first-letter {
  font-family: var(--font-display);
  font-size: 3.4em;
  line-height: 0.8;
  float: left;
  padding: 0.08em 0.12em 0 0;
  color: var(--wax);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.small {
  font-size: 0.86rem;
  line-height: 1.6;
}

.muted {
  color: var(--ink-faint);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; }
.mt-4 { margin-top: 2.5rem; }
.mt-5 { margin-top: 3.5rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

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

.stack > * + * {
  margin-top: 1.25rem;
}

/* ---------- top bar ---------- */

.topbar {
  background: var(--wax);
  color: var(--paper);
  position: relative;
  z-index: 60;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 0.42rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.topbar__right {
  opacity: 0.8;
  white-space: nowrap;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line), 0 14px 30px -24px rgba(22, 32, 27, 0.5);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand__mark {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
  position: relative;
  background: var(--paper);
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--line);
}

.brand__mark span {
  position: relative;
  z-index: 1;
  transform: translateY(-1px);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.nav__link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--wax);
}

.nav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--wax);
}

.nav__cta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 0.55rem 0.85rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}

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

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(4px) 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(-4px) rotate(-45deg);
}

/* drawer */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--ink);
  color: var(--paper);
  padding: 2rem var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.45s var(--ease), visibility 0.45s;
  overflow-y: auto;
}

.drawer[data-open="true"] {
  transform: translateY(0);
  visibility: visible;
}

.drawer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.drawer__close {
  background: none;
  border: 1px solid var(--line-light);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.drawer__link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  font-weight: 300;
  line-height: 1.2;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--line-light);
}

.drawer__link span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hessian-pale);
}

.drawer__foot {
  margin-top: auto;
  padding-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, 0.6);
}

body.drawer-open {
  overflow: hidden;
}

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 0.85rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
  cursor: pointer;
}

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

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

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--wax {
  background: var(--wax);
  border-color: var(--wax);
  color: var(--paper);
}

.btn--wax:hover {
  background: transparent;
  color: var(--wax);
}

.btn--light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.btn--light:hover {
  background: transparent;
  color: var(--paper);
}

.btn__arrow {
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: transform 0.22s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--hessian);
  padding-bottom: 0.2rem;
  color: var(--ink);
}

.text-link:hover {
  border-bottom-color: var(--wax);
  color: var(--wax);
}

.text-link--light {
  color: var(--paper);
  border-bottom-color: var(--line-light);
}

/* ---------- hero / frontispiece ---------- */

.hero {
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3.5rem);
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: end;
}

.hero__title {
  margin-top: 0.5rem;
}

.hero__title span {
  display: block;
}

.hero__title em {
  display: block;
}

.hero__aside {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero__lede {
  max-width: 34rem;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  border-top: 3px double var(--line);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1rem;
}

.hero__meta span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.6;
}

.hero__meta strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

/* ---------- stamp ---------- */

.stamp {
  display: block;
  width: clamp(6.5rem, 10vw, 8.5rem);
  height: auto;
  color: var(--wax);
  transform: rotate(-7deg);
  opacity: 0.92;
}

.stamp--light {
  color: var(--hessian-pale);
}

.stamp--large {
  width: clamp(8rem, 14vw, 12rem);
}

/* ---------- plates ---------- */

.plate {
  margin: 0;
  position: relative;
}

.plate__frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  border: 1px solid var(--line-soft);
  aspect-ratio: var(--ratio, 3 / 2);
}

.plate__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.02);
}

.plate__frame--full {
  aspect-ratio: 21 / 9;
}

.plate__frame--wide {
  aspect-ratio: 3 / 2;
}

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

.plate__frame--square {
  aspect-ratio: 1 / 1;
}

.plate__frame--tall {
  aspect-ratio: 2 / 3;
}

/* empty plate: a designed placeholder, not a broken image */

.plate__frame--empty {
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 9px,
      rgba(183, 154, 110, 0.13) 9px,
      rgba(183, 154, 110, 0.13) 10px
    );
}

.plate__frame--empty::before {
  content: "";
  position: absolute;
  inset: 0.6rem;
  border: 1px solid rgba(22, 32, 27, 0.16);
  pointer-events: none;
}

.plate__frame--empty::after {
  content: attr(data-plate);
  position: absolute;
  right: 1.1rem;
  bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 1;
  color: rgba(22, 32, 27, 0.08);
  letter-spacing: -0.03em;
  pointer-events: none;
}

.plate__slot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  padding: 1.5rem;
}

.plate__slot-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wax);
}

.plate__slot-note {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  max-width: 24ch;
  line-height: 1.6;
}

.plate__slot-icon {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.plate figcaption,
.plate__caption {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 1rem;
  padding-top: 0.7rem;
  margin-top: 0.7rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.plate__no {
  color: var(--wax);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plate__title {
  color: var(--ink);
  font-weight: 500;
}

.plate__meta {
  display: block;
  color: var(--ink-faint);
}

.plate--full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.plate--full .plate__caption {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.plate--flush .plate__frame {
  border: 0;
}

.plate--inset {
  max-width: 22rem;
  float: right;
  margin: 0.4rem 0 1.5rem 2.5rem;
}

.plate--inset .plate__frame {
  aspect-ratio: 4 / 5;
}

.plate--inset figcaption {
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.plate--aside {
  max-width: 22rem;
  justify-self: end;
  width: 100%;
}

/* pair + comparison */

.plate-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.compare {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  aspect-ratio: 3 / 2;
  background: var(--paper-2);
  --pos: 50%;
}

.compare__layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 9px,
      rgba(183, 154, 110, 0.13) 9px,
      rgba(183, 154, 110, 0.13) 10px
    );
}

.compare__layer--after {
  clip-path: inset(0 0 0 var(--pos));
  background-color: var(--paper-3);
}

.compare__layer span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  padding: 1rem;
}

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 1px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(22, 32, 27, 0.25);
  pointer-events: none;
}

.compare__handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  transform: translate(-50%, -50%);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

.compare__labels {
  position: absolute;
  inset: auto 0.8rem 0.8rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: none;
}

/* plate grids */

.plates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
}

.plates-grid--offset > :nth-child(2) {
  margin-top: 3rem;
}

.plates-grid--offset > :nth-child(3) {
  margin-top: 1.2rem;
}

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

/* ---------- structure diagram ---------- */

.structure {
  margin-top: 2.5rem;
}

.structure__tier {
  display: flex;
  justify-content: center;
  position: relative;
  padding-block: 0.2rem;
}

.structure__tier > .entity {
  width: min(100%, 40rem);
}

.structure__tier--split {
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: stretch;
}

.structure__tier--split > * {
  flex: 1 1 0;
}

.entity {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--wax);
  padding: 1.3rem 1.4rem 1.35rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

a.entity:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -26px rgba(22, 32, 27, 0.7);
}

.entity--muted {
  border-left-color: var(--hessian);
  border-style: dashed;
  background: transparent;
}

.entity__role {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wax);
}

.entity--muted .entity__role {
  color: var(--ink-faint);
}

.entity__name {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

.entity__meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  line-height: 1.7;
}

.entity__note {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.connector {
  width: 1px;
  height: 1.6rem;
  background: var(--line);
  margin-inline: auto;
  position: relative;
}

.connector::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: var(--wax);
  border-radius: 50%;
}

.structure__branch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  position: relative;
  padding-top: 1.6rem;
}

.structure__branch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1.6rem;
  border: 1px solid var(--line);
  border-bottom: 0;
}

.structure__branch::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 1.6rem;
  background: var(--line);
}

.structure__tier--single {
  display: flex;
  justify-content: center;
}

.structure__tier--single .entity {
  max-width: 34rem;
  width: 100%;
}

.structure__under {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}

.structure__drop {
  width: 1px;
  height: 1.6rem;
  background: var(--line);
  margin-left: 50%;
  position: relative;
}

.structure__drop--offset {
  margin-left: 75%;
}

.structure__drop::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: var(--wax);
  border-radius: 50%;
}

.structure__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.structure__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-swatch {
  width: 0.8rem;
  height: 0.8rem;
  border: 1px solid var(--line);
  display: inline-block;
}

.legend-swatch--wax {
  border-left: 3px solid var(--wax);
}

.legend-swatch--dashed {
  border: 1px dashed var(--line);
  border-left: 3px dashed var(--hessian);
}

/* ---------- timeline ---------- */

.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-top: 3rem;
  border-top: 1px solid var(--line);
}

.timeline__item {
  position: relative;
  padding: 1.6rem 1.1rem 0 0;
  border-right: 1px solid var(--line-soft);
}

.timeline__item:last-child {
  border-right: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wax);
}

.timeline__item--open::before {
  background: var(--paper);
  border: 1px solid var(--wax);
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--wax);
  display: block;
  margin-bottom: 0.6rem;
}

.timeline__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.2;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline__text {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-faint);
  display: block;
}

.timeline__flag {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px dashed var(--line);
  padding: 0.15rem 0.35rem;
}

/* ---------- tags, notes, callouts ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.22rem 0.42rem;
  color: var(--ink-faint);
  line-height: 1.4;
  white-space: nowrap;
}

.tag--wax {
  color: var(--wax);
  border-color: rgba(122, 43, 37, 0.4);
}

.tag--ok {
  color: var(--bottle);
  border-color: rgba(30, 58, 44, 0.35);
}

.tag--open {
  border-style: dashed;
}

.note {
  border-left: 2px solid var(--wax);
  background: var(--paper-2);
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 40rem;
}

.note__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wax);
  margin-bottom: 0.45rem;
}

.note--light {
  background: rgba(244, 239, 228, 0.06);
  border-left-color: var(--hessian);
  color: rgba(244, 239, 228, 0.78);
}

.note--light .note__label {
  color: var(--hessian-pale);
}

.callout {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 1.6rem;
  margin-block: 2rem;
}

.callout__figure {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 0.9;
  color: var(--wax);
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.callout__text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34rem;
}

.callout__text strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- quote band ---------- */

.quote-band {
  position: relative;
  padding-block: clamp(4rem, 9vw, 8rem);
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.quote-band__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.quote-band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  filter: saturate(0.8);
}

.quote-band__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22, 32, 27, 0.92) 0%, rgba(22, 32, 27, 0.55) 60%, rgba(22, 32, 27, 0.4) 100%);
}

.quote-band .wrap {
  position: relative;
  z-index: 2;
}

.quote-band__quote {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.9rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin: 0;
}

.quote-band__quote em {
  font-style: italic;
  color: var(--hessian-pale);
}

.quote-band__cite {
  display: block;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, 0.65);
  font-style: normal;
}

/* ---------- figures strip ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.figure {
  padding: 1.8rem 1.6rem 1.8rem 0;
  border-right: 1px solid var(--line-soft);
}

.figure:last-child {
  border-right: 0;
}

.figure__value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--wax);
  display: block;
  letter-spacing: -0.03em;
}

.figure__label {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.6;
}

/* ---------- profiles ---------- */

.profiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.5rem);
}

.profile {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.profile__portrait {
  aspect-ratio: 4 / 5;
  margin-bottom: 1rem;
  position: relative;
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 9px,
      rgba(183, 154, 110, 0.13) 9px,
      rgba(183, 154, 110, 0.13) 10px
    );
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.profile__portrait span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.7;
}

.profile__gen {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wax);
}

.profile__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 0.35rem;
}

.profile__role {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 0.2rem;
}

.profile__text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 0.7rem;
}

.profile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

/* ---------- flow (capital) ---------- */

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 2.5rem;
  border: 1px solid var(--line);
}

.flow__step {
  padding: 1.3rem 1.2rem;
  border-right: 1px solid var(--line-soft);
  position: relative;
  background: var(--paper);
}

.flow__step:last-child {
  border-right: 0;
}

.flow__step::after {
  content: "→";
  position: absolute;
  right: -0.55rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 1.1rem;
  height: 1.1rem;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--wax);
  font-size: 0.8rem;
}

.flow__step:last-child::after {
  display: none;
}

.flow__year {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--wax);
}

.flow__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  margin-top: 0.35rem;
}

.flow__note {
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-faint);
  margin-top: 0.35rem;
}

/* ---------- route diagram ---------- */

.route {
  margin-top: 2rem;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(1.2rem, 3vw, 2.2rem);
}

.route svg {
  width: 100%;
  height: auto;
  display: block;
}

.route__caption {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.route__track {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr 1.1fr 1fr 1.1fr 1fr 1.1fr 1fr;
  gap: 0;
}

.route__node,
.route__leg {
  position: relative;
  padding-top: 1.5rem;
}

.route__node {
  text-align: center;
}

.route__node::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--wax);
}

.route__leg::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--hessian);
}

.route__label {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.2;
}

.route__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.35rem;
  line-height: 1.5;
}

.route__leg span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wax);
  text-align: center;
  padding-inline: 0.3rem;
  line-height: 1.5;
}

/* production bars */

.bars {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.bar {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr) 4rem;
  gap: 1rem;
  align-items: center;
}

.bar__label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.5;
}

.bar__track {
  height: 1.05rem;
  background: var(--paper-3);
  position: relative;
}

.bar__fill {
  height: 100%;
  background: var(--hessian);
}

.bar__fill--wax {
  background: var(--wax);
}

.bar__value {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink);
  text-align: right;
}

/* ---------- tables ---------- */

.anatomy {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  counter-reset: anatomy;
}

.anatomy li {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.anatomy li strong {
  color: var(--ink);
  font-weight: 600;
}

.anatomy__num {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--wax);
  padding-top: 0.15rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 44rem;
  text-align: left;
}

.ledger-table th {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.8rem 1rem 0.8rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}

.ledger-table td {
  padding: 1rem 1rem 1rem 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.ledger-table td:first-child {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.3;
}

.ledger-table .mono {
  font-size: 0.72rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.ledger-table tr:hover td {
  background: rgba(236, 229, 214, 0.5);
}

/* ---------- cluster ---------- */

.cluster {
  border-top: 1px solid var(--line);
}

.cluster__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) auto;
  gap: 2rem;
  align-items: baseline;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  transition: background 0.2s var(--ease), padding 0.2s var(--ease);
}

.cluster__row:hover {
  background: rgba(236, 229, 214, 0.6);
  padding-left: 0.6rem;
}

.cluster__name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.2;
}

.cluster__role {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wax);
  display: block;
  margin-bottom: 0.35rem;
}

.cluster__desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.cluster__go {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- chapter index ---------- */

.chapters {
  border-top: 1px solid var(--line);
}

.chapter-link {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.3rem;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  transition: background 0.2s var(--ease), padding 0.2s var(--ease);
}

.chapter-link:hover {
  background: rgba(236, 229, 214, 0.55);
  padding-left: 0.6rem;
}

.chapter-link__num {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--wax);
}

.chapter-link__title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.2;
}

.chapter-link__note {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.chapter-link__arrow {
  font-size: 1rem;
  color: var(--ink-faint);
}

/* ---------- page head ---------- */

.page-head {
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-soft);
}

.page-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.page-head h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

.page-head__aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 0.4rem;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb span {
  color: var(--hessian);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem;
  position: relative;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.7fr)) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-light);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}

.footer__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  font-weight: 400;
  line-height: 1.3;
}

.footer__tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--hessian-pale);
  max-width: 20rem;
  line-height: 1.4;
}

.footer h4 {
  color: var(--hessian-pale);
  margin-bottom: 1rem;
}

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer__list a {
  text-decoration: none;
  font-size: 0.88rem;
  color: rgba(244, 239, 228, 0.78);
}

.footer__list a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--hessian);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.link-list a {
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration-color: var(--hessian);
}

.link-list a:hover {
  color: var(--wax);
}

.footer__statutory {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: rgba(244, 239, 228, 0.62);
  max-width: 52rem;
}

.footer__statutory strong {
  color: rgba(244, 239, 228, 0.9);
  font-weight: 500;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, 0.45);
}

/* ---------- review page ---------- */

.review-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 2px solid var(--wax);
  color: var(--wax);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  transform: rotate(-2deg);
  margin-bottom: 1.5rem;
}

.review-block {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-top: 3.5rem;
}

.review-block h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.review-block__intro {
  max-width: 44rem;
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.change-table td:nth-child(1),
.change-table td:nth-child(2) {
  font-size: 0.84rem;
}

.change-table td:nth-child(1) {
  font-family: var(--font-body);
  color: var(--ink-faint);
  font-style: italic;
}

.change-table td:nth-child(2) {
  font-family: var(--font-body);
  color: var(--ink);
}

.review-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-toc a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.hero .reveal {
  animation: rise 0.9s var(--ease) both;
}

.hero .reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.hero .reveal:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .site-nav {
    gap: 1rem;
  }

  .nav__link {
    font-size: 0.74rem;
  }

  .nav__cta {
    display: none;
  }
}

@media (max-width: 920px) {
  .site-nav {
    display: none;
  }

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

  .hero__grid,
  .page-head__grid,
  .split,
  .split--even {
    grid-template-columns: 1fr;
  }

  .hero__aside {
    gap: 1.5rem;
  }

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

  .ledger {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .ledger__rail {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 0 0 0.8rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    min-height: 0;
  }

  .ledger__num {
    margin-bottom: 0;
  }

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

  .timeline__item:nth-child(3) {
    border-right: 0;
  }

  .timeline__item:nth-child(-n + 3) {
    padding-bottom: 1.6rem;
    border-bottom: 1px solid var(--line-soft);
  }

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

  .plates-grid--offset > :nth-child(3) {
    margin-top: 0;
  }

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

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

  .flow__step:nth-child(2) {
    border-right: 0;
  }

  .flow__step:nth-child(2)::after {
    display: none;
  }

  .flow__step:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

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

  .footer__brand {
    grid-column: 1 / -1;
  }

  .structure__branch {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .structure__branch::before,
  .structure__branch::after {
    display: none;
  }

  .structure__branch > * + * {
    margin-top: 1rem;
  }

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

  .structure__under > [aria-hidden="true"] {
    display: none;
  }

  .structure__drop--offset {
    margin-left: 50%;
  }
}

@media (max-width: 620px) {
  .route__track {
    grid-template-columns: 1fr;
  }

  .route__node {
    text-align: left;
    padding: 0.85rem 0 0.85rem 1.7rem;
  }

  .route__node::before {
    left: 4px;
    top: 1.3rem;
    transform: none;
  }

  .route__leg {
    padding: 0 0 0 1.7rem;
  }

  .route__leg::before {
    left: 8px;
    top: 0;
    bottom: 0;
    right: auto;
    border-top: 0;
    border-left: 1px dashed var(--hessian);
  }

  .route__leg span {
    text-align: left;
    padding: 0.35rem 0;
  }

  .bar {
    grid-template-columns: 1fr 3.5rem;
    gap: 0.5rem 0.8rem;
  }

  .bar__label {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
  }

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

  .timeline {
    grid-template-columns: 1fr;
    border-top: 0;
  }

  .timeline__item {
    border-right: 0;
    border-top: 1px solid var(--line-soft);
    padding: 1.2rem 0 1.2rem 1.2rem;
  }

  .timeline__item::before {
    top: 1.6rem;
    left: 0;
  }

  .timeline__item:nth-child(3) {
    border-right: 0;
  }

  .timeline__item:nth-child(-n + 3) {
    padding-bottom: 1.2rem;
    border-bottom: 0;
  }

  .plates-grid,
  .plates-grid--two,
  .profiles,
  .plate-pair,
  .figures {
    grid-template-columns: 1fr;
  }

  .plates-grid--offset > :nth-child(2) {
    margin-top: 0;
  }

  .figure {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 1.4rem 0;
  }

  .figure:last-child {
    border-bottom: 0;
  }

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

  .flow__step {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .flow__step::after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -0.6rem;
    transform: translateX(-50%);
  }

  .flow__step:nth-child(2)::after {
    display: grid;
  }

  .flow__step:last-child {
    border-bottom: 0;
  }

  .cluster__row {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .cluster__go {
    margin-top: 0.3rem;
  }

  .chapter-link {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .chapter-link__arrow {
    display: none;
  }

  .plate--inset {
    float: none;
    max-width: none;
    margin: 0 0 1.5rem;
  }

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

  .callout {
    flex-direction: column;
    gap: 0.8rem;
  }

  .topbar__right {
    display: none;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
