/* BadCopper: the Department of Grievances.
   Physical objects (tablets, manila forms, tickets, stamps) keep their real colours in dark mode.
   Regulation-green walls, manila forms, real clay. One relief per page; no live text on reliefs. */

@font-face { font-family: "Cuneiform"; src: url(/fonts/cuneiform-sub.woff2) format("woff2"); unicode-range: U+12000-123FF; font-display: swap; }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap;
  src: url(/fonts/cinzel-700.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400 600; font-display: swap;
  src: url(/fonts/sourceserif4.woff2) format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 400; font-display: swap;
  src: url(/fonts/courierprime-400.woff2) format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 700; font-display: swap;
  src: url(/fonts/courierprime-700.woff2) format("woff2"); }

:root {
  --wall: #E3EBE3;
  --wall-2: #D3DFD5;
  --manila: #F2E4BE;
  --manila-edge: #D9C690;
  --ink: #1F2A24;
  --ink-soft: #4A5A51;
  --rule: #B5C6BA;
  --copper: #8F4A1A;
  --terracotta: #A8461F;
  --terracotta-hover: #8F3A17;
  --on-terracotta: #FFF8EE;
  --verdigris: #2F6E61;
  --stamp: #A3241B;
  --gold: #D4A62A;
  --focus: #1D5E52;
  --shadow: 30 40 34;

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --form: "Courier Prime", "Courier New", ui-monospace, monospace;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --max: 1120px;
  --radius: 4px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #101814;
    --wall-2: #18231E;
    --ink: #E4ECE6;
    --ink-soft: #A9BBB1;
    --rule: #2C3A33;
    --copper: #E09A5C;
    --verdigris: #6FC2AE;
    --stamp: #E0675C;
    --focus: #8FD9C6;
    --shadow: 0 0 0;
    color-scheme: dark;
  }
}

/* ── base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--copper); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: .01em; }
h1 { font-size: clamp(1.55rem, 1rem + 2.6vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 50; background: var(--ink); color: var(--wall); padding: .6rem 1rem; font-family: var(--form); }
.skip:focus { top: .5rem; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band--alt { background: var(--wall-2); }
.stack { display: grid; gap: 1rem; }
.measure { max-width: 62ch; }
.eyebrow { font: 700 .78rem/1.3 var(--form); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 52ch; }
.small { font-size: .9rem; color: var(--ink-soft); }
.form-text { font-family: var(--form); }
.section-head { display: grid; gap: .6rem; margin-bottom: 2rem; max-width: 60ch; }

/* ── buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.35rem;
  font: 700 1rem/1.1 var(--form); letter-spacing: .03em;
  border: 2px solid transparent; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--terracotta); color: var(--on-terracotta); box-shadow: 0 3px 0 rgb(80 25 5 / .55); }
.btn--primary:hover { background: var(--terracotta-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: rgb(var(--shadow) / .07); }
.btn--small { min-height: 40px; padding: .5rem .85rem; font-size: .88rem; white-space: nowrap; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ── header / footer ──────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--wall) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: grid; text-decoration: none; color: var(--ink); line-height: 1; gap: .2rem; }
.brand__name { font: 700 1.3rem/1 var(--display); letter-spacing: .03em; }
.brand__dept { font: 400 .68rem/1 var(--form); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.4rem); font-family: var(--form); font-size: .95rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: .5rem .1rem; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { text-decoration: underline; }
@media (max-width: 759px) { .nav .nav__cta { display: none; } }
@media (max-width: 360px) { .brand__name { font-size: 1.15rem; } }

.site-foot { --focus: var(--wall); background: var(--ink); color: var(--wall); padding-block: 3rem 2.5rem; font-size: .92rem; }
.site-foot a { color: inherit; }
.site-foot__grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .site-foot__grid { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.site-foot__pledge { font: 700 1.05rem/1.4 var(--form); }
.site-foot__links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-family: var(--form); }
.site-foot__fine { font-size: .82rem; opacity: .85; display: grid; gap: .5rem; max-width: 70ch; }

/* ── hero ─────────────────────────────────────────── */
.hero { position: relative; }
.hero__art { position: relative; background: #B97A55; }
.hero__art img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 28%; }
@media (min-width: 760px) { .hero__art img { aspect-ratio: auto; height: min(44vh, 420px); object-position: 50% 45%; } }
.hero__panel {
  position: relative; margin-top: -2.25rem;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-bottom: 1rem;
}
.hero__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
@media (min-width: 760px) {
  .hero__panel {
    margin-top: -4.5rem; padding: 1.6rem 2.25rem 2rem;
    background: var(--wall); border-radius: var(--radius);
    box-shadow: 0 20px 40px -24px rgb(var(--shadow) / .45);
  }
}
@media (min-width: 1000px) {
  .hero__panel { grid-template-columns: minmax(0, 1fr) 250px; gap: 2.5rem; align-items: center; }
  .hero__panel .record { grid-template-columns: 1fr; justify-items: center; text-align: center; border-left: 1px solid var(--rule); padding-left: 2rem; }
  .hero__panel .record img { width: 150px; height: 150px; }
}
.hero__sub { font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); color: var(--ink-soft); }
.record {
  display: grid; grid-template-columns: 56px 1fr; gap: .85rem; align-items: center;
  font-size: .95rem; max-width: 46ch;
}
.record img { width: 56px; height: 56px; }

