/* Margin. One column of quiet surfaces; the business's own colours carry the emphasis.
 * Figures are set in a high-contrast serif, everything else in a neutral grotesk. */
:root {
    --ground: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f8f9fa;
    --ink: #0f1115;
    --ink-2: #3a3f47;
    --muted: #6b7079;
    --hair: rgba(15, 17, 21, 0.07);
    --hair-2: rgba(15, 17, 21, 0.12);
    --good: #13795b;
    --warn: #a15c07;
    --bad: #b42318;
    --good-bg: color-mix(in oklab, var(--good) 10%, var(--surface));
    --warn-bg: color-mix(in oklab, var(--warn) 11%, var(--surface));
    --bad-bg: color-mix(in oklab, var(--bad) 9%, var(--surface));
    --shadow: 0 1px 1px rgba(15, 17, 21, 0.03), 0 2px 4px rgba(15, 17, 21, 0.03), 0 12px 32px -16px rgba(15, 17, 21, 0.14);
    --shadow-lg: 0 24px 64px -24px rgba(15, 17, 21, 0.35);
    --glass: rgba(244, 245, 247, 0.78);

    /* Set per business from its brand. */
    --brand: #1f4d45;
    --accent: #b5615f;
    --brand-ink: color-mix(in oklab, var(--brand) 92%, black);
    --brand-soft: color-mix(in oklab, var(--brand) 8%, var(--surface));
    --brand-wash: color-mix(in oklab, var(--brand) 14%, var(--surface));
    --accent-ink: color-mix(in oklab, var(--accent) 90%, black);
    --accent-soft: color-mix(in oklab, var(--accent) 9%, var(--surface));
    --track: color-mix(in oklab, var(--ink) 6%, var(--surface));

    --serif: 'Instrument Serif', 'Iowan Old Style', 'Times New Roman', serif;
    --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --r-lg: 22px;
    --r-md: 14px;
    --r-sm: 10px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ground: #0c0d0f;
        --surface: #15171a;
        --surface-2: #1b1e22;
        --ink: #eeeeeb;
        --ink-2: #c4c6ca;
        --muted: #8d929a;
        --hair: rgba(255, 255, 255, 0.07);
        --hair-2: rgba(255, 255, 255, 0.12);
        --good: #4fc59a;
        --warn: #e8a64a;
        --bad: #f0796d;
        --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.6);
        --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.8);
        --glass: rgba(12, 13, 15, 0.72);
        --brand-ink: color-mix(in oklab, var(--brand) 55%, white);
        --accent-ink: color-mix(in oklab, var(--accent) 60%, white);
        --brand-soft: color-mix(in oklab, var(--brand) 16%, var(--surface));
        --brand-wash: color-mix(in oklab, var(--brand) 26%, var(--surface));
        --accent-soft: color-mix(in oklab, var(--accent) 14%, var(--surface));
        --track: rgba(255, 255, 255, 0.06);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--ground);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 11.5px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 500; font-size: 15px;
    background: var(--ink); color: var(--ground); transition: transform 0.2s var(--ease), opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn.brand { background: var(--brand); color: #fff; }
.btn.quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2); }
.btn.text { background: none; color: var(--brand-ink); padding: 0 8px; height: 36px; }
.btn.danger { background: none; color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad) 35%, transparent); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair);
}
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- welcome ---------- */
.welcome {
    min-height: 100vh; min-height: 100dvh; display: grid; align-content: center; justify-items: start;
    gap: 28px; max-width: 560px; margin: 0 auto;
    padding: calc(40px + env(safe-area-inset-top)) 24px calc(40px + env(safe-area-inset-bottom));
}
.mark { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.mark img { width: 34px; height: 34px; border-radius: 9px; }
.welcome h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 13vw, 76px); line-height: 0.98; letter-spacing: -0.02em; }
.welcome h1 em { color: var(--brand-ink); }
.welcome p.lead { font-size: 17px; color: var(--ink-2); max-width: 44ch; }
.welcome .row { display: flex; flex-wrap: wrap; gap: 10px; }
.welcome .fine { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.welcome .fine svg { width: 15px; height: 15px; flex: none; }
.preview-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.preview-strip span { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink-2); }

