/* ───────────────────────────────────────────────────────────────
   This Page Intentionally Left Blank
   A sheet of paper that protests its own contents.
   ─────────────────────────────────────────────────────────────── */

:root {
  --paper:      #f4f1ea;
  --paper-deep: #ece7dc;
  --ink:        #191714;
  --ink-soft:   #5c574d;
  /* Darkened 31 Aug 2026. At #a9a294 this measured 2.25:1 on --paper and
     2.06:1 on --paper-deep — well under AA — and it carries real copy: the
     gauge note, the scroll cue, the dt labels and the colophon. Now 5.20:1
     and 4.75:1. It is still the lightest ink on the page and still reads as
     fine print; it is no longer print nobody can read. */
  --ink-faint:  #6b6456;
  /* A hairline colour, for rules and borders only. At 1.40:1 on --paper it is
     not a text colour; anything that reads uses --ink-faint. */
  --rule:       #d4cdbe;
  /* The dark section runs the palette the other way up, so it needs its own
     two values. Measured 31 Aug 2026 against --void #100f0d:
       --void-dim  paper at 55% — 5.65:1. At the 40% it was written at, 3.52:1.
       --void-mark the mark lifted until it reads there — 4.61:1, where
                   --mark itself is 3.34:1. --mark stays the mark on paper. */
  /* Non-text colours: a wash, a shadow, a fade. None of them carries copy, so
     none has a contrast number — but a colour with no name still cannot be
     changed anywhere except where it happens to sit, which is why they are
     here rather than in the rules that use them. */
  --wash-light: rgba(255, 255, 255, .55);
  --wash-dark:  rgba(25, 23, 20, .07);
  --paper-fade: rgba(244, 241, 234, 0);
  --shadow-ink: rgba(25, 23, 20, .08);
  --tag-outline: rgba(178, 64, 44, .55);

  --void-ink:   rgba(244, 241, 234, .62);
  --void-dim:   rgba(244, 241, 234, .55);
  --void-mark:  #d0553f;
  --mark:       #b2402c;          /* the one red printer's mark */
  --void:       #100f0d;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --mono:  ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --measure: 34rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.55;
  overflow-x: hidden;
}

/* The paper's tooth: a faint fibre wash, never a texture image. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(120% 90% at 50% 0%,   var(--wash-light), transparent 60%),
    radial-gradient(100% 80% at 50% 100%, var(--wash-dark),  transparent 62%);
  mix-blend-mode: multiply;
  opacity: .8;
}

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  /* min-height, not more padding: 44px is the target size rule, and the box
     was 38px tall. Padding alone would have moved the text off centre. */
  padding: .6rem 1rem; min-height: 44px; display: inline-flex; align-items: center;
  z-index: 99; font-family: var(--mono); font-size: .75rem;
}
.skip:focus { left: 0; }

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

/* ── masthead ─────────────────────────────────────────────────── */

.masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem var(--gutter);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  /* The sheet slides under the header rather than through it. */
  background: linear-gradient(var(--paper) 62%, var(--paper-fade));
  transition: opacity .35s ease;
}
/* Paper-on-black reads as an error, so the header steps out over the void. */
.masthead.is-gone { opacity: 0; }
.masthead__rule { flex: 1; height: 1px; background: var(--rule); }
.masthead__mark--right { text-align: right; }

/* ── sheets ───────────────────────────────────────────────────── */

.sheet {
  position: relative;
  padding: clamp(6rem, 14vh, 10rem) var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.sheet--hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
}

.eyebrow {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--mark);
}

/* The declaration itself — the one piece of real display typography. */
.declaration {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.75rem, min(11vw, 15vh), 9.5rem);
  line-height: .92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.declaration__line { display: block; }
.declaration__line--em {
  font-style: italic;
  color: var(--mark);
  /* pulled left so the italic's optical edge lines up with the roman above */
  margin-left: -0.03em;
}

.deck {
  max-width: var(--measure);
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 0;
  color: var(--ink-soft);
  font-size: 1.0625em;
  text-wrap: pretty;
}

/* superscript footnote markers */
.fn {
  font-family: var(--mono);
  font-size: .28em;
  vertical-align: super;
  letter-spacing: 0;
  color: var(--mark);
  margin-left: .12em;
}

/* ── the blankness gauge ──────────────────────────────────────── */

