/* ==========================================================================
   The Synthetic Economy — institutional stylesheet
   Static. No JavaScript. No build step.
   ========================================================================== */

:root {
  /* Surfaces */
  --paper:        #eeeae3;  /* page — warm paper */
  --paper-deep:   #e6e1d8;  /* recessed band */
  --card:         #f6f4ef;  /* raised card */
  --rule:         #d5cec2;  /* soft warm border */
  --rule-strong:  #bfb6a6;

  /* Ink */
  --ink:          #1b1a18;
  --ink-soft:     #4a453d;
  --ink-mute:     #635c51;

  /* Accent — muted slate blue */
  --accent:       #46586c;
  --accent-deep:  #313d4b;
  --accent-wash:  #dfe2e6;

  /* Type */
  --serif: "Source Serif 4", "Source Serif Pro", Charter, "Iowan Old Style",
           "Times New Roman", Georgia, serif;
  --sans:  "IBM Plex Sans", "Helvetica Neue", Arial, system-ui, sans-serif;

  /* Frame */
  --frame: 1180px;
  --rail: 172px;
  --gutter: 56px;
  --measure: 68ch;
}

/* --------------------------------------------------------------- reset -- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--card); color: var(--ink);
  padding: .6rem 1rem; border: 1px solid var(--rule-strong); z-index: 20;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------------------------------------------------------------- frame -- */

.frame {
  width: 100%;
  max-width: var(--frame);
  margin-inline: auto;
  padding-inline: 32px;
}

.band { border-top: 1px solid var(--rule); }
.band--sunken { background: var(--paper-deep); }
.band--flush { border-top: 0; }

.band__inner { padding-block: 80px; }
.band__inner--tight { padding-block: 52px; }

/* Two-column institutional grid: marginal index rail + content */
.split {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: start;
}

.rail {
  font-family: var(--sans);
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--ink-mute);
  letter-spacing: .01em;
  padding-top: .55rem;
  border-top: 2px solid var(--ink);
}
.rail b { display: block; font-weight: 600; color: var(--ink); }
.rail span { display: block; margin-top: .25rem; }

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

/* ------------------------------------------------------------- typography */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.2;
  margin-bottom: 1.1rem;
}

h3 { font-size: 1.28rem; line-height: 1.3; }

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

.lede {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.62;
  color: var(--ink-soft);
}

.prose { max-width: var(--measure); }
.prose p { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.72; color: var(--ink-soft); }

.note { font-size: .875rem; color: var(--ink-mute); line-height: 1.6; }

/* ------------------------------------------------------------------- nav -- */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 10;
}

.masthead__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--accent-deep); }

.nav { display: flex; gap: 26px; flex-wrap: wrap; }
.nav a {
  font-size: .875rem;
  color: var(--ink-mute);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

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

.hero { padding-block: 104px 76px; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: .015em;
  margin-bottom: 1.4rem;
}

.hero__sub {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.4;
  color: var(--accent-deep);
  max-width: 30ch;
  margin-bottom: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule-strong);
}

.hero__body { max-width: 62ch; }
.hero__body p { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.72; color: var(--ink-soft); }

.hero__aside {
  border-left: 1px solid var(--rule-strong);
  padding-left: 28px;
  padding-bottom: .35rem;
}
.hero__aside p { font-size: .9375rem; color: var(--ink-mute); line-height: 1.65; }
.hero__aside em { font-style: normal; color: var(--ink); }

.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2rem; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .9375rem;
  line-height: 1;
  padding: 14px 22px;
  text-decoration: none;
  border: 1px solid var(--accent-deep);
  color: var(--accent-deep);
  background: transparent;
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--accent-deep); color: var(--card); }
.btn--solid { background: var(--accent-deep); color: var(--card); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--card); }

/* -------------------------------------------------------- identity strip -- */

.identity {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.identity__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-block: 30px;
  gap: 0;
}

.fact { padding: 4px 26px; border-left: 1px solid var(--rule); }
.fact:first-child { padding-left: 0; border-left: 0; }

.fact dt {
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--ink-mute);
  margin-bottom: .45rem;
}
.fact dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--ink);
}

/* ----------------------------------------------------------------- cards -- */

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.card {
  background: var(--card);
  padding: 28px 26px 30px;
}
.card h3 { margin-bottom: .7rem; }
.card p { font-size: .9375rem; line-height: 1.65; color: var(--ink-soft); }

.card__tag {
  display: block;
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: .9rem;
}

/* ------------------------------------------------------------- documents -- */

.docs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.doc {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent-deep);
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
}

.doc--private { border-top-color: var(--rule-strong); }