/* ---------- shell ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-bottom: 1px solid var(--hair);
}
.topbar-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.switcher { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; max-width: max-content; padding: 4px 10px 4px 4px; border-radius: 999px; margin-right: auto; }
.switcher:hover { background: var(--track); }
.switcher .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.switcher svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.mono {
    width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; overflow: hidden;
    background: var(--brand); color: #fff; font-weight: 600; font-size: 14px;
}
.mono img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.mono.lg { width: 44px; height: 44px; border-radius: 13px; font-size: 18px; }
.month {
    height: 40px; border-radius: 999px; padding: 0 34px 0 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair);
    border: 0; appearance: none; -webkit-appearance: none; font-weight: 500; font-size: 14px; flex: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236b7079' stroke-width='1.8'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}

.tabbar {
    position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; gap: 2px; padding: 5px; border-radius: 999px;
    background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--hair);
    width: max-content; max-width: calc(100vw - 24px);
}
.tabbar a {
    display: grid; justify-items: center; gap: 1px; padding: 6px 10px 5px; border-radius: 999px; min-width: 58px;
    font-size: 10.5px; font-weight: 500; color: var(--muted); text-decoration: none; transition: background 0.25s var(--ease), color 0.25s;
}
.tabbar a svg { width: 20px; height: 20px; }
.tabbar a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.topnav { display: none; gap: 2px; padding: 4px; border-radius: 999px; background: var(--track); }
.topnav a { padding: 6px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; transition: background 0.25s var(--ease), color 0.25s; }
.topnav a svg { display: none; }
.topnav a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
@media (min-width: 900px) {
    .topnav { display: flex; }
    .tabbar { display: none; }
    .page { padding-bottom: 64px; }
    .toast { bottom: 28px; }
    .hero { padding: 36px 36px 32px; }
    .ring { width: 132px; height: 132px; }
    .ring .lab b { font-size: 38px; }
}

.page { max-width: 1040px; margin: 0 auto; padding: 20px 16px calc(120px + env(safe-area-inset-bottom)); display: grid; gap: 44px; }
.sec { display: grid; gap: 14px; scroll-margin-top: calc(80px + env(safe-area-inset-top)); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; letter-spacing: -0.015em; }
.sec-head p { color: var(--muted); font-size: 14px; max-width: 52ch; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; min-width: 0; align-content: start; }
.card h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.card .sub { color: var(--muted); font-size: 13px; margin-top: -8px; }

/* ---------- overview ---------- */
.hero {
    position: relative; overflow: hidden; border-radius: 28px; padding: 26px 22px 24px; color: var(--ink);
    background:
        radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--brand) 22%, transparent), transparent 60%),
        radial-gradient(80% 70% at 0% 100%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%),
        var(--surface);
    box-shadow: var(--shadow);
    display: grid; gap: 18px;
}
.hero-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-figure { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.hero .big { font-family: var(--serif); font-size: clamp(56px, 16vw, 96px); line-height: 0.92; letter-spacing: -0.03em; color: var(--brand-ink); }
.hero .big.neg { color: var(--bad); }
.hero .take { font-size: 16.5px; line-height: 1.5; color: var(--ink-2); max-width: 58ch; }
.hero .take b { color: var(--ink); font-weight: 600; }
.ring { width: 104px; height: 104px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .lab { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.ring .lab b { font-family: var(--serif); font-weight: 400; font-size: 30px; display: block; }
.ring .lab span { font-size: 11px; color: var(--muted); }
.flow { display: grid; gap: 10px; }
.flow-bar { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; display: flex; }
.flow-bar i { display: block; height: 100%; }
.flow-bar i.out { background: color-mix(in oklab, var(--ink) 22%, var(--surface)); }
.flow-bar i.left { background: var(--brand); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: grid; gap: 4px; }
.tile .v { font-family: var(--serif); font-size: 34px; line-height: 1.05; letter-spacing: -0.015em; }
.tile .k { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--track); color: var(--ink-2); width: max-content; }
.delta.up { background: var(--good-bg); color: var(--good); }
.delta.down { background: var(--bad-bg); color: var(--bad); }
.pill { font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); letter-spacing: 0.02em; }

.duo { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tax .v { font-family: var(--serif); font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.leak-peek { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 25%, transparent); text-decoration: none; color: inherit; }
.leak-peek .v { font-family: var(--serif); font-size: 44px; line-height: 1; letter-spacing: -0.02em; color: var(--accent-ink); }
.leak-peek .go { color: var(--accent-ink); font-weight: 500; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.leak-peek .go svg { width: 16px; height: 16px; }
.leak-peek .eyebrow { color: var(--accent-ink); }

/* ---------- bars ---------- */
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.bar .n { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.bar .v { font-size: 14px; font-weight: 500; white-space: nowrap; }
.bar .v small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in oklab, var(--brand) 75%, var(--surface)), var(--brand)); transform-origin: left; }
.bars.out .track i { background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 70%, var(--surface)), var(--accent)); }
.more { justify-self: start; }

