/* ═══════════════════════════════════════════════════════════════════
   URN — the register of the dead

   The page is not a landing page with a table on it. The page IS the
   book: aged paper, a red margin rule down the left of the sheet,
   ruled entries, typed data, and a rubber stamp on the entry that is
   currently standing. Everything that would normally be a "card" is a
   ruled block on the same leaf.

   Rules kept throughout:
     · every ink step is pre-solved against --paper-3, the DARKEST
       surface any of them sits on. This is a LIGHT theme, so the
       constraint runs the opposite way from a dark build.
     · explicit rgba only, NEVER color-mix(var(--x), transparent).
     · only transform and opacity are animated.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --paper:    #f2ecdc;   /* the leaf */
  --paper-2:  #eae3d0;   /* a ruled block on the leaf */
  --paper-3:  #e0d8c2;   /* the darkest surface any ink sits on */
  --rule:     #cec7ae;   /* the horizontal ruling */
  --rule-2:   #b3aa8d;   /* heavier ruling, column rules */

  --ink:       #221f18;   /* 11.6:1 on --paper-3 */
  --ink-dim:   #3d382d;   /*  8.1:1 */
  --ink-low:   #4a4436;   /*  6.8:1 — drives every small typed label */
  --ink-faint: #5c5545;   /*  5.0:1 — secondary only, never under 13px */

  --margin:  #a8402f;   /* the red margin rule. NEVER used for text. */
  --stamp:   #8c3524;   /*  5.6:1 — the stamp, and every red mark that is read */

  --ok:   #2f5c3a;
  --warn: #7a5216;
  --bad:  #8c2f22;

  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --body:    "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --mono:    "Courier Prime", ui-monospace, "Courier New", Courier, monospace;

  --gut:   clamp(1.1rem, 3.5vw, 2.6rem);
  --margin-x: clamp(2.2rem, 6vw, 4.6rem);  /* where the red rule sits */
  --hair:  1px solid var(--rule);
}

* { 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(--body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; }

/* ── the leaf ────────────────────────────────────────────────────────
   One sheet with the red margin rule ruled down it. Everything lives to
   the right of that rule, which is what makes this read as a book rather
   than as a container with a border. */

.sheet {
  position: relative;
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: var(--margin-x) var(--gut);
}
.sheet::before {
  content: "";
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--margin-x) - .95rem);
  width: 1px; background: var(--margin); opacity: .55;
}
/* the paper itself: warm fibre */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23f)' opacity='.06'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 99; background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; }
.skip:focus { left: .5rem; top: .5rem; }
:where(a, button, input, [tabindex]):focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; }
::selection { background: rgba(168, 64, 47, .22); }

.mono { font-family: var(--mono); font-size: .88em; font-variant-numeric: tabular-nums; }

/* ── the running head ────────────────────────────────────────────────── */

.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(242, 236, 220, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule-2);
}
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 56px; }
.ident { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; color: var(--ink); min-width: 0; }
.seal { width: 24px; height: 24px; flex: none; align-self: center; overflow: hidden; border: 1px solid var(--rule-2); }
.seal img { width: 100%; height: 100%; object-fit: cover; }
.ident-t { font-family: var(--display); font-size: 1.15rem; letter-spacing: .04em; white-space: nowrap; }
.ident-k { font-size: .68rem; color: var(--stamp); }

.bar-r { display: flex; align-items: center; gap: .5rem; }
.pulse { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .66rem; color: var(--ink-low); white-space: nowrap; }
.pulse-d { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.pulse[data-state="live"] .pulse-d { background: var(--ok); animation: beat 2.8s ease-in-out infinite; }
.pulse[data-state="pre"]  .pulse-d { background: var(--ink-faint); }
.pulse[data-state="stale"] .pulse-d { background: var(--warn); }
.pulse[data-state="stale"] .pulse-t { color: var(--warn); }
.pulse[data-state="down"]  .pulse-d { background: var(--bad); }
.pulse[data-state="down"]  .pulse-t { color: var(--bad); }
@keyframes beat { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.ca { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; background: transparent; border: 1px solid var(--rule-2); color: var(--ink-dim); padding: .3rem .55rem; font-family: var(--mono); font-size: .68rem; }
.ca-l { color: var(--ink-low); }
.lnk { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--stamp); padding-bottom: 1px; font-size: .82rem; }
.ca:hover { border-color: var(--ink-faint); color: var(--ink); }
.lnk:hover { color: var(--stamp); }

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

.mast { padding: clamp(2.4rem, 6vw, 4.2rem) 0 clamp(1.4rem, 3vw, 2rem); border-bottom: 3px double var(--rule-2); }
.mast-k { margin: 0 0 .7rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-low); }
.mast-h {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.5rem, 1rem + 6.4vw, 5.4rem);
  line-height: 1.02; margin: 0; letter-spacing: -.005em;
}
.mast-sub { margin: 1rem 0 0; max-width: 56ch; color: var(--ink-dim); font-size: 1.02rem; }
.mast-sub b { font-weight: 700; color: var(--ink); }

