@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
    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: 'Manrope Fallback';
    src: local('Arial');
    ascent-override: 99.32%;
    descent-override: 27.95%;
    line-gap-override: 0%;
    size-adjust: 100.40%;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
    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: 'JetBrains Mono Fallback';
    src: local('Courier New');
    ascent-override: 75%;
    descent-override: 25%;
    line-gap-override: 0%;
    size-adjust: 133%;
}

:root {
    --bg: #f5f6f8;
    --bg-soft: #eceef2;
    --bg-tint: #dde1e8;
    --bg-paper: #ffffff;
    --ink: #0e1628;
    --ink-2: #1f2a3d;
    --muted: #5b6373;
    --faint: #98a0ad;
    --rule: #dfe2ea;
    --rule-strong: #c2c8d3;
    --accent: #b91c1c;
    --accent-soft: #fde2e2;
    --accent-ink: #7f1d1d;
    --good: #1d6f3f;
    --good-soft: #d6e7dc;
    --good-ink: #14532d;
    --warn: #b45309;
    --warn-soft: #fef3c7;
    --warn-ink: #7c2d12;
    --bad: #b91c1c;
    --bad-soft: #fde2e2;
    --bad-ink: #7f1d1d;

    --ink-hover: #1f1f23;
    --header-bg: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 2px rgba(14, 22, 40, 0.04), 0 8px 24px -8px rgba(14, 22, 40, 0.08);
    --shadow-md: 0 4px 16px rgba(14, 22, 40, 0.08);
    --shadow-lg: 0 20px 60px -12px rgba(14, 22, 40, 0.25);
    --info-soft: #eff6ff;
    --info-ink: #1e40af;

    --fg: var(--ink);
    --border: var(--rule);

    --row-pad-y: 12px;
    --row-pad-x: 14px;

    --sans: "Manrope", "Manrope Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
    --mono: "JetBrains Mono", "JetBrains Mono Fallback", "SF Mono", ui-monospace, Menlo, monospace;
    --display: "Manrope", "Manrope Fallback", -apple-system, BlinkMacSystemFont, sans-serif;

    --radius: 4px;
    --radius-sm: 3px;
}

[data-theme="dark"] {
    --bg: #0b1220;
    --bg-soft: #141d31;
    --bg-tint: #1f2a44;
    --bg-paper: #182240;
    --ink: #f1f5fb;
    --ink-2: #c8d0dc;
    --muted: #8c95a8;
    --faint: #5d6679;
    --rule: #2c3a58;
    --rule-strong: #44557a;
    --accent: #f87171;
    --accent-soft: rgba(248, 113, 113, 0.14);
    --accent-ink: #fca5a5;
    --good: #34d399;
    --good-soft: rgba(52, 211, 153, 0.13);
    --good-ink: #6ee7b7;
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.13);
    --warn-ink: #fcd34d;
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.14);
    --bad-ink: #fca5a5;

    --ink-hover: #ffffff;
    --header-bg: rgba(14, 21, 38, 0.85);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px -8px rgba(0, 0, 0, 0.55);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 60px -12px rgba(0, 0, 0, 0.65);
    --info-soft: rgba(96, 165, 250, 0.15);
    --info-ink: #93c5fd;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1220;
        --bg-soft: #141d31;
        --bg-tint: #1f2a44;
        --bg-paper: #182240;
        --ink: #f1f5fb;
        --ink-2: #c8d0dc;
        --muted: #8c95a8;
        --faint: #5d6679;
        --rule: #2c3a58;
        --rule-strong: #44557a;
        --accent: #f87171;
        --accent-soft: rgba(248, 113, 113, 0.14);
        --accent-ink: #fca5a5;
        --good: #34d399;
        --good-soft: rgba(52, 211, 153, 0.13);
        --good-ink: #6ee7b7;
        --warn: #fbbf24;
        --warn-soft: rgba(251, 191, 36, 0.13);
        --warn-ink: #fcd34d;
        --bad: #f87171;
        --bad-soft: rgba(248, 113, 113, 0.14);
        --bad-ink: #fca5a5;

        --ink-hover: #ffffff;
        --header-bg: rgba(14, 21, 38, 0.85);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px -8px rgba(0, 0, 0, 0.55);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 20px 60px -12px rgba(0, 0, 0, 0.65);
        --info-soft: rgba(96, 165, 250, 0.15);
        --info-ink: #93c5fd;
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv01", "cv11";
    
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 24px;
    border-bottom: 1px solid var(--rule);
    background: var(--header-bg);
    backdrop-filter: saturate(140%) blur(8px);
}
.site-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.site-header .brand-mark {
    width: 22px; height: 22px;
    background: var(--ink);
    color: var(--bg);
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 12px;
    border-radius: var(--radius-sm);
}
.site-nav {
    display: flex;
    gap: 2px;
    align-items: center;
}
.site-nav a, .site-nav .cta {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    line-height: 1.4;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.active {
    color: var(--ink);
    background: var(--bg-tint);
}
.site-nav .cta {
    background: var(--ink);
    color: var(--bg);
    padding: 6px 14px;
}
.site-nav .cta:hover { background: var(--ink-hover); color: var(--bg); }
.site-nav .notif-link { font-size: 14px; }

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
.container-tight { max-width: 1040px; }

main.container { padding-top: 0; padding-bottom: 0; }

.eyebrow {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.h-display {
    font-family: var(--display);
    font-weight: 700;
    font-size: 56px;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
}
.h-section {
    font-family: var(--display);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}
.h-card {
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
}
.lead {
    font-size: 16px;
    line-height: 1.5;
    color: var(--muted);
    max-width: 56ch;
    text-wrap: pretty;
}
.mono { font-family: var(--mono); font-feature-settings: "ss01"; }
.muted { color: var(--muted); }
.center { text-align: center; }
.flex { display: flex; }
.gap-12 { gap: 12px; }

.button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.1s ease;
    text-decoration: none;
    line-height: 1.4;
    cursor: pointer;
}
.button:hover, .btn:hover {
    background: var(--bg-soft);
    border-color: var(--ink);
    text-decoration: none;
}
.button.primary, .btn.btn-primary,
button.primary {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
    /* Standalone <button class="primary"> (no .button class) still needs the
       base button geometry — padding/border/radius. */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-width: 1px;
    border-style: solid;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.1s ease;
    line-height: 1.4;
    cursor: pointer;
}
.button.primary:hover, .btn.btn-primary:hover,
button.primary:hover { background: var(--ink-hover); color: var(--bg); }
.button.danger,
button.danger {
    background: var(--bad-soft);
    border-color: var(--bad-soft);
    color: var(--bad-ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-width: 1px;
    border-style: solid;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.1s ease;
    line-height: 1.4;
    cursor: pointer;
}
.button.danger:hover,
button.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--muted);
    font-weight: 500;
}
.btn-link:hover { color: var(--ink); text-decoration: none; }

.kbd {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    padding: 0 5px;
    height: 20px;
    border: 1px solid var(--rule-strong);
    background: var(--bg);
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    border-radius: 3px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border: 1px solid var(--rule-strong);
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    background: var(--bg-paper);
    border-radius: 999px;
}
.chip-up {
    color: var(--bad-ink);
    background: var(--bad-soft);
    border-color: transparent;
}
.chip-down {
    color: var(--good-ink);
    background: var(--good-soft);
    border-color: transparent;
}
.chip-dot {
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.spark { display: block; }
.spark .line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.spark .line-up { stroke: var(--bad); }
.spark .line-down { stroke: var(--good); }
.spark .dot-last-up { fill: var(--bad); }
.spark .dot-last-down { fill: var(--good); }
.spark .area-up { fill: var(--bad); opacity: 0.1; }
.spark .area-down { fill: var(--good); opacity: 0.1; }

.hero {
    padding: 80px 0 56px;
    position: relative;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 64px;
    align-items: start;
}
.hero h1 .accent { color: var(--accent); }
.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
    flex-wrap: wrap;
}
.hero-trust {
    margin-top: 36px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 12px;
}
.hero-trust .dots { display: flex; }
.hero-trust .dots span {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--bg-tint);
    border: 2px solid var(--bg);
    margin-left: -6px;
    display: grid; place-items: center;
    font-size: 9px;
    font-weight: 600;
    color: var(--ink);
}
.hero-trust .dots span:first-child { margin-left: 0; }
.hero-trust strong { color: var(--ink); }

