/* Registry — a registrar's desk at night.
   Materials: lacquered desk, ivory deed paper, crimson foil seals, brass plates,
   red stamp ink, ruled ledger lines. Every surface draws from these tokens. */
:root {
  color-scheme: dark;
  --desk: #0b0a09;
  --desk-2: #14110e;
  --desk-3: #1e1915;
  --leather: #231b15;
  --paper: #f1e9d8;
  --paper-2: #e6dbc3;
  --paper-3: #d6c8a8;
  --paper-rule: rgba(80, 104, 140, 0.22);
  --paper-margin: rgba(170, 40, 40, 0.35);
  --ink: #1c1915;
  --ink-2: #4b4238;
  --ink-3: #7a6e60;
  --type: #f3ece0;
  --type-2: #c9bfae;
  --type-3: #8f8577;
  --brass-lo: #5a4217;
  --brass: #c9a35a;
  --brass-hi: #f5dc9c;
  --brass-edge: #8a6a2c;
  --brass-grad: linear-gradient(160deg, var(--brass-lo) 0%, var(--brass-hi) 38%, var(--brass) 55%, var(--brass-edge) 78%, var(--brass-hi) 100%);
  --wax-lo: #4a0b0e;
  --wax: #9e1f26;
  --wax-hi: #e4505a;
  --wax-grad: linear-gradient(150deg, var(--wax-lo) 0%, var(--wax-hi) 34%, var(--wax) 56%, var(--wax-lo) 100%);
  --stamp-ink: #b3262d;
  --stamp-blue: #29477a;
  --ok: #3f7d4e;
  --hair: rgba(245, 220, 156, 0.18);
  --hair-2: rgba(245, 220, 156, 0.08);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  --shadow-paper: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 2px 0 rgba(0, 0, 0, 0.06), 0 28px 60px -28px rgba(0, 0, 0, 0.9), 0 10px 22px -12px rgba(0, 0, 0, 0.7);
  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --settle: cubic-bezier(0.22, 1, 0.36, 1);
  --r: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--desk);
  color: var(--type);
  font: 400 16px/1.6 var(--sans);
  overflow-x: hidden;
}
/* Key light from above, a warm pool on the desk, an edge vignette. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1200px 620px at 50% -180px, rgba(255, 214, 150, 0.13), transparent 70%),
    radial-gradient(900px 500px at 80% 110%, rgba(158, 31, 38, 0.10), transparent 70%),
    linear-gradient(180deg, var(--desk-2), var(--desk) 60%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.grain {
  position: fixed;
  inset: -50%;
  z-index: 49;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  animation: grain 1s steps(12) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } 100% { transform: translate(0, 0); }
}

a { color: var(--brass-hi); text-decoration-color: rgba(245, 220, 156, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brass-hi); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ——— Type ——— */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(42px, 7vw, 86px); }
h2 { font-size: clamp(32px, 4.6vw, 54px); }
h3 { font-size: 26px; }
.foil-text {
  background: var(--brass-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 9s var(--settle) infinite;
}
@keyframes sheen { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--type-2); max-width: 640px; }
.muted { color: var(--type-3); }
.mono { font-family: var(--mono); }

/* ——— Engraved hairline frame: outer rim catching light, a second rule inside ——— */
.engraved { position: relative; border-radius: var(--r); background: linear-gradient(180deg, var(--desk-3), var(--desk-2)); box-shadow: var(--shadow-1); }
.engraved::before, .engraved::after { content: ''; position: absolute; pointer-events: none; border-radius: inherit; }
.engraved::before { inset: 0; border: 1px solid transparent; background: linear-gradient(180deg, rgba(245, 220, 156, 0.45), rgba(245, 220, 156, 0.06) 40%, rgba(245, 220, 156, 0.14)) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.engraved::after { inset: 6px; border: 1px solid var(--hair-2); border-radius: calc(var(--r) - 5px); }

/* ——— Nav: a brass rail ——— */
.rail { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); background: rgba(11, 10, 9, 0.72); border-bottom: 1px solid var(--hair-2); }
.rail::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(245, 220, 156, 0.5), transparent); opacity: 0.5; }
.rail .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--type); text-decoration: none; font: 600 22px/1 var(--display); letter-spacing: 0.02em; }
.brand .mini-seal { width: 30px; height: 30px; }
.rail nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.rail nav a { color: var(--type-2); text-decoration: none; font: 500 14px/1 var(--sans); padding: 10px 12px; border-radius: 8px; position: relative; }
.rail nav a[aria-current='page'] { color: var(--brass-hi); }
.rail nav a[aria-current='page']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--brass-grad); }
.rail nav a:hover { color: var(--type); background: rgba(245, 220, 156, 0.05); }
.rail .menu-btn { display: none; margin-left: auto; }
@media (max-width: 760px) {
  .rail nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px var(--gutter) 18px; background: rgba(11, 10, 9, 0.96); border-bottom: 1px solid var(--hair); }
  .rail nav.open { display: flex; }
  .rail nav a { padding: 14px 10px; font-size: 16px; }
  .rail .menu-btn { display: inline-flex; }
}