/* ── the entry standing ──────────────────────────────────────────────── */

.entry { padding: clamp(1.6rem, 4vw, 2.6rem) 0 clamp(2rem, 5vw, 3rem); border-bottom: 3px double var(--rule-2); }
.entry-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: var(--hair); }
.entry-k { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-low); }
.entry-no { font-size: .78rem; color: var(--stamp); }

.entry-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.2rem, 4vw, 3rem); align-items: start; padding-top: 1.3rem; }

.specimen {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.3rem, 1rem + 6vw, 5rem);
  line-height: 1.04; margin: 0; letter-spacing: -.01em; overflow-wrap: anywhere;
}
.specimen-in { display: inline; }
/* the name is TYPED into the register, so it arrives letter by letter with
   no movement at all: a typewriter does not slide its glyphs in. */
.specimen .ch { display: inline-block; white-space: pre; }
.specimen .ch.in  { animation: chIn 1ms steps(1) backwards; }
.specimen .ch.out { animation: chOut 1ms steps(1) forwards; }
@keyframes chIn  { from { opacity: 0; } }
@keyframes chOut { to   { opacity: 0; } }

.entry-tick { margin: .6rem 0 0; font-size: 1.02rem; color: var(--stamp); }

.facts { margin: 1.5rem 0 0; padding: 0; max-width: 62ch; }
.facts > div[hidden] { display: none; }
.facts > div { display: flex; align-items: baseline; gap: .6rem; padding: .42rem 0; border-bottom: 1px dotted var(--rule-2); }
.facts dt { color: var(--ink-low); font-size: .86rem; flex: none; }
.facts dd { margin: 0 0 0 auto; color: var(--ink-dim); text-align: right; overflow-wrap: anywhere; font-size: .92rem; }
.facts dd a { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.facts dd a:hover { color: var(--ink); }
.facts dd.unsure { color: var(--warn); }

.alert { margin: 1.1rem 0 0; padding: .6rem .75rem; font-size: .86rem; max-width: 62ch;
  background: rgba(140, 47, 34, .06); border: 1px solid rgba(140, 47, 34, .32); color: var(--bad); }
.alert[data-kind="warn"] { background: rgba(122, 82, 22, .06); border-color: rgba(122, 82, 22, .32); color: var(--warn); }
.alert[data-kind="note"] { background: rgba(74, 68, 54, .05); border-color: rgba(74, 68, 54, .26); color: var(--ink-low); }

/* THE STAMP. Rubber, slightly askew, ink a little uneven. This is the one
   element allowed to be crooked; everything else on the sheet is ruled
   square, which is what makes it read as a stamp and not a badge. */
.entry-side { display: grid; justify-items: center; gap: 1rem; }
.stamp {
  display: grid; justify-items: center; gap: .1rem;
  padding: .7rem 1.1rem; border: 2px solid var(--stamp); border-radius: 3px;
  color: var(--stamp); transform: rotate(-7deg); opacity: .82;
  box-shadow: inset 0 0 0 1px rgba(140, 53, 36, .5);
  max-width: 15rem;
}
.stamp-l1 { font-family: var(--body); font-style: italic; font-size: .78rem; letter-spacing: .04em; }
.stamp-l2 { font-family: var(--display); font-size: 1.7rem; line-height: 1; letter-spacing: .06em; }
.stamp-l3 { font-size: .6rem; letter-spacing: .1em; text-align: center; overflow-wrap: anywhere; max-width: 13rem; }
.readmark { margin: 0; font-size: .66rem; color: var(--ink-low); text-align: center; line-height: 1.5; }
.entry-verify { margin: 0; font-size: .76rem; }
.entry-verify a { color: var(--ink-low); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.entry-verify a:hover { color: var(--stamp); }

/* the ruled line that fills toward the next entry */
.nextrule { margin-top: clamp(1.6rem, 4vw, 2.4rem); }
.nextrule-h { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .45rem; }
.nextrule-k { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-low); }
.nextrule-v { font-size: .88rem; color: var(--ink-dim); }
.nextrule-v b { font-weight: 700; color: var(--ink); }
.nextrule-p { margin-left: auto; font-size: .74rem; color: var(--stamp); }
.nextrule-track { height: 3px; background: var(--rule); overflow: hidden; }
.nextrule-track span {
  display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left center;
  background: var(--stamp);
  transition: transform 800ms cubic-bezier(.2, .7, .2, 1); will-change: transform;
}

.cta { margin-top: 1.6rem; display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.btn {
  border: 0; text-decoration: none; font-family: var(--body);
  font-size: .92rem; padding: .72rem 1.4rem; cursor: pointer; display: inline-block;
  transition: filter 140ms ease, transform 140ms ease;
}
.btn-a { background: var(--ink); color: var(--paper); }
.btn-b { background: transparent; color: var(--ink-dim); box-shadow: inset 0 0 0 1px var(--rule-2); }
.btn-b:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-faint); }
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { background: var(--paper-3); color: var(--ink-low); cursor: not-allowed; filter: none; }