.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; }
.stack i { display: block; height: 100%; min-width: 3px; }
.legend { display: grid; gap: 2px; }
.legend .row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.legend .row:first-child { border-top: 0; }
.legend .row .p { color: var(--muted); font-size: 12.5px; width: 3.2em; text-align: right; }
.legend .row .a { font-weight: 500; }

/* ---------- lists ---------- */
.list { display: grid; }
.li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hair); }
.li:first-child { border-top: 0; padding-top: 2px; }
.li .t { font-weight: 500; font-size: 14.5px; overflow-wrap: anywhere; }
.li .s { color: var(--muted); font-size: 12.5px; }
.li .r { text-align: right; display: grid; justify-items: end; gap: 3px; }
.li .r .main { font-weight: 500; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--brand-soft); color: var(--brand-ink); }
.score { min-width: 2.7em; font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.score.good { color: var(--good); } .score.warn { color: var(--warn); } .score.bad { color: var(--bad); }
.tag { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; }
.tag.good { background: var(--good-bg); color: var(--good); } .tag.warn { background: var(--warn-bg); color: var(--warn); } .tag.bad { background: var(--bad-bg); color: var(--bad); }
.minibar { display: grid; gap: 3px; width: 100%; margin-top: 6px; }
.minibar span { display: block; height: 4px; border-radius: 999px; }
.minibar .rv { background: var(--brand); }
.minibar .cs { background: color-mix(in oklab, var(--ink) 25%, var(--surface)); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kpi .v { font-family: var(--serif); font-size: 38px; line-height: 1; letter-spacing: -0.02em; }

/* ---------- fix ---------- */
.leak {
    border-radius: 28px; padding: 26px 22px; display: grid; gap: 16px;
    background: radial-gradient(120% 100% at 100% 0%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%), var(--surface);
    box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in oklab, var(--accent) 22%, transparent);
}
.leak .eyebrow { color: var(--accent-ink); }
.leak h3 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.leak .amt { font-family: var(--serif); font-size: 26px; color: var(--accent-ink); }
.leak p { font-size: 15.5px; color: var(--ink-2); max-width: 60ch; }
.action { border-radius: var(--r-md); background: var(--surface-2); padding: 16px; display: grid; gap: 6px; box-shadow: inset 0 0 0 1px var(--hair); }
.action b { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.action p { color: var(--ink); }
.checks { list-style: none; display: grid; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 13px 0; border-top: 1px solid var(--hair); font-size: 14px; color: var(--ink-2); }
.checks li:first-child { border-top: 0; padding-top: 2px; }
.checks li b { color: var(--ink); font-weight: 600; display: block; margin-bottom: 1px; }
.checks .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--track); color: var(--muted); }
.checks .ic svg { width: 13px; height: 13px; }
.checks .good .ic { background: var(--good-bg); color: var(--good); }
.checks .warn .ic { background: var(--warn-bg); color: var(--warn); }
.checks .bad .ic { background: var(--bad-bg); color: var(--bad); }
.foot { color: var(--muted); font-size: 12.5px; text-align: center; padding-top: 6px; }

