/* Planning Desk base styles. Tokens first; other stylesheets reuse them. */

:root {
  --paper: #E9EDE6;
  --sheet: #F8FAF6;
  --ink: #16241F;
  --ink-2: #4A5A53;
  --rule: #C9D2C9;
  --res: #F2C230;
  --com: #D2402F;
  --ind: #7B4FA0;
  --open: #3D8C52;
  --pub: #2E5FA6;
  --agr: #A8C66C;
  --wat: #7FB7D9;

  /* Text-safe versions of the result colours (the fills above are too light for small text). */
  --ok-ink: #2A6A3B;
  --bad-ink: #A3281A;
  --part-ink: #7A5C00;

  --t-14: 0.875rem;
  --t-16: 1rem;
  --t-20: 1.25rem;
  --t-25: 1.5625rem;
  --t-31: 1.9375rem;
  --t-39: 2.4375rem;
  --t-49: 3.0625rem;
  --t-61: 3.8125rem;

  --f-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-btn: 6px;
  --r-tab: 2px;
  --wrap: 1180px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

[hidden] { display: none !important; }
img, svg { max-width: 100%; }
p { margin: 0 0 1em; max-width: 70ch; }
ul, ol { padding-left: 1.25em; }

h1, h2, h3, h4, .display {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 7vw, var(--t-49)); }
h2 { font-size: clamp(1.5625rem, 4.5vw, var(--t-31)); }
h3 { font-size: var(--t-20); font-variation-settings: "wdth" 110; font-stretch: 110%; }

a { color: var(--pub); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--pub); outline-offset: 2px; }
main:focus { outline: none; }

.small { font-size: var(--t-14); }
.muted { color: var(--ink-2); }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: var(--r-btn);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
main { display: block; padding: 24px 0 72px; min-height: 60vh; }

.site-header { border-bottom: 2px solid var(--ink); background: var(--sheet); }
.site-header .bar {
  max-width: var(--wrap); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.wordmark-text {
  font-family: var(--f-display); font-weight: 800; font-stretch: 125%;
  font-variation-settings: "wdth" 125; font-size: var(--t-20); letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--ink); font-weight: 600; text-decoration-thickness: 2px;
}

@media (max-width: 399px) {
  .site-header .bar { padding: 6px 12px; gap: 8px; }
  .wordmark { gap: 6px; }
  .wordmark-text { font-size: var(--t-16); }
  .nav-link { font-size: var(--t-14); padding: 0; }
  .site-header nav { gap: 4px; }
}
@media (max-width: 339px) {
  .wordmark-text { font-size: 0.9375rem; letter-spacing: -0.02em; }
  .wordmark-glyph { display: none; }
}

.section-title { font-size: var(--t-25); margin-bottom: 0.6em; }
.lede { font-size: var(--t-20); line-height: 1.5; color: var(--ink); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; max-width: none; }

.notice, .notice-block { padding: 20px; }
.notice-block { width: min(100%, var(--wrap)); margin: 0 auto; padding: 40px 20px; }
.notice-block > * { max-width: 60ch; }

/* ---------- Buttons and fields ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 2px solid var(--ink); border-radius: var(--r-btn);
  background: var(--sheet); color: var(--ink);
  font: 600 1rem/1.2 var(--f-body); text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s, transform 0.12s;
}
.btn:hover:not(:disabled) { background: #fff; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover:not(:disabled) { background: #2B4339; }
.btn--small { padding: 0 14px; font-size: var(--t-14); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--ink); border-radius: var(--r-btn);
  background: var(--sheet); color: var(--ink); cursor: pointer;
  transition: background-color 0.12s;
}
.icon-btn:hover:not(:disabled) { background: #fff; }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.field {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px;
  border: 2px solid var(--ink); border-radius: var(--r-btn);
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem;
}
textarea.field { resize: vertical; line-height: 1.5; }
.field--code {
  font-family: var(--f-display); font-weight: 800; font-stretch: 125%;
  font-variation-settings: "wdth" 125; font-size: var(--t-25);
  letter-spacing: 0.25em; text-transform: uppercase; text-align: center; padding-left: 0.25em;
}
.form-error { color: var(--bad-ink); font-weight: 600; margin: 8px 0 0; min-height: 0; }
.form-error:empty { display: none; }

/* ---------- Statute tabs ---------- */