/* ticket chip */
.ticket {
  justify-self: start; width: fit-content; max-width: 100%; position: relative;
  display: inline-grid; grid-template-columns: auto auto; column-gap: .9rem; align-items: center;
  padding: .55rem .95rem .6rem; background: var(--manila); color: #2B2416;
  border-radius: 3px; font-family: var(--form);
  box-shadow: 0 6px 14px -6px rgb(30 25 15 / .45);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 7px, #000 7.5px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 50%, transparent 7px, #000 7.5px) right / 51% 100% no-repeat;
          mask: radial-gradient(circle at 0 50%, transparent 7px, #000 7.5px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 50%, transparent 7px, #000 7.5px) right / 51% 100% no-repeat;
}
.ticket__label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; grid-row: 1; }
.ticket__num { grid-row: 1 / span 2; grid-column: 2; font: 700 2rem/1 var(--form); color: #A3241B; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.ticket__wait { font-size: .72rem; grid-row: 2; color: #5A4E36; }
.ticket__num.is-flip { animation: flip .6s steps(6) both; }

/* ── window 3: editor ─────────────────────────────── */
.window { display: grid; gap: 1.5rem; justify-items: center; }
.window__head { text-align: center; display: grid; gap: .4rem; justify-items: center; }
.window__grid { display: grid; gap: 1.25rem; width: 100%; max-width: 640px; }
@media (min-width: 1000px) {
  .window__grid { max-width: 940px; grid-template-columns: minmax(0, 620px) 260px; align-items: start; }
}

/* ── the tablet ───────────────────────────────────── */
.tablet {
  --clay-ink: #1E1A16;
  position: relative; isolation: isolate;
  width: 100%; max-width: 620px;
  display: grid; gap: .8rem;
  padding: clamp(1.25rem, 4.5vw, 2.1rem) clamp(1.15rem, 4.5vw, 2.25rem) clamp(1.2rem, 4vw, 1.8rem);
  border-radius: 34px 28px 38px 30px / 30px 38px 28px 40px;
  color: var(--clay-ink);
  font-family: var(--body);
  text-shadow: 0 1px 0 rgb(255 255 255 / .32);
  box-shadow:
    inset 5px 7px 12px rgb(255 255 255 / .28),
    inset -7px -9px 16px rgb(0 0 0 / .26),
    0 22px 36px -18px rgb(25 20 15 / .55);
}
.tablet--wet {
  background:
    linear-gradient(160deg, rgb(255 255 255 / .34), rgb(255 255 255 / .16) 45%, rgb(0 0 0 / .06)),
    url(/img/tex-wet.webp) center / cover,
    #9A938B;
}
.tablet--wet::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / .26) 50%, transparent 62%) 0 0 / 260% 100% no-repeat;
  animation: sheen 7s ease-in-out infinite;
}
.tablet--fired {
  --clay-ink: #2A1206;
  background:
    linear-gradient(160deg, rgb(255 236 214 / .22), transparent 50%, rgb(90 25 0 / .2)),
    url(/img/tex-fired.webp) center / cover,
    #D9804A;
  box-shadow:
    inset 4px 6px 10px rgb(255 230 200 / .25),
    inset -6px -8px 14px rgb(80 20 0 / .3),
    0 22px 36px -18px rgb(60 20 5 / .6);
}
.tablet--fired::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: .35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%235a1d05' stroke-width='.8'%3E%3Cpath d='M0 92l38 6 22-14 31 9'/%3E%3Cpath d='M400 214l-41-5-18 17-36-6-12 9'/%3E%3Cpath d='M262 0l-6 24 11 18-4 21'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100%;
}
.tablet__head { display: flex; justify-content: space-between; gap: 1rem; font: 700 .72rem/1.2 var(--form); letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.tablet__wedges {
  height: 12px; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='12' viewBox='0 0 44 12'%3E%3Cg fill='%23000'%3E%3Cpath d='M2 1l6 2.2L2 5.4z'/%3E%3Cpath d='M12 6l5 2-5 2z'/%3E%3Cpath d='M20 1h2v10h-2z' opacity='.7'/%3E%3Cpath d='M26 2l7 2.5L26 7z'/%3E%3Cpath d='M37 6l5 2-5 2z'/%3E%3C/g%3E%3C/svg%3E") left center / 44px 12px repeat-x;
  mix-blend-mode: multiply;
}
.tablet__cuneiform { font: 1.35rem/1.2 "Cuneiform", serif; letter-spacing: .12em; opacity: .78; mix-blend-mode: multiply; text-shadow: 0 1px 0 rgb(255 255 255 / .3); }
.tablet--card .tablet__cuneiform { font-size: 1.05rem; }
.tablet--long .tablet__text { font-size: clamp(.95rem, .9rem + .25vw, 1.05rem); line-height: 1.5; }
.tablet__to { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.tablet__label { font: 700 .74rem/1 var(--form); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.tablet__recipient { font: 700 clamp(1.25rem, 1rem + 1.4vw, 1.75rem)/1.15 var(--display); overflow-wrap: anywhere; }
.tablet__text { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 4.6em; }
.tablet__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font: 400 .85rem/1.2 var(--form); margin-top: .3rem; }
.tablet__seal {
  display: inline-grid; place-items: center; min-width: 3.4rem; min-height: 3.4rem; padding: .4rem .7rem;
  border-radius: 999px; border: 2px solid currentColor; font: 700 .8rem/1.1 var(--form); text-align: center;
  box-shadow: inset 2px 2px 4px rgb(0 0 0 / .18), inset -2px -2px 3px rgb(255 255 255 / .2);
  max-width: 60%; overflow-wrap: anywhere;
}
.tablet__seal:empty::before { content: "unsealed"; opacity: .6; font-weight: 400; }
.tablet--card { gap: .55rem; padding: 1.1rem 1.2rem 1rem; border-radius: 24px 20px 26px 22px / 22px 26px 20px 28px; }
.tablet--card .tablet__recipient { font-size: 1.15rem; }
.tablet--card .tablet__text { font-size: 1rem; min-height: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* editor variant: the inputs are carved into the clay */
.tablet--editor { gap: 1rem; }
.carve-field { display: grid; gap: .3rem; }
.carve-field label { font: 700 .74rem/1 var(--form); letter-spacing: .14em; text-transform: uppercase; display: flex; justify-content: space-between; gap: .5rem; }
.carve-field .count { font-weight: 400; letter-spacing: .04em; opacity: .85; font-variant-numeric: tabular-nums; }
.carve-field input, .carve-field textarea {
  width: 100%; background: rgb(0 0 0 / .07); color: var(--clay-ink);
  box-shadow: inset 0 2px 4px rgb(0 0 0 / .22), inset 0 -1px 0 rgb(255 255 255 / .25);
  border: 0; border-bottom: 2px dashed rgb(30 26 22 / .5); border-radius: 6px 6px 0 0;
  padding: .45rem .35rem; caret-color: #5A1D05;
  text-shadow: inherit;
}
.carve-field input { font: 700 clamp(1.2rem, 1rem + 1.2vw, 1.6rem)/1.2 var(--display); }
.carve-field textarea { font: 400 clamp(1.05rem, 1rem + .3vw, 1.2rem)/1.55 var(--body); resize: none; min-height: 7.5em; field-sizing: content; }
.carve-field input::placeholder, .carve-field textarea::placeholder { color: rgb(30 26 22 / .66); text-shadow: none; }
.carve-field input:focus-visible, .carve-field textarea:focus-visible {
  outline: 3px solid #12302A; outline-offset: 2px; border-bottom-style: solid; background: rgb(255 255 255 / .2);
}
.carve-field [aria-invalid="true"] { border-bottom-color: #8E1B12; border-bottom-style: solid; }
.carve-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 520px) { .carve-row { grid-template-columns: 1fr minmax(0, 14rem); align-items: end; } }
.carve-seal input { font: 700 1rem/1.2 var(--form); }

.tablet.is-drying::after { animation: none; opacity: 0; transition: opacity .6s; }
.tablet.is-drying { animation: dry 1.2s ease forwards; }

/* stamps */
.stamp {
  position: absolute; z-index: 2; pointer-events: none;
  font: 700 .72rem/1.1 var(--form); letter-spacing: .14em; text-transform: uppercase; text-shadow: none; white-space: nowrap;
  color: #8E1B12; border: 3px solid currentColor; padding: .35rem .6rem; border-radius: 4px;
  background: rgb(255 255 255 / .08);
  mix-blend-mode: multiply;
}
.stamp--unfired { top: .7rem; right: .9rem; transform: rotate(6deg); }
.tablet--wet .tablet__head span:last-child { visibility: hidden; }
.stamp--received {
  right: .9rem; bottom: .7rem; width: 6rem; height: 6rem; border-radius: 50%; white-space: normal;
  display: grid; place-content: center; text-align: center; padding: .4rem; gap: .15rem;
  outline: 2px solid currentColor; outline-offset: -7px; transform: rotate(-12deg); color: #6E1609;
}
.stamp--received b { font-size: .68rem; letter-spacing: .08em; }
.stamp--received small { font-size: .44rem; letter-spacing: .06em; line-height: 1.2; max-width: 4.2rem; }
.tablet--fired .tablet__foot { justify-content: flex-start; padding-right: 6rem; flex-wrap: wrap; }
.stamp.is-landing { animation: thunk .45s cubic-bezier(.2, .9, .3, 1.3) both; }
.tablet--card .stamp--received { width: 4.2rem; height: 4.2rem; bottom: .5rem; right: .6rem; outline-offset: -5px; }
.tablet--card .stamp--received b { font-size: .6rem; }
.tablet--card .stamp--received small { font-size: .4rem; }
.tablet--card.tablet--fired .tablet__foot { padding-right: 4.6rem; }

/* ── Gimil-Sin ────────────────────────────────────── */
.clerk { display: grid; grid-template-columns: 76px 1fr; gap: .75rem; align-items: end; max-width: 620px; width: 100%; }
@media (min-width: 1000px) { .clerk { grid-template-columns: 1fr; position: sticky; top: 6rem; } }
.clerk__fig {
  width: 76px; aspect-ratio: 3 / 4; background: var(--ink);
  -webkit-mask: var(--pose, url(/img/gimil-neutral.webp)) center bottom / contain no-repeat;
          mask: var(--pose, url(/img/gimil-neutral.webp)) center bottom / contain no-repeat;
}
@media (min-width: 1000px) { .clerk__fig { width: 180px; justify-self: center; order: 2; } }
.clerk[data-pose="refuse"] { --pose: url(/img/gimil-refuse.webp); }
.clerk[data-pose="stamp"] { --pose: url(/img/gimil-stamp.webp); }
.clerk[data-pose="shrug"] { --pose: url(/img/gimil-shrug.webp); }
.clerk[data-pose="point"] { --pose: url(/img/gimil-point.webp); }
.clerk[data-pose="asleep"] { --pose: url(/img/gimil-asleep.webp); }
.clerk__bubble {
  position: relative; background: var(--manila); color: #2B2416; border-radius: 10px;
  padding: .75rem .95rem; font: 400 .95rem/1.45 var(--form);
  box-shadow: 0 6px 16px -10px rgb(30 25 15 / .5);
}
.clerk__bubble::before {
  content: ""; position: absolute; left: -9px; bottom: 14px; border: 9px solid transparent; border-left: 0; border-right-color: var(--manila);
}
@media (min-width: 1000px) { .clerk__bubble::before { left: 50%; bottom: -9px; border: 9px solid transparent; border-bottom: 0; border-top-color: var(--manila); transform: translateX(-50%); } }
.clerk__name { display: block; font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #6B5B38; margin-bottom: .2rem; }
.clerk[data-pose="refuse"] .clerk__bubble { outline: 2px solid #A3241B; }

.submit-row { display: grid; gap: .6rem; justify-items: center; text-align: center; }
.submit-row .small strong { color: var(--verdigris); }

/* ── terms strip ──────────────────────────────────── */
.terms { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.term {
  background: var(--manila); color: #2B2416; padding: 1.3rem 1.25rem 1.2rem; border-radius: 3px;
  display: grid; gap: .45rem; align-content: start; border-top: 3px dotted #8C7A4E;
}
.term__big { font: 700 1.25rem/1.25 var(--form); }
.term p { font-size: .98rem; }
.term a { color: #7A3C12; }
.house-rules { margin-top: 1.25rem; font-family: var(--form); font-size: .95rem; }

/* ── how it works ─────────────────────────────────── */
.steps { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.step { display: grid; gap: .7rem; align-content: start; }
.step img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; width: 100%; background: #B97A55; }
.step h3 { font-family: var(--form); font-size: 1.05rem; letter-spacing: .02em; }
.step h3 span { color: var(--terracotta); }

/* ── hall / cards ─────────────────────────────────── */
.counter-line { font: 700 1rem/1.4 var(--form); }
.counter-line b { color: var(--stamp); font-variant-numeric: tabular-nums; }
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; }
.card-link { display: block; text-decoration: none; color: inherit; border-radius: 24px; }
.card-link:hover .tablet { transform: translateY(-2px); }
.card-link .tablet { transition: transform .15s; }
.card-meta { display: flex; justify-content: space-between; gap: 1rem; font: .85rem/1.3 var(--form); color: var(--ink-soft); padding: .55rem .4rem 0; }
.empty { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: center; max-width: 560px; }
.empty .clerk__fig { width: 90px; }
.tabs { display: flex; gap: .4rem; border-bottom: 2px solid var(--rule); margin-bottom: 1.5rem; font-family: var(--form); }
.tabs a { white-space: nowrap; padding: .6rem 1rem; text-decoration: none; color: var(--ink-soft); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--terracotta); font-weight: 700; }
.loader { font: .9rem var(--form); color: var(--ink-soft); padding: 1rem 0; text-align: center; }

/* ── case #1 ──────────────────────────────────────── */
.case { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 860px) { .case { grid-template-columns: minmax(0, 380px) 1fr; } }
.case figure { margin: 0; display: grid; gap: .5rem; }
.case figure img { border-radius: var(--radius); width: 100%; }
.case figcaption { font: .8rem/1.4 var(--form); color: var(--ink-soft); }
.paraphrase { border-left: 3px solid var(--verdigris); padding-left: 1rem; font-size: 1.08rem; display: grid; gap: .6rem; }
.paraphrase small { font: .82rem/1.4 var(--form); color: var(--ink-soft); }

/* ── FAQ ──────────────────────────────────────────── */
.faq { display: grid; gap: .6rem; max-width: 760px; }
.faq details { background: var(--wall-2); border-radius: var(--radius); padding: 0 1.1rem; }
.band--alt .faq details { background: var(--wall); }
.faq summary { cursor: pointer; padding: 1rem 0; font: 700 1.02rem/1.35 var(--form); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--terracotta); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 1.1rem; display: grid; gap: .6rem; max-width: 64ch; }

/* ── claim stub ───────────────────────────────────── */
.stub, .record-table, .notice, .term { --focus: #1D5E52; }
.stub {
  position: relative; width: 100%; max-width: 620px;
  background: var(--manila); color: #2B2416; border-radius: 4px;
  padding: 1.4rem 1.3rem 1.3rem; display: grid; gap: .9rem; font-family: var(--form);
  box-shadow: 0 10px 24px -16px rgb(30 25 15 / .6);
}
.stub::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: -1px; height: 2px;
  background: repeating-linear-gradient(90deg, #8C7A4E 0 8px, transparent 8px 14px);
}
.stub a { color: #7A3C12; }
.stub__rows { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; font-size: .92rem; }
.stub__rows dt { color: #6B5B38; }
.stub__rows dd { margin: 0; font-weight: 700; }
.stub__token { display: grid; gap: .35rem; padding-top: .85rem; border-top: 2px dashed #B8A472; font-size: .88rem; }
.stub__token input { width: 100%; font: .82rem var(--form); padding: .55rem; border: 1px solid #B8A472; background: #FBF4DF; color: #2B2416; border-radius: 3px; }
.stub .btn--ghost { color: #2B2416; border-color: #2B2416; }

.viewer-note { font-size: 1.05rem; text-align: center; }

/* ── kiln panel ───────────────────────────────────── */
.kiln { width: 100%; max-width: 620px; background: var(--wall-2); border-radius: var(--radius); overflow: hidden; display: grid; }
.kiln img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.kiln__body { padding: 1.2rem 1.25rem 1.4rem; display: grid; gap: .9rem; }
.kiln__body > label { display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; align-items: start; font-size: .98rem; }
.kiln__body input[type="checkbox"] { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--terracotta); }
.kiln__closed { border-left: 4px solid var(--stamp); padding-left: .9rem; }
.fire-flow { display: grid; gap: .7rem; font-size: .98rem; min-width: 0; overflow-wrap: anywhere; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.fire-flow input { width: 100%; min-width: 0; min-height: 44px; padding: .65rem .75rem; font: 1rem var(--form); color: var(--ink); background: var(--wall); border: 2px solid var(--rule); border-radius: var(--radius); }
.fire-flow:empty { display: none; }
.fire-flow--error { border-left: 4px solid var(--stamp); padding-left: .9rem; }
.fire-flow--ok { border-left: 4px solid var(--verdigris); padding-left: .9rem; }
.fire-flow__q { font: 700 1rem var(--form); }
.wallet-list { display: grid; gap: .5rem; }
.wallet-opt {
  display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .65rem .9rem; text-align: left;
  font: 1rem var(--body); color: var(--ink); background: var(--wall); border: 2px solid var(--rule);
  border-radius: var(--radius); cursor: pointer; text-decoration: none;
}
.wallet-opt:hover, .wallet-opt:focus-visible { border-color: var(--terracotta); }
.wallet-opt img { width: 28px; height: 28px; aspect-ratio: auto; object-fit: contain; border-radius: 6px; flex: none; }
.wallet-opt span { display: grid; gap: .1rem; }
.wallet-opt small { color: var(--ink-soft); font-size: .86rem; }
.btn[aria-busy="true"] { cursor: progress; opacity: .75; }
.stub-note { font: .78rem/1.4 var(--form); color: var(--ink-soft); border: 1px dashed var(--rule); padding: .4rem .6rem; }
.tablet.is-firing { animation: fire 2.4s ease forwards; }
.tablet.is-firing::before {
  content: ""; position: absolute; inset: -18px; border-radius: 40px; z-index: -2;
  background: radial-gradient(closest-side, rgb(255 140 40 / .65), transparent);
  animation: glow 1.2s ease-in-out infinite alternate;
}

/* ── object record (fired page) ───────────────────── */
.original { width: 100%; max-width: 620px; border: 2px solid var(--rule); border-radius: var(--radius); padding: 0 1.1rem; }
.original summary { cursor: pointer; padding: .9rem 0; font: 700 1rem var(--form); }
.original pre { margin: 0 0 1rem; white-space: pre-wrap; font: .95rem/1.55 var(--body); font-style: italic; overflow-wrap: anywhere; }
.original p { font-size: .9rem; color: var(--ink-soft); margin: 0 0 1rem; }
.record-figure { width: 100%; max-width: 620px; display: grid; gap: .4rem; justify-items: center; }
.record-figure img { width: min(100%, 300px); height: auto; border-radius: var(--radius); }
.record-figure figcaption { font: .8rem/1.4 var(--form); color: var(--ink-soft); text-align: center; }
.record-table { width: 100%; max-width: 620px; background: var(--manila); color: #2B2416; border-radius: 4px; padding: 1.2rem 1.25rem; font-family: var(--form); }
.record-table a { color: #7A3C12; }
.receipt .btn--ghost { color: #2B2416; border-color: #2B2416; margin-top: 1rem; }
.receipt-status { white-space: pre-line; overflow-wrap: anywhere; }
.record-table h2 { font: 700 .8rem/1.2 var(--form); letter-spacing: .16em; text-transform: uppercase; margin-bottom: .8rem; color: #6B5B38; }
.record-table dl { display: grid; grid-template-columns: minmax(7.5rem, max-content) 1fr; gap: .45rem 1rem; margin: 0; font-size: .93rem; }
.record-table dt { color: #6B5B38; }
.record-table dd { margin: 0; overflow-wrap: anywhere; }
.provenance { width: 100%; max-width: 620px; border: 2px solid var(--rule); border-radius: var(--radius); padding: 0 1.1rem; }
.provenance summary { cursor: pointer; padding: .9rem 0; font: 700 1rem var(--form); }
.provenance ul { margin: 0 0 1rem; padding-left: 1.1rem; display: grid; gap: .45rem; font-size: .95rem; overflow-wrap: anywhere; }
.shamash {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: .6rem 1.1rem;
  font: 700 1rem var(--form); color: var(--ink); background: transparent; border: 2px solid var(--verdigris);
  border-radius: 999px; cursor: pointer;
}
.shamash svg { width: 1.4rem; height: 1.4rem; color: var(--verdigris); transition: transform .3s; }
.shamash:hover svg, .shamash[aria-pressed="true"] svg { transform: rotate(90deg); }
.shamash[aria-pressed="true"] { background: color-mix(in srgb, var(--verdigris) 14%, transparent); }
.shamash b { font-variant-numeric: tabular-nums; }
.share { display: flex; flex-wrap: wrap; gap: .5rem; }
.share a, .share button {
  font: 700 .9rem var(--form); padding: .55rem .8rem; min-height: 44px; display: inline-flex; align-items: center;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
}
.share a:hover, .share button:hover { background: rgb(var(--shadow) / .07); }
.stub .share a, .stub .share button { color: #2B2416; border-color: #2B2416; }
.page-col { display: grid; gap: 1.5rem; justify-items: center; }
.page-col > * { width: 100%; max-width: 620px; }
.page-col > .tablet { justify-self: center; }
.cert { text-align: center; display: grid; gap: .5rem; }

/* ── notices / prose pages ────────────────────────── */
.page-hero { display: grid; gap: 1rem; }
.page-hero img { border-radius: var(--radius); width: 100%; }
.prose { display: grid; gap: 1rem; max-width: 66ch; }
.prose h2 { margin-top: 1.5rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.25rem; display: grid; gap: .45rem; }
.notice { background: var(--manila); color: #2B2416; border-radius: 4px; padding: 1.5rem 1.4rem; max-width: 760px; display: grid; gap: 1rem; }
.notice ol { margin: 0; padding-left: 1.4rem; display: grid; gap: .7rem; font-size: 1.04rem; }
.notice a { color: #7A3C12; }
.notice h2 { font: 700 .85rem/1.2 var(--form); letter-spacing: .16em; text-transform: uppercase; color: #6B5B38; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.checks li::before { content: "✓"; color: var(--verdigris); font-weight: 700; margin-right: .55rem; }
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.form-card { display: grid; gap: 1rem; max-width: 560px; }
.form-card label { display: grid; gap: .35rem; font: 700 .9rem var(--form); }
.form-card textarea, .form-card input { font: 1rem var(--body); padding: .7rem; border: 2px solid var(--rule); border-radius: var(--radius); background: var(--wall); color: var(--ink); }
.form-card textarea { min-height: 8rem; }

/* ── motion ───────────────────────────────────────── */
@keyframes sheen { 0%, 55% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
@keyframes dry { to { filter: brightness(1.12) saturate(.85); } }
@keyframes thunk { 0% { transform: scale(1.5) rotate(0deg); opacity: 0; } 70% { opacity: 1; } 100% { transform: scale(1) rotate(var(--rot, 6deg)); opacity: 1; } }
.stamp--received.is-landing { --rot: -12deg; }
@keyframes flip { from { opacity: .2; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes fire { 0% { filter: none; } 40% { filter: brightness(1.35) saturate(1.4) hue-rotate(-12deg); } 100% { filter: none; } }
@keyframes glow { from { opacity: .45; transform: scale(.96); } to { opacity: 1; transform: scale(1.04); } }
@keyframes rise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-80px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .tablet--wet::after { display: none; }
  html { scroll-behavior: auto; }
}

/* ── hall hero ────────────────────────────────────── */
.hall-hero { background: #B97A55; }
.hall-hero img { width: 100%; height: clamp(150px, 26vw, 320px); object-fit: cover; object-position: 50% 40%; }
