/* PLOT 666 — the register's sheet. Mono, dark; lime is light only (glow, money).
   Type sizes that carry money arrive inline from build.py. Motion: transitions
   <300ms ease-out on named properties, one ambient loop (fog), reduced-motion
   keeps color and drops travel. Table rules serve server.py's excavation report. */

:root {
  --ground: #110e08;   /* warm black — the night, not space */
  --panel:  #1c180d;   /* raised surface */
  --edge:   #35322d;   /* structural borders */
  --lime:   #ccff00;   /* light — glowing elements only */
  --txt:    #bfbfbf;   /* primary ink */
  --dim:    #888784;   /* secondary ink — AA on ground and panel */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: "Bricolage", "Arial Narrow", system-ui, sans-serif;  /* the plates' voice: names and sums */
  --sans: system-ui, sans-serif;
}

/* Self-hosted, two static weights cut from the plates' display face; 24 KB, no request leaves the site. */
@font-face { font-family: "Bricolage"; src: url(fonts/bricolage-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url(fonts/bricolage-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--txt);
  font: 16px/1.55 var(--mono);
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

/* phosphor invert on selection */
::selection { background: var(--lime); color: var(--ground); }

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

/* scanline hint — static, never animated */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(0deg,
    rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px);
}

/* light: layered glow stack (dark shadows are invisible here) */
.glow {
  color: var(--lime);
  text-shadow:
    0 0 2px  rgba(204, 255, 0, .50),
    0 0 14px rgba(204, 255, 0, .28),
    0 0 42px rgba(204, 255, 0, .12);
}

/* ── masthead ── */
.gate {
  position: relative;
  min-height: 48vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  gap: .9rem;
  padding: 2.2rem 1rem 2.6rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--edge);
  /* ambient bleed of the glowing title — the phosphor hint */
  background: radial-gradient(55% 46% at 50% 40%,
    rgba(204, 255, 0, .045), transparent 70%);
}

.gate h1 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 600;
  letter-spacing: .22em;
  padding-left: .22em; /* optical center vs trailing tracking */
}
.tagline { margin: 0; color: var(--dim); max-width: 36em; font-size: .95rem; }
/* the counter is a glow element and the hero stat: display-size,
   second only to the wordmark on desktop and at 390px alike */
.counter {
  margin: .8rem 0 .4rem;
  max-width: 100%;
  padding: .55rem 1rem;
  /* fallback only: build.py sets the size inline from the glyph count */
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 1.3;
  letter-spacing: .03em;
  white-space: nowrap;
}

/* fog: gray haze; the ONE permanent loop lives on .fog-near */
.fog {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 40% at 50% 100%,
    rgba(136, 135, 132, .14), transparent 70%);
}
.fog-near {
  background: radial-gradient(80% 30% at 30% 100%,
    rgba(136, 135, 132, .10), transparent 70%);
  animation: fog-drift 48s ease-in-out infinite alternate;
}
@keyframes fog-drift {
  from { transform: translateX(-2.5%); }
  to   { transform: translateX(2.5%); }
}

/* ── sections ── */
section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2.6rem 1.2rem;
}
h2 {
  display: flex; align-items: center; gap: .8rem;
  margin: 0 0 1.1rem;
  color: var(--dim);
  font-size: .85rem; font-weight: 400;
  letter-spacing: .3em; text-transform: uppercase;
}

h2::after { content: ""; flex: 1; height: 1px; background: var(--edge); opacity: .6; }

.hint { color: var(--dim); font-size: .8rem; }

