/* NeighborForge. Dark Forge house style, phone first (380px), then tablet, then desktop.
   Rule: #FFFFFF is never used for text, icons or design elements. Light ink is #FFFFFD. */

@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2-variations'); }

:root {
  --midnight: #0B1533;
  --panel: #12204A;
  --panel-2: #172858;
  --line: #2A3A6E;
  --ink: #FFFFFD;
  --ink-2: #C9D2EE;
  --ink-3: #A9B5DA;
  --ruby: #E0193A;
  --ruby-text: #FF6B7D;
  --ruby-room: #330A16;
  --topaz: #FFC20E;
  --topaz-room: #402609;
  --emerald: #00A651;
  --emerald-text: #3DDC8A;
  --emerald-room: #052B1C;
  --sapphire: #1659E0;
  --sapphire-text: #7FA9FF;
  --sapphire-room: #0A1A45;
  --focus: #FFC20E;
  --radius-btn: 14px;
  --radius-card: 20px;
  --tap: 48px;
  --gutter: 16px;
  --font-head: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--sapphire-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.icon { width: 22px; height: 22px; flex: none; }
.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: 8px; top: -60px; background: var(--topaz); color: var(--midnight); padding: 10px 14px; border-radius: 10px; font-weight: 800; z-index: 100; }
.skip:focus { top: 8px; }

h1, h2, h3 { font-family: var(--font-head); font-stretch: 118%; font-variation-settings: "wdth" 118; font-weight: 880; letter-spacing: -0.015em; line-height: 1.04; margin: 0 0 12px; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.92rem; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px var(--gutter);
  background: rgba(11, 21, 51, 0.96);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: var(--tap); }
