/* Reisapp — mobile-first styles. No build step; keep it lean. */

:root {
    --bg: #f6f5f1;
    --surface: #ffffff;
    --surface-2: #f1efe9;
    --text: #1b2120;
    --muted: #68726e;
    --line: #e4e1d8;
    --accent: #0f766e;
    --accent-strong: #0b5f58;
    --accent-ink: #ffffff;
    --accent-soft: #e0f0ed;
    --danger: #b42318;
    --live: #16a34a;
    --warn: #d97706;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgb(16 24 22 / .04), 0 8px 24px rgb(16 24 22 / .06);
    --shadow-lg: 0 24px 60px rgb(16 24 22 / .22);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --tabbar-h: 64px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #101413;
        --surface: #181e1c;
        --surface-2: #1f2724;
        --text: #e9eeeb;
        --muted: #98a39e;
        --line: #2a3330;
        --accent: #2fb5a5;
        --accent-strong: #4cc9ba;
        --accent-ink: #04201c;
        --accent-soft: #15322e;
        --danger: #f97066;
        --live: #4ade80;
        --warn: #fbbf24;
        --shadow: 0 1px 2px rgb(0 0 0 / .3);
        --shadow-lg: 0 24px 60px rgb(0 0 0 / .6);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
[x-cloak] { display: none !important; }

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--font);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }

h1, h2 { line-height: 1.2; margin: 0 0 .25rem; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; font-weight: 750; }
h2 { font-size: 1.12rem; font-weight: 700; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.lead { font-size: 1.05rem; margin: 0 0 1rem; }
.grow { flex: 1; min-width: 0; }

svg { flex: none; }
.icon-inline { width: 14px; height: 14px; fill: currentColor; vertical-align: -2px; margin-right: 2px; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 1rem;
    min-height: 56px;
    padding: .5rem 1rem;
    padding-top: max(.5rem, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.brand {
    display: inline-flex; align-items: center; gap: .45rem;
    font-weight: 750; font-size: 1.05rem; letter-spacing: -.01em;
    color: var(--text); text-decoration: none; margin-right: auto;
}
.brand svg { width: 24px; height: 24px; fill: var(--accent); }

.topnav { display: flex; align-items: center; gap: .15rem; }
.topnav a {
    padding: .45rem .8rem; border-radius: 999px;
    color: var(--muted); text-decoration: none; font-weight: 550; font-size: .95rem;
    transition: color .15s, background .15s;
}
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--text); background: var(--surface-2); }

.topbar-user { display: flex; align-items: center; gap: .75rem; }
.topbar-user form { margin: 0; }

.linklike { background: none; border: 0; cursor: pointer; font: inherit; padding: .4rem 0; }

.desktop-only { display: none !important; }
@media (min-width: 768px) {
    .desktop-only { display: flex !important; }
}

/* ── Bottom tab bar (mobile) ─────────────────────────── */
.tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 20;
    display: grid; grid-template-columns: repeat(3, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(16px);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--line);
}
.tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600;
}
.tabbar svg { width: 24px; height: 24px; fill: currentColor; transition: transform .2s var(--ease); }
.tabbar a.active { color: var(--accent); }
.tabbar a:active svg { transform: scale(.88); }
@media (min-width: 768px) { .tabbar { display: none; } }

/* ── Layout ──────────────────────────────────────────── */
.container {
    width: 100%; max-width: 780px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
    animation: page-in .28s var(--ease);
}
.has-tabbar .container { padding-bottom: calc(var(--tabbar-h) + 2rem + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
    .container { padding-top: 2rem; }
    .has-tabbar .container { padding-bottom: 3rem; }
}
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .container { animation: none; } }

