/* Layout concept: a public donor story that opens onto the working portal —
   the lily's iridescent pastels are the one signature, everything else is stem-green ink on lilac-white. */
:root {
  --paper: #fcf9fb;
  --paper-2: #f5eff4;
  --card: #ffffff;
  --ink: #183527;
  --ink-2: #4b5f56;
  --ink-3: #7d8c85;
  --line: #e8dfe7;
  --line-2: #d9cdd8;
  --rose: #b8346f;
  --rose-soft: #fbe3ee;
  --lilac: #7a5cc8;
  --lilac-soft: #ece6fb;
  --sky: #2f86c9;
  --sky-soft: #e1f0fb;
  --butter: #e6b52e;
  --butter-soft: #fdf3d4;
  --mint: #2a9d78;
  --mint-soft: #dcf4ea;
  --ok: #23875f;
  --ok-soft: #dcf2e7;
  --warn: #b7791f;
  --warn-soft: #fbefd6;
  --crit: #c93a52;
  --crit-soft: #fbe2e6;
  --blue-d: #3577c4;
  --gold-d: #c9921c;
  --shadow: 0 1px 2px rgba(24, 53, 39, .06), 0 8px 24px -12px rgba(24, 53, 39, .18);
  --shadow-lg: 0 2px 4px rgba(24, 53, 39, .05), 0 24px 60px -24px rgba(60, 30, 80, .28);
  --iris: linear-gradient(115deg, #f6abc9 0%, #c9b3f3 28%, #a8d6f6 52%, #fbe39c 76%, #b5ead0 100%);
  --halo: radial-gradient(closest-side, rgba(246, 171, 201, .55), rgba(201, 179, 243, .35) 45%, rgba(168, 214, 246, .18) 70%, transparent);
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14121a; --paper-2: #1b1823; --card: #201c29; --ink: #f1ecf3; --ink-2: #c3bac8; --ink-3: #8f8598;
    --line: #2f2939; --line-2: #3d3548; --rose: #f08bb6; --rose-soft: #3a1f2e; --lilac: #b9a2f5; --lilac-soft: #2a2340;
    --sky: #7cc0f2; --sky-soft: #1a2a3a; --butter: #f2cd61; --butter-soft: #362d14; --mint: #6fd8b2; --mint-soft: #15312a;
    --ok: #5fd39f; --ok-soft: #163126; --warn: #f0b75a; --warn-soft: #36290f; --crit: #ff8197; --crit-soft: #3b1820;
    --blue-d: #7db4f0; --gold-d: #f0c35a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 60px -24px rgba(0,0,0,.7);
    --halo: radial-gradient(closest-side, rgba(246, 171, 201, .32), rgba(201, 179, 243, .2) 45%, rgba(168, 214, 246, .1) 70%, transparent);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14121a; --paper-2: #1b1823; --card: #201c29; --ink: #f1ecf3; --ink-2: #c3bac8; --ink-3: #8f8598;
  --line: #2f2939; --line-2: #3d3548; --rose: #f08bb6; --rose-soft: #3a1f2e; --lilac: #b9a2f5; --lilac-soft: #2a2340;
  --sky: #7cc0f2; --sky-soft: #1a2a3a; --butter: #f2cd61; --butter-soft: #362d14; --mint: #6fd8b2; --mint-soft: #15312a;
  --ok: #5fd39f; --ok-soft: #163126; --warn: #f0b75a; --warn-soft: #36290f; --crit: #ff8197; --crit-soft: #3b1820;
  --blue-d: #7db4f0; --gold-d: #f0c35a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 60px -24px rgba(0,0,0,.7);
  --halo: radial-gradient(closest-side, rgba(246, 171, 201, .32), rgba(201, 179, 243, .2) 45%, rgba(168, 214, 246, .1) 70%, transparent);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 560; letter-spacing: -.015em; line-height: 1.08; margin: 0; text-wrap: balance; font-variation-settings: "opsz" 96, "SOFT" 60; }
p { margin: 0; }
.mono { font-family: var(--f-mono); font-size: .86em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font: 650 11.5px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--rose); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 650; font-size: 14.5px; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s, box-shadow .15s, border-color .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { box-shadow: 0 8px 20px -8px rgba(24,53,39,.5); }
.btn-rose { background: var(--rose); color: #fff; }
:root[data-theme="dark"] .btn-rose { color: #2a0f1c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-rose { color: #2a0f1c; } }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.crit { background: var(--crit-soft); color: var(--crit); }
.chip.info { background: var(--sky-soft); color: var(--sky); }
.chip.lilac { background: var(--lilac-soft); color: var(--lilac); }
.chip.plain { background: var(--paper-2); color: var(--ink-2); }
.chip.plain::before { display: none; }
.dist { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.dist i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dist.blue i { background: var(--blue-d); }
.dist.gold i { background: var(--gold-d); }

/* ---------- Public site ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-family: var(--f-display); font-style: italic; font-weight: 520; font-size: 21px; line-height: 1; white-space: nowrap; }
.brand-sub { display: block; font: 600 10px/1.2 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; font-style: normal; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 550; font-size: 14px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
@media (max-width: 900px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }
@media (max-width: 520px) { .nav-cta .btn-ghost { display: none; } .brand-sub { display: none; } }

.hero { position: relative; overflow: hidden; padding-block: 56px 72px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.4vw, 84px); font-weight: 520; letter-spacing: -.03em; line-height: .98; margin-top: 18px; }
.hero h1 em { font-style: italic; font-weight: 440; background: var(--iris); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; filter: saturate(1.25) brightness(.92); }
.hero-lede { font-size: 18.5px; line-height: 1.55; color: var(--ink-2); max-width: 34em; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 100%; }
.hero-art::before { content: ""; position: absolute; inset: -6%; background: var(--halo); border-radius: 50%; }
.hero-art img.lily { position: relative; width: 92%; margin: 4% auto 0; filter: drop-shadow(0 30px 40px rgba(122, 92, 200, .22)); animation: sway 9s ease-in-out infinite; transform-origin: 50% 95%; }
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.4deg); } }
.float-card { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-size: 13px; line-height: 1.3; }
.float-card b { display: block; font: 600 20px/1.1 var(--f-display); }
.float-card .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.float-card .dot svg { width: 18px; height: 18px; }
.fc-1 { left: -4%; top: 14%; }
.fc-2 { right: -2%; top: 48%; }
.fc-3 { left: 6%; bottom: 4%; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; margin: 0 auto; width: 100%; }
  .fc-1 { left: 0; } .fc-2 { right: 0; }
}
@media (max-width: 480px) { .float-card { font-size: 11.5px; padding: 9px 10px; } .float-card b { font-size: 16px; } .float-card .dot { width: 28px; height: 28px; } }

.proof { border-block: 1px solid var(--line); background: var(--paper-2); }
.proof-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; padding-block: 18px; }
.proof-row .label { font: 650 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.proof-row .partner { font-family: var(--f-display); font-size: 17px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tv-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.tv-badge span { background: var(--ink); color: var(--paper); border-radius: 6px; padding: 3px 7px; font-size: 11px; letter-spacing: .06em; }

.section { padding-block: 96px; }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 52px); font-weight: 520; }
.section-head h2 em { font-style: italic; font-weight: 420; color: var(--rose); }
.section-head p { font-size: 17px; color: var(--ink-2); max-width: 40em; }
@media (max-width: 640px) { .section { padding-block: 64px; } }

.need-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-2); }
.need-grid > div { padding: 28px 28px 8px 0; display: grid; gap: 10px; align-content: start; }
.need-grid > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.need-num { font: 500 clamp(52px, 6vw, 76px)/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: lining-nums; }
.need-num small { font-size: .45em; letter-spacing: 0; }
.need-grid p { color: var(--ink-2); max-width: 26em; }
.source { font-size: 12.5px; color: var(--ink-3); margin-top: 26px; }
@media (max-width: 800px) { .need-grid { grid-template-columns: 1fr; } .need-grid > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.flow-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 12px; align-content: start; position: relative; }
.flow-step .n { font: 600 12px/1 var(--f-mono); color: var(--ink-3); }
.flow-step h3 { font-size: 22px; }
.flow-step p { color: var(--ink-2); font-size: 14.5px; }
.flow-step .glyph { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.flow-step .glyph svg { width: 26px; height: 26px; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; right: -13px; top: 48px; width: 10px; height: 10px; border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2); transform: rotate(45deg); z-index: 2; background: transparent; }
@media (max-width: 960px) { .flow { grid-template-columns: 1fr 1fr; } .flow-step::after { display: none; } }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } }

.portal-promo { margin-top: 28px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: center; background: var(--ink); color: var(--paper); border-radius: 28px; padding: 40px; position: relative; overflow: hidden; }
.portal-promo::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; background: var(--iris); border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none; }
.portal-promo h3 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 500; }
.portal-promo h3 em { font-style: italic; color: #f6abc9; }
.portal-promo p { color: color-mix(in srgb, var(--paper) 75%, transparent); margin-top: 14px; font-size: 16px; }
.portal-promo blockquote { margin: 22px 0 0; padding-left: 16px; border-left: 2px solid #f6abc9; font-family: var(--f-display); font-style: italic; font-size: 17px; line-height: 1.45; color: color-mix(in srgb, var(--paper) 88%, transparent); }
.portal-promo blockquote cite { display: block; font: 600 12px/1.4 var(--f-body); font-style: normal; letter-spacing: .04em; margin-top: 8px; color: color-mix(in srgb, var(--paper) 60%, transparent); }
.portal-promo .btn-primary { background: var(--paper); color: var(--ink); }
.mock { position: relative; z-index: 1; background: var(--paper); color: var(--ink); border-radius: 16px; padding: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); display: grid; gap: 10px; min-width: 0; }
.mock-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.mock-top i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.mock-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 11px; color: var(--ink-2); min-width: 0; }
.mock-tile b { display: block; font: 600 20px/1.2 var(--f-display); color: var(--ink); }
.mock-track { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12px; }
.mock-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 10px; }
.mock-steps span { height: 6px; border-radius: 4px; background: var(--line); }
.mock-steps span.on { background: var(--ok); }
.mock-steps span.now { background: var(--iris); }
@media (max-width: 860px) { .portal-promo { grid-template-columns: 1fr; padding: 28px 22px; } }

.impact-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; min-width: 0; }
.panel h3 { font-size: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chart-scroll { overflow-x: auto; }
.honest { display: grid; gap: 14px; }
.honest .big { font: 500 64px/1 var(--f-display); letter-spacing: -.03em; }
.honest .callout { background: var(--paper-2); border-radius: var(--r); padding: 16px; font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 900px) { .impact-grid { grid-template-columns: 1fr; } }

.network-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.network-map { height: 460px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.network-stats { display: grid; gap: 12px; align-content: start; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.stat-tile .k { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.stat-tile .v { font: 550 34px/1.1 var(--f-display); letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-tile .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
@media (max-width: 860px) { .network-wrap { grid-template-columns: 1fr; } .network-map { height: 360px; } .network-stats { grid-template-columns: 1fr 1fr; } }

.give-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.give-card { border-radius: var(--r-lg); padding: 28px; display: grid; gap: 12px; align-content: start; border: 1px solid var(--line); background: var(--card); position: relative; overflow: hidden; }
.give-card .tier { font: 500 40px/1 var(--f-display); letter-spacing: -.02em; }
.give-card .tier small { font-size: 16px; font-family: var(--f-body); font-weight: 600; color: var(--ink-2); letter-spacing: 0; margin-left: 4px; }
.give-card p { color: var(--ink-2); font-size: 14.5px; }
.give-card .btn { margin-top: 8px; justify-self: start; }
.give-card.feature { background: var(--ink); color: var(--paper); border-color: transparent; }
.give-card.feature p, .give-card.feature .tier small { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.give-card.feature::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--iris); }
.give-card.feature .btn-rose { background: #f6abc9; color: #3a0f22; }
.also { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.also a { display: flex; gap: 16px; align-items: center; padding: 20px 22px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); text-decoration: none; transition: background .15s; }
.also a:hover { background: var(--paper-2); }
.also a b { font-family: var(--f-display); font-size: 19px; font-weight: 550; display: block; }
.also a span { color: var(--ink-2); font-size: 14px; }
.also svg { width: 22px; height: 22px; flex: none; color: var(--rose); }
@media (max-width: 860px) { .give-grid, .also { grid-template-columns: 1fr; } }

.quote-band { background: var(--paper-2); border-block: 1px solid var(--line); }
.quote-band figure { margin: 0; padding-block: 80px; display: grid; gap: 22px; max-width: 900px; }
.quote-band blockquote { margin: 0; font: 420 clamp(24px, 3vw, 36px)/1.3 var(--f-display); letter-spacing: -.01em; text-wrap: pretty; }
.quote-band blockquote::before { content: "“"; display: block; font-size: 80px; line-height: .6; color: var(--rose); margin-bottom: 8px; }
.quote-band figcaption { font-size: 14px; color: var(--ink-2); }
.quote-band figcaption b { color: var(--ink); }

.site-footer { padding-block: 56px 40px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { font: 650 11.5px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.foot-grid a { text-decoration: none; color: var(--ink-2); }
.foot-grid a:hover { color: var(--ink); }
.gtm { display: flex; gap: 14px; align-items: center; }
.gtm img { width: 54px; height: auto; border-radius: 10px; }
.foot-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { position: relative; background: var(--ink); color: var(--paper); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.login-art::before { content: ""; position: absolute; inset: 15% -20% -20% 10%; background: var(--iris); filter: blur(90px); opacity: .28; border-radius: 50%; }
.login-art img { position: relative; width: min(78%, 420px); align-self: center; filter: drop-shadow(0 30px 50px rgba(0,0,0,.35)); }
.login-art h2 { position: relative; font-size: clamp(30px, 3.4vw, 46px); font-weight: 480; }
.login-art h2 em { font-style: italic; color: #f6abc9; }
.login-art p { position: relative; color: color-mix(in srgb, var(--paper) 70%, transparent); margin-top: 12px; max-width: 30em; }
.login-main { display: grid; place-items: center; padding: 40px var(--gutter-r) 40px var(--gutter-l); }
.login-card { width: 100%; max-width: 440px; display: grid; gap: 22px; }
.login-card h1 { font-size: 36px; font-weight: 520; }
.role-pick { display: grid; gap: 12px; }
.role { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.role:hover { border-color: var(--line-2); }
.role[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--lilac-soft); }
.role .ri { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.role .ri svg { width: 24px; height: 24px; }
.role b { display: block; font-size: 15.5px; }
.role span { font-size: 13px; color: var(--ink-2); }
.role .check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.role[aria-pressed="true"] .check { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.role .check svg { width: 13px; height: 13px; opacity: 0; }
.role[aria-pressed="true"] .check svg { opacity: 1; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 650; }
.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; }
textarea.input { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 3px var(--lilac-soft); }
.demo-note { font-size: 12.5px; color: var(--ink-3); background: var(--paper-2); border-radius: 10px; padding: 10px 12px; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-art { padding: 28px var(--gutter-r) 28px var(--gutter-l); min-height: 0; } .login-art img { width: 160px; } }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; }
.side { position: sticky; top: env(safe-area-inset-top, 0px); height: calc(100dvh - env(safe-area-inset-top, 0px)); border-right: 1px solid var(--line); background: var(--paper-2); display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; padding-left: max(14px, env(safe-area-inset-left, 0px)); }
.side .brand { padding: 4px 6px; }
.side .brand img { width: 34px; height: 34px; }
.side .brand-name { font-size: 18px; }
.side-label { font: 650 10.5px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px; margin-bottom: 6px; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; position: relative; }
.side nav a svg { width: 18px; height: 18px; flex: none; }
.side nav a:hover { background: var(--card); color: var(--ink); }
.side nav a.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.side nav a .count { margin-left: auto; font: 650 11px/1 var(--f-mono); background: var(--rose); color: #fff; padding: 4px 6px; border-radius: 999px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--iris); color: #2b1a3a; flex: none; }
.who b { display: block; font-size: 13.5px; line-height: 1.2; }
.who span { font-size: 12px; color: var(--ink-3); }
.who > div { min-width: 0; }
.who b, .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 12px; height: 64px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 22px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .spacer { flex: 1; }
.demo-flag { font: 650 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--lilac); background: var(--lilac-soft); padding: 6px 9px; border-radius: 999px; white-space: nowrap; }
.content { padding: 28px max(28px, env(safe-area-inset-right, 0px)) 80px max(28px, env(safe-area-inset-left, 0px)); display: grid; gap: 22px; align-content: start; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding-left: var(--gutter-l); padding-right: var(--gutter-r); height: 58px; }
  .topbar h1 { font-size: 19px; }
  .content { padding: 18px var(--gutter-r) calc(96px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); gap: 16px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; font-size: 10.5px; font-weight: 650; text-decoration: none; color: var(--ink-3); border-radius: 10px; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--ink); background: var(--paper-2); }
  .demo-flag { display: none; }
}

/* ---------- App components ---------- */
.greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.greet h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 520; }
.greet h2 em { font-style: italic; color: var(--rose); font-weight: 440; }
.greet p { color: var(--ink-2); margin-top: 6px; }
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .g-3, .g-2 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .g-4 { grid-template-columns: 1fr 1fr; gap: 10px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: 18px; font-weight: 580; }
.card-head .sub { font-size: 12.5px; color: var(--ink-3); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 4px; min-width: 0; position: relative; overflow: hidden; }
.kpi .k { font-size: 12.5px; font-weight: 650; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.kpi .k svg { width: 15px; height: 15px; color: var(--ink-3); }
.kpi .v { font: 550 32px/1.1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v small { font: 600 13px/1 var(--f-body); color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.kpi .d { font-size: 12px; color: var(--ink-3); }
.kpi .d.up { color: var(--ok); }
.kpi .d.down { color: var(--crit); }
.kpi.alert { border-color: color-mix(in srgb, var(--crit) 40%, var(--line)); }
.kpi.alert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--crit); }
@media (max-width: 420px) { .kpi { padding: 12px; } .kpi .v { font-size: 25px; } }

/* supply gauge */
.supply { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; }
.ring { position: relative; width: 180px; height: 180px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .center b { font: 550 46px/1 var(--f-display); letter-spacing: -.03em; }
.ring .center span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
@media (max-width: 560px) { .supply { grid-template-columns: 1fr; justify-items: center; } }
.items { display: grid; gap: 12px; width: 100%; min-width: 0; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.item-row .name { font-weight: 600; font-size: 14px; }
.item-row .qty { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.bar .goal { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-3); opacity: .5; }

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); flex-wrap: wrap; }
.banner svg { width: 22px; height: 22px; flex: none; }
.banner .t { flex: 1; min-width: 200px; font-size: 14px; }
.banner .t b { display: block; font-size: 15px; }
.banner.warn { background: var(--warn-soft); color: var(--ink); }
.banner.warn svg { color: var(--warn); }
.banner.ok { background: var(--ok-soft); }
.banner.ok svg { color: var(--ok); }
.banner.info { background: var(--lilac-soft); }
.banner.info svg { color: var(--lilac); }

/* shipment tracker */
.ship { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 14px; }
.ship + .ship { margin-top: 12px; }
.ship-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.ship-top b { font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.steps .st { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 11.5px; color: var(--ink-3); font-weight: 600; position: relative; z-index: 1; }
.steps .st .b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line-2); }
.steps .st .b svg { width: 13px; height: 13px; }
.steps .st.done { color: var(--ink-2); }
.steps .st.done .b { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .st.now { color: var(--ink); }
.steps .st.now .b { border-color: var(--lilac); background: var(--lilac-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lilac) 18%, transparent); }
.steps .st.now .b::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lilac); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .5; } }
.steps .rail { position: absolute; top: 12px; left: 10%; right: 10%; height: 2px; background: var(--line-2); }
.steps .rail i { position: absolute; inset: 0 auto 0 0; background: var(--ok); }
.ship-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--ink-2); }
.ship-meta b { color: var(--ink); font-weight: 650; }
@media (max-width: 520px) { .steps .st { font-size: 10px; } }