/* ── the walk: graves as ledger rows ── */
.rows {
  display: flex; flex-direction: column;
  border: 1px solid var(--edge);
  border-radius: 4px;
  overflow: hidden;
}
.grave {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) max-content max-content max-content;
  grid-template-areas: "no name died buried chip";
  align-items: baseline;
  gap: .2rem 1.1rem;
  padding: .6rem .9rem;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(53, 50, 45, .45);
  text-decoration: none;
  font-size: .85rem;
  transition: background-color .12s ease-out, border-color .12s ease-out;
}
.grave:last-child { border-bottom: none; }
.grave:hover { background-color: var(--panel); }
.grave .plot-no {
  grid-area: no;
  color: var(--dim);
  font-size: .72rem; letter-spacing: .1em;
  white-space: nowrap;
  transition: color .12s ease-out;
}
.grave:hover .plot-no { color: var(--txt); }
.grave .name { grid-area: name; color: var(--txt); overflow-wrap: anywhere; }
/* money is the key number of the row, but the screen's one light is the total above */
.grave .buried {
  grid-area: buried; justify-self: end;
  color: var(--txt);
  font-size: .8rem;
  white-space: nowrap;
}
/* monument class = chip + left accent weight */
.grave:is(.crypt, .obelisk, .slab, .stone)::after {
  grid-area: chip; align-self: center;
  font-size: .6rem; letter-spacing: .14em;
  color: var(--dim);
  border: 1px solid var(--edge);
  border-radius: 3px;
  padding: .1rem .5rem;
}
.grave.crypt::after   { content: "CRYPT"; color: var(--txt); border-color: var(--dim); }
.grave.crypt          { border-left-color: var(--dim); }
.grave.obelisk::after { content: "OBELISK"; }
.grave.obelisk        { border-left-color: var(--edge); }
.grave.slab::after    { content: "SLAB"; }
.grave.stone::after   { content: "STONE"; }

@media (max-width: 620px) {
  .grave {
    grid-template-columns: 1fr max-content;
    grid-template-areas: "no chip" "name name" "buried buried";
    row-gap: .25rem;
  }
  .grave .buried { justify-self: start; }
}

/* ── what a wallet is holding (server.py dig_page) ──
   04.09: outer frame, header fill and zebra rows dropped. Rules hold the table
   together; no block inside a page carries its own background or border. */
table {
  width: 100%; min-width: 640px;
  border-collapse: collapse;
  font-size: .8rem;
}
th, td { text-align: left; padding: .45rem .8rem .45rem 0; }
thead th {
  color: var(--dim);
  font-weight: 400;
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--edge);
}

td {
  color: var(--txt);
  border-bottom: 1px solid var(--panel);
  transition: background-color .1s ease-out;
}

tbody tr:hover td { background-color: var(--panel); }
td:first-child { color: var(--dim); white-space: nowrap; }
th:nth-child(3), td:nth-child(3),
th:nth-child(4), td:nth-child(4) { text-align: right; }
td:nth-child(4) { white-space: nowrap; }
td:nth-child(5) {
  color: var(--dim);
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
}

/* ── status rows ── */
/* Plain statements of fact, not callout boxes: a rounded panel with a coloured
   left edge is the most template-looking device available, and it says nothing. */
.mass-grave p, .mint p { margin: 0; max-width: 46em; color: var(--dim); font-size: .95rem; }
.mint p { color: var(--txt); }
.mass-grave, .mint { padding-top: 1.6rem; padding-bottom: 1.6rem; }

/* ── dig ── */
.dig > p:first-of-type { color: var(--dim); font-size: .95rem; max-width: 46em; }
#digform { display: flex; flex-wrap: wrap; gap: .6rem; }
#digaddr {
  flex: 1 1 16rem; min-width: 0;
  font-family: var(--mono);
  font-size: 16px; /* 16px stops iOS focus zoom */
  color: var(--txt);
  background: var(--ground);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: .55rem .75rem;
  transition: border-color .15s ease-out;
}
#digaddr::placeholder { color: var(--dim); opacity: 1; }
#digaddr:focus { border-color: var(--txt); }
.dig button {
  font-family: var(--mono); font-size: .8rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--txt);
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: .55rem 1.3rem;
  cursor: pointer;
  transition: border-color .15s ease-out, background-color .15s ease-out,
              transform .1s ease-out;
}
.dig button:hover { border-color: var(--dim); background-color: var(--edge); }
.dig button:active { transform: scale(.97); }
/* error: loud without a new hue; display untouched so [hidden] keeps working */
#digerr { color: var(--txt); border-left: 2px solid var(--txt); padding-left: .6rem; }
#digerr::before { content: "! "; }

/* ── method ── */
.method {
  max-width: 1060px; margin: 0 auto;
  padding: 1.6rem 1.2rem 3rem;
  border-top: 1px solid var(--panel);
  color: var(--dim); font-size: .75rem;
}

/* ── single grave: the dossier ── */
.grave-single { max-width: 640px; margin: 0 auto; padding: 3.5rem 1.2rem 4rem; }
.grave-single .plot-no { margin: 0; font-size: .8rem; letter-spacing: .3em; }
.grave-single h1 {
  margin: .35rem 0 1.9rem;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  letter-spacing: .14em; line-height: 1.2;
  overflow-wrap: anywhere;
}
/* 04.09: the panel and the frame are gone. No block inside a page carries its own
   background, border or corner — the rows are held together by their rules alone. */