.hero-meta {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.hero-meta > div {
    padding: 22px 24px;
    border-right: 1px solid var(--rule);
}
.hero-meta > div:last-child { border-right: none; }
.hero-meta .num {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}
.hero-meta .num.accent { color: var(--accent); }
.hero-meta .label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.4;
}

.demo-card {
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -8px rgba(0,0,0,0.08);
}
.demo-card .demo-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--rule);
    background: var(--bg-soft);
    font-size: 12px;
}
.demo-card .demo-head .dots { display: flex; gap: 5px; }
.demo-card .demo-head .dots span {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--rule-strong);
}
.demo-card .demo-row {
    display: grid;
    grid-template-columns: 1fr 56px 56px;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--rule);
    align-items: center;
    font-size: 13px;
}
.demo-card .demo-row .ref {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
}
.demo-card .demo-row .label {
    font-size: 13px;
    margin-top: 1px;
    font-weight: 500;
}
.demo-card .demo-row .delta {
    font-family: var(--mono);
    color: var(--bad);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}
.demo-card .demo-foot {
    padding: 10px 16px;
    background: var(--bg-soft);
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--rule);
}

.steps {
    padding: 56px 32px;
    background: var(--bg-soft);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin-top: 32px;
}
.steps-head { margin-bottom: 32px; }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.step {
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 22px;
}
.step-num {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}
.step h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}
.step p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
.step p + .feature-bullets {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--rule);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.hero-grid.hero-grid-single {
    grid-template-columns: 1fr;
    max-width: 760px;
}
.features-cta {
    padding: 80px 0;
    text-align: center;
}
.features-cta .lead {
    margin: 16px auto 0;
    max-width: 560px;
}
.features-cta .hero-actions {
    justify-content: center;
}

.lp-demo-wrap {
    padding: 96px 0;
    background: var(--bg-soft);
    color: var(--ink);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    margin: 64px calc(-1 * ((100vw - 100%) / 2)) 0;
}
.lp-demo-wrap .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}
.lp-demo-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 32px;
    gap: 32px;
}
.lp-demo-head h2 {
    font-family: var(--display);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0;
    max-width: 18ch;
    color: var(--ink);
}
.lp-demo-head h2 em {
    font-style: normal;
    color: var(--bad);
    font-weight: 700;
}
.lp-demo-head .demo-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    border-left: 1px solid var(--rule);
    padding-left: 24px;
    max-width: 280px;
}
.lp-demo-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--rule);
    background: var(--bg-paper);
    min-height: 520px;
    box-shadow: 0 1px 0 var(--rule);
}

.invoice-paper {
    padding: 32px 36px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-2);
    border-right: 1px solid var(--rule);
    position: relative;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 19px, var(--bg-soft) 19px, var(--bg-soft) 20px),
        var(--bg-paper);
}
.invoice-paper .stamp {
    position: absolute;
    top: 24px; right: 24px;
    border: 2px solid var(--bad);
    color: var(--bad);
    padding: 4px 10px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    transform: rotate(-4deg);
    text-transform: uppercase;
    background: var(--bg-paper);
}
.invoice-paper .inv-head { margin-bottom: 24px; }
.invoice-paper .inv-head .supplier {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    text-transform: uppercase;
}
.invoice-paper .inv-head .meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}
.invoice-paper .inv-line {
    display: grid;
    grid-template-columns: 78px 1fr 50px 60px;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--rule);
    align-items: baseline;
    position: relative;
}
.invoice-paper .inv-line .ref { color: var(--ink); transition: color 0.3s ease; }
.invoice-paper .inv-line .desc { color: var(--ink-2); }
.invoice-paper .inv-line .qty { text-align: right; color: var(--muted); }
.invoice-paper .inv-line .price { text-align: right; color: var(--ink); }

.invoice-paper .inv-line.flagged::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(185, 28, 28, 0.08) 0%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    animation: lp-flag-bg 0.5s ease forwards;
    animation-delay: var(--flag-delay, 0s);
}
@keyframes lp-flag-bg {
    to { opacity: 1; }
}
.invoice-paper .inv-line.flagged .ref {
    font-weight: 600;
    animation: lp-flag-ref 0.5s ease forwards;
    animation-delay: var(--flag-delay, 0s);
}
@keyframes lp-flag-ref {
    to { color: var(--bad); }
}
.invoice-paper .inv-line .annotation {
    position: absolute;
    right: -8px;
    background: var(--bad);
    color: white;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(100%) translateY(4px);
    animation: lp-anno-in 0.4s ease forwards;
    animation-delay: var(--flag-delay, 0s);
}
@keyframes lp-anno-in {
    to {
        opacity: 1;
        transform: translateX(100%) translateY(0);
    }
}
.invoice-paper .inv-foot {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
    padding-top: 10px;
    border-top: 2px solid var(--ink);
}

.demo-output {
    padding: 32px 36px;
    background: var(--bg);
}
.demo-output .out-step {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 24px;
    padding: 6px 10px;
    background: var(--bg-soft);
    border-radius: 3px;
}
.demo-output .out-step .scan-dot {
    width: 6px; height: 6px;
    background: var(--bad);
    border-radius: 50%;
    animation: lp-pulse 1.2s ease-in-out infinite;
}
@keyframes lp-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.demo-output .out-h {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0 0 6px;
}
.demo-output .out-sub {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 24px;
}
.demo-output .out-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--rule);
    margin-bottom: 18px;
}
.demo-output .out-grid > div {
    padding: 14px 16px;
    border-right: 1px solid var(--rule);
}
.demo-output .out-grid > div:last-child { border-right: none; }
.demo-output .out-grid .l {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 6px;
}
.demo-output .out-grid .v {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
}
.demo-output .out-grid .v.up { color: var(--bad); }

.flag-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.flag-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--bad);
    align-items: center;
    opacity: 0;
    transform: translateX(12px);
    animation: lp-card-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    animation-delay: var(--card-delay, 0s);
}
@keyframes lp-card-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.flag-card .ref {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink);
}
.flag-card .desc {
    font-size: 12px;
    color: var(--ink-2);
}
.flag-card .desc small {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
}
.flag-card .delta {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--bad);
}

.faq { padding: 64px 0; }
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 56px;
    align-items: start;
}
.faq-item {
    padding: 16px 0;
    border-top: 1px solid var(--rule);
}
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-q {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
}
.faq-a {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    max-width: 60ch;
}

.privacy {
    padding: 48px 0;
    border-top: 1px solid var(--rule);
}
.privacy h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.privacy p { color: var(--muted); margin: 0; max-width: 60ch; }

.site-footer {
    padding: 24px 0;
    border-top: 1px solid var(--rule);
    margin-top: 0;
    color: var(--muted);
    font-size: 12px;
}
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-cols { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; width: 100%; justify-content: space-between; }
.footer-cols > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.footer-cols strong { color: var(--ink); font-weight: 600; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--ink); text-decoration: none; }
.consent-reset .link-button {
    background: none; border: none; color: var(--muted);
    padding: 0; font: inherit; cursor: pointer;
}
.consent-reset .link-button:hover { color: var(--ink); }