/* ——— Buttons: a crimson rubber stamp and a brass plate ——— */
.btn {
  --lift: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: 600 15px/1 var(--sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  transform: translateY(var(--lift));
  transition: transform 0.35s var(--spring), box-shadow 0.3s var(--settle), filter 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --lift: -2px; }
.btn:active { --lift: 1px; transition-duration: 0.08s; }
.btn[disabled], .btn[aria-disabled='true'] { cursor: not-allowed; filter: grayscale(0.7) brightness(0.8); }
.btn-stamp {
  color: #fff6ef;
  background: var(--wax-grad);
  box-shadow: 0 1px 0 rgba(255, 210, 200, 0.45) inset, 0 -2px 0 rgba(0, 0, 0, 0.35) inset, 0 10px 24px -10px rgba(158, 31, 38, 0.9), 0 2px 0 var(--wax-lo);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35);
}
.btn-stamp::after { content: ''; position: absolute; inset: 4px; border-radius: 7px; border: 1px dashed rgba(255, 230, 220, 0.35); pointer-events: none; }
.btn-plate {
  color: #2a1e08;
  background: var(--brass-grad);
  background-size: 160% 100%;
  box-shadow: 0 1px 0 rgba(255, 248, 225, 0.8) inset, 0 -2px 0 rgba(70, 48, 10, 0.45) inset, 0 10px 22px -12px rgba(201, 163, 90, 0.8), 0 2px 0 var(--brass-lo);
  text-shadow: 0 1px 0 rgba(255, 245, 210, 0.5);
}
.btn-plate:hover { background-position: 60% 0; }
.btn-ghost { color: var(--type); background: rgba(245, 220, 156, 0.04); box-shadow: 0 0 0 1px var(--hair) inset; }
.btn-ghost:hover { background: rgba(245, 220, 156, 0.08); }
.btn-ink { color: var(--ink); background: transparent; box-shadow: 0 0 0 1.5px var(--ink-2) inset; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 8px; }
.btn .glyph { width: 18px; height: 18px; }
.btn.pressed { animation: press 0.5s var(--spring); }
@keyframes press { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(2px) scale(0.96); } 100% { transform: translateY(0) scale(1); } }

