/*
 * Campaign OS design system. A clean CRM look: navy ink, white cards on a cool grey
 * canvas, one orange accent for primary actions, teal for links and focus.
 * Chart colours (--series-*) were run through the dataviz palette validator
 * (light mode, white surface): all checks pass.
 */
:root {
  --ink: #33475b;            /* primary text */
  --ink-strong: #213343;
  --ink-muted: #516f90;      /* secondary text, 5.2:1 on white */
  --canvas: #f5f8fa;         /* page background */
  --surface: #ffffff;        /* cards */
  --surface-sunken: #f5f8fa;
  --line: #dfe3eb;           /* borders */
  --line-strong: #cbd6e2;
  --grid: #eaf0f6;           /* chart gridlines */
  --nav: #2d3e50;
  --nav-ink: #cbd6e2;
  --accent: #cc4a22;         /* primary buttons, 4.7:1 with white */
  --accent-hover: #b03f1c;
  --accent-soft: #fff1ec;
  --link: #00728a;
  --focus: #00a4bd;

  --good: #00875a;   --good-soft: #e5f5ee;
  --warn: #a35a00;   --warn-soft: #fef3e2;
  --bad: #c0392b;    --bad-soft: #fdecea;
  --info: #00728a;   --info-soft: #e5f5f8;

  --series-1: #0091ae;  --series-2: #e8613a;  --series-3: #00a38d;
  --series-4: #5c6bc8;  --series-5: #c48a1c;  --series-6: #d64570;
  --muted-mark: #b8c4d2;     /* de-emphasised data (Low priority, track) */

  --tier-mobilise: #00a38d;  --tier-persuade: #e8613a;  --tier-low: #b8c4d2;

  --radius: 6px;
  --shadow: 0 1px 2px rgba(45, 62, 80, .06), 0 1px 1px rgba(45, 62, 80, .04);
  --font: "Lexend Deca", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink-strong); font-weight: 600; line-height: 1.25; margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-sunken); padding: 1px 5px; border-radius: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--ink-muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Top navigation ---------- */
.topnav { background: var(--nav); color: var(--nav-ink); position: sticky; top: 0; z-index: 1100; } /* above Leaflet controls (1000) */
.topnav-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 20px; }
.demo-banner { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 12px; font-weight: 500; padding: 6px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; }
.brand-workspace { color: var(--nav-ink); font-weight: 400; font-size: 13px; border-left: 1px solid #4a5d70; padding-left: 10px;
  display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }  /* long workspace names never push the menu */