.auth, .dashboard {
    max-width: 420px;
    margin: 48px auto;
    padding: 28px;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.auth h1, .dashboard h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
}
.auth form, .dashboard form { display: flex; flex-direction: column; gap: 12px; }
.auth label { display: flex; flex-direction: column; gap: 4px; }
.auth label span { font-size: 12px; color: var(--muted); font-weight: 500; }
.auth input, .dashboard input {
    background: var(--bg);
    border: 1px solid var(--rule-strong);
    color: var(--ink);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font: inherit;
}
.auth input:focus, .dashboard input:focus {
    outline: none;
    border-color: var(--ink);
}
.auth button, .dashboard button {
    background: var(--ink);
    color: var(--bg);
    border: 0;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}
.auth button:hover, .dashboard button:hover { background: var(--ink-hover); }

/* Terms acceptance checkbox (account.require_terms_acceptance). Overrides the
   stacked .auth label layout: box and sentence sit on one line. */
.auth label.terms-check { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 13px; }
.auth label.terms-check input { margin: 2px 0 0; padding: 0; flex: none; }
.auth label.terms-check span { font-size: inherit; color: var(--ink); font-weight: 400; }
.auth .auth-cancel { font-size: 13px; color: var(--muted); }

/* FormShield honeypot (App\Core\Web\FormShield::field). Kept rendered but off
   screen, the way it was when this was an inline style: a bot that only
   skips display:none fields still fills it. The markup also carries the
   `hidden` attribute, so a theme that does not load this stylesheet hides it
   anyway; this rule overrides that to restore the off-screen variant. */
.form-trap, .form-trap[hidden] {
    display: block;
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.oauth-btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    color: var(--ink);
    margin-top: 8px;
}

.oauth-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 9px 14px;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}
.oauth-btn-google:hover { background: #f5f5f5; border-color: var(--ink); }
.oauth-btn-google:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.oauth-btn-google__icon { width: 18px; height: 18px; flex: none; }

.error-msg {
    background: var(--bad-soft);
    color: var(--bad-ink);
    border: 1px solid var(--bad);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 12.5px;
}
.status-msg {
    background: var(--good-soft);
    color: var(--good-ink);
    border: 1px solid var(--good);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 12.5px;
}

.legal-page, .post {
    max-width: 720px;
    margin: 32px auto 64px;
}
.legal-body, .post-body { line-height: 1.7; font-size: 14px; }
.legal-body h2, .post-body h2 { margin-top: 28px; font-size: 18px; font-weight: 600; }
.legal-body a, .post-body a { color: var(--accent); }

.page-list, .post-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}
.page-list li, .post-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
}

.pricing { max-width: 1080px; margin: 32px auto 64px; }
.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.plan {
    padding: 24px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--bg-paper);
}
.plan h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.plan-current { border-color: var(--ink); }

ul.features { list-style: '✓  '; padding-left: 20px; color: var(--muted); display: block; grid-template-columns: none; margin: 0; }
ul.features li { margin: 6px 0; }

.billing-result { max-width: 540px; margin: 64px auto; text-align: center; }

.settings { max-width: 540px; margin: 32px auto 64px; }
.settings hr { border: none; border-top: 1px solid var(--rule); margin: 28px 0; }
.settings h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
.settings h2.danger { color: var(--bad-ink); }
.settings select {
    background: var(--bg);
    border: 1px solid var(--rule-strong);
    color: var(--ink);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font: inherit;
}
.settings button.danger {
    background: var(--bad-soft);
    color: var(--bad-ink);
}
.settings button.danger:hover { background: var(--bad); color: #fff; }

.cta-row { margin: 24px 0; display: flex; gap: 12px; flex-wrap: wrap; }

.page-head {
    padding: 28px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 32px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-head h1 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 4px 0 0;
}

.stats {
    list-style: none; padding: 0;
    margin: 24px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--bg-paper);
    overflow: hidden;
}
.stats li {
    padding: 18px 20px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--bg-paper);
}
.stats li:last-child { border-right: none; }
.stats strong {
    display: block;
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1;
}
.stats span { color: var(--muted); font-size: 12px; margin-top: 6px; display: block; }
.stats li.highlight { background: var(--accent-soft); border-color: transparent; }
.stats li.highlight strong { color: var(--accent); }
.stats li a { color: var(--ink); display: block; }
.stats li a:hover { text-decoration: none; }

.data-table {
    width: 100%; border-collapse: collapse;
    margin: 16px 0;
    font-size: 12.5px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-paper);
}
.data-table th, .data-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}
.data-table thead th {
    color: var(--muted);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--bg-soft);
}
.data-table tr:hover { background: var(--bg-soft); }
.data-table tbody tr:last-child td { border-bottom: none; }

.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--rule-strong);
    background: var(--bg);
    color: var(--muted);
}
.status-received      { background: var(--info-soft); color: var(--info-ink); border-color: transparent; }
.status-extracting    { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.status-extracted     { background: var(--good-soft); color: var(--good-ink); border-color: transparent; }
.status-review_needed { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.status-failed        { background: var(--bad-soft);  color: var(--bad-ink);  border-color: transparent; }
.status-discarded     { background: var(--bg-tint);   color: var(--muted);    border-color: transparent; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}
.badge.severity-info     { background: var(--info-soft); color: var(--info-ink); }
.badge.severity-warning  { background: var(--warn-soft); color: var(--warn-ink); }
.badge.severity-critical { background: var(--bad-soft);  color: var(--bad-ink); }
tr.severity-critical td  { color: var(--bad-ink); }
tr.severity-warning  td  { color: var(--warn-ink); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters a {
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--rule-strong);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 500;
    background: var(--bg);
}
.filters a:hover { background: var(--bg-soft); text-decoration: none; }
.filters a.active {
    background: var(--ink); color: var(--bg);
    border-color: var(--ink);
}

form label { display: block; margin: 14px 0; }
form label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
form input[type="text"], form input[type="email"], form input[type="password"],
form input[type="search"], form input[type="number"], form select, form textarea, form input[type="file"] {
    width: 100%; max-width: 480px; padding: 8px 10px;
    background: var(--bg); color: var(--ink);
    border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); font: inherit;
}
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--ink); }
form textarea { max-width: none; }
form button { padding: 8px 14px; }

/* Fallback for bare <button type="submit"> (no helper class): otherwise the
   browser-default light-gray background collides with the dark-mode --ink
   text color → unreadable. Wrapped entirely in :where() so specificity is 0
   and any page-scoped rule (.auth button, .dashboard button, etc.) still
   wins on its own page. */
:where(form button[type="submit"]:not([class]):not(:disabled)) {
    background: var(--bg);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    transition: all 0.1s ease;
}
:where(form button[type="submit"]:not([class]):not(:disabled):hover) {
    background: var(--bg-soft);
    border-color: var(--ink);
}

.invoice-summary { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 16px 0; font-size: 13px; }
.invoice-summary dt { color: var(--muted); }
.invoice-summary dd { margin: 0; }

.quota { color: var(--muted); margin: 8px 0 24px; font-size: 12.5px; }

form.search { display: flex; gap: 8px; max-width: 720px; flex-wrap: wrap; align-items: center; }
form.search input { flex: 1 1 220px; min-width: 220px; width: auto; }
form.search select { width: auto; max-width: 100%; flex: 0 1 auto; }