/* ——— The hero object: the Registry seal ——— */
.seal-stage { position: relative; perspective: 1100px; display: grid; place-items: center; }
.seal {
  --rx: 0deg; --ry: 0deg; --fx: 50%; --fy: 30%;
  position: relative;
  width: min(360px, 72vw);
  aspect-ratio: 1;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--settle);
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.65)) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
  cursor: pointer;
}
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal .foil {
  position: absolute; inset: 5%; border-radius: 50%; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--fx) var(--fy), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 42%), conic-gradient(from 0deg at 50% 50%, rgba(255, 120, 130, 0.0), rgba(255, 220, 200, 0.18), rgba(255, 120, 130, 0.0), rgba(255, 200, 160, 0.15), rgba(255, 120, 130, 0));
}
.seal .glint { position: absolute; inset: 5%; border-radius: 50%; overflow: hidden; pointer-events: none; }
.seal .glint::before { content: ''; position: absolute; top: -20%; bottom: -20%; width: 30%; left: -60%; transform: skewX(-18deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); animation: glint 6.5s 2s var(--settle) infinite; }
@keyframes glint { 0%, 78% { left: -60%; } 100% { left: 140%; } }
.rosette { transform-origin: 50% 50%; animation: turn 120s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.seal.stamping { animation: stamp-down 0.9s var(--spring); }
@keyframes stamp-down { 0% { transform: translateY(0) scale(1); } 22% { transform: translateY(-18px) scale(1.08) rotateX(8deg); } 42% { transform: translateY(6px) scale(0.94); } 70% { transform: translateY(-2px) scale(1.01); } 100% { transform: none; } }

/* Deed paper: ivory laid paper with chain lines and a deckled feel */
.paper {
  position: relative;
  color: var(--ink);
  background:
    repeating-linear-gradient(90deg, rgba(120, 96, 60, 0.035) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(120, 96, 60, 0.025) 0 1px, transparent 1px 3px),
    radial-gradient(120% 80% at 50% 0%, #fbf5e8, var(--paper) 50%, var(--paper-2));
  border-radius: 6px;
  box-shadow: var(--shadow-paper);
}
.paper::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(60, 48, 30, 0.28); border-radius: 3px; pointer-events: none; }
.paper::after { content: ''; position: absolute; inset: 14px; border: 0.5px solid rgba(60, 48, 30, 0.18); border-radius: 2px; pointer-events: none; }
.ledger {
  background:
    linear-gradient(90deg, transparent 54px, var(--paper-margin) 54px 55px, transparent 55px),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--paper-rule) 31px 32px),
    radial-gradient(120% 80% at 50% 0%, #fbf5e8, var(--paper) 50%, var(--paper-2));
}

/* Rubber stamps: inked text, slightly rotated, worn */
.stamp-mark {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 5px;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stamp-ink);
  transform: rotate(-4deg);
  mix-blend-mode: multiply;
  opacity: 0.88;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Cfilter id='r'%3E%3CfeTurbulence baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23r)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Cfilter id='r'%3E%3CfeTurbulence baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23r)'/%3E%3C/svg%3E");
}
.stamp-mark.blue { color: var(--stamp-blue); transform: rotate(3deg); }
.stamp-mark.green { color: var(--ok); transform: rotate(-2deg); }
.stamp-mark.on-dark { mix-blend-mode: normal; color: var(--wax-hi); }
.stamp-in { animation: stamp-in 0.55s var(--spring) both; }
@keyframes stamp-in { 0% { transform: scale(1.8) rotate(-12deg); opacity: 0; } 60% { opacity: 0.95; } 100% { opacity: 0.88; } }

/* Date stamper: rotating rubber bands */
.dater { display: inline-flex; gap: 2px; font: 600 13px/1 var(--mono); color: var(--stamp-blue); }
.dater span { display: inline-block; min-width: 0.7em; text-align: center; padding: 3px 1px; border-radius: 2px; background: linear-gradient(180deg, rgba(41, 71, 122, 0.08), rgba(41, 71, 122, 0.18) 50%, rgba(41, 71, 122, 0.08)); }
.dater.rolling span { animation: roll 0.32s steps(4) infinite; }
.dater.rolling span:nth-child(2n) { animation-delay: 0.08s; }
@keyframes roll { 0% { transform: translateY(-30%); opacity: 0.4; } 50% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(30%); opacity: 0.4; } }