.page-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    margin-bottom: 1.25rem;
}
.page-head p { margin: .3rem 0 0; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.section-head h2 { margin: 0; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.15rem;
    margin-bottom: 1rem;
}
.card > p:first-of-type { margin-top: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-foot { padding: .9rem 1.15rem; border-top: 1px solid var(--line); }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack > h2 { margin: 0; }

.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }

/* Stats row */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.stat-label { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { display: block; font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; }

/* ── Flash ───────────────────────────────────────────── */
.flash {
    display: flex; align-items: center; gap: .6rem;
    background: var(--accent-soft); color: var(--text);
    border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1rem;
    font-weight: 550;
    transition: opacity .4s, transform .4s, max-height .4s, margin .4s, padding .4s;
    max-height: 120px; overflow: hidden;
}
.flash::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
}
.flash.hide { opacity: 0; transform: translateY(-6px); max-height: 0; margin: 0; padding-block: 0; }

/* ── Forms ───────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .35rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 650; font-size: .92rem; padding: 0; }
.field em { font-weight: 400; font-style: normal; }
.field output { font-weight: 500; color: var(--muted); }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], select, textarea {
    width: 100%;
    font: inherit; color: var(--text);
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: .7rem .85rem;
    min-height: 48px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line); }
input:focus, select:focus, textarea:focus {
    outline: none; background: var(--surface); border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
textarea { resize: vertical; }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }

button:focus-visible, a:focus-visible, .check input:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}

.check { display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .2rem 0; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }

.hint { color: var(--muted); margin: .25rem 0 0; }
.error { color: var(--danger); font-weight: 550; }

.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-top: 1rem; }
.inline-form .field.grow { flex: 1 1 180px; }
.inline-form .field.tid { width: 84px; }
.inline-form .field.tid input { text-transform: uppercase; text-align: center; font-weight: 700; letter-spacing: .08em; }
.inline-form .btn { flex: 1 1 100%; }
@media (min-width: 560px) { .inline-form .btn { flex: 0 0 auto; } }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 48px; padding: .6rem 1.2rem;
    border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 650; text-decoration: none; white-space: nowrap;
    cursor: pointer; user-select: none;
    transition: background .15s, transform .12s var(--ease), box-shadow .15s, border-color .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { background: transparent; color: var(--danger); border-color: currentColor; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: .35rem .85rem; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
    transition: background .15s, color .15s;
}
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ── Badges, avatars, status ─────────────────────────── */
.badge {
    display: inline-block; padding: .15rem .6rem;
    border-radius: 999px; font-size: .76rem; font-weight: 650;
    background: var(--surface-2); color: var(--muted);
    vertical-align: middle; white-space: nowrap;
}
.badge.live { background: color-mix(in srgb, var(--live) 16%, transparent); color: var(--live); }
.badge.live::before {
    content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; margin-right: 5px; vertical-align: 1px;
    animation: pulse 1.8s infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

.avatar {
    --c: var(--accent);
    display: inline-grid; place-items: center; flex: none;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--c); color: #fff; text-decoration: none;
    font-weight: 750; font-size: .9rem; letter-spacing: .02em;
    box-shadow: inset 0 0 0 2px rgb(255 255 255 / .18);
}
.avatar.sm { width: 32px; height: 32px; font-size: .74rem; }

.status-dot {
    position: absolute; right: -2px; bottom: -2px;
    width: 14px; height: 14px; border-radius: 50%;
    border: 3px solid var(--surface); background: var(--muted);
}
.status-dot.live { background: var(--live); }
.status-dot.recent { background: var(--warn); }
.status-dot.never { background: var(--line); }

/* ── Auth ────────────────────────────────────────────── */
.auth { max-width: 420px; margin: 1.5rem auto 0; }
.auth .card { padding: 1.6rem; }
.auth h1 { margin-bottom: .3rem; }
.auth .card > .muted { margin: 0 0 1.4rem; }
@media (min-width: 768px) { .auth { margin-top: 3rem; } }

/* ── Trips ───────────────────────────────────────────── */
.trip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.trip-list .card { margin: 0; }
.trip-card {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
    color: inherit; text-decoration: none;
    transition: border-color .15s, transform .15s var(--ease), box-shadow .15s;
}
.trip-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.trip-card:active { transform: scale(.99); }
.trip-card h2 { font-size: 1.15rem; }
.trip-card p { margin: .15rem 0 0; }
.trip-card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }

.empty, .map-placeholder { text-align: center; padding: 2.25rem 1.25rem; }
.empty svg, .map-placeholder svg { width: 48px; height: 48px; fill: var(--accent); opacity: .5; }
.empty h2 { margin-top: .5rem; }
.empty p { margin: .25rem auto 1.25rem; max-width: 34ch; }
.map-placeholder { min-height: 200px; display: grid; place-content: center; justify-items: center; }
.map-placeholder p { margin: .5rem 0 0; }