/* ---------- empty business ---------- */
.drop {
    border-radius: 28px; padding: 40px 22px; display: grid; justify-items: center; text-align: center; gap: 14px;
    background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--hair-2);
    transition: box-shadow 0.25s var(--ease), background 0.25s;
}
.drop.over { background: var(--brand-soft); box-shadow: var(--shadow), inset 0 0 0 2px var(--brand); }
.drop h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.05; }
.drop p { color: var(--muted); max-width: 42ch; }
.drop .glyph { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.drop .glyph svg { width: 26px; height: 26px; }
.kinds { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); width: 100%; max-width: 640px; text-align: left; }
.kinds div { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.kinds b { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; }

/* ---------- sheets ---------- */
.sheet {
    border: 0; padding: 0; background: transparent; color: var(--ink);
    width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; margin: auto auto 0;
}
.sheet::backdrop { background: rgba(8, 9, 11, 0.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-inner {
    background: var(--surface); border-radius: 26px 26px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
    display: grid; gap: 18px; max-height: 92vh; max-height: 92dvh; overflow: auto; box-shadow: var(--shadow-lg);
}
.sheet-inner::before { content: ''; justify-self: center; width: 38px; height: 5px; border-radius: 999px; background: var(--hair-2); }
@media (min-width: 640px) {
    .sheet { margin: auto; }
    .sheet-inner { border-radius: 26px; padding: 24px 26px; }
    .sheet-inner::before { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
    .sheet[open] .sheet-inner { animation: rise 0.42s var(--ease); }
    @keyframes rise { from { transform: translateY(24px); opacity: 0; } }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.05; }
.form { display: grid; gap: 14px; }
.fl { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); min-width: 0; }
.fl input[type=text], .fl input[type=number], .fl select {
    height: 46px; border-radius: 12px; border: 0; padding: 0 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair-2); font-size: 16px; font-weight: 400; color: var(--ink); width: 100%;
}
.two { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sw { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); position: relative; }
.sw[aria-pressed=true]::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink); }
.sw.custom { overflow: hidden; display: grid; place-items: center; background: conic-gradient(#e5484d, #f5a524, #46a758, #0091ff, #8e4ec6, #e5484d); }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.logo-pick { display: flex; align-items: center; gap: 12px; }
.logo-pick label { font-weight: 500; color: var(--brand-ink); cursor: pointer; font-size: 14px; }
.logo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.sheet-actions .grow { display: flex; gap: 10px; margin-left: auto; }
.blist { display: grid; gap: 6px; }
.bitem { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; text-align: left; width: 100%; }
.bitem:hover, .bitem.on { background: var(--surface-2); }
.bitem .t { font-weight: 500; }
.bitem .s { font-size: 12.5px; color: var(--muted); }
.bitem .chev { margin-left: auto; color: var(--muted); }
.bitem .chev svg { width: 16px; height: 16px; }
.files { display: grid; gap: 10px; }
.file { border-radius: 16px; background: var(--surface-2); padding: 12px 14px; display: grid; gap: 8px; box-shadow: inset 0 0 0 1px var(--hair); }
.file.err { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad) 45%, transparent); }
.file-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.file-top .nm { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-top .meta { font-size: 12px; color: var(--muted); }
.file select { height: 34px; border-radius: 10px; border: 0; padding: 0 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); font-size: 13px; }
.file .warn-t { font-size: 12.5px; color: var(--bad); }
.file details summary { font-size: 12.5px; color: var(--brand-ink); cursor: pointer; font-weight: 500; }
.colmap { display: grid; gap: 6px 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-top: 8px; }
.colmap label { display: grid; grid-template-columns: 7.6rem minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.colmap select { width: 100%; min-width: 0; }
.picker { border-radius: 16px; padding: 18px; text-align: center; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--hair-2); display: grid; gap: 6px; justify-items: center; cursor: pointer; }
.picker.over { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); }
.picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.picker b { font-weight: 600; }
.picker span { font-size: 13px; color: var(--muted); }
.menu { display: grid; gap: 2px; }
.menu button { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 12px; text-align: left; font-size: 15px; }
.menu button:hover { background: var(--surface-2); }
.menu button svg { width: 19px; height: 19px; color: var(--muted); }
.menu button.danger { color: var(--bad); }
.menu button.danger svg { color: var(--bad); }

.toast {
    position: fixed; left: 50%; transform: translateX(-50%); z-index: 50;
    bottom: calc(92px + env(safe-area-inset-bottom)); padding: 11px 16px; border-radius: 999px;
    background: var(--ink); color: var(--ground); font-size: 14px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal .track i { animation: grow 0.9s var(--ease) both; }
    .reveal .stack i, .reveal .flow-bar i { animation: grow 0.9s var(--ease) both; transform-origin: left; }
    .reveal .card, .reveal .hero, .reveal .leak { animation: lift 0.6s var(--ease) both; }
    .reveal .sec:nth-child(2) .card { animation-delay: 0.05s; }
    @keyframes grow { from { transform: scaleX(0); } }
    @keyframes lift { from { opacity: 0; transform: translateY(10px); } }
    .ring circle.val { transition: stroke-dashoffset 1.1s var(--ease); }
}

/* ---------- print / PDF ---------- */
@media print {
    @page { margin: 14mm; }
    :root { --ground: #fff; --surface: #fff; color-scheme: light; }
    body { background: #fff; font-size: 12px; }
    .topbar, .tabbar, .toast, .no-print { display: none !important; }
    .page { padding: 0; gap: 22px; max-width: none; }
    .card, .hero, .leak { box-shadow: inset 0 0 0 1px #e3e5e8 !important; break-inside: avoid; }
    .print-head { display: flex !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; }
}
.print-head { display: none; align-items: center; gap: 12px; }