.pagination {
    display: flex; gap: 6px; margin: 24px 0; align-items: center; flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--rule-strong);
    color: var(--muted);
    font-size: 12px;
}
.pagination a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.pagination .active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.address-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-soft); border: 1px solid var(--rule); border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 12.5px;
}
.address-box code { font-family: var(--mono); flex: 1; word-break: break-all; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; }
fieldset { border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
fieldset legend { padding: 0 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }
.edit-lines input { padding: 4px 6px; font-size: 12px; max-width: none; }
.edit-lines td { padding: 4px; }
.prefs-table th { font-size: 12px; }
.prefs-table p { margin: 2px 0 0; font-size: 12px; }

.actions-row { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.export-links { display: inline-flex; gap: 6px; }

.invoice-preview { margin: 16px 0; }
.invoice-preview summary { cursor: pointer; padding: 6px 0; color: var(--accent); }

.designer fieldset { background: var(--bg-soft); }
.designer-text pre { white-space: pre-wrap; }

/* ============================================================================
   Notifications — header bell + inbox page
   ============================================================================ */

/* Bell icon in the site header. SVG, sits on a subtle pill that lights up on
   hover. Badge floats top-right when there are unread items. */
.notif-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    transition: background 0.12s ease, color 0.12s ease;
}
.notif-link svg { width: 18px; height: 18px; }
.notif-link:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.notif-link.active { color: var(--ink); background: var(--bg-soft); }
/* Subtle pulse when there's something to read. */
.notif-link.has-unread { color: var(--ink); }
.notif-badge {
    position: absolute; top: -3px; right: -6px;
    background: var(--accent); color: #fff;
    font-family: var(--sans);
    font-size: 10px; font-weight: 700; line-height: 1;
    border-radius: 999px;
    padding: 3px 5px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--header-bg, var(--bg));
    letter-spacing: 0;
}

/* --- Inbox page shell --- */
.notif-page { max-width: 760px; margin: 0 auto; }

.notif-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 20px;
}
.notif-page-head h1 { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.notif-page-sub { margin: 0; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.notif-page-pill {
    display: inline-grid; place-items: center;
    min-width: 22px; height: 22px;
    padding: 0 7px;
    background: var(--accent); color: #fff;
    font-weight: 700; font-size: 11px;
    border-radius: 999px;
}
.notif-page-action .btn { display: inline-flex; align-items: center; gap: 6px; }
.notif-page-action .btn svg { width: 14px; height: 14px; }

/* --- Push subscription card --- */
.notif-push-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 18px;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin: 0 0 20px;
    box-shadow: var(--shadow-sm);
}
.notif-push-icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 50%;
}
.notif-push-icon svg { width: 22px; height: 22px; }
.notif-push-body h2 { margin: 0 0 4px; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.notif-push-desc { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.notif-push-states > div,
.notif-push-states > p { margin: 0; }
.notif-push-on {
    display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.notif-push-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px; font-weight: 500;
    line-height: 1.4;
}
.notif-push-pill svg { width: 12px; height: 12px; }
.notif-push-pill.is-good { background: var(--good-soft); color: var(--good-ink); }
.notif-push-pill.is-warn { background: var(--warn-soft); color: var(--warn-ink); }
.notif-push-pill.is-muted { background: var(--bg-soft); color: var(--muted); }
.btn.btn-ghost {
    background: transparent;
    border-color: var(--rule);
    color: var(--ink);
}
.btn.btn-ghost:hover { background: var(--bg-soft); border-color: var(--rule-strong); }
.btn.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Flash message after mark-all-read / preferences-saved. */
.notif-flash {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: var(--good-soft);
    color: var(--good-ink);
    border-radius: var(--radius);
    font-size: 13px;
    border: 1px solid color-mix(in srgb, var(--good) 22%, transparent);
}

/* --- Empty state --- */
.notif-empty {
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    padding: 56px 24px;
    background: var(--bg-paper);
    border: 1px dashed var(--rule);
    border-radius: var(--radius);
}
.notif-empty svg { width: 56px; height: 56px; color: var(--faint); margin-bottom: 16px; }
.notif-empty h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.notif-empty p { margin: 0; font-size: 13px; }

/* --- Notification list --- */
.notif-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.notif-card {
    position: relative;
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 14px;
    padding: 14px 16px 14px 14px;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    transition: border-color 0.12s ease, transform 0.12s ease;
}
.notif-card:hover { border-color: var(--rule-strong); }
.notif-card.is-unread { border-color: color-mix(in srgb, var(--accent) 35%, var(--rule)); }
.notif-card-dot {
    width: 8px; height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: transparent;
}
.notif-card.is-unread .notif-card-dot {
    background: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.notif-card-main { min-width: 0; }
.notif-card-side {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 11.5px;
    white-space: nowrap;
}
.notif-card-time { font-variant-numeric: tabular-nums; }

.notif-card-mark { margin: 0; }
.notif-card-mark-btn {
    display: inline-grid; place-items: center;
    width: 26px; height: 26px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.12s ease;
}
.notif-card-mark-btn svg { width: 13px; height: 13px; }
.notif-card-mark-btn:hover {
    background: var(--good-soft);
    border-color: var(--good);
    color: var(--good-ink);
}

/* Generic card body (used when no per-type partial is registered). */
.notif-card-generic .notif-card-title { font-weight: 600; font-size: 13.5px; margin: 0 0 6px; }
.notif-card-kv {
    margin: 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 2px 12px;
    font-size: 12.5px;
}
.notif-card-kv dt { color: var(--muted); text-transform: capitalize; }
.notif-card-kv dd { margin: 0; color: var(--ink); word-break: break-word; }

/* ---- Typed cards (rendered by consumer-site partials) -------------------- */
/* Header shared by every typed card: icon + title + supplier subtitle. */
.notif-card-head {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 6px;
}
.notif-card-icon {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.notif-card-icon svg { width: 16px; height: 16px; }
.notif-card-icon.is-alert { background: var(--accent-soft); color: var(--accent); }
.notif-card-icon.is-info  { background: var(--info-soft);   color: var(--info-ink); }
.notif-card-icon.is-warn  { background: var(--warn-soft);   color: var(--warn-ink); }
.notif-card-icon.is-good  { background: var(--good-soft);   color: var(--good-ink); }
/* Direction modifiers used by the price_alert.immediate card. Up = bad (red),
   down = good (green) — matches the project semantic ("baisse" is celebrated). */
.notif-card-icon--up   { background: var(--bad-soft);  color: var(--bad-ink);  }
.notif-card-icon--down { background: var(--good-soft); color: var(--good-ink); }
.notif-card-icon--flat { background: var(--accent-soft); color: var(--muted); }
.notif-card-title {
    font-weight: 600; font-size: 13.5px; line-height: 1.3;
    color: var(--ink);
}
.notif-card-subtitle {
    font-size: 12px; color: var(--muted); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif-card-headings { min-width: 0; }
.notif-card-body { font-size: 13px; color: var(--ink-2, var(--ink)); margin: 4px 0 8px; line-height: 1.5; }
.notif-card-body strong { color: var(--ink); }
.notif-card-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600;
    color: var(--accent-ink);
    text-decoration: none;
}
.notif-card-link svg { width: 12px; height: 12px; }
.notif-card-link:hover { text-decoration: underline; }

/* Price-move row: single compact line `old → new  [± delta%]`. Replaces the
   former boxed AVANT/MAINTENANT layout, which was too heavy in the feed. The
   delta pill carries the direction colour; the new value picks up an ink-only
   tint so colour is not the only signal. */
.notif-pricemove {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 6px 0 10px;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}
.notif-pricemove-old {
    font-size: 13px;
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent);
}
.notif-pricemove-sep {
    width: 12px; height: 12px;
    color: var(--muted);
    flex-shrink: 0;
}
.notif-pricemove-new {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}
.notif-pricemove-delta {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    margin-left: auto;
    background: var(--accent-soft);
    color: var(--muted);
}
.notif-pricemove-delta svg { width: 10px; height: 10px; }

.notif-pricemove--up   .notif-pricemove-new   { color: var(--bad-ink); }
.notif-pricemove--up   .notif-pricemove-delta { background: var(--bad-soft);  color: var(--bad-ink); }
.notif-pricemove--down .notif-pricemove-new   { color: var(--good-ink); }
.notif-pricemove--down .notif-pricemove-delta { background: var(--good-soft); color: var(--good-ink); }

/* Mobile: stack side meta under main column. */
@media (max-width: 560px) {
    .notif-card {
        grid-template-columns: 18px 1fr;
        grid-template-rows: auto auto;
    }
    .notif-card-side {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .notif-pricemove-delta { margin-left: 0; }
}

.ocr-stub-banner { background: var(--warn-soft); color: var(--warn-ink); padding: 12px 16px; border-radius: var(--radius); }
.ocr-stub-banner p { margin: 4px 0 0; font-size: 12.5px; }

section.features {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin: 48px 0;
}
section.features article {
    border: 1px solid var(--rule); border-radius: var(--radius);
    padding: 22px;
    background: var(--bg-paper);
}
section.features article h2 {
    font-size: 16px; margin: 0 0 8px; font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.01em;
}
section.features article p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.5; }

.upload-page .page-head .crumb {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.upload-page .page-head-intro {
    color: var(--muted);
    max-width: 360px;
    text-align: right;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin: 24px 0;
}
.dropzone {
    padding: 48px 32px;
    background: var(--bg-soft);
    border: 1.5px dashed var(--rule-strong);
    border-radius: var(--radius);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.dropzone:hover,
.dropzone.drag {
    background: var(--bg-paper);
    border-color: var(--ink);
}
.dropzone-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-paper);
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    font-size: 18px;
    color: var(--ink);
}
.dropzone h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
}
.dropzone p.muted {
    color: var(--muted);
    margin: 0;
    font-size: 13px;
}
.dropzone .btn-ghost {
    margin-top: 24px;
    padding: 8px 16px;
    background: var(--bg-paper);
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}
.dropzone .btn-ghost:hover {
    background: var(--bg-soft);
    border-color: var(--ink);
}
.dropzone .hint {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--faint);
}

.inbound-banner {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin: 0 0 16px;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.inbound-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--rule);
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 16px;
    color: var(--ink);
}
.inbound-banner-body { min-width: 0; }
.inbound-banner-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.005em;
}
.inbound-banner-text {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.inbound-banner .inbound-addr {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink);
    background: var(--bg-soft);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    margin: 0 4px;
}
.inbound-banner-copy { font-size: 12px; }
.inbound-banner-action {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--ink);
    text-decoration: none;
}
.inbound-banner-action:hover { text-decoration: underline; }
@media (max-width: 720px) {
    .inbound-banner {
        grid-template-columns: 36px 1fr;
        row-gap: 8px;
    }
    .inbound-banner-action {
        grid-column: 2;
    }
}