.member-list, .device-list, .zone-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.member-list li, .device-list li, .zone-list li {
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem 0; border-top: 1px solid var(--line);
}
.member-list li:first-child, .device-list li:first-child, .zone-list li:first-child { border-top: 0; }
.member-name { flex: 1; min-width: 0; font-weight: 600; }
.member-name em { font-style: normal; font-weight: 400; }

/* ── Devices & zones ─────────────────────────────────── */
.device-badge {
    --c: var(--accent);
    position: relative; flex: none;
    display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 14px;
    background: color-mix(in srgb, var(--c) 16%, var(--surface));
    color: var(--c); font-weight: 800; letter-spacing: .04em;
}
.device-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.device-info strong, .zone-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-actions { display: flex; align-items: center; gap: .25rem; }
.zone-list .grow { display: flex; flex-direction: column; }
.zone-icon {
    display: grid; place-items: center; flex: none;
    width: 40px; height: 40px; border-radius: 12px;
    background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger);
}
.zone-icon svg { width: 20px; height: 20px; fill: currentColor; }
.zone-form { margin-top: 1rem; }

/* ── Maps ────────────────────────────────────────────── */
.map { position: relative; background: var(--surface-2); isolation: isolate; }
.map-canvas { position: absolute; inset: 0; }
.map-md { height: 260px; }
.map-sm { height: 240px; border-radius: var(--radius-sm); overflow: hidden; margin-top: .75rem; }
@media (min-width: 768px) { .map-md { height: 340px; } .map-sm { height: 300px; } }
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-control-zoom a { color: var(--text) !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
@media (prefers-color-scheme: dark) {
    .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
    .leaflet-control-zoom a, .leaflet-control-attribution { background: var(--surface) !important; }
    .leaflet-control-attribution a { color: var(--muted); }
}

.map-overlay-btn {
    position: absolute; z-index: 500; top: .6rem; left: .6rem;
    display: inline-flex; align-items: center; gap: .4rem;
    min-height: 38px; padding: .35rem .8rem;
    background: var(--surface); color: var(--text);
    border: 0; border-radius: 999px; box-shadow: var(--shadow);
    font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer;
}
.map-overlay-btn svg { width: 18px; height: 18px; fill: var(--accent); }

/* ── Bottom sheet / modal ────────────────────────────── */
.sheet-backdrop {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgb(8 12 11 / .5);
    backdrop-filter: blur(3px);
    animation: fade-in .2s ease;
}
.sheet {
    position: relative;
    width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-lg);
    animation: sheet-up .32s var(--ease);
}
.sheet::before {
    content: ""; display: block; width: 40px; height: 5px; border-radius: 3px;
    background: var(--line); margin: -.6rem auto 1rem;
}
.sheet h2 { font-size: 1.3rem; padding-right: 2.5rem; }
.sheet-close { position: absolute; top: .75rem; right: .75rem; }
@media (min-width: 768px) {
    .sheet-backdrop { align-items: center; }
    .sheet { border-radius: 24px; }
    .sheet::before { display: none; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }

.steps { list-style: none; counter-reset: step; margin: 1rem 0; padding: 0; display: grid; gap: 1.1rem; }
.steps li {
    counter-increment: step; position: relative;
    display: flex; flex-direction: column; gap: .35rem;
    padding-left: 2.6rem;
}
.steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: -.1rem;
    display: grid; place-items: center;
    width: 1.9rem; height: 1.9rem; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .9rem;
}
.steps .btn.block { margin-top: .35rem; }
.store-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .2rem; }
.steps details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; margin-top: .4rem; }

.qr {
    background: #fff; border-radius: var(--radius-sm); padding: .5rem;
    width: min(100%, 300px); margin-top: .4rem;
    border: 1px solid var(--line);
}
.qr svg { display: block; width: 100%; height: auto; }

/* Show the one-tap button on phones, the QR code on computers */
.only-pointer { display: none; }
@media (hover: hover) and (pointer: fine) {
    .only-touch { display: none !important; }
    .only-pointer { display: block; }
    span.only-pointer { display: inline; }
}

.connect-state {
    display: flex; align-items: center; gap: .75rem;
    padding: .9rem 1rem; border-radius: var(--radius-sm);
    background: var(--surface-2); font-weight: 600;
}
.connect-state small { display: block; font-weight: 400; margin-top: .15rem; }
.connect-state.ok { background: color-mix(in srgb, var(--live) 14%, var(--surface)); color: var(--live); }
.connect-state.ok svg { width: 24px; height: 24px; fill: currentColor; }