.nav-links { display: flex; gap: 4px; height: 100%; flex: 1; flex-wrap: wrap; }
.nav-links a { color: var(--nav-ink); display: flex; align-items: center; padding: 0 8px; height: 100%; border-bottom: 3px solid transparent; border-top: 3px solid transparent; white-space: nowrap; font-size: 14px; }
.nav-links a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.05); }
.nav-links > a.active { color: #fff; border-bottom-color: var(--series-2); }
.nav-group { position: relative; height: 100%; }
.nav-group summary { list-style: none; cursor: pointer; color: var(--nav-ink); display: flex; align-items: center; gap: 6px; padding: 0 8px; height: 100%; border-top: 3px solid transparent; border-bottom: 3px solid transparent; white-space: nowrap; font-size: 14px; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover, .nav-group[open] summary { color: #fff; background: rgba(255,255,255,.05); }
.nav-group.active summary { color: #fff; border-bottom-color: var(--series-2); }
.nav-group[open] summary svg { transform: rotate(180deg); }
.nav-menu { position: absolute; top: 100%; left: 0; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(45, 62, 80, .18); padding: 6px 0; z-index: 1200; }
.nav-links .nav-menu a { color: var(--ink); height: auto; padding: 9px 16px; border: 0; display: block; }
.nav-links .nav-menu a:hover { background: var(--surface-sunken); text-decoration: none; color: var(--ink-strong); }
.nav-menu.end { left: auto; right: 0; }
.nav-group.account summary { padding: 0; border: 0; height: auto; }
.nav-group.account summary:hover .avatar, .nav-group.account[open] .avatar { box-shadow: 0 0 0 2px var(--nav-ink); }
.nav-group.account .nav-menu { top: calc(100% + 13px); min-width: 230px; }
.account-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 16px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
.account-who strong { color: var(--ink-strong); font-weight: 600; }
.nav-user .nav-menu a { display: block; padding: 9px 16px; color: var(--ink); font-size: 14px; }
.nav-user .nav-menu a:hover { background: var(--surface-sunken); color: var(--ink-strong); text-decoration: none; }
.nav-user .nav-menu button { width: 100%; text-align: left; border: 0; border-radius: 0; padding: 9px 16px; color: var(--ink); font-size: 14px; }
.nav-user .nav-menu button:hover { background: var(--surface-sunken); color: var(--ink-strong); }
.nav-links .nav-menu a.active { font-weight: 600; color: var(--ink-strong); box-shadow: inset 3px 0 0 var(--series-2); }
.nav-user { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #516f90; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; text-transform: uppercase; cursor: pointer; position: relative; }
.nav-user button { background: transparent; color: var(--nav-ink); border: 1px solid #4a5d70; border-radius: 3px; padding: 4px 10px; font: inherit; cursor: pointer; }
.nav-user button:hover, .nav-user .nav-field:hover { color: #fff; border-color: var(--nav-ink); text-decoration: none; }
.nav-user .nav-field { color: var(--nav-ink); border: 1px solid #4a5d70; border-radius: 3px; padding: 4px 10px; }

/* ---------- Page ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 24px 24px 64px; }
.breadcrumb { font-size: 14px; margin-bottom: 8px; color: var(--ink-muted); }
.breadcrumb::before { content: "\2190\00a0"; color: var(--link); }  /* a back arrow: the way up */
.breadcrumb a { font-weight: 500; }
@media (max-width: 700px) { .breadcrumb { font-size: 15px; line-height: 1.9; } .breadcrumb a { display: inline-block; padding: 4px 0; } }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-header .subtitle { color: var(--ink-muted); margin: 6px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section { margin-top: 24px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-main { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-header p { margin: 4px 0 0; color: var(--ink-muted); font-size: 13px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-sunken); border-radius: 0 0 var(--radius) var(--radius); font-size: 13px; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); min-width: 0; }
.kpi-label { font-size: 13px; color: var(--ink-muted); display: block; }
.kpi-value { font-size: 28px; font-weight: 600; color: var(--ink-strong); display: block; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-sub { font-size: 12px; color: var(--ink-muted); display: block; margin-top: 4px; }
.kpi.accent { border-top: 3px solid var(--series-2); }
.delta-bad { color: var(--bad); font-weight: 600; }
.delta-good { color: var(--good); font-weight: 600; }

/* ---------- Meter (path to victory) ---------- */
.meter { position: relative; height: 18px; background: var(--grid); border-radius: 4px; overflow: hidden; display: flex; gap: 2px; }
.meter > span { display: block; height: 100%; }
.meter .m-base { background: var(--series-1); }
.meter .m-gain { background: repeating-linear-gradient(135deg, var(--series-3) 0 6px, #4dc3b2 6px 10px); }
.meter-target { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink-strong); }
.meter-wrap { position: relative; padding-top: 22px; }
.meter-wrap .target-label { position: absolute; top: 0; transform: translateX(-50%); font-size: 12px; color: var(--ink-strong); font-weight: 600; white-space: nowrap; }
.meter-wrap .target-label.end { transform: translateX(calc(-100% + 2px)); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); font-weight: 600; background: var(--surface-sunken); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f9fbfc; }
.table tr.highlight td { background: #f2fbf9; }
.table .rank { color: var(--ink-muted); width: 32px; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell .b { height: 6px; border-radius: 0 3px 3px 0; background: var(--series-1); min-width: 2px; }

/* ---------- Tags / badges ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.tag.plain::before { display: none; }
.tag-mobilise { background: #e5f6f3; color: #00705f; }
.tag-mobilise::before { background: var(--tier-mobilise); }
.tag-persuade { background: #fdeee8; color: #a8401c; }
.tag-persuade::before { background: var(--tier-persuade); }
.tag-low-priority, .tag-neutral { background: #eef2f6; color: #516f90; }
.tag-low-priority::before, .tag-neutral::before { background: var(--tier-low); }
.tag-good { background: var(--good-soft); color: var(--good); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-info { background: var(--info-soft); color: var(--info); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid; margin-bottom: 16px; align-items: flex-start; }
.alert svg { flex: none; margin-top: 2px; }
.alert p:last-child { margin: 0; }
.alert-info { background: var(--info-soft); border-color: #b3e0ea; }
.alert-success { background: var(--good-soft); border-color: #b2e0cb; }
.alert-warning { background: var(--warn-soft); border-color: #f5d39c; }
.alert-error { background: var(--bad-soft); border-color: #f2b8b1; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 500 14px/1.3 var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; background: var(--surface-sunken); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--bad); border-color: #e9a59d; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=tel],
input[type=url], input[type=date], input[type=time], input[type=datetime-local], select, textarea, input[type=file] {
  font: 14px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 3px; padding: 8px 10px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(0, 164, 189, .2); }
select.compact { padding: 4px 8px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--ink-strong); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { width: 100%; }
textarea { resize: vertical; }
.field .help { display: block; font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.field .error, .error { color: var(--bad); font-size: 12px; display: block; margin-top: 4px; }
.field.full { grid-column: 1 / -1; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checkbox input { margin-top: 3px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-actions input { flex: 1; min-width: 0; }
.toolbar input[type=search] { min-width: 240px; flex: 1; max-width: 360px; }
form.inline { display: inline; }
.form-actions { display: flex; gap: 8px; margin-top: 20px; }

/* ---------- Stepper ---------- */
.stepper { display: flex; gap: 0; margin-bottom: 20px; counter-reset: step; flex-wrap: wrap; }
.stepper li { list-style: none; display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 13px; padding-right: 28px; position: relative; }
.stepper li::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-weight: 600; font-size: 12px; background: var(--surface); }
.stepper li.done::before { content: "✓"; background: var(--series-3); border-color: var(--series-3); color: #fff; }
.stepper li.current { color: var(--ink-strong); font-weight: 600; }
.stepper li.current::before { border-color: var(--accent); color: var(--accent); }
.stepper { padding: 0; }

/* ---------- Misc ---------- */
.chart { position: relative; height: 260px; }
.chart-note { margin: 8px 0 0; font-size: 12px; color: var(--ink-muted); }
#map { height: 360px; border-radius: var(--radius); }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-muted); }
.empty h3 { margin-bottom: 6px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.dl dt { color: var(--ink-muted); }
.dl dd { margin: 0; color: var(--ink-strong); }
details.explain summary { cursor: pointer; color: var(--link); font-weight: 500; }
details.explain[open] summary { margin-bottom: 8px; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.danger-zone { border-color: #f2b8b1; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 400px; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }

@media (max-width: 1100px) { .brand-workspace { display: none; } }
/* Below 1010px the owner's bar (measured: brand 135 + menu 655 + user 123 + gaps and padding 88 = 1001px) no longer fits: menu gets its own row. */
@media (max-width: 1009px) {
  .topnav-inner { gap: 0 12px; height: auto; flex-wrap: wrap; }
  .brand, .nav-user { height: 52px; }
  .nav-user { margin-left: auto; }
  .nav-links { order: 3; flex-basis: 100%; height: auto; margin: 0 -24px; padding: 0 16px; border-top: 1px solid #3e5165; }
  .nav-links > a, .nav-group { height: 44px; }
}
@media (max-width: 480px) { .brand-name { display: none; } }
@media (max-width: 700px) {
  .topnav { position: static; }  /* the stacked bar is too tall to pin on a phone */
  .topnav-inner { padding: 0 16px; }
  .nav-links { margin: 0 -16px; padding: 0 8px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .brand-workspace { display: none; }
  .page { padding: 16px 16px 48px; }
  .kpi-value { font-size: 24px; }
  .toolbar input[type=search] { min-width: 0; }
}

/* ---------- Drill-down maps ---------- */
.areamap, .areamap.leaflet-container { height: 460px; background: var(--surface-sunken); border-radius: var(--radius); }
.areamap .leaflet-interactive { cursor: pointer; }
.leaflet-tooltip.map-tip { background: var(--nav); color: #fff; border: 0; border-radius: 4px; padding: 6px 10px; font: 12px/1.4 var(--font); box-shadow: var(--shadow); }
.leaflet-tooltip.map-tip::before { display: none; }
.map-legend { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 12px; font-size: 12px; color: var(--ink-muted); align-items: center; }
.map-legend .swatch { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 0; white-space: nowrap; }
.map-legend .swatch i { height: 10px; border-radius: 2px; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 3px; overflow: hidden; }
.segmented a { padding: 5px 12px; font-size: 13px; color: var(--ink); border-left: 1px solid var(--line-strong); }
.segmented a:first-child { border-left: 0; }
.segmented a.on { background: var(--nav); color: #fff; }
.segmented a:hover { text-decoration: none; }
@media (max-width: 700px) { .areamap, .areamap.leaflet-container { height: 340px; } .map-legend { font-size: 10px; flex-wrap: nowrap; } }

/* ---------- Field app (phones) ---------- */
body.fa { background: var(--canvas); padding-bottom: env(safe-area-inset-bottom); }
.fa-top { position: sticky; top: 0; z-index: 20; background: var(--nav); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; }
.fa-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-brand .brand-mark { width: 24px; height: 24px; flex: none; }
.fa-pill { border: 0; border-radius: 999px; padding: 6px 12px; font: 600 12px var(--font); cursor: pointer; white-space: nowrap; }
/* Same status colours as the platform's tags and alerts. */
.fa-pill.good { background: var(--good-soft); color: var(--good); }
.fa-pill.warn { background: var(--warn-soft); color: var(--warn); }
.fa-pill.bad { background: var(--bad-soft); color: var(--bad); }
.fa-main { max-width: 640px; margin: 0 auto; padding: 16px 14px 96px; }
.fa-h1 { font-size: 22px; margin: 4px 0 8px; }
.fa-h2 { font-size: 16px; margin: 24px 0 8px; }
.fa-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: var(--shadow); }
.fa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fa-actions .btn { min-height: 44px; }
.fa-back { background: none; border: 0; color: var(--link); font: 500 15px var(--font); padding: 8px 0; cursor: pointer; }
.fa-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; align-items: center; }
.fa-tools input[type=search] { flex: 1; min-width: 160px; min-height: 44px; font-size: 16px; }
.fa-tools .segmented a { padding: 10px 12px; }
.fa-centre { position: sticky; top: 50px; background: var(--canvas); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); padding: 10px 2px 6px; }
.fa-person { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 6px; font: inherit; color: inherit; cursor: pointer; min-height: 56px; }
.fa-person > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fa-q { border: 0; padding: 0; margin: 18px 0; }
.fa-q legend { font-weight: 600; color: var(--ink-strong); margin-bottom: 8px; padding: 0; }
.fa-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fa-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fa-choice { background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 12px 8px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; min-height: 48px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.fa-scale .fa-choice b { font-size: 20px; }
.fa-scale .fa-choice span { font-size: 10px; line-height: 1.2; color: var(--ink-muted); }
.fa-choice.on { border-color: var(--nav); background: var(--nav); color: #fff; }
.fa-choice.on span { color: #dfe3eb; }
.fa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fa-chip { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 8px 14px; font: 500 13px var(--font); color: var(--ink); cursor: pointer; min-height: 40px; }
.fa-chip.on { background: var(--series-3); border-color: var(--series-3); color: #fff; }
.fa-main .field input { width: 100%; min-height: 44px; font-size: 16px; }
.fa-main .checkbox { padding: 6px 0; font-weight: 400; }
.fa-main .checkbox input { width: 20px; height: 20px; }
.fa-sticky { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); justify-content: flex-end; }
.fa-sticky .btn { flex: 1; justify-content: center; max-width: 300px; }
.fa-footer { display: flex; flex-direction: column; gap: 8px; margin-top: 32px; }
.fa-footer .btn { justify-content: center; min-height: 44px; }
.fa-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--nav); color: #fff; padding: 10px 16px; border-radius: 6px; font-size: 14px; z-index: 30; box-shadow: var(--shadow); }
.fa-scale-key { display: none; margin: 6px 0 0; }
@media (max-width: 400px) { .fa-scale .fa-choice span { display: none; } .fa-scale-key { display: block; } }

/* ---------- Public donation page ---------- */
.give { max-width: 460px; margin: 0 auto; padding: 32px 16px 48px; }
.give-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.give-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-strong); }
.give-lang { font-weight: 500; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap; }
.give-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px 8px 0 0; }
.give-button { width: 100%; justify-content: center; min-height: 48px; font-size: 16px; }
.give-paybill { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; text-align: left; width: 100%; }
.give-paybill summary { cursor: pointer; color: var(--link); font-weight: 500; min-height: 32px; }
.give-paybill ol { margin: 12px 0 8px; padding-left: 20px; display: grid; gap: 6px; }
.give-help { width: 100%; text-align: left; margin-top: 16px; padding: 16px; border-radius: 8px; background: var(--surface-sunken); }
.give-help h2, .give-share h2 { font-size: 16px; margin: 0 0 8px; }
.give-help ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.give-help .give-paybill { margin-top: 8px; border-top: 0; padding-top: 0; }
.give-share { width: 100%; display: grid; gap: 8px; margin: 16px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.give h1 { margin-bottom: 4px; }
.give-amounts { border: 0; padding: 0; margin: 16px 0; }
.give-amounts legend { font-weight: 500; color: var(--ink-strong); margin-bottom: 8px; padding: 0; }
.give-amounts input { width: 100%; margin-top: 10px; min-height: 44px; font-size: 16px; }
.give .field input { min-height: 44px; font-size: 16px; }
.give-foot { margin-top: 16px; text-align: center; }
.give-status { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 24px; }
.give-status > svg { width: 40px; height: 40px; }
.give-status .alert { width: 100%; text-align: left; margin: 16px 0 0; }
.give-status .alert form { flex-wrap: wrap; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--grid); border-top-color: var(--series-3); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.ussd-screen { font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: #1e2b36; color: #e6f1f8; padding: 16px; border-radius: 8px; min-height: 120px; white-space: normal; }