.statutes { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.statute {
  display: inline-block; padding: 2px 8px;
  border: 1px solid var(--ink); border-radius: var(--r-tab); background: var(--sheet);
  font-family: var(--f-display); font-weight: 700; font-stretch: 100%;
  font-variation-settings: "wdth" 100; font-size: var(--t-14); line-height: 1.5;
}

/* ---------- Zoning map ---------- */

.sitemap { display: block; width: 100%; height: auto; overflow: visible; }
.sitemap .lot { stroke: none; transition: opacity 0.12s; }
.sitemap .z-R { fill: var(--res); }
.sitemap .z-C { fill: var(--com); }
.sitemap .z-I { fill: var(--ind); }
.sitemap .z-O { fill: var(--open); }
.sitemap .z-P { fill: var(--pub); }
.sitemap .z-A { fill: var(--agr); }
.sitemap .z-W { fill: var(--wat); }
.sitemap .z-x { fill: var(--rule); }
.sitemap .lot--subject { stroke: var(--ink); }
.lot-pulse {
  fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none;
  transform-box: fill-box; transform-origin: center;
  animation: lot-pulse 2.8s ease-out infinite;
}
@keyframes lot-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  70%, 100% { transform: scale(2); opacity: 0; }
}
.sitemap--interactive .lot:hover { opacity: 0.8; }
.lot-subject[role="button"] { cursor: pointer; outline: none; }
.lot-subject[role="button"]:focus-visible .lot--subject { stroke: var(--pub); stroke-width: 4; }
.sitemap-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--t-14); }
.sitemap-legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; }
.z-bg-R { background: var(--res); } .z-bg-C { background: var(--com); } .z-bg-I { background: var(--ind); }
.z-bg-O { background: var(--open); } .z-bg-P { background: var(--pub); } .z-bg-A { background: var(--agr); }
.z-bg-W { background: var(--wat); }

/* ---------- The stamp ---------- */

.stamp {
  --ink-colour: var(--ok-ink);
  position: relative; display: inline-block; max-width: 100%;
  margin: 6px 10px 18px 4px; padding: 0.3em 0.8em 0.25em;
  color: var(--ink-colour);
  border: 4px solid currentColor; border-radius: 6px;
  text-align: center; line-height: 1.05;
  opacity: 0.92;
  rotate: -7deg;
  mix-blend-mode: multiply;
  -webkit-mask-image: var(--stamp-grain);
  mask-image: var(--stamp-grain);
  -webkit-mask-size: 240px 140px;
  mask-size: 240px 140px;
  animation: stamp-drop 220ms ease-out both;
}
/* inner rule: the double border of a real rubber stamp */
.stamp::before {
  content: ""; position: absolute; inset: 3px;
  border: 2px solid currentColor; border-radius: 3px; pointer-events: none;
}
.stamp-text {
  display: block; position: relative;
  font-family: var(--f-display); font-weight: 800; font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: clamp(1.5rem, 5vw, var(--t-31)); letter-spacing: 0.1em; text-transform: uppercase;
  /* faint second pass: the ink never lands exactly twice */
  text-shadow: 0.6px 0.5px 0 currentColor, -0.5px 0 0 currentColor;
}
.stamp-sub {
  display: block; position: relative; margin-top: 2px; padding-top: 2px;
  border-top: 1.5px solid currentColor;
  font-family: var(--f-display); font-weight: 700; font-stretch: 100%;
  font-variation-settings: "wdth" 100; font-size: 0.6875rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.stamp--good { --ink-colour: var(--ok-ink); }
.stamp--bad { --ink-colour: var(--com); }
.stamp--partial { --ink-colour: var(--part-ink); }
.stamp--lg { margin: 18px 14px 28px 8px; padding: 0.35em 0.9em 0.3em; border-width: 6px; }
.stamp--lg::before { inset: 4px; border-width: 3px; }
.stamp--lg .stamp-text { font-size: clamp(1.25rem, 5.5vw, var(--t-39)); }
.stamp--lg .stamp-sub { font-size: 0.8125rem; }

:root {
  --stamp-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='140'><filter id='n' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  12 0 0 0 -2.9'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

@keyframes stamp-drop {
  from { opacity: 0; transform: scale(1.6); }
  to { opacity: 0.92; transform: scale(1); }
}
.is-shaking { animation: sheet-shake 120ms linear 180ms 1; }
@keyframes sheet-shake {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(2px, 1px); }
  60% { transform: translate(-2px, -1px); }
}

/* GSAP stampSlam owns these; the CSS drop is only the fallback where no slam runs. */
.stamp[data-tone], .end .stamp, .rankup .stamp { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .stamp, .is-shaking, .lot-pulse { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Sheets and stage chrome ---------- */

.sheet { background: var(--sheet); border: 1.5px solid var(--ink); padding: clamp(16px, 4vw, 32px); }
.stage-meta { margin: 0 0 14px; font-size: var(--t-14); font-weight: 600; color: var(--ink-2); }
.stage-title { font-size: clamp(1.5625rem, 5vw, var(--t-39)); margin-bottom: 0.4em; }
.stage-title:focus { outline: none; }
.stage-prompt { font-size: var(--t-20); line-height: 1.5; max-width: 62ch; }
.stage-body { margin-top: 20px; }
.stage-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }
.stage-footer .wager { flex: 1 1 100%; }
.locked-note { margin: 0; font-weight: 700; }
.locked-note::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--open); }
.feedback { margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--ink); }
.explain { font-size: 1.0625rem; margin-bottom: 0; }
.hint { font-size: var(--t-14); color: var(--ink-2); margin: 12px 0 0; }
@media (hover: none) { .hint { display: none; } }
.points { margin: 0; font-weight: 700; flex: 1 1 100%; }
.points--good { color: var(--ok-ink); }
.points--partial { color: var(--part-ink); }
.points--bad { color: var(--bad-ink); }