.protocol {
  display: grid; grid-template-columns: max-content 1fr;
  margin: 0 0 1.8rem;
  font-size: .85rem;
}
/* labels recede: quiet sans; data stays mono */
.protocol dt {
  padding: .5rem 1rem .5rem 0;
  color: var(--dim);
  font-family: var(--sans);
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  line-height: 2; /* optically matches the dd line box */
  border-top: 1px solid rgba(53, 50, 45, .6);
}
.protocol dd {
  margin: 0;
  padding: .5rem 0 .5rem 1rem;
  color: var(--txt);
  font-family: var(--mono);
  text-align: right;
  overflow-wrap: anywhere;
  border-top: 1px solid rgba(53, 50, 45, .6);
}
.protocol dt:first-of-type, .protocol dd:first-of-type { border-top: none; }
/* lifetime volume: ONE deliberate scale jump; the rest of the dl stays quiet */
.protocol dd.vol {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  line-height: 1.2;
  padding-top: .6rem;
  padding-bottom: .6rem;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  white-space: nowrap; /* a sum broken across two lines is two wrong numbers */
  text-shadow:
    0 0 2px  rgba(204, 255, 0, .50),
    0 0 14px rgba(204, 255, 0, .28),
    0 0 42px rgba(204, 255, 0, .12);
}
/* center the label against the oversized value; the element still
   stretches, so the row's border-top rule stays on the grid line */
.protocol dt:has(+ dd.vol) { display: flex; align-items: center; }
/* narrow paper: the label sits over the sum so the sum keeps its one line */
@media (max-width: 480px) {
  .protocol dt:has(+ dd.vol), .protocol dd.vol { grid-column: 1 / -1; }
  .protocol dd.vol { border-top: none; padding-top: 0; }
}

.back {
  display: inline-block;
  padding: .45rem .95rem;
  border: 1px solid var(--edge);
  border-radius: 4px;
  color: var(--dim);
  font-size: .8rem;
  text-decoration: none;
  transition: color .15s ease-out, border-color .15s ease-out;
}
.back:hover { color: var(--txt); border-color: var(--dim); }

/* ── reduced motion: keep color feedback, remove travel and scale ── */
@media (prefers-reduced-motion: reduce) {
  .fog-near { animation: none; }
  .dig button:active { transform: none; }
}