/* ——— Sections ——— */
section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.hero { padding-top: clamp(40px, 7vw, 90px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 em { font-style: italic; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .fine { margin-top: 18px; font-size: 13.5px; color: var(--type-3); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero .seal-stage { order: -1; } .seal { width: min(280px, 70vw); } .cert .cert-seal { right: -6px; width: 140px; } }
.hero { overflow-x: clip; }

.cert { position: relative; width: min(460px, 100%); margin: 0 auto 40px; padding: 38px 34px 128px; transform: rotate(-1.6deg); }
.cert .cert-head { text-align: center; font: 600 11px/1.3 var(--mono); letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-2); }
.cert .cert-title { text-align: center; font: 600 30px/1.1 var(--display); margin: 10px 0 18px; color: var(--ink); }
.cert dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.cert dt { color: var(--ink-3); font: 500 11px/1.9 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.cert dd { margin: 0; color: var(--ink); font-weight: 500; border-bottom: 1px dotted rgba(60, 48, 30, 0.35); }
.cert .cert-seal { position: absolute; right: -30px; bottom: -48px; width: 176px; }
.cert .cert-stamp { position: absolute; left: 34px; bottom: 42px; font-size: 15px; }
.cert .sample { position: absolute; top: 14px; right: 18px; font: 600 10px/1 var(--mono); letter-spacing: 0.2em; color: var(--ink-3); }

.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.figure { padding: 26px 24px 24px; }
.figure .n { font: 600 clamp(40px, 5vw, 58px)/1 var(--display); }
.figure p { margin: 10px 0 0; color: var(--type-2); font-size: 15px; }
.figure .src { display: block; margin-top: 12px; font: 500 11.5px/1.4 var(--mono); color: var(--type-3); }
@media (max-width: 860px) { .figures { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; counter-reset: s; }
.docket { position: relative; padding: 30px 24px 26px; min-height: 230px; }
.docket .tab { position: absolute; top: -14px; left: 22px; padding: 6px 12px; border-radius: 6px 6px 0 0; font: 600 11px/1 var(--mono); letter-spacing: 0.16em; color: #2a1e08; background: var(--brass-grad); }
.docket h3 { color: var(--ink); margin-top: 6px; }
.docket p { color: var(--ink-2); margin: 10px 0 0; font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 5vw, 60px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--type-2); }
.checklist li::before { content: ''; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--wax-grad); box-shadow: 0 0 0 2px rgba(228, 80, 90, 0.18), 0 1px 0 rgba(255, 255, 255, 0.3) inset; }

/* Pricing: three engraved plates */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; align-items: stretch; }
.plan { padding: 30px 26px 28px; display: flex; flex-direction: column; }
.plan .price { font: 600 52px/1 var(--display); margin: 14px 0 4px; }
.plan .price small { font: 500 15px/1 var(--sans); color: var(--type-3); margin-left: 4px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; color: var(--type-2); font-size: 15px; }
.plan ul li { padding-left: 22px; position: relative; }
.plan ul li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--brass-grad); }
.plan .btn { margin-top: auto; }
.plan.featured { transform: translateY(-8px); }
.plan.featured::before { background: linear-gradient(180deg, rgba(228, 80, 90, 0.75), rgba(228, 80, 90, 0.1) 45%, rgba(245, 220, 156, 0.3)) border-box; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan.featured { transform: none; } }

.faq { display: grid; gap: 12px; margin-top: 36px; }
.faq details { padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 600 18px/1.3 var(--display); font-size: 21px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 24px/1 var(--sans); color: var(--brass); transition: transform 0.4s var(--spring); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--type-2); }

footer { padding: 54px 0 70px; border-top: 1px solid var(--hair-2); color: var(--type-3); font-size: 14px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
footer h4 { margin: 0 0 10px; font: 600 12px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--type-2); }
footer a { color: var(--type-2); text-decoration: none; display: block; padding: 4px 0; }
footer a:hover { color: var(--brass-hi); }
footer .made { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr; } }

/* ——— App shell (planner, claim kit) ——— */
.app-head { padding: 34px 0 10px; }
.app-head h1 { font-size: clamp(36px, 5.4vw, 60px); }
.app-head p { margin: 12px 0 0; }
.app { display: grid; grid-template-columns: 1fr 360px; gap: 26px; padding-bottom: 90px; align-items: start; }
.app > * { min-width: 0; }
@media (max-width: 1000px) { .app { grid-template-columns: 1fr; } }
.panel { padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 30px; }
.panel .sub { color: var(--type-3); font-size: 14px; margin: 6px 0 0; }
.sticky { position: sticky; top: 86px; }
@media (max-width: 1000px) { .sticky { position: static; } }

.drop {
  margin-top: 18px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  min-height: 170px;
  padding: 26px;
  border-radius: 12px;
  border: 1.5px dashed rgba(245, 220, 156, 0.3);
  background: radial-gradient(80% 120% at 50% 0%, rgba(245, 220, 156, 0.06), transparent);
  transition: border-color 0.2s, background 0.3s, transform 0.4s var(--spring);
  cursor: pointer;
}
.drop:hover, .drop.over { border-color: var(--brass-hi); background: radial-gradient(80% 120% at 50% 0%, rgba(245, 220, 156, 0.12), transparent); }
.drop.over { transform: scale(1.01); }
.drop strong { font: 600 22px/1.2 var(--display); }
.drop small { color: var(--type-3); }