.tips {
    padding: 22px 24px;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}
.tips h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 14px;
}
.tips ol {
    padding: 0;
    margin: 0;
    list-style: none;
    counter-reset: t;
}
.tips ol li {
    counter-increment: t;
    padding: 10px 0 10px 32px;
    position: relative;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
    border-top: 1px solid var(--rule);
}
.tips ol li:first-child {
    border-top: none;
    padding-top: 4px;
}
.tips ol li::before {
    content: counter(t);
    position: absolute;
    left: 0;
    top: 14px;
    width: 18px;
    height: 18px;
    background: var(--bg-tint);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--ink);
}
.tips ol li:first-child::before { top: 6px; }

.recent-uploads {
    margin: 32px 0 16px;
}
.recent-uploads h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
}
.file-table {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-paper);
}
.file-row {
    display: grid;
    grid-template-columns: 28px 2fr 1.4fr 100px 130px 32px;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--rule);
    font-size: 13px;
    color: inherit;
    text-decoration: none;
}
.file-row:last-child { border-bottom: none; }
a.file-row { transition: background 0.08s; }
a.file-row:hover { background: var(--bg-soft); }
.file-row.head {
    background: var(--bg-soft);
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    text-transform: none;
}
.file-row .icon {
    width: 22px; height: 26px;
    border: 1px solid var(--rule-strong);
    border-radius: 3px;
    background: var(--bg);
    position: relative;
    display: inline-block;
}
.file-row .icon::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 7px; height: 7px;
    border-bottom: 1px solid var(--rule-strong);
    border-left: 1px solid var(--rule-strong);
    background: var(--bg-soft);
}
.file-row .supplier {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}
.file-row .name {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.file-row .meta {
    color: var(--muted);
    font-size: 12px;
}
.file-row .status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ink-2);
}
.file-row .status .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--good);
}
.file-row .status.pending .dot { background: var(--warn); }
.file-row .status.failed  .dot { background: var(--bad); }
.file-row .status.processing .dot {
    background: var(--ink);
    animation: file-blink 1s infinite;
}
.file-row .status.discarded .dot { background: var(--faint); }
.file-row .arrow {
    text-align: right;
    color: var(--faint);
    font-family: var(--mono);
    font-size: 12px;
}
a.file-row:hover .arrow { color: var(--ink); }
@keyframes file-blink { 50% { opacity: 0.4; } }

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 22, 40, 0.45);
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 24px;
    animation: auth-overlay-in 0.18s ease both;
}
.auth-overlay[hidden] { display: none; }
@keyframes auth-overlay-in { from { opacity: 0; } }
.auth-modal {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 880px;
    background: var(--bg-paper);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.25);
    animation: auth-modal-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    overflow: hidden;
}
@keyframes auth-modal-in {
    from { transform: translateY(8px); opacity: 0; }
}
.auth-close {
    position: absolute;
    top: 14px; right: 14px;
    background: transparent;
    border: none;
    width: 28px; height: 28px;
    font-size: 14px;
    color: var(--muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.auth-close:hover { color: var(--ink); background: var(--bg-soft); }

.auth-side {
    padding: 40px 36px;
    background: var(--bg-soft);
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.auth-eyebrow {
    font-family: var(--mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 18px;
}
.auth-title {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin: 0 0 28px;
    color: var(--ink);
}
.auth-points {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--ink-2);
}
.auth-points li { display: flex; gap: 12px; }
.auth-points li span {
    color: var(--accent-ink);
    font-family: var(--mono);
    flex-shrink: 0;
}
.auth-foot {
    font-size: 12px;
    color: var(--muted);
}

.auth-form {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
}
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 24px;
    gap: 4px;
}
.auth-tabs button {
    background: none;
    border: none;
    padding: 8px 0;
    margin-right: 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
}
.auth-tabs button.active {
    color: var(--ink);
    border-bottom-color: var(--ink);
}
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.auth-field span {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.auth-field input {
    background: var(--bg);
    border: 1px solid var(--rule-strong);
    padding: 10px 12px;
    font-size: 14px;
    border-radius: var(--radius-sm);
    outline: none;
    font-family: var(--sans);
}
.auth-field input:focus { border-color: var(--ink); }
.auth-submit {
    margin-top: 8px;
    padding: 12px 18px;
    font-size: 14px;
    background: var(--ink);
    color: var(--bg-paper);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.1s, border-color 0.1s;
}
.auth-submit:hover { background: var(--accent); border-color: var(--accent); }
.auth-legal {
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}
.auth-switch {
    background: none;
    border: none;
    padding: 0;
    color: var(--ink);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

@media (max-width: 880px) {
    .hero { padding: 48px 0 32px; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .h-display { font-size: 40px; }
    .hero-meta { grid-template-columns: 1fr; }
    .hero-meta > div { border-right: none; border-bottom: 1px solid var(--rule); }
    .hero-meta > div:last-child { border-bottom: none; }
    .steps-grid { grid-template-columns: 1fr; }
    .faq-grid { grid-template-columns: 1fr; gap: 24px; }
    .site-header { padding: 0 16px; height: auto; min-height: 52px; flex-wrap: wrap; gap: 8px; }
    .site-nav { flex-wrap: wrap; }

    .upload-grid { grid-template-columns: 1fr; }
    .upload-page .page-head-intro { text-align: left; max-width: none; }
    .file-row { grid-template-columns: 24px 1.6fr 90px 100px 24px; }
    .file-row .meta:nth-of-type(2) { display: none; } 
    .file-row.head span:nth-of-type(4) { display: none; }
    .auth-modal { grid-template-columns: 1fr; max-width: 480px; }
    .auth-side { display: none; }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-menu {
    position: relative;
}
.user-menu > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    outline: none;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:focus-visible .user-menu-bubble {
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);
}
.user-menu-bubble {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    display: inline-grid;
    place-items: center;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.02em;
    overflow: hidden;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    border: 1px solid var(--ink);
}
.user-menu-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-menu-bubble--guest {
    background: var(--bg-paper);
    color: var(--muted);
    border-color: var(--rule-strong);
}
.user-menu > summary:hover .user-menu-bubble {
    transform: scale(1.04);
}
.user-menu[open] .user-menu-bubble {
    box-shadow: 0 0 0 2px var(--bg-tint);
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    max-width: 280px;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(14, 22, 40, 0.10), 0 2px 8px rgba(14, 22, 40, 0.06);
    padding: 4px;
    z-index: 30;
}
[dir="rtl"] .user-menu-panel { right: auto; left: 0; }

.user-menu-identity {
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 4px;
}
.user-menu-name {
    color: var(--ink);
    font-weight: 600;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-email {
    color: var(--muted);
    font-size: 11.5px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-section { padding: 2px 0; }
.user-menu-section + .user-menu-section {
    border-top: 1px solid var(--rule);
    margin-top: 4px;
    padding-top: 4px;
}
.user-menu-section-title {
    padding: 6px 12px 2px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--faint);
    font-weight: 600;
}
.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 13px;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    line-height: 1.4;
}
.user-menu-item:hover {
    background: var(--bg-soft);
    text-decoration: none;
}
.user-menu-item--danger { color: var(--accent-ink); }
.user-menu-item--danger:hover { background: var(--accent-soft); color: var(--accent-ink); }

.user-menu-locale-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.user-menu-locale-list li { margin: 0; }
.user-menu-locale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.user-menu-locale-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-locale-code {
    flex: 0 0 auto;
    color: var(--faint);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 0.1s;
}
.user-menu-locale-item:hover .user-menu-locale-code { opacity: 0.85; }
.user-menu-locale-check {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}
.user-menu-locale-item--active { background: var(--bg-tint); color: var(--ink); cursor: default; }
.user-menu-locale-item--active:hover { background: var(--bg-tint); text-decoration: none; }

.user-menu-theme {
    padding: 6px 8px 8px;
}
.user-menu-theme .user-menu-section-title {
    padding: 2px 4px 6px;
}
.user-menu-theme-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    background: var(--bg-soft);
    padding: 3px;
    border-radius: var(--radius-sm);
}
.user-menu-theme-btn {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    border-radius: var(--radius-sm);
    padding: 6px 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.user-menu-theme-btn:hover {
    background: var(--bg-paper);
    color: var(--ink);
}
.user-menu-theme-btn:focus-visible {
    outline: none;
    border-color: var(--ink);
}
.user-menu-theme-btn.is-active,
.user-menu-theme-btn[aria-checked="true"] {
    background: var(--bg-paper);
    color: var(--ink);
    border-color: var(--rule-strong);
    box-shadow: 0 1px 2px rgba(14, 22, 40, 0.06);
}

.settings-hub-head {
    margin-bottom: 1.25rem;
}
.settings-hub-head h1 {
    margin: 0 0 0.25rem;
}
.settings-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.settings-tile {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.settings-tile:hover {
    border-color: var(--rule-strong);
    box-shadow: 0 1px 3px rgba(14, 22, 40, 0.05);
    text-decoration: none;
}
.settings-tile:focus-visible {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);
}
.settings-tile-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--ink);
    display: inline-grid;
    place-items: center;
}
.settings-tile-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.settings-tile-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--ink);
}
.settings-tile-desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
}

