/* Estates design system. One source for both themes: every colour below is a token, never a literal in a page.
   Green and red mean paid and owing, nothing else. Petrol and brass are the brand. */
@font-face { font-family: "Archivo"; src: url("fonts/archivo-latin.de2f1fe81758.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-latin-ext.589f7bc0fac4.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #F5F1E8; --surface: #FFFFFF; --surface-2: #EDE8DB; --line: #DDD5C3; --line-strong: #C4BAA3;
  --ink: #0E2A32; --muted: #566469;
  --petrol: #11485A; --petrol-deep: #0B2F3B; --petrol-soft: #DCE9EC; --link: #11485A;
  --brass: #B8872B; --brass-text: #7C5A12; --brass-soft: #F3E7C8;
  --action: #11485A; --action-ink: #FFFFFF; --action-hover: #0B2F3B;
  --paid: #157A45; --paid-soft: #DDF0E4; --owing: #BF3A2B; --owing-soft: #F8E1DC;
  --unknown: #5F6B70; --unknown-soft: #E7EAEA; --warn: #8A5A00; --warn-soft: #F6E9CC;
  --band: #0B2F3B; --band-ink: #EAF1EF; --band-muted: #9DB8BF; --band-line: #1C4957; --band-hover: #134252;
  --st-open: #C9B58A; --st-fenced: #A88F5C; --st-foundation: #8C9AA0; --st-building: #D9922E; --st-completed: #5AA7BC; --st-occupied: #11485A;
  --signal-paid: #157A45; --signal-owing: #BF3A2B; --signal-none: #5F6B70; --signal-visitor: #0B2F3B;
  --shadow: 0 1px 2px rgba(14,42,50,.06), 0 8px 24px rgba(14,42,50,.06);
  --radius: 10px; --radius-sm: 6px; --focus: 0 0 0 3px rgba(184,135,43,.45);
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #081A20; --surface: #0F2830; --surface-2: #163640; --line: #24474F; --line-strong: #346370;
  --ink: #EAF1EF; --muted: #9CB0B3;
  --petrol: #6FC3D6; --petrol-deep: #0B2F3B; --petrol-soft: #16404C; --link: #8AD3E3;
  --brass: #E0B552; --brass-text: #E8C36B; --brass-soft: #3A3117;
  --action: #E0B552; --action-ink: #0B2F3B; --action-hover: #EBC670;
  --paid: #4CCB86; --paid-soft: #123A28; --owing: #FF7A68; --owing-soft: #45201B;
  --unknown: #A8B6B9; --unknown-soft: #20363C; --warn: #F0C36A; --warn-soft: #3B2F12;
  --band: #061318; --band-ink: #EAF1EF; --band-muted: #8FA9AF; --band-line: #17333B; --band-hover: #0F2830;
  --st-occupied: #2E7F96;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --focus: 0 0 0 3px rgba(224,181,82,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--font); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-stretch: 108%; font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 .8em; } a { color: var(--link); text-underline-offset: 2px; }
small, .small { font-size: 13px; } .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.hide { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
::selection { background: var(--brass-soft); color: var(--ink); }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  font: 600 14px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.btn.primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.btn.danger { color: var(--owing); border-color: var(--owing); background: transparent; }
.btn.danger:hover { background: var(--owing-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--link); }
.btn.ghost:hover { background: var(--petrol-soft); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; } .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Forms */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=email],
input[type=search], input[type=file], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: 400 15px/1.3 var(--font); }
textarea { min-height: 88px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--action); vertical-align: -3px; margin: 0 6px 0 0; }
.field { margin-bottom: 14px; } .field .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.field .error, .error-text { font-size: 13px; color: var(--owing); margin-top: 4px; font-weight: 600; }
.check { display: flex; align-items: center; font-weight: 500; font-size: 14px; margin-bottom: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--muted); }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card > h2, .card > h3 { margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.stat .label { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 28px; font-weight: 700; font-stretch: 92%; font-variant-numeric: tabular-nums; margin-top: 4px; line-height: 1.15; overflow-wrap: anywhere; }
.stat .note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat.paid .value { color: var(--paid); } .stat.owing .value { color: var(--owing); }
.stat.brass { border-left: 4px solid var(--brass); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; position: sticky; top: 0; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; } .table tbody tr:hover td { background: color-mix(in srgb, var(--petrol-soft) 45%, transparent); }
.table td.right, .table th.right { text-align: right; } .table a.row-link { font-weight: 600; text-decoration: none; }
.table .sub { display: block; font-size: 12.5px; color: var(--muted); }

/* Status */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: var(--unknown-soft); color: var(--unknown); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.paid, .pill.clear { background: var(--paid-soft); color: var(--paid); }
.pill.owing { background: var(--owing-soft); color: var(--owing); }
.pill.brass { background: var(--brass-soft); color: var(--brass-text); } .pill.plain::before { display: none; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.st-open { background: var(--st-open); } .st-fenced { background: var(--st-fenced); } .st-foundation { background: var(--st-foundation); }
.st-building { background: var(--st-building); } .st-completed { background: var(--st-completed); } .st-occupied { background: var(--st-occupied); }
.plate { display: inline-block; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 5px; background: var(--surface);
  font-weight: 800; font-stretch: 80%; letter-spacing: .06em; font-variant-numeric: tabular-nums; text-transform: uppercase; white-space: nowrap; }
.plate.lg { font-size: 34px; padding: 6px 18px; border-width: 3px; border-radius: 8px; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); margin-bottom: 14px; font-size: 14px; }
.alert.success { background: var(--paid-soft); border-color: transparent; color: var(--paid); }
.alert.error { background: var(--owing-soft); border-color: transparent; color: var(--owing); }
.alert.warning, .alert.info { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.alert strong { color: inherit; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; } .empty .btn { margin-top: 14px; }
.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; overflow-wrap: anywhere; }
.code-big { font-size: 44px; font-weight: 800; font-stretch: 80%; letter-spacing: .14em; font-variant-numeric: tabular-nums; color: var(--petrol); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brass); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.filters .field { margin: 0; min-width: 150px; flex: 1 1 150px; } .filters .btn { flex: none; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-size: 13px; color: var(--muted); }
dialog.sheet { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 20px;
  width: min(480px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog.sheet::backdrop { background: rgba(6,19,24,.55); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--band); color: var(--band-ink); padding: 10px 16px;
  border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 2000; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--owing); color: #fff; }

/* Manage shell */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--band); color: var(--band-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--band-ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; } .brand b { font-size: 19px; font-stretch: 110%; font-weight: 800; letter-spacing: -.01em; }
.side .estate { margin: 0 12px 10px; padding: 10px 12px; border: 1px solid var(--band-line); border-radius: var(--radius-sm); font-size: 13px; }
.side .estate b { display: block; font-size: 14px; } .side .estate span { color: var(--band-muted); }
.side .estate select { margin-top: 8px; min-height: 34px; padding: 4px 8px; background: var(--band-hover); color: var(--band-ink); border-color: var(--band-line); font-size: 13px; }
.nav { padding: 4px 10px; flex: 1; } .nav h4 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--band-muted); margin: 16px 10px 6px; font-stretch: 100%; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--band-ink); text-decoration: none;
  font-weight: 500; font-size: 14.5px; border-left: 3px solid transparent; }
