/* Self-hosted fonts (SIL Open Font License, see fonts/OFL-*.txt) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("fonts/bricolage-grotesque-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #efece5;
  --ink: #141a22;
  --ink-2: #4b5563;
  --ink-3: #7b8391;
  --line: #e2ddd3;
  --accent: #0b6e5f;
  --accent-ink: #ffffff;
  --accent-soft: #dcefe9;
  --accent-strong: #08594d;
  --region: #d7e6dc;
  --region-hover: #a9d0c0;
  --region-line: #f5f3ee;
  --label: #1d2a33;
  --warn: #9a4b00;
  --warn-soft: #fff0dc;
  --danger: #b42318;
  --cta: #ff6b0a;
  --cta-hover: #ff8330;
  --cta-ink: #2a1200;
  --cta-text: #d9520a;
  --shadow: 0 1px 2px rgb(20 26 34 / 0.05), 0 8px 24px -12px rgb(20 26 34 / 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --tabbar-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e27;
    --surface-2: #1f2832;
    --ink: #eef1f4;
    --ink-2: #b3bcc7;
    --ink-3: #8691a0;
    --line: #2a3542;
    --accent: #43c2a8;
    --accent-ink: #062520;
    --accent-soft: #163a35;
    --accent-strong: #6fd8c2;
    --region: #2b4a45;
    --region-hover: #3a6b60;
    --region-line: #0f141b;
    --label: #dbe7e3;
    --warn: #ffb766;
    --warn-soft: #3a2a14;
    --danger: #ff8a7a;
    --cta: #ff7a1f;
    --cta-hover: #ff9447;
    --cta-ink: #2a1200;
    --cta-text: #ff9447;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px -14px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
code { font: 500 0.85em ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; }
svg { flex: none; }
[hidden] { display: none !important; }

.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: 12px; top: -48px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Top bar & tabs ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 18px/1 var(--display); }
.brand-mark { width: 30px; height: 30px; color: var(--accent-ink); }
.brand-mark rect { fill: var(--accent); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); text-decoration: none; font-size: 12px; font-weight: 600;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab-cta { color: var(--cta-text); font-weight: 700; }
.tab-cta svg { width: 44px; height: 28px; padding: 3px 10px; border-radius: 14px; background: var(--cta); color: var(--cta-ink); stroke-width: 2; }
.tab-cta[aria-current="page"] { color: var(--cta-text); }
.tab-cta[aria-current="page"]::before { background: var(--cta); }
.tab-cta .count { background: var(--ink); color: var(--bg); }
.count {
  position: absolute; top: 7px; left: calc(50% + 6px);
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 11px/20px var(--font); text-align: center;
}

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

main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 32px; }

.intro { margin-bottom: 18px; }
.intro h1 { font-size: clamp(28px, 7vw, 44px); }
.intro p { margin-top: 6px; color: var(--ink-2); max-width: 60ch; }

.find-layout, .write-layout { display: grid; gap: 16px; }
.find-layout > *, .write-layout > *, .write-form, .step { min-width: 0; }

/* ---------- Form controls ---------- */

.controls { display: grid; gap: 10px; margin-bottom: 12px; }