.settings-hub-grid + .settings-hub-grid {
    border-top: 1px solid var(--rule);
    padding-top: 16px;
    margin-top: 8px;
}

.settings-pane {
    max-width: 760px;
    margin: 0 auto;
}
.settings-pane > h1 {
    margin: 0 0 0.25rem;
    font-size: 24px;
}
.settings-pane-intro {
    margin: 0 0 1.5rem;
    font-size: 13px;
}
.settings-pane-back {
    margin: 0 0 0.5rem;
    font-size: 12px;
}
.settings-pane-back a {
    color: var(--muted);
    text-decoration: none;
}
.settings-pane-back a:hover {
    color: var(--ink);
}

.settings-pane-card {
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 14px;
}
.settings-pane-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}
.settings-pane-card-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.settings-pane-card--danger {
    border-color: var(--bad-soft);
}
.settings-pane-card--danger .settings-pane-card-head h2 {
    color: var(--bad-ink);
}
.settings-pane-card-warning {
    background: var(--bad-soft);
    color: var(--bad-ink);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin: 0 0 12px;
    font-size: 12.5px;
}
.settings-pane-card--ok {
    border-color: var(--good-soft);
}

.settings-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted);
}
.settings-status-badge--ok {
    background: var(--good-soft);
    color: var(--good-ink);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.settings-form .form-field-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}
.settings-form .form-field-hint {
    font-size: 12px;
    color: var(--muted);
}
.settings-form input,
.settings-form select,
.settings-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-paper);
    color: var(--ink);
    font: inherit;
}
.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
    outline: none;
    border-color: var(--ink);
}
.settings-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.credits-balance-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.credits-balance-figure {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.credits-balance-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
}
.credits-balance-unit {
    font-size: 13px;
}
.credits-ledger td.num,
.credits-ledger th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.credits-delta-positive { color: var(--good-ink); font-weight: 600; }
.credits-delta-negative { color: var(--bad-ink);  font-weight: 600; }
.data-table-wrap {
    overflow-x: auto;
}

.invoice-viewer {
    margin: 1.5rem 0;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-radius: 10px;
    overflow: hidden;
}
.invoice-viewer-loading,
.invoice-viewer-empty,
.invoice-viewer-error {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}
.invoice-viewer-error { color: var(--bad-ink); background: var(--bad-soft); }

.invoice-viewer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    min-height: 600px;
}
@media (max-width: 880px) {
    .invoice-viewer-grid { grid-template-columns: 1fr; }
    .invoice-viewer-side { border-left: none !important; border-top: 1px solid var(--rule); position: static !important; }
}

.invoice-viewer-pdf {
    background: var(--bg-soft);
    padding: 1rem;
    overflow-y: auto;
    max-height: 80vh;
}
.invoice-viewer-page {
    position: relative;
    display: block;
    margin: 0 auto 1rem;
    max-width: 100%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(14, 22, 40, 0.08);
    border-radius: 4px;
    overflow: hidden;
}
.invoice-viewer-page img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}
.invoice-viewer-overlay {
    position: absolute;
    top: 0; left: 0;
    cursor: crosshair;
}
.invoice-viewer-box {
    position: absolute;
    border: 2px solid;
    border-radius: 2px;
    cursor: pointer;
    transition: filter 0.1s, transform 0.1s;
    box-sizing: border-box;
    pointer-events: auto;
}
.invoice-viewer-box:hover {
    filter: brightness(1.05) saturate(1.2);
    transform: scale(1.02);
    z-index: 2;
}

.invoice-viewer-side {
    border-left: 1px solid var(--rule);
    background: var(--bg-paper);
    padding: 1rem 1.25rem;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 80vh;
    overflow-y: auto;
}
.invoice-viewer-side h2 {
    margin: 0 0 0.4rem;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.invoice-viewer-side .muted { font-size: 12px; line-height: 1.4; margin: 0 0 1rem; }
.invoice-viewer-side-head { margin-bottom: 1rem; }

.invoice-viewer-supplier {
    margin: 0 0 1rem;
    padding: 0.6rem 0.7rem;
    background: var(--bg-soft);
    border-radius: 6px;
}
.invoice-viewer-supplier label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 12px;
    color: var(--muted);
}
.invoice-viewer-supplier input {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--rule);
    border-radius: 5px;
    font-size: 13px;
    background: var(--bg-paper);
    color: var(--ink);
}