.doc__no {
  font-size: .75rem;
  letter-spacing: .05em;
  color: var(--ink-mute);
  margin-bottom: .8rem;
}

.doc h3 {
  font-size: 1.35rem;
  line-height: 1.28;
  margin-bottom: .55rem;
}

.doc__full {
  font-family: var(--serif);
  font-size: .98rem;
  line-height: 1.55;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 1.15rem;
}

.doc__desc { font-size: .9375rem; line-height: 1.65; color: var(--ink-soft); margin-bottom: 1.4rem; }

.doc__meta {
  margin: 0 0 1.3rem;
  border-top: 1px solid var(--rule);
  font-size: .875rem;
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
}
.doc__meta dt {
  color: var(--ink-mute);
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}
.doc__meta dd {
  margin: 0;
  color: var(--ink);
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}

.doc__foot { margin-top: auto; }

.status {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .03em;
  padding: 5px 10px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-mute);
  background: var(--paper-deep);
}
.status--open { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-wash); }

/* ---------------------------------------------------------------- ledger -- */

.ledger-wrap { border: 1px solid var(--rule); background: var(--card); overflow-x: auto; }

table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  min-width: 640px;
}

table.ledger caption {
  text-align: left;
  padding: 20px 24px 6px;
  font-size: .875rem;
  color: var(--ink-mute);
}

table.ledger th {
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .05em;
  color: var(--ink);
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule-strong);
  vertical-align: bottom;
  white-space: nowrap;
}

table.ledger td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-soft);
  line-height: 1.6;
}
table.ledger tr:last-child td { border-bottom: 0; }
table.ledger td:first-child { color: var(--ink); }

table.ledger--five { min-width: 900px; }
table.ledger--five th:first-child,
table.ledger--five td:first-child { width: 20%; }

.verdict { font-weight: 600; white-space: nowrap; font-size: .8125rem; letter-spacing: .02em; }
.verdict--falsified { color: #7a3b34; }
.verdict--displaced { color: #7a5a2e; }
.verdict--qualified { color: var(--accent-deep); }
.verdict--survives  { color: #3f5a44; }

/* --------------------------------------------------------------- listing -- */

.chain {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.chain li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  font-size: .9375rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.chain b { font-family: var(--serif); font-size: 1.02rem; font-weight: 400; color: var(--ink); }

.plainlist { list-style: none; margin: 0; padding: 0; }
.plainlist li {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: .9375rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.plainlist li:first-child { border-top: 1px solid var(--rule); }
.plainlist strong { font-weight: 600; color: var(--ink); }

/* ----------------------------------------------------------------- about -- */

.duo {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: start;
}

.sidepanel {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 26px 26px 22px;
}
.sidepanel h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.sidepanel p { font-size: .9375rem; color: var(--ink-soft); line-height: 1.6; }

.contactline {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  word-break: break-word;
}

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

.footer {
  border-top: 1px solid var(--rule-strong);
  background: var(--paper-deep);
}
.footer__inner {
  padding-block: 42px 46px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.footer h4 {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--ink);
  margin: 0 0 .85rem;
}
.footer p, .footer li { font-size: .8125rem; color: var(--ink-mute); line-height: 1.7; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer a { color: var(--ink-mute); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }

.colophon {
  border-top: 1px solid var(--rule);
  padding-block: 20px 26px;
  font-size: .8125rem;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

.pagehead { padding-block: 72px 44px; }
.pagehead h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  line-height: 1.08;
  max-width: 20ch;
  margin-bottom: 1.2rem;
}
.pagehead .lede { max-width: 60ch; }
.backlink { font-size: .875rem; color: var(--ink-mute); text-decoration: none; display: inline-block; margin-bottom: 2rem; }
.backlink:hover { color: var(--ink); }

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

@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --rail: 140px; --gutter: 40px; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .hero__aside { border-left: 0; border-top: 1px solid var(--rule-strong); padding-left: 0; padding-top: 22px; max-width: 60ch; }
  .identity__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 0; }
  .fact:nth-child(odd) { padding-left: 0; border-left: 0; }
  .docs { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; gap: 36px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .frame { padding-inline: 22px; }
  .split { grid-template-columns: 1fr; gap: 22px; }
  .rail { border-top: 0; padding-top: 0; }
  .rail b { display: inline; }
  .rail span { display: inline; margin-left: .5rem; }
  .band__inner { padding-block: 56px; }
  .hero { padding-block: 64px 52px; }
  .cards { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 30px; }
  .chain li { grid-template-columns: 1fr; gap: 4px; }
  .doc__meta { grid-template-columns: 7rem minmax(0, 1fr); }
  .masthead { position: static; }
}

@media print {
  .masthead, .actions { display: none; }
  body { background: #fff; }
}