.field { display: grid; gap: 6px; margin-top: 16px; }
.field label, .field .label { font: 600 12px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--type-2); }
.field .hint { font-size: 13px; color: var(--type-3); }
input[type='text'], input[type='date'], input[type='number'], input[type='url'], input[type='email'], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 220, 156, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: var(--type);
  font: 400 15.5px/1.4 var(--sans);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 2px 6px rgba(0, 0, 0, 0.35) inset;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201, 163, 90, 0.18), 0 2px 6px rgba(0, 0, 0, 0.35) inset; }
input[type='date'] { color-scheme: dark; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

/* Choice chips: brass tokens that flip face-up when chosen */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 999px; cursor: pointer;
  font: 500 14px/1 var(--sans); color: var(--type-2);
  background: rgba(245, 220, 156, 0.04); box-shadow: 0 0 0 1px var(--hair) inset;
  transition: transform 0.35s var(--spring), background 0.2s, color 0.2s;
}
.chip input:checked + span { color: #2a1e08; background: var(--brass-grad); box-shadow: 0 1px 0 rgba(255, 248, 225, 0.8) inset, 0 6px 14px -8px rgba(201, 163, 90, 0.9); transform: translateY(-1px); }
.chip input:focus-visible + span { outline: 2px solid var(--brass-hi); outline-offset: 2px; }

/* Ledger list of works */
.works { margin-top: 18px; padding: 14px 16px 18px 70px; min-height: 160px; max-height: 620px; overflow-y: auto; overscroll-behavior: contain; }
.works .empty { color: var(--ink-3); font: italic 500 19px/32px var(--display); padding-top: 32px; }
.work { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--paper-rule); animation: deal 0.5s var(--spring) both; }
.work .thumb { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--paper-3); box-shadow: 0 0 0 1px rgba(60, 48, 30, 0.25), 0 2px 4px rgba(0, 0, 0, 0.2); display: grid; place-items: center; font: 600 11px/1 var(--mono); color: var(--ink-3); }
.work .t { color: var(--ink); font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work .m { color: var(--ink-3); font-size: 12.5px; font-family: var(--mono); }
.work input[type='date'] { min-height: 34px; padding: 4px 8px; font-size: 13px; background: rgba(255, 255, 255, 0.5); color: var(--ink); border-color: rgba(60, 48, 30, 0.25); box-shadow: none; color-scheme: light; width: 150px; }
.work .x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 18px; padding: 6px; }
.work .x:hover { color: var(--stamp-ink); }
.work .status { display: block; margin-top: 2px; font: 600 11px/1.3 var(--mono); letter-spacing: 0.06em; }
.status.open { color: var(--stamp-blue); } .status.urgent, .status.late, .status.returned { color: var(--stamp-ink); } .status.sealed { color: var(--ok); }
@keyframes deal { 0% { opacity: 0; transform: translateY(-14px) rotate(-1.5deg); } 100% { opacity: 1; transform: none; } }
@media (max-width: 640px) { .works { padding-left: 62px; padding-right: 10px; } .work { grid-template-columns: 40px 1fr; } .work .side { grid-column: 2; } }