.invoice-viewer-fields {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 1rem;
}
.invoice-viewer-field-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: var(--ink-2);
}
.invoice-viewer-field-row:hover { background: var(--bg-soft); }
.invoice-viewer-field-label { flex: 1; min-width: 0; }
.invoice-viewer-field-count {
    font-size: 11px;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}
.invoice-viewer-field-count.has { color: var(--good-ink); font-weight: 600; }
.invoice-viewer-swatch {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.invoice-viewer-savebar {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
}
.invoice-viewer-savebar button.primary {
    width: 100%;
    background: var(--ink);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
.invoice-viewer-savebar button.primary:hover { background: var(--ink-2); color: var(--bg); }
.invoice-viewer-save-msg {
    font-size: 12px;
    color: var(--muted);
    min-height: 1em;
    text-align: center;
}
.invoice-viewer-save-msg.error { color: var(--bad-ink); font-weight: 600; }

.invoice-viewer-picker {
    position: absolute;
    z-index: 9999;
    background: var(--bg-paper);
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(14, 22, 40, 0.18);
    padding: 0.6rem;
    width: 240px;
    max-width: calc(100vw - 16px);
}
.invoice-viewer-picker[hidden] { display: none; }
.invoice-viewer-picker-head {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.4rem;
    padding: 0 0.2rem;
}
.invoice-viewer-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}
.invoice-viewer-picker-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--rule);
    border-left-width: 3px;
    border-radius: 5px;
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}
.invoice-viewer-picker-btn:hover { background: var(--bg-soft); }
.invoice-viewer-picker-remove {
    width: 100%;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.4rem;
    background: var(--bad-soft);
    color: var(--bad-ink);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.invoice-viewer-picker-remove:hover { background: var(--bad); color: #fff; }

.user-menu-logout { margin: 0; }

.contact-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 24px 0 8px;
    color: var(--muted, #5b6373);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}
.contact-back:hover { color: var(--ink, #0e1628); text-decoration: none; }
.contact-back svg { width: 16px; height: 16px; }

.contact-status {
    margin: 16px 0;
    padding: 12px 16px;
    background: var(--good-soft, #d6e7dc);
    color: var(--good-ink, #14532d);
    border: 1px solid var(--good, #1d6f3f);
    border-radius: var(--radius, 4px);
    font-size: 14px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
    align-items: start;
    padding: 32px 0 56px;
}
.contact-intro h1.h-section { margin: 0 0 12px; }
.contact-intro .lead {
    color: var(--muted, #5b6373);
    margin: 0 0 32px;
    max-width: 36ch;
}
.contact-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.contact-info-item strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink, #0e1628); }
.contact-info-item p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--muted, #5b6373);
    line-height: 1.5;
}
.contact-info-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--bg-soft, #eceef2);
    color: var(--ink-2, #1f2a3d);
    border-radius: 8px;
}
.contact-info-icon svg { width: 18px; height: 18px; }
.contact-info-icon-mail   { background: #e0ecff; color: #1d4ed8; }
.contact-info-icon-clock  { background: #dcfce7; color: #15803d; }
.contact-info-icon-chat   { background: #ffedd5; color: #c2410c; }
.contact-info-icon-shield { background: #ede9fe; color: #6d28d9; }
.contact-info-icon-gavel  { background: #fee2e2; color: #b91c1c; }

.contact-form-card {
    background: var(--bg-paper, #ffffff);
    border: 1px solid var(--rule, #dfe2ea);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.contact-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.contact-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.contact-field > span {
    font-weight: 600;
    color: var(--ink, #0e1628);
}
.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    background: var(--bg, #f5f6f8);
    border: 1px solid var(--rule-strong, #c2c8d3);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink, #0e1628);
    outline: none;
    transition: border-color 0.1s, box-shadow 0.1s;
}
.contact-field input::placeholder,
.contact-field textarea::placeholder { color: var(--faint, #98a0ad); }
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    border-color: var(--ink, #0e1628);
    box-shadow: 0 0 0 3px rgba(14,22,40,0.08);
}
.contact-field textarea { resize: vertical; min-height: 120px; }
.contact-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
    padding: 12px 18px;
    background: var(--accent, #2563eb);
    color: #fff;
    border: 1px solid var(--accent, #2563eb);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s, transform 0.05s;
}
.contact-submit:hover { background: var(--accent-ink, #1e40af); border-color: var(--accent-ink, #1e40af); }
.contact-submit:active { transform: translateY(1px); }
.contact-submit svg { width: 16px; height: 16px; }

.contact-direct {
    border-top: 1px solid var(--rule, #dfe2ea);
    padding: 48px 0 64px;
}
.contact-direct-head {
    text-align: center;
    margin-bottom: 28px;
}
.contact-direct-head h2 { margin: 0 0 8px; }
.contact-direct-head p { margin: 0; }
.contact-direct-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.contact-direct-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-paper, #ffffff);
    border: 1px solid var(--rule, #dfe2ea);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s, box-shadow 0.12s, transform 0.05s;
}
.contact-direct-card:hover {
    border-color: var(--ink, #0e1628);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 20px -10px rgba(0,0,0,0.12);
    text-decoration: none;
}
.contact-direct-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: #e0ecff;
    color: #1d4ed8;
    border-radius: 8px;
}
.contact-direct-icon svg { width: 18px; height: 18px; }
.contact-direct-card strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink, #0e1628);
    margin-bottom: 2px;
}
.contact-direct-mail {
    display: block;
    font-size: 13px;
    color: var(--accent, #2563eb);
    font-weight: 500;
    margin-bottom: 6px;
    word-break: break-all;
}
.contact-direct-card p {
    margin: 0;
    font-size: 12px;
    color: var(--muted, #5b6373);
    line-height: 1.5;
}

@media (max-width: 880px) {
    .contact-grid { grid-template-columns: 1fr; gap: 32px; padding: 16px 0 32px; }
    .contact-form-row { grid-template-columns: 1fr; }
    .contact-direct-grid { grid-template-columns: 1fr; }
    .contact-form-card { padding: 22px; }
}

.auth { max-width: 440px; }
.auth .auth-title { margin: 0 0 8px; }
.auth-subtitle {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}
.auth-oauth {
    margin: 18px 0 0;
    text-align: center;
}
.auth-oauth .oauth-btn { display: inline-block; }
.auth p.auth-foot { margin: 18px 0 0; text-align: center; }
.auth p.auth-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.auth p.auth-foot a:hover { color: var(--ink); }

/* Accessible hiding (also used outside the admin). */
.visually-hidden {
    position: absolute !important; clip: rect(1px,1px,1px,1px);
    width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
}

/* ===========================================================================
   Mobile / phone breakpoints
   880px = tablet (existing rules); 700px = phone; 420px = small phone.
   =========================================================================== */
@media (max-width: 700px) {
    html, body { overflow-x: hidden; }

    .container { padding: 0 14px; }

    .site-header {
        padding: 6px 12px;
        height: auto;
        min-height: 48px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .site-header .brand { font-size: 13px; gap: 8px; }
    .site-nav {
        order: 3;
        flex-basis: 100%;
        margin: 0 -12px;
        padding: 0 12px 4px;
        gap: 2px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .site-nav::-webkit-scrollbar { display: none; }
    .site-nav a, .site-nav .cta { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
    .header-right { gap: 6px; margin-left: auto; }

    .hero { padding: 32px 0 24px; }
    .h-display { font-size: 32px; line-height: 1.1; }
    .h-section { font-size: 22px; }
    .hero-grid { gap: 24px; }
    .hero-actions { gap: 8px; }
    .hero-trust { margin-top: 24px; gap: 12px; flex-wrap: wrap; }
    .hero-meta { margin-top: 32px; }
    .hero-meta > div { padding: 16px 18px; }
    .hero-meta .num { font-size: 24px; }
    .hero-meta .label { font-size: 11px; margin-top: 6px; }

    .steps { padding: 36px 16px; margin-top: 24px; }
    .steps-head { margin-bottom: 20px; }
    .step { padding: 18px; }
    .step h3 { font-size: 15px; }

    .demo-card .demo-head { padding: 10px 12px; font-size: 11px; }
    .demo-card .demo-row {
        grid-template-columns: minmax(0, 1fr) 56px 50px;
        gap: 8px;
        padding: 10px 12px;
        font-size: 12px;
    }
    .demo-card .demo-row .label { font-size: 12px; }
    .demo-card .demo-row > div { min-width: 0; }
    .demo-card .demo-row .label, .demo-card .demo-row .ref {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .lp-demo-wrap { padding: 48px 0; margin-top: 32px; }
    .lp-demo-wrap .container { padding: 0 14px; }
    .lp-demo-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 20px;
    }
    .lp-demo-head h2 { font-size: 26px; max-width: none; line-height: 1.15; }
    .lp-demo-head .demo-num {
        text-align: left;
        border-left: none;
        border-top: 1px solid var(--rule);
        padding-left: 0;
        padding-top: 12px;
        max-width: none;
        width: 100%;
    }
    .lp-demo-stage {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .invoice-paper {
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding: 22px 18px;
        font-size: 10px;
        overflow: hidden;
    }
    .invoice-paper .stamp { top: 16px; right: 14px; font-size: 9px; padding: 3px 7px; }
    .invoice-paper .inv-head .supplier { font-size: 14px; }
    .invoice-paper .inv-head .meta { font-size: 9px; }
    .invoice-paper .inv-line {
        grid-template-columns: 64px minmax(0, 1fr) 42px 56px;
        gap: 6px;
    }
    .invoice-paper .inv-line .desc {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .invoice-paper .inv-line .annotation {
        right: 0;
        transform: translateX(0);
        font-size: 9px;
        padding: 1px 4px;
    }
    .demo-output { padding: 22px 18px; }
    .demo-output .out-h { font-size: 18px; }
    .demo-output .out-sub { font-size: 12px; }
    .demo-output .out-grid .v { font-size: 16px; }
    .demo-output .out-grid > div { padding: 12px 14px; }
    .flag-card {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 10px 12px;
    }
    .flag-card .desc {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .flag-card .desc small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .faq { padding: 40px 0; }

    .page-head {
        padding: 18px 0 14px;
        gap: 12px;
        margin-bottom: 16px;
        align-items: flex-start;
    }
    .page-head h1 { font-size: 22px; }
    .upload-page .page-head-intro { max-width: none; text-align: left; }

    .stats { grid-template-columns: 1fr 1fr; }
    .stats li { padding: 14px 16px; border-right: 1px solid var(--rule); }
    .stats li:nth-child(2n) { border-right: none; }
    .stats strong { font-size: 22px; }

    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 12px;
        max-width: 100%;
    }
    .data-table thead, .data-table tbody { width: 100%; }
    .data-table th, .data-table td { padding: 8px 10px; white-space: nowrap; }

    form input[type="text"], form input[type="email"], form input[type="password"],
    form input[type="search"], form input[type="number"], form select, form textarea, form input[type="file"] {
        max-width: 100%;
    }
    form.search { gap: 6px; }
    form.search input { min-width: 0; flex: 1 1 100%; }
    form.search select { flex: 1 1 auto; }

    .auth, .dashboard { margin: 24px auto; padding: 20px; }

    .invoice-summary { grid-template-columns: 1fr; gap: 2px; }
    .invoice-summary dt {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted);
        margin-top: 8px;
    }
    .invoice-summary dd { margin: 0 0 4px; }

    .invoice-preview img,
    .invoice-preview object { max-height: 60vh; }

    .notifications-list li {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 12px 14px;
    }
    .notifications-list .notif-time { order: -1; font-size: 11px; }
    .notifications-list .notif-actions { justify-self: start; }

    .plans { grid-template-columns: 1fr; gap: 12px; }
    .plan { padding: 18px; }

    .settings-hub-grid { grid-template-columns: 1fr; }
    .settings { margin: 24px auto; padding: 0 4px; }

    .site-footer { padding: 18px 0; }
    .footer-cols { gap: 12px; flex-direction: column; align-items: flex-start; }
    .footer-cols > div:first-child { flex-wrap: wrap; }
    .footer-nav { gap: 12px; }

    .invoice-viewer-grid { grid-template-columns: 1fr; }
    .invoice-viewer-side {
        border-left: none !important;
        border-top: 1px solid var(--rule);
        position: static !important;
        max-height: none;
        padding: 1rem;
    }
    .invoice-viewer-pdf { padding: 0.75rem; max-height: 60vh; }

    .auth-overlay { padding: 12px; }
    .auth-modal { grid-template-columns: 1fr; max-width: 100%; }
    .auth-side { display: none; }
    .auth-form { padding: 28px 22px; }

    .actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
    .cta-row { gap: 8px; }
    .cta-row .button { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 420px) {
    .container { padding: 0 12px; }
    .h-display { font-size: 28px; }
    .hero-actions .button { flex: 1 1 100%; justify-content: center; }
    .stats { grid-template-columns: 1fr; }
    .stats li, .stats li:nth-child(2n) { border-right: none; }
    .invoice-paper .inv-line {
        grid-template-columns: 56px minmax(0, 1fr) 38px 52px;
        font-size: 9px;
        gap: 4px;
    }
    .lp-demo-head h2 { font-size: 22px; }
    .demo-output .out-grid { grid-template-columns: 1fr; }
    .demo-output .out-grid > div { border-right: none; border-bottom: 1px solid var(--rule); }
    .demo-output .out-grid > div:last-child { border-bottom: none; }
    .flag-card { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 8px; padding: 9px 10px; }
    .lp-demo-wrap .container { padding: 0 12px; }
    .invoice-paper { padding: 18px 14px; }
    .site-header .brand span:last-child { font-size: 13px; }
}

/* ============================================================================
   Dialog — themed replacement for window.confirm / prompt / alert.
   ========================================================================= */
.app-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 22, 40, 0.55);
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    animation: app-dialog-overlay-in 0.14s ease both;
}
@keyframes app-dialog-overlay-in { from { opacity: 0; } }
.app-dialog {
    width: 100%;
    max-width: 420px;
    background: var(--bg-paper);
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.35);
    padding: 22px 22px 18px;
    animation: app-dialog-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes app-dialog-in {
    from { transform: translateY(6px); opacity: 0; }
}
.app-dialog__title {
    margin: 0 0 8px;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--ink);
}
.app-dialog__message {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-2);
    white-space: pre-wrap;
}
.app-dialog__input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    margin: 0 0 16px;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    outline: none;
}
.app-dialog__input:focus { border-color: var(--ink); }
.app-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.app-dialog__btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--radius-sm);
    border: 1px solid var(--rule-strong);
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.app-dialog__btn:hover { background: var(--bg-soft); border-color: var(--ink); }
.app-dialog__btn--ok {
    background: var(--ink);
    color: var(--bg-paper);
    border-color: var(--ink);
}
.app-dialog__btn--ok:hover { background: var(--ink-hover); border-color: var(--ink-hover); color: var(--bg-paper); }
.app-dialog__btn--danger {
    background: var(--bad);
    border-color: var(--bad);
    color: #fff;
}
.app-dialog__btn--danger:hover { background: var(--bad-ink); border-color: var(--bad-ink); }