/* ── monument: the stone is drawn from the grave's own numbers ── */
.monument { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.monument svg { max-width: 100%; height: auto; }

/* Type size arrives from the data (build.py), so the sheet must not override it. */
.grave-single h1 { color: var(--txt); letter-spacing: .04em; line-height: 1.05; margin: .2rem 0 1.6rem; }
.gate h1 { color: var(--dim); font-weight: 400; }
.tagline { max-width: 44ch; }

.grave .died { grid-area: died; color: var(--dim); font-size: .75rem; white-space: nowrap; }
.sorter { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; }
.sorter button {
  background: none; border: 1px solid var(--edge); border-radius: 3px;
  color: var(--dim); font: inherit; font-size: .7rem; padding: .2rem .6rem; cursor: pointer;
  transition: color .12s ease-out, border-color .12s ease-out;
}
.sorter button:hover { color: var(--txt); }
.sorter button.on { color: var(--txt); border-color: var(--dim); }
@media (max-width: 620px) {
  .grave { grid-template-areas: "no chip" "name name" "died buried"; }
  .grave .buried { justify-self: end; }
}

/* ── the excavation wait: a machine reporting, not a spinner ── */
.dig-wait { max-width: 1060px; margin: 0 auto; padding: 3rem 1.2rem; }
.dig-wait h1.shaft { color: var(--txt); font-size: clamp(1.6rem, 5vw, 2.6rem); letter-spacing: .06em; margin: .3rem 0 2rem; }
.wait-grid { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.readout { align-content: start; }
.log {
  height: 22rem; overflow-y: auto; padding: .8rem 1rem;
  border: 1px solid var(--edge); background: var(--panel);
  font-size: .74rem; line-height: 1.7;
  scrollbar-width: thin; scrollbar-color: var(--edge) transparent;
}
.log .line { display: grid; grid-template-columns: 5.5rem 6.5rem 1fr; gap: .6rem; margin: 0; color: var(--dim); }
.log .line .c { color: var(--txt); }
.log .line.hit { color: var(--lime); text-shadow: 0 0 10px rgba(204, 255, 0, .25); }
.log .line.hit .c { color: var(--lime); }
.log .line.warn .x { color: var(--txt); }
@media (max-width: 720px) {
  .wait-grid { grid-template-columns: 1fr; }
  .log { height: 16rem; }
  .log .line { grid-template-columns: 4.6rem 1fr; }
  .log .line .c { display: none; }
}
.verdict { color: var(--txt); font-size: clamp(1.6rem, 4.5vw, 2.6rem); margin: 1.2rem 0 .4rem; letter-spacing: .02em; }
.grave-single .tagline { margin: 0 0 1.4rem; }

/* ── the total filing itself in: digit wheels, one visit only ── */
.counter.rolling { display: flex; justify-content: center; line-height: 1; }
.counter.rolling .cell { display: block; height: 1em; overflow: hidden; }
.counter.rolling .cell.fixed { overflow: visible; }
.counter.rolling .strip { display: block; will-change: transform; }
.counter.rolling .face { display: block; height: 1em; line-height: 1em; }

/* ── the plan: a survey sheet, not a picture ── */

/* ── the walk: a grave is never a dead end ──
   Two neighbours in money order, then the register. A footer row, because the
   page is one screen — fixed chrome earned nothing here. */
.walk-row { max-width: 640px; margin: 0 auto; padding: 0 1.2rem 4rem; font-size: .85rem; }
.walk-row p { margin: 0; }
.walk-row a { color: var(--dim); text-decoration: none; transition: color .12s ease-out; }
.walk-row a:hover { color: var(--txt); }
.walk-row .walk { display: flex; justify-content: space-between; gap: 1.2rem; padding-bottom: .9rem; }
.walk-row .walk a { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.walk-row .walk .next { text-align: right; }
.walk-row .walk .prev::before { content: "\2190\00a0"; }
.walk-row .walk .next::after  { content: "\00a0\2192"; }
.walk-row .walk b { font-weight: 400; color: var(--txt); font-size: .7rem; margin-right: .4rem; }
/* narrow: the two neighbours stack, so neither name is starved of width */
@media (max-width: 480px) {
  .walk-row .walk { flex-direction: column; gap: .35rem; }
  .walk-row .walk .next { text-align: left; }
}
.walk-row .links {
  display: flex; flex-wrap: wrap; gap: .4rem 1.4rem;
  padding-top: .9rem; border-top: 1px solid var(--edge);
}

/* ── the mint page: sixteen stones, one form ── */
.atlas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem .6rem; margin: 0 0 2.2rem; }
.atlas figure { margin: 0; text-align: center; }
.atlas svg { width: 100%; height: auto; display: block; }
.atlas figcaption { margin-top: .35rem; color: var(--dim); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.5; }
@media (max-width: 480px) { .atlas { grid-template-columns: repeat(2, 1fr); } }
.mint-page h2 { margin-top: 2.2rem; }
.mint-page .dig { padding: 0; margin: 0 0 .6rem; }
.examples a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--edge); margin-right: .7rem; transition: color .12s ease-out; }
.examples a:hover { color: var(--txt); }

/* ── posting a grave or a dig: intent links, no scripts from anyone ── */
.post { margin: 1.4rem 0 0; font-size: .8rem; color: var(--dim); }
.post a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--edge); transition: color .12s ease-out; }
.post a:hover { color: var(--txt); }

