:root {
  --bg: #f5f1ea;
  --surface: #fffdfa;
  --surface-alt: #f0e8dc;
  --ink: #1f1d1a;
  --muted: #5f5a52;
  --line: #d7cfc2;
  --line-strong: #bfb3a0;
  --accent: #1f5a4f;
  --accent-strong: #18473e;
  --warn: #8b5d22;
  --container: 860px;
  --header: 1100px;
  --radius: 12px;
  --radius-sm: 8px;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.72 var(--font-body);
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

a,
button {
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
}

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.site-header .container {
  width: min(calc(100% - 32px), var(--header));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 241, 234, 0.96);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 150px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.button--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button--secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.button--secondary:hover {
  background: #f8f4ed;
}

.button:focus-visible,
.menu-toggle:focus-visible,
.site-nav__list a:focus-visible,
.quick-links a:focus-visible,
.footer-links a:focus-visible,
.tabs__button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--warn);
  outline-offset: 2px;
}

.hero {
  padding: 30px 0 10px;
}

.hero__layout {
  display: block;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-copy,
.hero-summary,
.story-card,
.paper-note,
.quote-panel,
.ledger-card__intro,
.ledger-card__body,
.timeline__item,
.site-footer__panel {
  padding: 24px;
}

.hero-copy {
  margin-bottom: 18px;
}

.hero-summary {
  margin-top: 0;
}

.eyebrow,
.card-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf6ef;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  color: var(--ink);
  line-height: 1.12;
  font-family: var(--font-heading);
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  line-height: 1.15;
  text-wrap: balance;
}

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

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
}

p {
  margin: 0 0 16px;
  color: var(--muted);
}

.lead {
  font-size: 1.05rem;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.badge-list,
.plain-list,
.check-list,
.compact-list,
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.badge-list li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf7f1;
  color: var(--ink);
  font-size: 0.94rem;
}

.image-frame {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eae3d8;
}

.image-frame img {
  width: 100%;
  height: auto;
}

.image-caption {
  font-size: 0.95rem;
}

.content-visual {
  margin: 22px 0 4px;
}

.content-visual .image-frame {
  margin-bottom: 8px;
}

.content-visual .image-caption {
  margin-bottom: 0;
}

.fact-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.fact-list div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.fact-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fact-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.small-note {
  color: var(--muted);
  font-size: 0.94rem;
}

.text-link {
  color: var(--accent);
}

.text-link:hover {
  color: var(--accent-strong);
}

.section {
  padding: 10px 0 16px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head p:last-child {
  margin-bottom: 0;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
}

.quick-links a:hover,
.quick-links a.is-active {
  color: var(--ink);
  border-color: var(--line-strong);
}

.review-grid,
.snapshot-grid,
.cards-grid,
.split-grid,
.stacked-list,
.timeline {
  display: block;
}

.review-grid > *,
.snapshot-grid > *,
.cards-grid > *,
.split-grid > *,
.stacked-list > *,
.timeline > * {
  margin-bottom: 14px;
}

.review-grid > *:last-child,
.snapshot-grid > *:last-child,
.cards-grid > *:last-child,
.split-grid > *:last-child,
.stacked-list > *:last-child,
.timeline > *:last-child {
  margin-bottom: 0;
}

.story-card {
  border-left: 4px solid var(--accent);
  background: #fffdf9;
}

.paper-note {
  background: var(--surface-alt);
  border-style: dashed;
}

.quote-panel {
  background: #2d463e;
  border-color: #2d463e;
  color: #f7f1e8;
}

.quote-panel h2,
.quote-panel h3,
.quote-panel strong,
.quote-panel .small-note,
.quote-panel .section-kicker {
  color: inherit;
}

.quote-panel .section-kicker {
  color: #d8d0c4;
  opacity: 1;
}

.quote-panel .check-list li::before {
  border-color: #f4cd8b;
}

.ledger-card {
  overflow: hidden;
}

.ledger-card__intro {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.ledger-card__body {
  padding-top: 18px;
}

.inline-note,
.callout,
.warning-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm);
  background: #faf3e8;
}