.gauge {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  max-width: 26rem;
}
.gauge__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.gauge__value {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.gauge__pct { font-size: .75rem; color: var(--ink-faint); margin-left: .15em; }

.gauge__track {
  margin-top: .6rem;
  height: 3px;
  background: var(--rule);
  overflow: hidden;
}
.gauge__fill {
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform-origin: left center;
  transition: width .35s cubic-bezier(.2,.7,.3,1), background-color .6s linear;
}
.gauge--soiled .gauge__fill { background: var(--mark); }

.gauge__note {
  margin: .7rem 0 0;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  color: var(--ink-faint);
  min-height: 1.2em;
}

.scroll-cue {
  position: absolute;
  left: var(--gutter); bottom: clamp(1.5rem, 5vh, 3rem);
  margin: 0;
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.scroll-cue__arrow {
  width: 2.5rem; height: 1px; background: var(--ink-faint);
  animation: creep 2.6s ease-in-out infinite;
  transform-origin: left center;
}
@keyframes creep {
  0%, 100% { transform: scaleX(.4); opacity: .5; }
  50%      { transform: scaleX(1);  opacity: 1; }
}

/* ── section titles ───────────────────────────────────────────── */

.section-title {
  margin: 0 0 clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  display: flex; flex-direction: column; gap: .9rem;
}
.section-title__num {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mark);
}

/* ── clauses: set as a page of small print ────────────────────── */

.clauses {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  border-top: 1px solid var(--rule);
  padding-top: clamp(2rem, 4vw, 3rem);
}
.clause { margin: 0; max-width: 30rem; }
.clause__head {
  margin: 0 0 .6rem;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.clause p {
  margin: 0;
  font-size: .9375em;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.clause em { font-style: italic; color: var(--ink); }

/* ── the void ─────────────────────────────────────────────────── */

.sheet--void {
  background: var(--void);
  color: var(--paper);
  border-bottom-color: var(--void);
  min-height: 92svh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-block: clamp(5rem, 12vh, 9rem);
  cursor: crosshair;
}
.void__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.void__body { position: relative; z-index: 2; pointer-events: none; }
.void__title {
  margin: 0;
  font-size: clamp(3.5rem, 14vw, 12rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: .9;
  color: var(--paper);
  mix-blend-mode: difference;
}
.void__sub {
  max-width: 28rem;
  margin: 1.5rem 0 0;
  color: var(--void-ink);
  text-wrap: pretty;
}
.void__count {
  margin: 2.5rem 0 0;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--void-dim);
  font-variant-numeric: tabular-nums;
}
.void__count [data-specks] { color: var(--void-mark); }

/* ── certificate ──────────────────────────────────────────────── */

.sheet--cert { background: var(--paper-deep); }

.cert { margin: 0; max-width: 46rem; }
.cert__inner {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: .5rem .5rem 0 var(--shadow-ink);
}
.cert__inner::after {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.cert__kicker {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mark);
}
.cert__body {
  margin: 0;
  max-width: 26rem;
  font-size: clamp(1.0625rem, 2vw, 1.375rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.cert__body strong { font-weight: 400; font-style: italic; }

.cert__seal {
  position: absolute;
  right: clamp(1.5rem, 4vw, 3rem);
  bottom: clamp(1.5rem, 4vw, 3rem);
  width: clamp(6rem, 14vw, 9rem);
  color: var(--mark);
  opacity: .8;
  transform: rotate(-9deg);
}
.cert__meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem;
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  max-width: 24rem;
}
.cert__meta dt {
  font-family: var(--mono); font-size: .625rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint);
}
.cert__meta dd {
  margin: .3rem 0 0;
  font-family: var(--mono); font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}
.cert__seal svg { width: 100%; height: auto; display: block; }

@media (max-width: 40rem) {
  /* the seal and the metadata share a corner, so give the metadata room */
  .cert__meta { padding-right: 7.5rem; }
  .cert__seal { width: 5.5rem; }
}

.cert__cap {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

/* ── the ledger of accrued footnotes ──────────────────────────── */

.ledger {
  padding: clamp(3rem, 8vh, 5rem) var(--gutter) 0;
  max-width: 44rem;
}
.ledger__head {
  margin: 0 0 1rem;
  font-family: var(--mono); font-size: .6875rem;
  letter-spacing: .28em; text-transform: uppercase; color: var(--mark);
}
.ledger__list {
  margin: 0; padding-left: 1.4rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  color: var(--ink-soft);
  font-size: .9375em;
}
.ledger__list li { margin-bottom: .75rem; }
.ledger__list li::marker { font-family: var(--mono); font-size: .75em; color: var(--ink-faint); }
.ledger__list li.is-new { animation: settle .5s ease-out both; }
@keyframes settle {
  from { opacity: 0; transform: translateY(-.35rem); }
  to   { opacity: 1; transform: none; }
}

/* ── colophon ─────────────────────────────────────────────────── */

.colophon {
  padding: clamp(3rem, 8vh, 5rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
}
.colophon__row {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.colophon__note {
  margin: 0; max-width: 22rem;
  font-family: var(--mono); font-size: .6875rem; line-height: 1.7;
  letter-spacing: .04em; color: var(--ink-faint);
}

.restore {
  appearance: none;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: .85rem 1.4rem;
  cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column; gap: .25rem;
  transition: background-color .2s, color .2s;
}
.restore:hover { background: var(--ink); color: var(--paper); }
.restore__label {
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .18em; text-transform: uppercase;
}
.restore__sub { font-family: var(--mono); font-size: .625rem; opacity: .6; letter-spacing: .06em; }

.colophon__fine {
  margin: 2.5rem 0 0;
  font-family: var(--mono); font-size: .625rem;
  letter-spacing: .1em; color: var(--ink-faint);
}

/* ── 404: the sheet that was never printed ────────────────────── */

/* The correction is the joke, so it is drawn the way a proof-reader would
   make it: the wrong word struck through in the printer's red, the right one
   set beside it. Both stay on the line — the strike is only legible next to
   what replaced it. */
.declaration__strike {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--mark);
  text-decoration-thickness: .045em;
}
.declaration__fix {
  font-style: italic;
  color: var(--mark);
  margin-left: -0.03em;
}

/* The filing record. Mono, ruled, and deliberately shaped like the certificate
   metadata on sheet 1 so the two read as the same department. */
.filing {
  max-width: var(--measure);
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .04em;
}
.filing > div {
  display: flex; gap: 1.5rem; align-items: baseline;
  padding: .7rem 0;
  border-bottom: 1px solid var(--rule);
}
.filing dt {
  flex: 0 0 6.5rem;
  text-transform: uppercase; letter-spacing: .18em;
  font-size: .625rem; color: var(--ink-faint);
}
.filing dd { margin: 0; color: var(--ink-soft); min-width: 0; }

/* A requested path is arbitrary visitor input, so it is written with
   textContent and allowed to wrap anywhere rather than pushing the page wide. */
.filing__path { overflow-wrap: anywhere; color: var(--ink); }
.filing__status { color: var(--mark); }

/* The way back reuses the restore button's dress. It is a link, not a button,
   so it needs the two properties an <a> does not get for free. */
a.back {
  display: inline-flex;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  text-decoration: none;
}

/* ── the erasure wipe ─────────────────────────────────────────── */

.wipe {
  position: fixed; inset: 0;
  background: var(--paper);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
}
.wipe.is-wiping { animation: erase 1.5s ease-in-out both; }
@keyframes erase {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  65%  { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wipe.is-wiping { animation-duration: .4s; }
  .scroll-cue__arrow { animation: none; }
}

/* ── the ink you leave behind ─────────────────────────────────── */

.speck {
  position: fixed;
  z-index: 2;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  opacity: .22;
  transition: opacity 1.2s linear;
}
.speck--void { background: var(--paper); opacity: .3; }
.speck.is-fading { opacity: 0; }

/* ───────────────────────────────────────────────────────────────
   Element inspector — inert unless ?tags or ?focus= is present.
   ─────────────────────────────────────────────────────────────── */

body.tags-on [data-eid] { outline: 1px solid var(--tag-outline); outline-offset: 2px; }
body.tags-on [data-eid]::after {
  content: attr(data-eid);
  position: absolute;
  top: 0; left: 0;
  z-index: 40;
  transform: translate(0, -100%);
  text-transform: none;
  background: var(--mark);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  padding: 1px 4px;
  pointer-events: none;
}
body.tags-on [data-eid] { position: relative; }
body.tags-on .masthead, body.tags-on .sheet--hero { position: relative; }
body.tags-on .masthead { position: fixed; }

body.focus-on [data-eid] { opacity: .06; transition: opacity .3s; }
body.focus-on [data-eid].is-focused { opacity: 1; }
body.focus-on .is-focused-target,
body.focus-on .is-focused-target [data-eid] { opacity: 1; }

.inspector-toast {
  position: fixed;
  left: 50%; bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: .6875rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .6rem 1rem;
  opacity: 0; transition: opacity .25s;
}
.inspector-toast.is-up { opacity: 1; }