.nav a:hover { background: var(--band-hover); } .nav a.on { background: var(--band-hover); border-left-color: #E0B552; font-weight: 700; }
.nav a svg { color: var(--band-muted); } .nav a.on svg { color: #E0B552; }
.side-foot { padding: 12px 14px 16px; border-top: 1px solid var(--band-line); font-size: 13px; }
.side-foot .who { font-weight: 700; } .side-foot .role { color: var(--band-muted); }
.side-foot .btn-row { margin-top: 10px; } .side-foot .btn { background: transparent; border-color: var(--band-line); color: var(--band-ink); }
.side-foot .btn:hover { background: var(--band-hover); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: 10px; padding: 10px 14px; background: var(--band); color: var(--band-ink); position: sticky; top: 0; z-index: 900; }
.topbar .brand { padding: 0; flex: 1; } .topbar button { background: transparent; border: 1px solid var(--band-line); color: var(--band-ink); border-radius: var(--radius-sm); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 26px 28px 60px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); } .crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; } .crumb a { color: var(--muted); }
.banner { background: var(--warn-soft); color: var(--warn); padding: 8px 28px; font-size: 13.5px; font-weight: 600; }

/* Map */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: calc(100vh - 0px); }
#map { height: 100%; min-height: 420px; background: #1b2a2e; }
.map-side { background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; }
.map-tools { position: absolute; z-index: 800; top: 12px; left: 56px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 420px); }
.map-tools .btn { box-shadow: var(--shadow); } .map-tools .btn.on { background: var(--brass); border-color: var(--brass); color: #0B2F3B; }
.map-hint { position: absolute; z-index: 800; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--band); color: var(--band-ink); padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); max-width: 80%; text-align: center; }
.map-stage { position: relative; min-width: 0; }
.legend { display: grid; gap: 4px; font-size: 13px; margin-top: 8px; }
.vertex { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid #E0B552; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.vertex.mid { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-width: 2px; opacity: .7; }
.leaflet-tooltip.plot-label, .leaflet-div-icon.plot-label, .plot-label { background: transparent; border: 0; box-shadow: none; padding: 0; color: #fff; font: 800 12.500px var(--font); font-stretch: 85%; letter-spacing: .03em; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 2px #000; white-space: nowrap; }
.leaflet-tooltip.plot-label::before { display: none; }
.gate-pin { display: flex; align-items: center; gap: 6px; color: #fff; font: 800 12px var(--font); text-shadow: 0 0 3px #000, 0 0 3px #000; white-space: nowrap; transform: translate(-7px, -7px); }
.gate-pin i { width: 14px; height: 14px; border-radius: 3px; background: #E0B552; border: 2px solid #0B2F3B; flex: none; }
.leaflet-container { font-family: var(--font); } .leaflet-control-attribution { font-size: 10px; }

/* Sign-in */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { background: var(--band); color: var(--band-ink); padding: 40px 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-art > div:not(.credit) { margin-top: 9vh; } .auth-art .credit { margin-top: auto; }
.auth-art h1 { font-size: clamp(30px, 3.6vw, 46px); font-stretch: 112%; font-weight: 800; line-height: 1.05; max-width: 12ch; position: relative; }
.auth-art h1 em { font-style: normal; color: #E0B552; } .auth-art p { color: var(--band-muted); max-width: 40ch; position: relative; }
.auth-art .credit { font-size: 13px; color: var(--band-muted); position: relative; }
.auth-art svg.motif { position: absolute; inset: auto -5% 9% auto; width: 66%; opacity: .9; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-form .inner { width: min(380px, 100%); } .auth-form h2 { font-size: 24px; margin-bottom: 6px; }
.auth-form .lead { color: var(--muted); margin-bottom: 22px; }
.theme-fab { position: fixed; top: 14px; right: 14px; z-index: 50; }

/* Resident and gate web app (phone first) */
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding: 0 16px 96px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 0 12px; }
.app-head .brand { padding: 0; color: var(--ink); } .app-head .brand b { font-size: 17px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--surface); border-top: 1px solid var(--line);
  display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.tabbar nav { display: flex; width: min(560px, 100%); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabbar a.on { color: var(--petrol); } .tabbar a.on svg { color: var(--brass); }
.standing { border-radius: 14px; padding: 22px 20px; color: #fff; background: var(--signal-paid); position: relative; overflow: hidden; }
.standing.owing { background: var(--signal-owing); } .standing.none { background: var(--signal-none); }
.standing .state { font-size: 34px; font-weight: 800; font-stretch: 84%; text-transform: uppercase; letter-spacing: .02em; line-height: 1; }
.standing .where { font-weight: 600; opacity: .9; margin-bottom: 10px; } .standing .figure { font-size: 20px; font-weight: 700; margin-top: 10px; font-variant-numeric: tabular-nums; }
.list { list-style: none; margin: 0; padding: 0; } .list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; } .list .t { font-weight: 600; } .list .s { font-size: 13px; color: var(--muted); }
.verdict { border-radius: 16px; padding: 28px 20px; text-align: center; color: #fff; background: var(--signal-none); margin-bottom: 16px; }
.verdict.clear { background: var(--signal-paid); } .verdict.owing { background: var(--signal-owing); }
.verdict.visitor { background: var(--signal-visitor); border: 1px solid var(--band-line); }
.verdict .word { font-size: clamp(44px, 13vw, 72px); font-weight: 800; font-stretch: 78%; text-transform: uppercase; line-height: .95; letter-spacing: .01em; }
.verdict .house { font-size: 20px; font-weight: 700; margin-top: 12px; } .verdict .who { font-size: 16px; opacity: .92; }
.verdict .plate { margin-top: 14px; color: #0E2A32; background: #fff; border-color: #0E2A32; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; } .topbar { display: flex; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 1000; transform: translateX(-102%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(6,19,24,.55); }
  .page { padding: 18px 16px 60px; } .banner { padding: 8px 16px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; }
  .map-wrap { grid-template-columns: 1fr; height: auto; } #map { height: 62vh; } .map-side { border-left: 0; border-top: 1px solid var(--line); }
  .map-tools { max-width: calc(100% - 70px); }
  .auth { grid-template-columns: 1fr; } .auth-art { padding: 26px 22px 22px; min-height: 0; gap: 18px; } .auth-art svg.motif { display: none; }
}
@media (max-width: 620px) {
  .g2, .g3, .g4, .form-grid { grid-template-columns: 1fr; } h1 { font-size: 22px; }
  .stat .value { font-size: 24px; } .table th, .table td { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