.mark { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-14); font-weight: 700; }
.mark:empty { display: none; }
.is-correct .mark { color: var(--ok-ink); }
.is-wrong .mark { color: var(--bad-ink); }
.is-partial .mark { color: var(--part-ink); }

/* Choice */
.options { display: grid; gap: 10px; }
.opt {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center;
  width: 100%; min-height: 56px; padding: 12px 14px; margin: 0;
  border: 2px solid var(--rule); border-radius: var(--r-btn);
  background: var(--sheet); color: var(--ink); text-align: left; font: inherit;
  transition: border-color 0.12s, background-color 0.12s;
}
button.opt { cursor: pointer; }
button.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt[aria-checked="true"] { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.opt-key {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 2px solid var(--ink); border-radius: var(--r-tab);
  font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 125;
  transition: background-color 0.12s, color 0.12s;
}
.opt[aria-checked="true"] .opt-key { background: var(--ink); color: var(--paper); }
.opt .mark { grid-column: 2; }
.opt:disabled { color: var(--ink); }
.opt.is-correct { border-color: var(--open); background: rgba(61, 140, 82, 0.12); box-shadow: inset 0 0 0 1px var(--open); }
.opt.is-wrong { border-color: var(--com); background: rgba(210, 64, 47, 0.09); box-shadow: inset 0 0 0 1px var(--com); }
.opt.is-partial { border-color: var(--res); background: rgba(242, 194, 48, 0.2); box-shadow: inset 0 0 0 1px var(--res); }
.opt[aria-disabled="true"] { cursor: default; }

/* Brief */
.brief-body { font-size: 1.0625rem; }
.facts { margin: 20px 0 0; border-top: 2px solid var(--ink); }
.fact { display: grid; grid-template-columns: minmax(0, 13rem) 1fr; gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.fact dt { font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 100; }
.fact dd { margin: 0; }
.perspectives { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 24px; }
.persp { border: 2px solid var(--ink); border-left-width: 10px; padding: 14px 16px; background: #fff; }
.persp--for { border-left-color: var(--open); }
.persp--against { border-left-color: var(--com); }
.persp h3 { margin-bottom: 0.4em; }
.persp ul { margin: 0; }

/* Reflect */
.reflect { list-style: decimal; padding-left: 1.4em; display: grid; gap: 22px; }
.reflect-q { display: block; font-weight: 600; font-size: var(--t-20); line-height: 1.4; margin-bottom: 8px; }

/* Sort */
.sort-status { font-size: var(--t-14); color: var(--ink-2); margin: 0 0 12px; min-height: 1.5em; }
.bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-top: 14px; }
.bin { background: var(--sheet); border: 2px solid var(--ink); display: flex; flex-direction: column; min-width: 0; }
.bin--pool { border-style: dashed; border-color: var(--ink-2); }
.bin--pool.is-empty { display: none; }
.is-revealed .bin--pool.is-empty, .stage--host .bin--pool.is-empty { display: none; }
.bin-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; min-height: 44px; padding: 8px 12px; margin: 0;
  border: 0; border-bottom: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 110; font-size: 1rem;
  text-align: left; cursor: pointer;
  transition: background-color 0.12s;
}
.bin--pool .bin-head { border-bottom: 1px dashed var(--ink-2); }
.bin-head:disabled { cursor: default; color: var(--ink); }
.bin-hint { display: none; font-family: var(--f-body); font-weight: 600; font-size: var(--t-14); color: var(--pub); }
.has-selection .bin-head:not(:disabled) { background: #fff; }
.has-selection .bin-head:not(:disabled) .bin-hint { display: inline; }
.bin.is-over { outline: 3px solid var(--pub); outline-offset: -3px; background: #fff; }
.tiles { list-style: none; margin: 0; padding: 10px; display: grid; gap: 8px; min-height: 64px; align-content: start; }
.tiles--pool { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tile, .step {
  position: relative; display: flex; align-items: center; flex-wrap: wrap;
  border: 2px solid var(--ink); border-radius: var(--r-btn); background: var(--sheet);
  touch-action: manipulation;
}
.tile { cursor: grab; }
.stage--host .tile, .is-revealed .tile { cursor: default; }
.tile-btn {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 12px; margin: 0;
  background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.tile .grip, .step .grip {
  display: grid; place-items: center; align-self: stretch; width: 30px;
  border-right: 1px solid var(--rule); color: var(--ink-2); cursor: grab; touch-action: none;
}
.tile .mark { flex: 1 1 100%; padding: 0 12px 8px 12px; }
.tile.is-selected { outline: 3px solid var(--pub); outline-offset: 1px; background: #fff; }
.tile.is-correct, .step.is-correct { border-color: var(--open); background: rgba(61, 140, 82, 0.1); }
.tile.is-wrong, .step.is-wrong { border-color: var(--com); background: rgba(210, 64, 47, 0.08); }
.is-dragging { opacity: 0.35; }
.drag-ghost {
  position: fixed; z-index: 1000; margin: 0; pointer-events: none; list-style: none;
  background: var(--sheet); box-shadow: 0 8px 20px rgba(22, 36, 31, 0.18);
}

/* Match */
.match { display: grid; gap: 24px; }
@media (min-width: 720px) { .match { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.col-title { font-size: var(--t-16); margin-bottom: 10px; }
.mrows, .chips { list-style: none; margin: 0; padding: 0; }
.mrows { display: grid; gap: 8px; }
.mrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.mleft {
  flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; align-content: center;
  min-height: 56px; padding: 8px 12px; margin: 0;
  border: 2px solid var(--rule); border-radius: var(--r-btn); background: var(--sheet);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.12s;
}
.mleft:disabled { color: var(--ink); cursor: default; }
.mrow.is-active .mleft { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.mleft-text { font-weight: 600; }
.mslot { font-size: var(--t-14); color: var(--ink-2); min-height: 1.3em; }
.mslot.is-filled { color: var(--ink); font-weight: 700; }
.mrow .mark { flex: 1 1 100%; }
.mrow.is-correct .mleft { border-color: var(--open); background: rgba(61, 140, 82, 0.1); }
.mrow.is-wrong .mleft { border-color: var(--com); background: rgba(210, 64, 47, 0.08); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  max-width: 100%; min-height: 44px; padding: 8px 14px; margin: 0;
  border: 2px solid var(--ink); border-radius: var(--r-btn); background: var(--sheet); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
  transition: background-color 0.12s;
}
.chip:hover:not(:disabled) { background: #fff; }
.chip:disabled { color: var(--ink); cursor: default; }
.chip.is-used { border-style: dashed; color: var(--ink-2); }
.chip.is-distractor { border-color: var(--rule); color: var(--ink-2); }

/* Order */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.step { gap: 10px; padding: 6px 8px 6px 6px; min-height: 56px; }
.step .grip { width: 28px; border-right: 0; align-self: center; height: 44px; }
.step-num {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px;
  background: var(--ink); color: var(--paper); border-radius: var(--r-tab);
  font-family: var(--f-display); font-weight: 800; font-size: var(--t-14);
}
.step-text { flex: 1 1 150px; min-width: 0; padding: 4px 0; }
.step-btns { display: flex; gap: 4px; }
.step .mark { flex: 1 1 100%; padding-left: 38px; }
.step.drop-before { box-shadow: 0 -4px 0 var(--pub); }
.step.drop-after { box-shadow: 0 4px 0 var(--pub); }

/* Host projection: bigger, no inputs */
.stage--host .stage-title { font-size: clamp(2rem, 4vw, var(--t-49)); }
.stage--host .stage-prompt { font-size: clamp(1.25rem, 2.6vw, var(--t-31)); max-width: none; }
.stage--host .opt { font-size: clamp(1.25rem, 2.4vw, var(--t-31)); min-height: 72px; }
.stage--host .opt-key { width: 48px; height: 48px; font-size: var(--t-25); }
.stage--host .tile, .stage--host .mleft, .stage--host .step, .stage--host .chip { font-size: clamp(1.1rem, 2vw, var(--t-25)); }
.stage--host .brief-body, .stage--host .reflect-q { font-size: clamp(1.1rem, 2.2vw, var(--t-25)); max-width: none; }
.stage--host .tile-btn, .stage--host .mleft { cursor: default; }

/* ---------- Home ---------- */

.home { padding-top: 8px; }
.hero { display: grid; gap: 24px; margin-bottom: 48px; }
.hero-title { font-size: clamp(2.25rem, 10vw, var(--t-61)); margin-bottom: 0.3em; }
.join-form { background: var(--sheet); border: 1.5px solid var(--ink); padding: 14px 16px 16px; }
.join-label { display: block; font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 110; margin-bottom: 8px; }
.join-row { display: flex; gap: 8px; }
.join-row .field { flex: 1 1 0; min-width: 0; }
.hero-map { background: var(--sheet); border: 1.5px solid var(--ink); padding: clamp(16px, 3vw, 28px); }
.districts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 32px 40px; }
.district { flex: 1 1 260px; max-width: 460px; min-width: 0; }
.districts--1 .district { max-width: 560px; }
.district-title {
  display: inline-block; margin-top: 14px;
  font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 115;
  font-size: var(--t-20); line-height: 1.2; color: var(--ink); text-decoration: none;
}
.district-title:hover, .district:focus-within .district-title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.district-meta { margin: 4px 0 0; font-size: var(--t-14); color: var(--ink-2); }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "copy join" "map map"; align-items: start; gap: 32px 48px; }
  .hero-copy { grid-area: copy; }
  .join-form { grid-area: join; }
  .hero-map { grid-area: map; }
}
.empty { font-size: var(--t-20); }
.home-foot { margin-top: 40px; font-size: var(--t-14); color: var(--ink-2); }

.ledger { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1.5px solid var(--ink); }
.ledger th {
  text-align: left; padding: 10px 12px; background: var(--paper); border-bottom: 2px solid var(--ink);
  font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 100; font-size: var(--t-14);
}
.ledger td { padding: 14px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.cell-title { max-width: 44ch; }
.ledger-title {
  display: block; color: var(--ink); text-decoration: none;
  font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 115; font-size: var(--t-20); line-height: 1.2;
}
.ledger-title:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.ledger-topic { display: block; margin-top: 4px; font-size: var(--t-14); color: var(--ink-2); }
.cell-actions { white-space: nowrap; }
.cell-actions .btn + .btn { margin-left: 8px; }
@media (max-width: 899px) {
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ledger tr { padding: 16px; border-bottom: 1px solid var(--rule); }
  .ledger tr:last-child { border-bottom: 0; }
  .ledger td { padding: 2px 0; border: 0; }
  .ledger td:not(.cell-title):not(.cell-actions)::before { content: attr(data-label) ": "; color: var(--ink-2); }
  .cell-actions { display: flex !important; flex-wrap: wrap; gap: 8px; margin-top: 14px; white-space: normal; }
  .cell-actions .btn + .btn { margin-left: 0; }
  .cell-title { max-width: none; margin-bottom: 6px; }
}