/* order form */
.order-lines { display: grid; gap: 10px; }
.oline { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.oline .sw { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.oline .sw svg { width: 22px; height: 22px; }
.oline b { display: block; font-size: 14.5px; }
.oline span { font-size: 12.5px; color: var(--ink-3); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; background: var(--card); }
.stepper button { width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--paper-2); }
.stepper button svg { width: 16px; height: 16px; }
.stepper input { width: 48px; height: 36px; border: 0; text-align: center; font: 650 15px var(--f-body); background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.suggest { font-size: 11.5px; color: var(--lilac); font-weight: 650; cursor: pointer; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.summary { position: sticky; top: 84px; display: grid; gap: 14px; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; padding-block: 6px; border-bottom: 1px dashed var(--line); }
.sum-row:last-child { border-bottom: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* log visit */
.tap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tap { border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-lg); padding: 18px 14px; display: grid; gap: 10px; justify-items: center; text-align: center; cursor: pointer; transition: transform .1s, border-color .15s; font-weight: 650; font-size: 14px; position: relative; }
.tap:hover { border-color: var(--line-2); }
.tap:active { transform: scale(.97); }
.tap .sw { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.tap .sw svg { width: 26px; height: 26px; }
.tap .ct { position: absolute; top: 10px; right: 10px; font: 650 12px/1 var(--f-mono); background: var(--ink); color: var(--paper); padding: 4px 7px; border-radius: 999px; }
.tap.bump { animation: bump .3s ease; }
@keyframes bump { 40% { transform: scale(1.05); } }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.t th { text-align: left; font: 650 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { cursor: default; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover { background: var(--paper-2); }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.mini-bar { width: 90px; height: 6px; border-radius: 4px; background: var(--paper-2); position: relative; overflow: hidden; display: inline-block; vertical-align: middle; }
.mini-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.col { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 280px; scroll-snap-align: start; transition: background .15s, border-color .15s; }
.col.drop { background: var(--lilac-soft); border-color: var(--lilac); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 6px; font-size: 13px; font-weight: 700; }
.col-head .n { font: 650 11px/1 var(--f-mono); background: var(--card); border: 1px solid var(--line); padding: 4px 7px; border-radius: 999px; color: var(--ink-2); }
.col-head .lbl { display: flex; align-items: center; gap: 8px; }
.col-head .lbl i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ocard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.03); font-size: 13px; }
.ocard:active { cursor: grabbing; }
.ocard.dragging { opacity: .4; }
.ocard .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ocard .sch { font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.ocard .lines { color: var(--ink-2); font-size: 12px; }
.ocard .foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ocard .pri { font: 650 10.5px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--crit); }

/* map page */
.map-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; height: calc(100dvh - 64px - 56px - env(safe-area-inset-top, 0px)); min-height: 560px; }
.map-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.map-panel .ph { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.map-panel .pb { overflow-y: auto; padding: 8px; flex: 1; min-height: 0; }
.map-panel .pf { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--paper-2); }
.map-box { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); min-height: 0; background: var(--paper-2); }
#opsMap, #atlasMap { position: absolute; inset: 0; }
.srow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.srow:hover { background: var(--paper-2); }
.srow.sel { background: var(--lilac-soft); border-color: color-mix(in srgb, var(--lilac) 40%, transparent); }
.srow .cb { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; background: var(--card); }
.srow .cb svg { width: 12px; height: 12px; opacity: 0; }
.srow.sel .cb { background: var(--lilac); border-color: var(--lilac); color: #fff; }
.srow.sel .cb svg { opacity: 1; }
.srow b { display: block; font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow span { font-size: 12px; color: var(--ink-3); }
.srow .days { text-align: right; font: 650 13px/1.1 var(--f-body); font-variant-numeric: tabular-nums; }
.srow .days small { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.stop { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: grab; font-size: 13px; }
.stop + .stop { margin-top: 6px; }
.stop .no { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 12px var(--f-mono); }
.stop.hub .no { background: var(--rose); }
.stop.dragging { opacity: .4; }
.stop .mv { display: flex; gap: 2px; }
.stop .mv button { width: 26px; height: 26px; border: 0; background: transparent; cursor: pointer; border-radius: 6px; display: grid; place-items: center; color: var(--ink-3); }
.stop .mv button:hover { background: var(--paper-2); color: var(--ink); }
.stop .mv svg { width: 14px; height: 14px; }
.route-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.route-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.route-stats b { display: block; font: 600 18px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.route-stats span { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; font-size: 12px; box-shadow: var(--shadow); }
.map-legend span { display: flex; align-items: center; gap: 8px; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.map-tools { position: absolute; right: 12px; top: 12px; z-index: 500; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.map-tools .seg { background: var(--card); box-shadow: var(--shadow); }
@media (max-width: 1000px) {
  .map-layout { grid-template-columns: 1fr; height: auto; }
  .map-box { height: 440px; order: -1; }
  .map-panel .pb { max-height: 420px; }
}

/* leaflet skin */
.leaflet-container { font-family: var(--f-body); background: var(--paper-2); }
.pin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 2px 8px rgba(0,0,0,.25); position: relative; }
.pin.sel { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lilac) 45%, transparent), 0 2px 8px rgba(0,0,0,.25); }
.pin .ring2 { position: absolute; inset: -9px; border-radius: 50%; border: 2px solid currentColor; opacity: .5; animation: ping 2s ease-out infinite; }
@keyframes ping { from { transform: scale(.5); opacity: .7; } to { transform: scale(1.4); opacity: 0; } }
.hub-pin { width: 40px; height: 40px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.3); border: 3px solid var(--card); }
.hub-pin img { width: 26px; height: 26px; }
.stop-pin { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 11px/24px var(--f-mono); text-align: center; border: 2px solid var(--card); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.leaflet-popup-content-wrapper { border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); }
.leaflet-popup-tip { background: var(--card); }
.leaflet-popup-content { margin: 14px 16px; font-size: 13px; line-height: 1.45; }
.leaflet-popup-content b.t { font: 600 16px/1.2 var(--f-display); display: block; margin-bottom: 4px; }
.leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--card) 80%, transparent) !important; color: var(--ink-3); }
.leaflet-control-attribution a { color: var(--ink-2); }
.leaflet-bar a { background: var(--card); color: var(--ink); border-color: var(--line); }
.route-line { stroke-dasharray: 2 10; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(20, 12, 28, .35); z-index: 900; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 901; background: var(--card); box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.drawer.on { transform: none; }
.drawer .dh { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer .dh h3 { font-size: 24px; font-weight: 550; }
.drawer .db { padding: 20px 22px; overflow-y: auto; display: grid; gap: 18px; align-content: start; flex: 1; }
.drawer .df { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }
.picklist { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 14px; display: grid; gap: 8px; }
.pick { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.pick input { width: 18px; height: 18px; accent-color: var(--ok); }
.pick .bin { font: 600 11px var(--f-mono); color: var(--ink-3); }

/* toast */
.toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
@media (max-width: 900px) { .toasts { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
.toast { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 12px 16px; display: flex; gap: 10px; align-items: center; font-size: 14px; box-shadow: var(--shadow-lg); animation: tin .3s cubic-bezier(.2,.8,.2,1); }
.toast svg { width: 18px; height: 18px; color: #8fe3bd; flex: none; }
@keyframes tin { from { transform: translateY(12px); opacity: 0; } }

/* charts */
.chart text { fill: var(--ink-3); font-family: var(--f-body); font-size: 11px; }
.chart .grid line { stroke: var(--line); }
.chart .lbl { fill: var(--ink); font-weight: 600; font-size: 12px; }
.empty { padding: 30px 16px; text-align: center; color: var(--ink-3); font-size: 14px; display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 30px; height: 30px; color: var(--line-2); }
.alert-list { display: grid; gap: 4px; }
.alert-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; }
.alert-row:hover { background: var(--paper-2); }
.alert-row .ai { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.alert-row .ai svg { width: 17px; height: 17px; }
.alert-row b { display: block; font-size: 13.5px; }
.alert-row span { font-size: 12.5px; color: var(--ink-3); }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding-bottom: 14px; position: relative; font-size: 13.5px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl i { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line-2); }
.tl span { color: var(--ink-3); font-size: 12px; display: block; }
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); background: var(--mint-soft); padding: 12px 14px; border-radius: 12px; }
.privacy svg { width: 18px; height: 18px; color: var(--mint); flex: none; margin-top: 1px; }
.reveal { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { transform: translateY(8px); opacity: .001; } }
@media print { .side, .topbar, .tabbar, .no-print { display: none !important; } .app { display: block; } body { background: #fff; } }

.local-need { margin-top: 40px; padding: 26px 28px; border-radius: var(--r-lg); background: var(--paper-2); border: 1px solid var(--line); display: grid; gap: 14px; }
.local-need:empty { display: none; }
.local-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.local-row b { display: block; font: 520 34px/1.05 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.local-row span { font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 760px) { .local-row { grid-template-columns: 1fr 1fr; } }
@media print { .report { border: 0; padding: 0 !important; } .content { padding: 0 !important; } }
.leaflet-control .map-legend, .map-legend.leaflet-control { position: static; margin: 0 0 10px 10px; }
@media (max-width: 520px) { .srow[data-act="open-school"] { grid-template-columns: minmax(0, 1fr) 64px 40px !important; gap: 8px; } }

/* Ministry family bar (shared with the Greater Things site) */
.family-bar { background: #0b1c27; color: #a9bcc0; font-size: 12.5px; }
.family-bar .wrap { display: flex; align-items: center; gap: 18px; height: 36px; overflow-x: auto; scrollbar-width: none; }
.family-bar a { text-decoration: none; white-space: nowrap; }
.family-bar a:hover, .family-bar a[aria-current] { color: #fff; }
.family-bar .home { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 650; }
.family-bar .home img { width: 18px; height: 18px; }
.family-bar .sep { width: 1px; height: 14px; background: rgba(255,255,255,.18); flex: none; }
.family-bar .end { margin-left: auto; }