/* Batch folders */
.batches { display: grid; gap: 16px; margin-top: 16px; }
.folder { position: relative; padding: 22px 20px 18px; border-radius: 4px 10px 10px 10px; color: var(--ink); background: linear-gradient(180deg, #e2c992, #d4b678 60%, #c9a965); box-shadow: 0 1px 0 rgba(255, 245, 210, 0.7) inset, 0 18px 30px -18px rgba(0, 0, 0, 0.9); animation: deal 0.55s var(--spring) both; }
.folder::before { content: attr(data-tab); position: absolute; top: -18px; left: 0; padding: 5px 12px 4px; border-radius: 6px 6px 0 0; font: 600 10.5px/1 var(--mono); letter-spacing: 0.14em; color: var(--ink-2); background: #e2c992; box-shadow: 0 1px 0 rgba(255, 245, 210, 0.7) inset; }
.folder h4 { margin: 0; font: 600 21px/1.15 var(--display); }
.folder .meta { margin-top: 6px; font: 500 12.5px/1.5 var(--mono); color: var(--ink-2); }
.folder .actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.folder .stamp-mark { position: absolute; right: 14px; top: 14px; }
.folder.late { background: linear-gradient(180deg, #e6c3b4, #d9ab9a 60%, #cc9c8a); }

/* Summary card (the receipt) */
.tally { padding: 22px 22px 18px; }
.tally .line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(60, 48, 30, 0.25); font-size: 14.5px; color: var(--ink-2); }
.tally .line strong { color: var(--ink); font-family: var(--mono); }
.tally .total { border-bottom: 3px double rgba(60, 48, 30, 0.5); }
.tally h3 { color: var(--ink); font-size: 24px; margin-bottom: 8px; }
.tally .note { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }

/* Case file tabs (claim kit) */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 2px; margin-top: 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; border: 0; cursor: pointer; padding: 11px 16px 10px; border-radius: 8px 8px 0 0; font: 600 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); background: linear-gradient(180deg, #cdbd9a, #bfae8a); transition: transform 0.35s var(--spring); transform: translateY(4px); }
.tabs button[aria-selected='true'] { color: var(--ink); background: linear-gradient(180deg, #fbf5e8, var(--paper)); transform: translateY(0); }
.tabs button .dot { display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--stamp-ink); vertical-align: 1px; }
.tabs button .dot.done { background: var(--ok); }
.casefile { padding: 30px clamp(18px, 3vw, 34px) 30px; border-top-left-radius: 0; }
.casefile h2 { color: var(--ink); font-size: 32px; }
.casefile .sub { color: var(--ink-3); }
.casefile .field label, .casefile .field .label { color: var(--ink-2); }
.casefile .field .hint { color: var(--ink-3); }
.casefile input[type='text'], .casefile input[type='date'], .casefile input[type='number'], .casefile input[type='url'], .casefile input[type='email'], .casefile select, .casefile textarea {
  background: rgba(255, 255, 255, 0.55); color: var(--ink); border-color: rgba(60, 48, 30, 0.28); box-shadow: 0 1px 2px rgba(60, 48, 30, 0.12) inset; color-scheme: light;
}
.casefile .chip span { color: var(--ink-2); background: rgba(60, 48, 30, 0.05); box-shadow: 0 0 0 1px rgba(60, 48, 30, 0.25) inset; }
.casefile .pane { display: none; }
.casefile .pane.on { display: block; animation: slide-in 0.45s var(--settle); }
@keyframes slide-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.casefile .nav-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.entry { position: relative; padding: 16px 16px 6px; margin-top: 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.35); box-shadow: 0 0 0 1px rgba(60, 48, 30, 0.18) inset; animation: deal 0.45s var(--spring) both; }
.entry .x { position: absolute; top: 8px; right: 8px; }
.entry .field:first-child { margin-top: 0; }

/* Returned: the error object */
.returned { position: relative; padding: 16px 18px 16px 18px; margin-top: 12px; border-radius: 8px; color: var(--ink); background: rgba(179, 38, 45, 0.07); box-shadow: 0 0 0 1px rgba(179, 38, 45, 0.3) inset; }
.returned .stamp-mark { margin-bottom: 8px; }
.returned p { margin: 4px 0 0; font-size: 14.5px; }
.returned .fix { color: var(--ink-2); font-size: 13.5px; }
.cleared { padding: 16px 18px; margin-top: 12px; border-radius: 8px; color: var(--ink); background: rgba(63, 125, 78, 0.08); box-shadow: 0 0 0 1px rgba(63, 125, 78, 0.35) inset; }
.on-desk .returned { color: var(--type); background: rgba(179, 38, 45, 0.12); }
.on-desk .returned .fix { color: var(--type-2); }
.on-desk .cleared { color: var(--type); }

.caps { display: grid; gap: 8px; margin-top: 12px; }
.caps .cap { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(60, 48, 30, 0.05); font-size: 14px; }
.caps .cap b { font-family: var(--mono); }
.meter { position: relative; height: 12px; border-radius: 6px; margin-top: 12px; background: rgba(60, 48, 30, 0.12); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--wax-grad); transition: width 0.7s var(--spring); }

.packet { padding: clamp(26px, 5vw, 56px); }
.packet h2 { color: var(--ink); text-align: center; }
.packet .pk-head { text-align: center; font: 600 11px/1.4 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.packet section { padding: 18px 0; border-bottom: 1px solid rgba(60, 48, 30, 0.2); }
.packet h3 { color: var(--ink); font-size: 20px; margin-bottom: 8px; }
.packet ol, .packet ul { margin: 0; padding-left: 22px; color: var(--ink); }
.packet li { margin: 6px 0; }
.packet table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.packet th, .packet td { text-align: left; padding: 7px 8px; border-bottom: 1px solid rgba(60, 48, 30, 0.2); color: var(--ink); vertical-align: top; }
.packet th { font: 600 11px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* Toast: a slip of paper slid under the door */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translate(-50%, 140%); padding: 14px 20px; max-width: min(520px, calc(100vw - 32px)); border-radius: 8px; color: var(--ink); background: var(--paper); box-shadow: var(--shadow-paper); font-size: 14.5px; transition: transform 0.55s var(--spring); }
.toast.on { transform: translate(-50%, 0); }

.lock { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--brass); }
.notice { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: rgba(245, 220, 156, 0.06); box-shadow: 0 0 0 1px var(--hair) inset; color: var(--type-2); font-size: 14px; }
.notice.paperish { background: rgba(60, 48, 30, 0.06); box-shadow: 0 0 0 1px rgba(60, 48, 30, 0.2) inset; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font: 600 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; background: rgba(245, 220, 156, 0.08); color: var(--brass-hi); box-shadow: 0 0 0 1px var(--hair) inset; }

.legal { max-width: 760px; padding: 50px 0 90px; }
.legal h1 { font-size: clamp(38px, 5vw, 56px); }
.legal h2 { font-size: 28px; margin-top: 36px; }
.legal p, .legal li { color: var(--type-2); }

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

@media print {
  body { background: #fff; color: #000; }
  body::before, body::after, .grain, .rail, footer, .no-print, .tabs, .app-head, .sticky { display: none !important; }
  .app { display: block; }
  .packet { box-shadow: none; background: #fff; }
  .paper::before, .paper::after { display: none; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ——— Guides: a page from the registrar's handbook ——— */
.guide { max-width: 780px; padding: 40px 0 90px; }
.guide h1 { font-size: clamp(38px, 5.4vw, 60px); margin-top: 12px; }
.guide .lede { margin-top: 18px; }
.guide h2 { font-size: clamp(26px, 3.4vw, 34px); margin-top: 46px; }
.guide h3 { font-size: 22px; margin-top: 26px; }
.guide p, .guide li { color: var(--type-2); font-size: 16.5px; }
.guide li { margin: 6px 0; }
.guide strong { color: var(--type); }
.guide .cite { font: 500 12px/1.4 var(--mono); color: var(--type-3); }
.guide .byline { margin-top: 16px; font: 500 12.5px/1.5 var(--mono); color: var(--type-3); }
.guide table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.guide th, .guide td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--hair); color: var(--type-2); vertical-align: top; }
.guide th { font: 600 11.5px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--type-3); }
.guide .plate { margin-top: 40px; padding: 26px 24px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.guide .plate p { margin: 6px 0 0; font-size: 15px; }
.guide .steps-list { counter-reset: g; list-style: none; padding: 0; }
.guide .steps-list > li { counter-increment: g; position: relative; padding-left: 46px; margin: 18px 0; }
.guide .steps-list > li::before { content: counter(g); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 14px/1 var(--mono); color: #fff6ef; background: var(--wax-grad); box-shadow: 0 1px 0 rgba(255, 210, 200, 0.45) inset, 0 6px 14px -8px rgba(158, 31, 38, 0.9); }
.guide-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 30px; }
.guide-list a { display: block; padding: 24px 22px; text-decoration: none; color: var(--type); }
.guide-list a h3 { font-size: 24px; }
.guide-list a p { color: var(--type-2); margin: 8px 0 0; font-size: 15px; }
@media (max-width: 760px) { .guide-list { grid-template-columns: 1fr; } }