.field { display: flex; align-items: center; gap: 8px; position: relative; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px;
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field.search svg { position: absolute; left: 14px; width: 20px; height: 20px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.field.search input { padding-left: 44px; }
.field.select select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b8391' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px;
}
.field.stacked { flex-direction: column; align-items: stretch; gap: 6px; }
.field.stacked > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field textarea { resize: vertical; line-height: 1.55; min-height: 280px; }
.grow { flex: 1; min-width: 0; }

.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check small { color: var(--ink-3); }

.row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-3); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.big { min-height: 54px; font-size: 16px; width: 100%; }
.btn.danger { color: var(--danger); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Map ---------- */

.map-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.map-card summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; cursor: pointer; list-style: none; font-weight: 600;
}
.map-card summary::-webkit-details-marker { display: none; }
.map-card summary::after {
  content: ""; width: 10px; height: 10px; margin-left: 4px; flex: none;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.map-card[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.map-card summary > span:first-child { margin-right: auto; }
.map-caption { color: var(--ink-3); font-weight: 500; font-size: 14px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.map { padding: 0 8px 8px; }
.map svg { display: block; width: 100%; height: auto; max-height: 52vh; margin: 0 auto; touch-action: manipulation; }
.map-loading { padding: 40px; text-align: center; color: var(--ink-3); }

.map .region { fill: var(--region); stroke: var(--region-line); stroke-width: 2.5; stroke-linejoin: round; cursor: pointer; transition: fill .15s; outline: none; }
.map .region:hover, .map .region.hover { fill: var(--region-hover); }
.map .region:focus-visible { fill: var(--region-hover); stroke: var(--accent); stroke-width: 4; }
.map .region.active { fill: var(--accent); }
.map .label {
  font: 700 34px var(--font); fill: var(--label); text-anchor: middle; dominant-baseline: central;
  paint-order: stroke; stroke: var(--region); stroke-width: 6px; stroke-linejoin: round; pointer-events: none;
}
.map .label.active { fill: var(--accent-ink); stroke: var(--accent); }
.map .inset { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 6; }
.map.has-active .region:not(.active) { fill: color-mix(in srgb, var(--region) 75%, var(--bg)); }

/* ---------- Results ---------- */

.results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.results-head h2 { font-size: 24px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.results-actions { display: flex; gap: 8px; }

.members { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.member {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: grid; gap: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.member.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.member-top { display: flex; gap: 12px; align-items: flex-start; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong);
  font: 700 15px/1 var(--display);
}
.member-id { flex: 1; min-width: 0; }
.member-name { font: 600 17px/1.3 var(--font); margin: 0; }
.member-name .last { font-weight: 700; }
.member-name .pre { color: var(--ink-3); font-weight: 500; font-size: 14px; }
.member-role { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 500; line-height: 1;
  padding: 6px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 0; text-align: left;
}
button.tag { cursor: pointer; font-family: inherit; }
button.tag:hover { color: var(--ink); }
.tag b { font-weight: 700; color: var(--ink); }
.members.filtered .tag[data-filter] { display: none; }

.emails { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.email {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 2px 2px 2px 12px;
}
.email a.addr { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; font-size: 14.5px; overflow-wrap: anywhere; padding: 8px 0; }
.email a.addr:hover { color: var(--accent); text-decoration: underline; }
.email .kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); flex: none; }

.toggle-add { width: 100%; }
.toggle-add[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.toggle-add[aria-pressed="true"] .plus { display: none; }
.toggle-add[aria-pressed="false"] .tick { display: none; }

.no-results { padding: 32px 16px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Write ---------- */

.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step + .step { margin-top: 12px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-head h2 { font-size: 19px; }
.lang-switch { margin-left: auto; display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 999px; flex: none; }
.lang-switch button { font: 600 13px/1 var(--font); color: var(--ink-2); background: transparent; border: 0; border-radius: 999px; padding: 8px 12px; min-height: 34px; cursor: pointer; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-checked="true"] { background: var(--cta); color: var(--cta-ink); box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--cta) 70%, transparent); }
.step-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 700 13px/1 var(--font); flex: none; }
.hint, .empty-hint { color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.empty-hint { margin: 0; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 4px 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; font-weight: 600;
}
.chip small { font-weight: 500; opacity: .8; }
.chip button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }
.chip button:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.chip button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.chips-more { border: 0; background: none; color: var(--accent); font: 600 14px var(--font); cursor: pointer; padding: 8px; }

.samples {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: thin;
}
.sample {
  scroll-snap-align: start; flex: 0 0 72%; max-width: 240px;
  text-align: left; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1.5px solid transparent; color: var(--ink);
  font: inherit; cursor: pointer; display: grid; gap: 4px; align-content: start;
}
.sample strong { font-size: 15px; }
.sample span { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.sample em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.sample[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }

.blanks { display: grid; gap: 12px; }

.preview-col { display: grid; gap: 12px; align-content: start; }
.preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.preview-head h2 { font-size: 19px; }
.badge { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.envelope { margin: 0; padding: 4px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.envelope div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 8px 0; }
.envelope div + div { border-top: 1px dashed var(--line); }
.envelope dt { color: var(--ink-3); font-weight: 600; }
.envelope dd { margin: 0; overflow-wrap: anywhere; }
.letter { padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; max-height: 60vh; overflow: auto; }
.blank { background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 0 3px; font-weight: 600; }

.send-bar {
  display: grid; gap: 8px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.send-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.send-more .btn { padding: 0 8px; }
.fineprint { font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* ---------- Footer, toast, dialog ---------- */

.footer { max-width: 1240px; margin: 0 auto; padding: 8px 16px 28px; color: var(--ink-3); font-size: 13px; }
.footer p { margin: 0 0 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgb(0 0 0 / .4); }
.dialog h2 { font-size: 20px; margin-bottom: 6px; }
.dialog p { color: var(--ink-2); font-size: 14px; margin-bottom: 14px; }

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  main { padding: 28px 24px 40px; }
  .topbar-inner, .footer { padding-left: 24px; padding-right: 24px; }
  .controls { grid-template-columns: 1fr 1fr; }
  .members { grid-template-columns: 1fr 1fr; }
  .member { align-content: start; }
  .samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .sample { max-width: none; }
  .blanks { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .topbar {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
  }
  main { padding-top: 40px; }
  .tabs {
    position: static; display: flex; gap: 4px; height: auto; padding: 4px;
    background: var(--surface-2); border: 0; border-radius: 999px;
  }
  .tab { flex-direction: row; gap: 8px; padding: 9px 16px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2); }
  .tab svg { width: 18px; height: 18px; }
  .tab:hover { color: var(--ink); }
  .tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
  .tab[aria-current="page"]::before { display: none; }
  .count { position: static; }
  .tab-cta, .tab-cta[aria-current="page"] { background: var(--cta); color: var(--cta-ink); font-weight: 700; box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--cta) 70%, transparent); }
  .tab-cta:hover { background: var(--cta-hover); color: var(--cta-ink); }
  .tab-cta[aria-current="page"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--cta); }
  .tab-cta svg { width: 18px; height: 18px; padding: 0; border-radius: 0; background: none; stroke-width: 2.2; }
  .toast { bottom: 24px; }

  .find-layout { grid-template-columns: minmax(340px, 5fr) 7fr; gap: 28px; align-items: start; }
  .map-panel { position: sticky; top: 84px; }
  .map svg { max-height: calc(100vh - 260px); }
  .map-card summary { pointer-events: none; }
  .map-card summary::after { display: none; }
  .members { grid-template-columns: 1fr; }
  .results-head { margin-top: 0; }

  .write-layout { grid-template-columns: 7fr 5fr; grid-template-rows: auto 1fr; gap: 12px 28px; align-items: start; }
  .write-form { grid-column: 1; grid-row: 1; }
  .write-edit { grid-column: 1; grid-row: 2; }
  .preview-col { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 84px; }
  .letter { max-height: calc(100vh - 430px); min-height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