/* ── section heads ───────────────────────────────────────────────────── */

.sec-h { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 1rem + 2.2vw, 2.7rem); line-height: 1.06; margin: 0 0 .6rem; }
.sec-sub { color: var(--ink-dim); margin: 0 0 1.6rem; max-width: 62ch; font-size: .96rem; }
.sub-h { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 .5rem; }

/* ── THE REGISTER ────────────────────────────────────────────────────── */

.ledger { padding: clamp(2.2rem, 5vw, 3.4rem) 0; border-bottom: 3px double var(--rule-2); }
.book { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-2); }
.reg { width: 100%; border-collapse: collapse; font-size: .9rem; }
.reg thead th {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-low); font-weight: 400; text-align: left;
  padding: .55rem .7rem; border-bottom: 1px solid var(--rule-2); white-space: nowrap;
}
.reg td { padding: .38rem .7rem; border-bottom: 1px dotted var(--rule); vertical-align: middle; }
.reg tbody tr:hover td { background: var(--paper-2); }
.c-no    { width: 3.6rem; }
.c-face  { width: 2.4rem; }
.c-tkr   { width: 6rem; }
.c-peak  { width: 8rem; }
.c-status{ width: 9rem; }
.t-no { font-family: var(--mono); font-size: .74rem; color: var(--ink-low); }
/* inline-block, NOT the default inline: width/height do not apply to an
   inline box, so the span ignored its size, its border rendered as a stray
   vertical rule beside every face, and the block img inside forced the row
   to its natural height. */
.t-face { display: inline-block; vertical-align: middle; width: 26px; height: 26px; overflow: hidden; border: 1px solid var(--rule-2); background: var(--paper-3); }
.t-face img { width: 100%; height: 100%; object-fit: cover; }
.t-face.gone { background: repeating-linear-gradient(45deg, var(--paper-3) 0 4px, var(--paper-2) 4px 8px); }
.t-name { font-family: var(--body); overflow-wrap: anywhere; }
.t-tkr, .t-peak { font-family: var(--mono); font-size: .76rem; color: var(--ink-dim); }
.t-status { font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-low); }

/* the entry currently standing, marked in the margin the way a clerk would */
.reg tr.r-now td { background: var(--paper-2); border-bottom: 1px solid var(--ink); border-top: 1px solid var(--ink); }
.reg tr.r-now .t-name { font-weight: 700; }
.reg tr.r-now .t-status { color: var(--stamp); }
.reg tr.r-now .t-no::before { content: "\25B8 "; color: var(--stamp); }
.reg tr.r-past .t-name { color: var(--ink-dim); }
.reg tr.r-past .t-face img { filter: grayscale(1); opacity: .75; }

.book-foot { margin: 0; padding: .8rem .7rem 1rem; font-size: .8rem; color: var(--ink-low); display: flex; align-items: baseline; gap: .7rem; }
.book-cont { font-family: var(--mono); color: var(--rule-2); letter-spacing: .2em; }
.reg-empty td { padding: 2rem .7rem; color: var(--ink-low); font-style: italic; }
/* the reserved rows, before the register has been written */
.r-skel td { color: transparent; }
.r-skel .t-face { background: var(--paper-2); border-color: var(--rule); }

/* the ledger's own totals */
.totals { margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule-2); }
.totals > div { padding: .9rem .8rem .9rem 0; border-right: var(--hair); }
.totals > div:last-child { border-right: 0; }
.totals dt { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-low); }
.totals dd { margin: .35rem 0 0; font-size: 1.05rem; color: var(--ink); overflow-wrap: anywhere; }

/* ── the clauses ─────────────────────────────────────────────────────── */