/* ── reserving a plot from a dig ── */
.reserve { margin: 1.8rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--edge); }
.reserve form { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.reserve .held { margin: 0; color: var(--txt); font-size: .8rem; letter-spacing: .2em; }
.walk-row.dig-nav { padding-top: 2.4rem; }

/* ── display face where the plates use it: the total, a grave's name, the mint's headline ── */
@media (min-width: 900px) { body { font-size: 17px; } }
.counter { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.grave-single h1 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; }
.mint-page { max-width: 1060px; }
.mint-page .protocol, .mint-page > p, .mint-page .dig { max-width: 640px; }

/* ── the cemetery plan: the survey sheet ─────────────────────────────────────
   Built from the plate CemeteryPlan.dc.html. The plate's light is money: the total
   and the crypt sums glow — the one place on the site with more than one light,
   because a sheet is one drawing, not a screen of rows. */
.eyebrow { margin: 0; color: var(--dim); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; }
.sheet { border: 1px solid var(--edge); background: #0f0c07; padding: 1.4rem 1.4rem 0; }
.sheet-head { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-start; padding-bottom: 1.2rem; border-bottom: 1px solid var(--edge); }
.sheet-title { margin: .35rem 0 .45rem; font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1; color: #d9d5cb; }
.sheet-total { text-align: right; }
.sheet-total .sum { margin: .35rem 0 .45rem; font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.plan { max-width: 1300px; }
.sheet-body { display: grid; grid-template-columns: minmax(0, 2.7fr) minmax(240px, 1fr); gap: 1.8rem; padding: 1.3rem 0 1.2rem; }
.band { margin-bottom: 1.3rem; }
.band-label {
  display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .7rem; padding: .4rem .55rem;
  font-size: .62rem; letter-spacing: .2em; color: var(--txt);
  border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge);
  background: repeating-linear-gradient(90deg, rgba(136, 135, 132, .07) 0 2px, transparent 2px 7px);
}
.band-label span:last-child { color: var(--dim); text-align: right; }
.plots { display: flex; flex-wrap: wrap; gap: .6rem; }
.plot {
  position: relative; display: grid; gap: .15rem; padding: .5rem .55rem .55rem;
  border: 1px solid var(--edge); background: linear-gradient(180deg, #17130d, #110e08);
  color: var(--dim); text-decoration: none; font-size: .62rem; letter-spacing: .12em;
  transition: border-color .12s ease-out;
}
.plot:hover { border-color: var(--dim); }
.plot .fp, .lg .fp {
  display: block; margin-bottom: .35rem;
  background: linear-gradient(135deg, #35322d, #1c180d);
  box-shadow: inset 0 0 0 1px #4a463c, inset 0 0 0 5px #17130d, inset 0 0 0 6px #35322d;
}
.plot.crypt { flex: 1 1 172px; max-width: 208px; }  .plot.crypt .fp { aspect-ratio: 4 / 1.9; }
.plot.obelisk { flex: 0 1 104px; }                   .plot.obelisk .fp { aspect-ratio: 1.15; }
.plot.slab { flex: 0 1 84px; }                       .plot.slab .fp { aspect-ratio: 3 / 2; }
.plot.stone { flex: 0 0 48px; padding: .3rem; }      .plot.stone .fp { aspect-ratio: 1; box-shadow: inset 0 0 0 1px #4a463c; }
.plot .cls { position: absolute; right: .55rem; top: .5rem; opacity: .6; }
.plot .nm { font-family: var(--display); font-weight: 600; font-size: .92rem; letter-spacing: .01em; color: #d9d5cb; line-height: 1.12; overflow-wrap: anywhere; }
.plot.obelisk .nm { font-size: .68rem; }
.plot .sum { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0; color: var(--txt); font-variant-numeric: tabular-nums; }
.plot.obelisk .sum, .plot.slab .sum { font-size: .72rem; }
.plot.deep::after {
  content: ""; position: absolute; right: .5rem; bottom: .55rem; width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 8px rgba(204, 255, 0, .6);
}
.plot.crypt.deep::after { bottom: auto; top: 2.2rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px rgba(204, 255, 0, .6); vertical-align: middle; margin-right: .4rem; }
.field { display: grid; grid-template-columns: repeat(var(--per-row), 1fr); gap: 3px; margin: 0 0 .5rem; }
.field i { display: block; aspect-ratio: 1 / 1.3; background: #26221a; box-shadow: inset 0 0 0 1px #35322d; }
.sheet-aside .rule { padding-bottom: .5rem; border-bottom: 1px solid var(--edge); margin: 0 0 .8rem; }
.sheet-aside .legend + .eyebrow { margin: .2rem 0 1.4rem; }
.legend { display: grid; gap: .55rem; margin-bottom: .8rem; }
.lg { display: grid; grid-template-columns: 46px 1fr auto; grid-template-rows: auto auto; column-gap: .8rem; align-items: center; }
.lg .fp { grid-row: 1 / 3; width: 46px; height: 30px; margin: 0; box-shadow: inset 0 0 0 1px #4a463c, inset 0 0 0 4px #17130d, inset 0 0 0 5px #35322d; }
.lg.obelisk .fp { width: 30px; height: 30px; }
.lg.slab .fp { height: 22px; }
.lg.stone .fp { width: 16px; height: 16px; box-shadow: inset 0 0 0 1px #4a463c; }
.lg.unmarked .fp { width: 46px; height: 14px; background: repeating-linear-gradient(90deg, #26221a 0 3px, transparent 3px 6px); box-shadow: none; }
.lg b { grid-column: 2; grid-row: 1; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; color: #d9d5cb; }
.lg .eyebrow { grid-column: 2; grid-row: 2; }
.lg .n { grid-column: 3; grid-row: 1 / 3; font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--txt); text-align: right; }
.schedule { list-style: none; margin: 0; padding: 0; }
.schedule li { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--panel); }
.schedule .no { font-size: .62rem; color: var(--dim); letter-spacing: .12em; }
.schedule .who, .schedule .amt { display: grid; gap: .15rem; }
.schedule .amt { text-align: right; }
.schedule b { font-family: var(--display); font-weight: 600; font-size: .9rem; color: #d9d5cb; letter-spacing: .02em; }
.schedule .sum { font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--txt); font-variant-numeric: tabular-nums; }
.sheet-foot { display: flex; flex-wrap: wrap; border-top: 1px solid var(--edge); margin: 0 -1.4rem; }
.sheet-foot div { flex: 1 1 150px; padding: .8rem 1.4rem; border-right: 1px solid var(--edge); display: grid; gap: .35rem; }
.sheet-foot div:last-child { border-right: none; }
.sheet-foot b { font-weight: 400; font-size: .85rem; color: var(--txt); letter-spacing: .08em; }
@media (max-width: 1100px) {
  .sheet { padding: 1rem 1rem 0; }
  .sheet-body { grid-template-columns: 1fr; }
  .sheet-head { flex-direction: column; gap: 1rem; }
  .sheet-total { text-align: left; }
  .sheet-foot { margin: 0 -1rem; }
  .field { --per-row: 15 !important; }
  .plot.crypt { flex: 1 1 140px; max-width: none; }
  .plot.obelisk { flex: 1 1 96px; }
}

/* ── the monument atlas: the plate ───────────────────────────────────────────
   Built from StoneAtlas.dc.html: one row per class, the stage across, a real grave
   named in every cell that has one, the decay parameters printed under the stone. */
.plate { display: grid; gap: 1.8rem; }
.plate-row { display: grid; grid-template-columns: 130px 1fr; gap: 1.2rem; align-items: start; }
.plate-class { text-align: right; padding-top: .3rem; }
.plate-class .roman { display: block; font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: .85; color: #35322d; }
.plate-class b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: .14em; color: #d9d5cb; margin-top: .5rem; }
.plate-class .eyebrow { margin-top: .45rem; font-size: .58rem; color: var(--txt); }
.cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.cell { margin: 0; background: #100d06; border: 1px solid #221e15; padding: .5rem .5rem .6rem; }
.cell svg { width: 100%; height: auto; display: block; }
.cell figcaption { display: grid; gap: .3rem; margin-top: .45rem; text-align: left; }
.cell .row { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.cell .no { font-size: .6rem; letter-spacing: .18em; color: var(--txt); text-transform: uppercase; }
.cell .nm { font-family: var(--display); font-weight: 600; font-size: .9rem; color: #d9d5cb; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .none { font-size: .58rem; letter-spacing: .14em; color: var(--dim); }
.cell .params { font-size: .55rem; letter-spacing: .04em; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .plate-row { grid-template-columns: 1fr; }
  .plate-class { text-align: left; }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── the plates list (review only) ── */
.plates { margin: 1.4rem 0 0; padding: 0 0 0 1.2rem; display: grid; gap: .55rem; font-size: .95rem; }
.plates a { color: var(--txt); text-decoration: none; border-bottom: 1px solid var(--edge); }
.plates a:hover { color: var(--lime); }

/* ── first screen: four figures, eight stones, the drop ──
   Added 04.09 with the structure pass. Deliberately plain: colour, type and spacing
   all come from tokens already defined above, so the look stays open for the design
   pass. No block here gets its own frame, background, header or footer. */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.1rem 2rem;
  margin: 1.8rem 0 0;
  width: 100%;
  max-width: 60em;
}
.tile b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.1rem, 3.2vw, 1.6rem);
  letter-spacing: -.01em;
  color: var(--txt);
}
.tile span { display: block; margin-inline: auto; color: var(--dim); font-size: .78rem; line-height: 1.35; max-width: 22ch; }

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  margin: 1.4rem 0 0;
  width: 100%;
  justify-content: center;
  max-width: 60em;
}
.strip svg { width: 120px; height: auto; flex: 0 0 auto; }

.drop { margin: 1.6rem 0 .6rem; max-width: 44ch; font-size: .95rem; }
.drop-act { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.6rem; }
.cta {
  display: inline-block;
  padding: .55rem 1.1rem;
  border: 1px solid var(--edge);
  color: var(--txt);
  text-decoration: none;
  font-size: .9rem;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}
.cta:hover { border-color: var(--dim); background-color: var(--edge); }
.cta:active { transform: scale(.97); }

.steps { margin: 0; padding-left: 1.4em; max-width: 52em; }
.steps li { margin: 0 0 .7rem; }

@media (max-width: 560px) {
  .strip svg { width: 84px; }
  /* two columns, not four stacked: the drop line has to stay reachable */
  .tiles { grid-template-columns: 1fr 1fr; gap: 1.1rem 1rem; }
  .tile span { max-width: 18ch; }
}

/* the grave's one sentence: what a reader repeats to someone else */
.lede { margin: .8rem auto 1.6rem; max-width: 46ch; font-size: 1rem; line-height: 1.5; }
.grave-single .drop { margin: 1.8rem auto .8rem; }
.grave-single .drop-act { justify-content: center; }

/* ── the gate: the drawn first screen, ported from the board of 01.09 ──
   The board carried its own font classes; they map onto the site's faces here so the
   artwork makes no request of its own. It scales by its viewBox, so it fits any width
   without a media query. */
/* The board is a landscape poster. Shrunk to a phone its labels fall to two pixels and
   stop being readable — measured 04.09 — so below 900px the text twin takes over and the
   poster steps aside. Both are built from the same figures, so they cannot disagree. */
.gate-art { display: block; margin: 0 auto; max-width: 1440px; }
.gate-text { display: none; }
@media (max-width: 900px) {
  .gate-art { display: none; }
  .gate-text { display: flex; }
}
.gate-art svg { display: block; width: 100%; height: auto; }
.gate-art .display { font-family: var(--display); }
.gate-art .mono { font-family: var(--mono); }

.drop-band {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.2rem 2.6rem;
  border-bottom: 1px solid var(--edge);
}
.drop-band .drop { max-width: 52ch; }

/* ── the certificate of death, ported from the board of 01.09 ──
   The drawn frame is one shared file the browser caches; each grave adds only its own
   text over it. It is a fixed 900×1240 sheet, so it scales as a whole rather than
   reflowing: a certificate that reflows is not a certificate. */
/* The sheet is 900px and the grave's column is 640px. It breaks out of the column and
   centres in the viewport rather than being cut off by it; below its own width it scales
   down whole, because a certificate that reflows stops being a certificate. */
.cert-wrap {
  margin: 2.4rem 0 1.6rem;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50vw);
  display: flex;
  justify-content: center;
}
.certificate {
  position: relative;
  width: 900px; height: 1240px;
  margin: 0 auto;
  font-kerning: normal;
}
.certificate .display { font-family: var(--display); }
.certificate .mono { font-family: var(--mono); }
.cert-frame { display: block; width: 900px; height: 1240px; }
.cert-label { color: var(--dim); font-size: 10px; letter-spacing: .19em; white-space: nowrap; }
.cert-lead { flex: 1; border-bottom: 1.5px dotted rgba(136,135,132,.5); margin: 0 16px; transform: translateY(-4px); }
.cert-value { color: #d9d5cb; font-size: 13.5px; letter-spacing: .05em; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* The sheet is a fixed 900x1240 and must shrink whole. calc(100vw / 900) does not give a
   scale factor — dividing a length by a number yields a length, so the transform was
   silently dropped and the certificate hung off both edges. Explicit steps instead, each
   with the wrapper height its scale leaves behind. */
@media (max-width: 940px) {
  .cert-wrap { overflow: hidden; height: 992px; }
  .certificate { transform: scale(.8); transform-origin: top center; }
}
@media (max-width: 760px) {
  .cert-wrap { height: 744px; }
  .certificate { transform: scale(.6); }
}
@media (max-width: 560px) {
  .cert-wrap { height: 545px; }
  .certificate { transform: scale(.44); }
}
@media (max-width: 420px) {
  .cert-wrap { height: 447px; }
  .certificate { transform: scale(.36); }
}
