/* Supplier exposure calculator (/einvoicing-exposure), as supplied by Doftwerks with its rules scoped
   to .sx-calc so they never touch the site header and footer. The page stays light unless the site
   sets data-theme="dark" on <html>. Layout: inputs left, result right at desktop; stacked on a phone. */
.sx-calc {
    --bg: #f6f7f4;
    --surface: #ffffff;
    --fg: #1d221e;
    --muted: #5d665f;
    --line: #d9ded8;
    --accent: #2e5e3a;
    --accent-ink: #ffffff;
    --soft: #e6efe8;
    --vat: #2e5e3a;
    --cit: #7a9c7f;
    --levy: #b9cdbb;
    --warn: #8a5a1c;
    --display: "Source Serif 4", Georgia, "Times New Roman", serif;
    --body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}
:root[data-theme="dark"] .sx-calc {
    --bg: #141815; --surface: #1c221d; --fg: #e9ede8; --muted: #a2aca4; --line: #313a33;
    --accent: #7fb08a; --accent-ink: #0f1a12; --soft: #22302568;
    --vat: #7fb08a; --cit: #4f7a58; --levy: #35503b; --warn: #d9a45b; color-scheme: dark;
}

.sx-calc, .sx-calc * { box-sizing: border-box; }
.sx-calc [hidden] { display: none !important; }
/* The site header is fixed and 70px tall. */
.sx-calc { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.5; margin: 0; padding-top: 70px; }
.sx-calc .wrap { max-width: 1040px; margin: 0 auto; padding-block: 28px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.sx-calc header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.sx-calc .eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.sx-calc h1 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.1; margin: 0; text-wrap: balance; max-width: 22ch; }
.sx-calc .lede { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }
.sx-calc .countdown { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 16px; min-width: 190px; }
.sx-calc .countdown .n { font-family: var(--display); font-size: 34px; line-height: 1; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.sx-calc .countdown .l { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }

.sx-calc .grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .sx-calc .grid { grid-template-columns: 1fr; } }

.sx-calc .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; min-width: 0; }
.sx-calc .panel h2 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0 0 14px; }
.sx-calc .field { display: grid; gap: 8px; margin-bottom: 20px; }
.sx-calc .field:last-child { margin-bottom: 0; }
.sx-calc label.t, .sx-calc span.t { font-weight: 600; font-size: 14px; }
.sx-calc .hint { font-size: 13px; color: var(--muted); margin: 0; }
.sx-calc .money { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.sx-calc .money span { padding: 0 12px; display: flex; align-items: center; color: var(--muted); font-weight: 600; border-right: 1px solid var(--line); }
.sx-calc .money input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 20px; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.sx-calc .money input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.sx-calc .money.big input { font-size: 24px; padding: 12px; }
.sx-calc .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-calc .chip { border: 1px solid var(--line); background: transparent; color: var(--fg); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.sx-calc .chip:hover, .sx-calc .chip:focus-visible { border-color: var(--accent); outline: none; }
.sx-calc .chip[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.sx-calc .slider-row { display: flex; align-items: center; gap: 12px; }
.sx-calc input[type=range] { flex: 1; accent-color: var(--accent); min-width: 0; }
.sx-calc .pct { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3.5ch; text-align: right; }
.sx-calc .seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sx-calc .seg button { flex: 1; border: 0; background: transparent; color: var(--fg); font: inherit; padding: 9px 10px; cursor: pointer; }
.sx-calc .seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.sx-calc .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sx-calc details { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; }
.sx-calc summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); }
.sx-calc summary.quiet { color: var(--muted); }
.sx-calc .est { display: grid; gap: 14px; margin-top: 14px; padding: 14px; background: var(--bg); border-radius: 8px; }
.sx-calc .est .out { font-size: 14px; }
.sx-calc .est .out strong { font-variant-numeric: tabular-nums; }
.sx-calc .adv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.sx-calc .adv label { font-size: 13px; display: grid; gap: 4px; }
.sx-calc .adv input { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; background: var(--bg); color: var(--fg); width: 100%; }

.sx-calc .result h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sx-calc .tag { font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.sx-calc .total { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5vw, 48px); line-height: 1.05; color: var(--accent); font-variant-numeric: tabular-nums; margin: 4px 0 2px; overflow-wrap: anywhere; }
.sx-calc .total-l { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.sx-calc .bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line); margin-bottom: 14px; }
.sx-calc .bar div { height: 100%; transition: width 0.25s ease; }
@media (prefers-reduced-motion: reduce) { .sx-calc .bar div { transition: none; } }
.sx-calc .rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.sx-calc .row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.sx-calc .sw { width: 12px; height: 12px; border-radius: 3px; }
.sx-calc .row .k { font-size: 14px; }
.sx-calc .row .k small { display: block; color: var(--muted); font-size: 12.5px; }
.sx-calc .row .v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; text-align: right; }
.sx-calc .row .v .w { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.sx-calc .note { background: var(--soft); border-radius: 8px; padding: 12px 14px; font-size: 14px; margin-top: 16px; }
.sx-calc .note.warn { color: var(--warn); background: transparent; border: 1px solid currentColor; }
.sx-calc .per { margin-top: 16px; font-size: 14px; color: var(--muted); }
.sx-calc .per strong { color: var(--fg); }
.sx-calc .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.sx-calc .btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 11px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid var(--accent); }
.sx-calc .btn.primary { background: var(--accent); color: var(--accent-ink); }
.sx-calc .btn.ghost { background: transparent; color: var(--accent); }
.sx-calc .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sx-calc .copied { font-size: 13px; color: var(--muted); align-self: center; }

.sx-calc .timeline { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .sx-calc .timeline { grid-template-columns: 1fr; } }
.sx-calc .ph { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.sx-calc .ph .p { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.sx-calc .ph .b { font-family: var(--display); font-size: 18px; font-weight: 600; margin: 4px 0 6px; }
.sx-calc .ph .d { font-size: 13.5px; color: var(--muted); }
.sx-calc .ph.now { border-color: var(--accent); }
.sx-calc .ph.now .p { color: var(--accent); }

.sx-calc footer { margin-top: 28px; padding-top: 16px; border-top: 2px solid var(--accent); font-size: 13px; color: var(--muted); display: grid; gap: 8px; }
.sx-calc footer p { margin: 0; max-width: 90ch; }