.spinner {
    width: 20px; height: 20px; flex: none; border-radius: 50%;
    border: 3px solid var(--line); border-top-color: var(--accent);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Colour swatches ─────────────────────────────────── */
.swatches { display: flex; flex-wrap: wrap; gap: .65rem; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.swatch span {
    display: block; width: 38px; height: 38px; border-radius: 50%;
    background: var(--c); border: 3px solid var(--surface);
    box-shadow: 0 0 0 1px var(--line);
    transition: transform .15s var(--ease), box-shadow .15s;
}
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--text); transform: scale(1.08); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.danger-zone h2 { color: var(--danger); }
.danger-zone p { margin: .25rem 0 1rem; }

.logout-row { margin-top: 1.5rem; }
@media (min-width: 768px) { .logout-row { display: none; } }

.add-more { margin-top: .75rem; }


/* ── Trip map ────────────────────────────────────────── */
.trip-map-card { position: relative; }
.map-trip { height: min(58vh, 560px); min-height: 320px; }
.map-overlay-btn.right { left: auto; right: .6rem; padding: .35rem; width: 40px; justify-content: center; }
.map-overlay-btn.right svg { fill: var(--text); }

.trip-map-card.is-full {
    position: fixed; inset: 0; z-index: 90; margin: 0;
    border-radius: 0; border: 0; display: flex; flex-direction: column;
    padding-top: env(safe-area-inset-top);
}
.trip-map-card.is-full .map-trip { flex: 1; height: auto; min-height: 0; }
.trip-map-card.is-full .map-overlay-btn.right { top: calc(.6rem + env(safe-area-inset-top)); }
body.no-scroll { overflow: hidden; }

.map-empty {
    position: absolute; inset: 0; z-index: 400;
    display: grid; place-content: center; justify-items: center; gap: .6rem; text-align: center;
    padding: 1.5rem; background: color-mix(in srgb, var(--surface) 70%, transparent);
    backdrop-filter: blur(2px);
}
.map-empty svg { width: 40px; height: 40px; fill: var(--accent); opacity: .6; }
.map-empty p { margin: 0; font-weight: 600; max-width: 28ch; }

.traveler-chips {
    display: flex; gap: .5rem; overflow-x: auto; padding: .75rem;
    scrollbar-width: none; border-top: 1px solid var(--line);
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
}
.traveler-chips::-webkit-scrollbar { display: none; }
.traveler-chip {
    display: flex; align-items: center; gap: .55rem; flex: none;
    padding: .4rem .85rem .4rem .4rem; border-radius: 999px;
    background: var(--surface-2); border: 1px solid transparent;
    font: inherit; color: var(--text); text-align: left; cursor: pointer;
    transition: opacity .2s, border-color .15s, transform .12s var(--ease);
}
.traveler-chip:active { transform: scale(.97); }
.traveler-chip:hover { border-color: var(--line); }
.traveler-chip.is-off { opacity: .45; }
.traveler-chip.is-off .avatar { filter: grayscale(1); }
.chip-text { display: flex; flex-direction: column; line-height: 1.2; }
.chip-text strong { font-size: .9rem; }
.chip-text small { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.live-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--live); margin-right: 3px; vertical-align: 1px; animation: pulse 1.8s infinite;
}

.delay-note { margin: -.5rem 0 1rem; }

.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin-bottom: 1rem; }
.stat-tile {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .75rem .85rem; box-shadow: var(--shadow);
}
.stat-tile .stat-value { font-size: 1.35rem; font-weight: 750; letter-spacing: -.01em; }
.stat-tile .stat-value small { font-size: .8rem; font-weight: 600; color: var(--muted); }


/* ── Collapsible card ────────────────────────────────── */
.collapsible { padding: 0; }
.collapse-head {
    display: flex; align-items: center; gap: .8rem; width: 100%;
    padding: 1rem 1.15rem; background: none; border: 0; border-radius: var(--radius);
    font: inherit; color: var(--text); text-align: left; cursor: pointer;
}
.collapse-head .grow { display: flex; flex-direction: column; }
.collapse-head strong { font-size: 1.05rem; }
.collapse-head .chevron { width: 24px; height: 24px; fill: var(--muted); transition: transform .2s var(--ease); }
.collapse-head[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.collapse-body { padding: 0 1.15rem 1.15rem; }
.collapse-body > p:first-child { margin-top: 0; }