.clauses { padding: clamp(2.2rem, 5vw, 3.4rem) 0; border-bottom: 3px double var(--rule-2); }
.clause-list { list-style: none; margin: 0; padding: 0; max-width: 74ch; }
.clause-list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; padding: 1.1rem 0; border-bottom: 1px dotted var(--rule-2); }
.clause-list li:first-child { border-top: 1px dotted var(--rule-2); }
.clause-n { margin: 0; font-family: var(--mono); font-size: .8rem; color: var(--stamp); padding-top: .2rem; }
.clause-b h3 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; margin: 0 0 .3rem; line-height: 1.15; }
.clause-b p { margin: 0; color: var(--ink-dim); font-size: .94rem; }
.clause-b b { font-weight: 700; color: var(--ink); }
.note-foot { margin: 1.5rem 0 0; padding-left: 1rem; border-left: 2px solid var(--rule-2); color: var(--ink-low); font-size: .88rem; max-width: 72ch; }

/* ── the form ────────────────────────────────────────────────────────── */

.apply { padding: clamp(2.2rem, 5vw, 3.4rem) 0; border-bottom: 3px double var(--rule-2); }
.form { border: 1px solid var(--rule-2); background: var(--paper-2); max-width: 46rem; }
.form-hd { margin: 0; padding: .6rem .9rem; border-bottom: 1px solid var(--rule-2); font-size: .78rem; color: var(--ink-low); letter-spacing: .04em; }
.form-rows { display: grid; grid-template-columns: 1.5fr 1fr; }
.fld { display: block; padding: 1rem .9rem 1.1rem; border-right: var(--hair); }
.fld:last-child { border-right: 0; }
.fld-l { display: block; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-low); margin-bottom: .5rem; }
.fld-h { display: block; margin-top: .45rem; font-size: .74rem; color: var(--ink-faint); font-style: italic; }
/* an underline to write on, not a rounded input box */
.fld input[type="text"] {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ink-faint);
  color: var(--ink); font-family: var(--mono); font-size: 1.05rem; padding: .3rem 0;
}
.fld input:focus { outline: none; border-bottom-color: var(--stamp); }
.fld input::placeholder { color: var(--ink-faint); }
.willmove { margin: 0; padding: .3rem 0; border-bottom: 1px solid var(--rule-2); color: var(--ink-low); font-size: 1.05rem; }
.willmove-on { color: var(--stamp); border-bottom-color: var(--stamp); }

.act { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; padding: 1rem .9rem 1.1rem; border-top: 1px solid var(--rule-2); }
.act-n { margin: 0; font-size: .82rem; color: var(--ink-low); max-width: 44ch; }
.act-n.err { color: var(--bad); }
.act-n.ok  { color: var(--ok); }

.elsewhere { margin-top: 2.2rem; }
.ways { margin: 1.2rem 0; padding: 0; border-top: 1px solid var(--rule-2); max-width: 62rem; }
.ways > div { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); gap: 1rem; padding: .65rem 0; border-bottom: 1px dotted var(--rule-2); }
.ways dt { font-weight: 700; font-size: .9rem; }
.ways dd { margin: 0; color: var(--ink-dim); font-size: .9rem; }
.ways code { font-family: var(--mono); font-size: .9em; }
.cli { background: var(--paper-2); border: 1px solid var(--rule-2); padding: .85rem 1rem; overflow-x: auto; }
.cli code { font-family: var(--mono); font-size: .76rem; color: var(--ink-dim); white-space: pre; }
.cli span { color: var(--stamp); }

/* ── signatories ─────────────────────────────────────────────────────── */

.signatories { padding: clamp(2.2rem, 5vw, 3.4rem) 0; }
.board { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-2); max-width: 60rem; }
.board li { display: flex; align-items: baseline; gap: 1rem; padding: .65rem 0; border-bottom: 1px dotted var(--rule-2); }
.board .r { font-family: var(--mono); font-size: .72rem; color: var(--stamp); width: 2.2rem; flex: none; }
.board .w { font-family: var(--mono); font-size: .78rem; color: var(--ink-dim); overflow-wrap: anywhere; flex: 1; text-decoration: none; }
.board .w:hover { color: var(--ink); }
.board .c { font-family: var(--mono); font-size: .74rem; color: var(--ink-low); white-space: nowrap; }
.board .empty { color: var(--ink-low); font-style: italic; }

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