.brand-mark { width: 30px; height: 30px; color: var(--topaz); }
.brand-name { font-family: var(--font-head); font-stretch: 118%; font-weight: 880; font-size: 1.15rem; letter-spacing: -0.015em; }
.topbar form { margin: 0; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: var(--tap); min-height: var(--tap); padding: 0 10px;
  background: transparent; color: var(--ink-2); border: 1px solid transparent; border-radius: 12px;
  font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.iconbtn:hover { color: var(--ink); border-color: var(--line); }
.desktop-nav { display: none; }

/* ---------- Bottom tab bar (phone) ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--panel); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 60px; color: var(--ink-2); text-decoration: none; font-size: 0.75rem; font-weight: 700;
}
.tabbar a[aria-current="page"] { color: var(--topaz); }
.tabbar a[aria-current="page"] .icon { stroke-width: 2.4; }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px var(--gutter) 24px; }
.footer { padding: 18px var(--gutter) calc(84px + env(safe-area-inset-bottom, 0)); text-align: center; color: var(--ink-2); font-size: 0.85rem; border-top: 1px solid var(--line); }
.footer p { margin: 0; }
body.public .footer { padding-bottom: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px;
  font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.15; text-align: center; text-decoration: none;
  border-radius: var(--radius-btn); border: 2px solid var(--ink); cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn.topaz { background: var(--topaz); color: var(--midnight); box-shadow: 4px 4px 0 var(--ruby); }
.btn.topaz:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ruby); }
.btn.emerald { background: var(--emerald); color: var(--midnight); box-shadow: 4px 4px 0 var(--topaz); }
.btn.emerald:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--topaz); }
.btn.sapphire { background: var(--sapphire); color: var(--ink); box-shadow: 4px 4px 0 var(--ruby); }
.btn.sapphire:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ruby); }
.btn.ghost { background: transparent; color: var(--ink); border-color: rgba(255, 255, 253, 0.4); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: transparent; color: var(--ruby-text); border-color: var(--ruby-text); }
.btn.danger.solid { background: var(--ruby); color: var(--ink); border-color: var(--ink); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 0.92rem; }
.btn.block { display: flex; width: 100%; }
.btn .icon { width: 20px; height: 20px; }
.linkbtn { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--sapphire-text); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn.danger { color: var(--ruby-text); }

.actions { display: grid; gap: 14px; margin: 4px 0 24px; }
.actions .btn { min-height: 58px; font-size: 1.05rem; justify-content: flex-start; padding: 0 18px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form { display: inline; margin: 0; }

/* ---------- Cards and sections ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px; margin-bottom: 16px; }
.card > h2:first-child, .card > header h2 { margin-bottom: 10px; }
.card header.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card header.card-head h2 { margin: 0; }
.section-title { display: flex; align-items: center; gap: 8px; }
.page-head { margin: 4px 0 18px; }
.page-head .sub { color: var(--ink-2); margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--ink-2); text-decoration: none; font-weight: 700; margin-bottom: 4px; }
.back:hover { color: var(--ink); }
.empty { color: var(--ink-2); padding: 6px 0; margin: 0; }

.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.count { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 10px; text-decoration: none; color: var(--ink); display: block; }
.count strong { display: block; font-family: var(--font-head); font-stretch: 118%; font-size: 1.6rem; font-weight: 880; line-height: 1; }
.count span { color: var(--ink-2); font-size: 0.85rem; font-weight: 600; }
.count:hover { border-color: var(--ink-3); }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list-link { display: flex; align-items: center; gap: 12px; padding: 12px 2px; min-height: 64px; color: var(--ink); text-decoration: none; }
.list-link:hover .title { text-decoration: underline; text-underline-offset: 3px; }
.list-link .body { flex: 1; min-width: 0; }
.list-link .title { font-weight: 800; display: block; overflow-wrap: anywhere; }
.list-link .meta { color: var(--ink-2); font-size: 0.92rem; display: block; overflow-wrap: anywhere; }
.list-link .chev { color: var(--ink-3); }

.fu { display: grid; gap: 8px; padding: 12px 0; }
.fu-top { display: flex; gap: 10px; align-items: flex-start; }
.fu-top .body { flex: 1; min-width: 0; }
.fu-title { font-weight: 800; overflow-wrap: anywhere; }
.fu .row-actions .btn { flex: 1 1 auto; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 10px 0 10px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--sapphire-text); }
.timeline li.in::before { border-color: var(--emerald-text); }
.timeline li.out::before { border-color: var(--topaz); }
.timeline .when { color: var(--ink-2); font-size: 0.88rem; display: block; }
.timeline .what { overflow-wrap: anywhere; white-space: pre-line; }

/* ---------- Status tags (text always included, color is never the only signal) ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; border: 1px solid var(--line); color: var(--ink-2); background: var(--panel-2); white-space: nowrap; }
.tag.ruby { color: var(--ruby-text); border-color: rgba(255, 107, 125, 0.6); background: var(--ruby-room); }
.tag.topaz { color: var(--topaz); border-color: rgba(255, 194, 14, 0.6); background: var(--topaz-room); }
.tag.emerald { color: var(--emerald-text); border-color: rgba(61, 220, 138, 0.55); background: var(--emerald-room); }
.tag.sapphire { color: var(--sapphire-text); border-color: rgba(127, 169, 255, 0.6); background: var(--sapphire-room); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; border: 2px solid; }
.banner .icon { width: 26px; height: 26px; margin-top: 1px; }
.banner p { margin: 0; }
.banner strong { display: block; font-size: 1.05rem; }
.banner.dnc { background: var(--ruby-room); border-color: var(--ruby-text); color: var(--ink); }
.banner.dnc .icon { color: var(--ruby-text); }
.banner.unverified { background: var(--topaz-room); border-color: var(--topaz); color: var(--ink); }
.banner.unverified .icon { color: var(--topaz); }
.banner.archived { background: var(--sapphire-room); border-color: var(--sapphire-text); }

.flash { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-weight: 700; border: 2px solid; }
.flash.ok { background: var(--emerald-room); border-color: var(--emerald-text); color: var(--ink); }
.flash.error { background: var(--ruby-room); border-color: var(--ruby-text); color: var(--ink); }

/* ---------- Key value details ---------- */
dl.kv { display: grid; grid-template-columns: 1fr; gap: 2px 14px; margin: 0; }
dl.kv dt { color: var(--ink-2); font-size: 0.88rem; font-weight: 600; margin-top: 8px; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---------- Forms ---------- */
form.stack { display: grid; gap: 4px; }
.field { margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 800; margin-bottom: 6px; }
.field .opt { font-weight: 500; color: var(--ink-2); font-size: 0.88rem; }
.hint { color: var(--ink-2); font-size: 0.92rem; margin: -2px 0 8px; }
.err { color: var(--ruby-text); font-weight: 700; margin: -2px 0 8px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=date], input[type=datetime-local],
input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--midnight); border: 2px solid var(--line); border-radius: 12px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus, textarea:focus { border-color: var(--topaz); outline: none; box-shadow: 0 0 0 3px rgba(255, 194, 14, 0.35); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--ruby-text); }
input[type=file] { width: 100%; min-height: 50px; padding: 10px; color: var(--ink); background: var(--midnight); border: 2px dashed var(--line); border-radius: 12px; font: inherit; }
input[type=file]::file-selector-button { font: inherit; font-weight: 800; padding: 8px 14px; margin-right: 10px; border-radius: 10px; border: 2px solid var(--ink); background: var(--panel-2); color: var(--ink); cursor: pointer; }
::placeholder { color: var(--ink-3); opacity: 1; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; margin: 0 !important; font-weight: 700 !important; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--midnight); color: var(--ink); }
.chip input:checked + span { background: var(--sapphire); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.checkline { display: flex !important; align-items: center; gap: 12px; min-height: 48px; font-weight: 700; cursor: pointer; }
.checkline input { width: 26px; height: 26px; accent-color: var(--sapphire); flex: none; }

.form-actions { display: grid; gap: 12px; margin-top: 8px; }
.form-actions .btn { width: 100%; }
details.more { border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; margin: 4px 0 16px; background: var(--panel); }
details.more summary { min-height: 52px; display: flex; align-items: center; font-weight: 800; cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; display: inline-block; width: 22px; color: var(--topaz); font-size: 1.3rem; }
details.more[open] summary::before { content: "\2212"; }
details.more[open] { padding-bottom: 14px; }
[hidden] { display: none !important; }

.filters { display: grid; gap: 10px; margin-bottom: 16px; }
.filters .field { margin: 0; }
.filters .search-row { display: flex; gap: 8px; }
.filters .search-row input { flex: 1; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-note { color: var(--ink-2); font-size: 0.92rem; margin: 0 0 10px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.seg a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.seg a[aria-current="true"] { background: var(--sapphire); border-color: var(--ink); }

/* ---------- Login ---------- */
.auth { max-width: 420px; margin: 24px auto 0; }
.auth .card { padding: 22px 18px; }
.qr { display: block; margin: 8px auto 12px; width: 220px; height: 220px; background: #FFFFFF; border-radius: 12px; padding: 8px; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: 0.04em; background: var(--midnight); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; overflow-wrap: anywhere; }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.3em; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }

.audit-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.audit-table th, .audit-table td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.audit-table th { color: var(--ink-2); font-weight: 700; }
.table-wrap { overflow-x: auto; }

.danger-zone { border-color: rgba(255, 107, 125, 0.5); }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  h1 { font-size: 2.1rem; }
  .actions { grid-template-columns: repeat(3, 1fr); }
  .actions .btn { justify-content: center; }
  .counts { gap: 14px; }
  .form-actions { grid-template-columns: auto auto; justify-content: start; }
  .form-actions .btn { width: auto; min-width: 180px; }
  .filters { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: repeat(4, 1fr); }
  dl.kv { grid-template-columns: max-content 1fr; }
  dl.kv dt { margin-top: 0; padding: 6px 0; }
  dl.kv dd { padding: 6px 0; }
  .fu { grid-template-columns: 1fr auto; align-items: center; }
  .fu .row-actions .btn { flex: none; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 980px) {
  .tabbar { display: none; }
  .footer { padding-bottom: 24px; }
  .desktop-nav { display: flex; gap: 4px; }
  .desktop-nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 700; }
  .desktop-nav a:hover { color: var(--ink); background: var(--panel); }
  .desktop-nav a[aria-current="page"] { color: var(--topaz); background: var(--panel); }
  .page-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0 20px; align-items: start; }
  .home-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0 20px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .btn.topaz:active, .btn.emerald:active, .btn.sapphire:active { transform: none; }
}

@media (forced-colors: active) {
  .btn, .chip span, .tag, .banner { border: 2px solid CanvasText; }
}

@media print {
  .tabbar, .topbar form, .desktop-nav, .actions { display: none; }
}

/* Utilities (CSP blocks inline style attributes, so spacing lives here) */
.spread { justify-content: space-between; }
.m0 { margin: 0; }
.mt14, [data-mt14] { margin-top: 14px; }
[data-mt12] { margin-top: 12px; }
[data-mt10], .mt10 { margin-top: 10px; }
[data-mt24] { margin-top: 24px; }
[data-mt6] { margin: 6px 0 0; }
[data-mb4] { margin-bottom: 4px; }
[data-block], .block { display: block; }
[data-pad8] { padding: 8px 0; }
.text-ruby { color: var(--ruby-text); }

/* ---------- Metrics ---------- */
.hero-metric .big-number { font-family: var(--font-head); font-stretch: 118%; font-weight: 880; font-size: 4rem; line-height: 1; color: var(--topaz); margin: 4px 0 10px; }
dl.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
dl.stats > div { background: var(--midnight); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
dl.stats dt { color: var(--ink-2); font-size: 0.88rem; font-weight: 600; }
dl.stats dd { margin: 2px 0 0; font-family: var(--font-head); font-stretch: 118%; font-weight: 880; font-size: 1.6rem; line-height: 1.1; }
dl.stats dd a { color: var(--ink); text-decoration: none; display: inline-block; min-height: 32px; }
dl.stats dd a:hover { text-decoration: underline; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 12px; }
.share-item { margin: 0; }
.share-item img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--midnight); }
.share-item figcaption { font-size: 0.88rem; color: var(--ink-2); margin: 8px 0; }
.share-item .row-actions .btn { flex: 1 1 auto; }
#public-link { font-size: 15px; }

/* ---------- Public counter page ---------- */
body.count-page { background: radial-gradient(120% 70% at 50% 35%, #2A2410 0%, var(--midnight) 60%), var(--midnight); }
.count-main { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 82vh; padding: 32px var(--gutter); }
.count-mark { width: 56px; height: 56px; margin-bottom: 8px; }
.count-brand { font-family: var(--font-head); font-stretch: 118%; font-weight: 880; font-size: 1.4rem; margin: 0 0 18px; }
.count-h1 { margin: 0 0 22px; }
.count-number { display: block; font-size: clamp(5rem, 30vw, 11rem); line-height: 0.95; color: var(--topaz); }
.count-line { display: block; font-family: var(--font-body); font-stretch: normal; font-weight: 800; letter-spacing: 0; font-size: 1.35rem; line-height: 1.3; max-width: 22ch; margin: 14px auto 0; }
.count-tag { color: var(--ink-2); font-size: 1.15rem; margin: 0 0 6px; }
.count-free { color: var(--topaz); font-weight: 800; font-size: 1.15rem; margin: 0 0 28px; }
.count-updated { color: var(--ink-2); font-size: 0.95rem; margin: 0; }
body.count-page .footer { border-top: 0; padding-bottom: 24px; }

/* ---------- Discovery ---------- */
.banner.gate { background: var(--sapphire-room); border-color: var(--sapphire-text); }
.banner.gate .icon { color: var(--sapphire-text); }
.banner.ok { background: var(--emerald-room); border-color: var(--emerald-text); }
.banner.ok .icon { color: var(--emerald-text); }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.steps li { font-size: 0.82rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.steps li[aria-current="step"] { background: var(--sapphire); color: var(--ink); border-color: var(--ink); }
.steps li.done { color: var(--emerald-text); border-color: rgba(61, 220, 138, 0.55); }
.url-line { overflow-wrap: anywhere; }
@media (min-width: 640px) {
  dl.stats { grid-template-columns: repeat(3, 1fr); }
}
.merge-choice { display: block; cursor: pointer; }
.merge-choice:has(input:checked) { border-color: var(--topaz); box-shadow: 0 0 0 2px var(--topaz) inset; }

/* ---------- Public intake forms (/join, /hire) ---------- */
.intake-main { max-width: 640px; }
.intake-hero { margin: 8px 0 18px; }
.eyebrow { display: inline-block; color: var(--topaz); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em; margin: 0 0 8px; }
.intake-hero h1 { font-size: 2rem; margin-bottom: 14px; }
.lead { font-size: 1.1rem; color: var(--ink-2); }
.intake-hero .lead:last-child { margin-bottom: 0; }
.intake-form .card { padding: 18px 16px 6px; }
.intake-form .card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; margin-bottom: 16px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--topaz); color: var(--midnight); font-size: 1rem; font-stretch: 100%; }
.intake-form .chip span { min-height: 48px; }
.intake-form .checkline { align-items: flex-start; font-size: 1.02rem; line-height: 1.4; padding: 6px 0; }
.intake-form .checkline input { margin-top: 0; }
.intake-form .field.check .hint { margin: 2px 0 6px 38px; }
.intake-form .field.check .err { margin-bottom: 4px; }
.consent-card { border-color: rgba(255, 194, 14, 0.45); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.btn.big { min-height: 60px; font-size: 1.15rem; margin-top: 4px; }
.center { text-align: center; }
.intake-form > .small { margin-top: 12px; }
.other-door { margin: 18px 0 4px; text-align: center; color: var(--ink-2); }
.footer .footer-free { color: var(--topaz); font-weight: 800; margin-bottom: 6px; }
.thanks { max-width: 520px; margin: 32px auto 0; text-align: center; }
.thanks .card { text-align: left; }
.thanks-mark { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%; background: var(--emerald); color: var(--midnight); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--topaz); margin-bottom: 18px; }
.thanks-mark .icon { width: 40px; height: 40px; stroke-width: 3; }
.thanks h1 { font-size: 2rem; }
.thanks-free { color: var(--topaz); font-weight: 800; margin: 18px 0 22px; }
.thanks-links { display: grid; gap: 12px; }
@media (min-width: 640px) {
  .intake-hero h1 { font-size: 2.4rem; }
  .intake-form .card { padding: 22px 22px 8px; }
}

/* Links from the public counter to the forms */
.count-actions { display: grid; gap: 14px; width: 100%; max-width: 340px; margin: 0 0 28px; }
.count-actions .btn { min-height: 56px; }

/* Admin: new submissions from the public forms */
.banner.intake { background: var(--sapphire-room); border-color: var(--sapphire-text); }
.banner.intake .icon { color: var(--sapphire-text); }
.banner.intake a { color: var(--ink); }
.banner.intake .small { display: block; }
.consent-note { margin: 10px 0 4px; }

/* Public forms: high contrast permission boxes (the native dark checkbox is too faint on the panel) */
.intake-form .checkline input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; width: 28px; height: 28px; margin: 0; cursor: pointer;
  border: 2px solid var(--ink-2); border-radius: 8px; background: var(--midnight) center / 18px 18px no-repeat;
}
.intake-form .checkline input[type=checkbox]:checked {
  background-color: var(--sapphire); border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFD' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.intake-form .has-error .checkline input[type=checkbox] { border-color: var(--ruby-text); }
.intake-form .checkline input[type=checkbox]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.intake-form input, .intake-form textarea { scroll-margin-top: 150px; }
.intake-hero h1, .thanks h1 { text-wrap: balance; }
.other-door a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 700; }
@media (forced-colors: active) {
  .intake-form .checkline input[type=checkbox] { appearance: auto; -webkit-appearance: checkbox; }
}

/* ---------- Public plain language pages (/about, /privacy, /terms) and shared public bits ---------- */
.free-line { display: inline-block; color: var(--topaz); font-weight: 800; font-size: 1.05rem; margin: 0 0 12px; }
.about-actions { display: grid; gap: 14px; margin: 0 0 22px; }
.about-actions .btn { min-height: 56px; }
.page-card h2 { font-size: 1.3rem; }
.page-card p { margin: 0 0 12px; line-height: 1.55; }
.page-card p:last-child, .page-card ul:last-child, .page-card ol:last-child { margin-bottom: 0; }
.page-card a { overflow-wrap: anywhere; }
.plain-list, .how-steps { margin: 0 0 12px; padding-left: 22px; line-height: 1.55; }
.plain-list li, .how-steps li { margin-bottom: 10px; }
.plain-list li:last-child, .how-steps li:last-child { margin-bottom: 0; }
.how-steps li::marker { color: var(--topaz); font-family: var(--font-head); font-weight: 880; }
.short-version { border-color: rgba(255, 194, 14, 0.45); }
.policy-date { color: var(--ink-2); font-weight: 700; margin: 0 0 8px; }
.review-note { color: var(--ink-2); font-size: 0.95rem; border-left: 3px solid var(--topaz); padding: 4px 0 4px 12px; margin: 8px 0 0; }
.pay-forward { color: var(--ink-2); font-size: 0.92rem; line-height: 1.5; text-align: center; max-width: 34em; margin: 18px auto 6px; }
.thanks .pay-forward { margin: -6px auto 22px; }
.consent-links { margin: 6px 0 12px; }
.consent-links a { font-weight: 700; }

/* Footer links on every public page */
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 4px 0 6px; }
.footer-links a, .footer-contact a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 700; }
.footer-contact { margin-bottom: 6px !important; }