.inline-note strong,
.callout strong,
.warning-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.editorial-meta {
  margin-top: 18px;
}

.editorial-meta div:first-child {
  border-top: 1px solid var(--line);
}

.meta-summary,
.source-summary {
  margin-bottom: 14px;
}

.source-links,
.change-log {
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-links li,
.change-log li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.source-links li:first-child,
.change-log li:first-child {
  padding-top: 0;
  border-top: 0;
}

.source-links strong,
.change-log strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.page-links {
  display: grid;
  gap: 10px;
}

.page-links a {
  color: var(--accent);
}

.page-links a:hover {
  color: var(--accent-strong);
}

.visual-card {
  overflow: hidden;
}

.visual-card img {
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
}

.visual-card__caption {
  padding: 18px 20px 20px;
}

.plain-list li,
.check-list li,
.compact-list li {
  position: relative;
  margin-bottom: 10px;
  color: var(--muted);
}

.plain-list li {
  padding-left: 18px;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
}

.check-list li {
  padding-left: 24px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.34em;
  width: 8px;
  height: 13px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(40deg);
}

.compact-list li {
  padding-left: 0;
}

.compact-list li::before {
  display: none;
}

.quote-panel p,
.quote-panel .plain-list li,
.quote-panel .check-list li,
.quote-panel .compact-list li,
.quote-panel .small-note {
  color: #e6ddd1;
}

.quote-panel strong,
.quote-panel h2,
.quote-panel h3 {
  color: #fff8ef;
}

.timeline--rail {
  position: relative;
  padding-left: 24px;
}

.timeline--rail::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-strong);
}

.timeline__item {
  position: relative;
}

.timeline--rail .timeline__item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 26px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #f8f4ed;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e6e0d7;
}

.data-table th {
  background: #f4efe7;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.accordion {
  display: block;
}

.accordion details {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.accordion details:last-child {
  margin-bottom: 0;
}

.accordion summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

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

.accordion details[open] summary {
  border-bottom: 1px solid var(--line);
}

.accordion__body {
  padding: 16px 18px 18px;
}

.tabs {
  display: block;
}

.tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs__button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.tabs__button[aria-selected="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.tabs__panel[hidden] {
  display: none;
}

.redirect-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ddd0;
}

.redirect-meter__value {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7e6a49);
  transform-origin: left;
  animation: redirect-progress 3s linear forwards;
}

.site-footer {
  padding: 28px 0 44px;
}

.site-footer .container {
  width: min(calc(100% - 32px), var(--header));
}

.site-footer__panel {
  overflow: hidden;
}

.footer-top,
.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

.footer-top {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.footer-brand p {
  max-width: 58ch;
  margin: 12px 0 0;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.footer-status span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #faf7f1;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.footer-section h3 {
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 7px;
}

.footer-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  opacity: 0.5;
  transform: rotate(45deg);
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--line);
  background: #faf7f1;
}

.footer-bottom {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.footer-note {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.93rem;
}

.footer-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.footer-payments img {
  width: 68px;
  height: 38px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.back-top {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

body.reveal-ready [data-reveal] {
  opacity: 1;
  transform: translateY(14px);
  transition: transform 360ms ease;
}

body.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes redirect-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav__list a,
  .site-nav .button {
    width: 100%;
    justify-content: flex-start;
  }

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

  .footer-actions,
  .footer-payments {
    justify-content: flex-start;
  }

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

@media (max-width: 720px) {
  html {
    scroll-padding-top: 84px;
  }

  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .hero-copy,
  .hero-summary,
  .story-card,
  .paper-note,
  .quote-panel,
  .ledger-card__intro,
  .ledger-card__body,
  .timeline__item,
  .site-footer__panel {
    padding: 20px;
  }

  h1 {
    font-size: 1.45rem;
    line-height: 1.18;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
  }

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

  .footer-actions .button {
    width: 100%;
  }

  .fact-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timeline--rail {
    padding-left: 20px;
  }

  .timeline--rail::before {
    left: 6px;
  }

  .timeline--rail .timeline__item::before {
    left: -17px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