.foot { border-top: 3px double var(--rule-2); padding: 2.4rem 0 3rem; margin-top: 1rem; }
.foot-in { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.foot-m { width: 54px; height: 54px; flex: none; border: 1px solid var(--rule-2); }
.foot-c { flex: 1; min-width: 220px; }
.foot-c p { margin: 0; }
.foot-l { color: var(--ink-dim); font-size: .9rem; }
.foot-a { color: var(--ink-low); font-size: .72rem; margin-top: .25rem; overflow-wrap: anywhere; }
.foot-s { color: var(--ink-low); font-size: .78rem; margin-top: .25rem; font-style: italic; }
.foot-x { color: var(--ink-dim); font-size: .76rem; text-decoration: none; border-bottom: 1px solid var(--stamp); }
.foot-x:hover { color: var(--stamp); }

/* ── states ──────────────────────────────────────────────────────────── */

/* PRE-LAUNCH. The form is inert and the stamp has not been struck. Signalled
   with the frame and the copy, never with opacity on TEXT: an inert control
   is still a control people have to read. */
body[data-prelaunch] .stamp { border-style: dashed; opacity: .5; }
body[data-prelaunch] .fld input { pointer-events: none; border-bottom-style: dashed; }
body[data-prelaunch] .willmove { border-bottom-style: dashed; }

/* NO READ AT ALL. A progress rule implies a burn total we do not have. */
body[data-noread] .nextrule { display: none; }

/* STALE. The last good read is kept and marked, in COLOUR not opacity. */
body[data-stale] .facts dd,
body[data-stale] .facts dd a,
body[data-stale] .nextrule-v,
body[data-stale] .nextrule-v b,
body[data-stale] .nextrule-p,
body[data-stale] .totals dd { color: var(--ink-low); }
body[data-stale] .stamp { opacity: .45; }
body[data-stale] .t-face img { filter: grayscale(1); }

/* the entry being struck: the stamp lands. */
body.struck .stamp { animation: strike 900ms cubic-bezier(.2, .9, .3, 1); }
@keyframes strike {
  0%   { transform: rotate(-7deg) scale(1.5); opacity: 0; }
  55%  { transform: rotate(-7deg) scale(.96); opacity: 1; }
  100% { transform: rotate(-7deg) scale(1); opacity: .82; }
}

/* ── responsive ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .entry-body { grid-template-columns: 1fr; }
  .entry-side { justify-items: start; }
  .stamp { transform: rotate(-4deg); }
  .totals { grid-template-columns: repeat(2, 1fr); }
  .totals > div:nth-child(2) { border-right: 0; }
  .totals > div:nth-child(n+3) { border-top: var(--hair); }
  .form-rows { grid-template-columns: 1fr; }
  .fld { border-right: 0; border-bottom: var(--hair); }
  .fld:last-child { border-bottom: 0; }
  /* the peak column is the first thing a narrow book gives up */
  .c-peak, .t-peak { display: none; }
  body.struck .stamp { animation: none; }
}
@media (max-width: 640px) {
  .c-status, .t-status { display: none; }
  .ways > div { grid-template-columns: 1fr; gap: .2rem; }
  .clause-list li { grid-template-columns: 1.8rem minmax(0, 1fr); gap: .7rem; }
  .pulse .pulse-t { display: none; }
  .nextrule-p { margin-left: 0; }
}
@media (max-width: 430px) {
  .ident-k { display: none; }
  .cta .btn { flex: 1; text-align: center; }
  .c-face, .t-face { display: none; }
}

/* ── reduced motion ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pulse-d { animation: none !important; }
  .specimen .ch.in, .specimen .ch.out { animation: none !important; opacity: 1; }
  body.struck .stamp { animation: none !important; }
}

/* ── the contract line ───────────────────────────────────────────────────
   `[hidden]` asserted explicitly: a bare `display:flex` on the class would
   otherwise beat it, which once shipped an empty bar pre-launch. */
.cabar { display: flex; align-items: center; gap: .7rem; margin: 1.4rem 0 0;
  padding: .55rem .7rem; border: 1px solid var(--rule-2); background: var(--paper-2); max-width: 44rem; }
.cabar[hidden] { display: none !important; }
.cabar-k { font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-low); flex: none; }
.cabar-v { font-size: .76rem; color: var(--ink-dim); overflow-wrap: anywhere; line-height: 1.35; flex: 1 1 auto; user-select: all; }
.cabar-b { flex: none; cursor: pointer; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .34rem .8rem; color: var(--paper); background: var(--ink); border: 1px solid var(--ink);
  transition: background .16s ease; }
.cabar-b:hover { background: var(--stamp); border-color: var(--stamp); }
.cabar-b:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }
.cabar-b[data-done="1"] { background: var(--ok); border-color: var(--ok); }
@media (max-width: 560px) { .cabar { flex-wrap: wrap; } .cabar-v { flex-basis: 100%; order: 3; } }
@media (prefers-reduced-motion: reduce) { .cabar-b { transition: none; } }