/* /join: "Before an introduction" choice (big round radios, high contrast like the permission boxes) */
.intro-choice { margin: 8px 0 10px; padding: 12px 12px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.intro-choice legend { float: left; width: 100%; margin-bottom: 4px; }
.intro-choice legend + * { clear: both; }
.intake-form .intro-choice .checkline { font-weight: 600; }
.intake-form .checkline input[type=radio] {
  appearance: none; -webkit-appearance: none; flex: none; width: 28px; height: 28px; margin: 0; cursor: pointer;
  border: 2px solid var(--ink-2); border-radius: 50%; background: var(--midnight);
}
.intake-form .checkline input[type=radio]:checked { border-color: var(--ink); background: radial-gradient(circle, var(--ink) 0 5px, var(--sapphire) 6px); }
.intake-form .checkline input[type=radio]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (forced-colors: active) {
  .intake-form .checkline input[type=radio] { appearance: auto; -webkit-appearance: radio; }
}
.public a[href^="tel:"] { white-space: nowrap; }
.consent-links a { display: inline-flex; align-items: center; min-height: 44px; }
.intake-page .page-card a, .about-actions + .card a { padding: 2px 0; }

/* Demo copy banner */
.demo-banner{background:#F2B705;color:#0B1533;padding:.6rem 1rem;text-align:center;font-weight:600;font-size:.95rem;line-height:1.4}
.demo-banner strong{font-weight:800}

/* Show or hide password (eye button added by app.js) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 56px; }
.pw-toggle { position: absolute; top: 0; right: 0; width: 52px; height: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: 0 12px 12px 0; color: var(--ink-2); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed=true] { color: var(--ink); }
.pw-toggle:focus-visible { outline: 3px solid var(--topaz); outline-offset: -3px; }
.pw-toggle .icon { width: 22px; height: 22px; }
