@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(vendor/fonts/ibm-plex-sans-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2190-2199, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(vendor/fonts/ibm-plex-sans-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(vendor/fonts/ibm-plex-sans-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2190-2199, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(vendor/fonts/ibm-plex-sans-latin-ext-600.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(vendor/fonts/ibm-plex-sans-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2190-2199, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(vendor/fonts/ibm-plex-sans-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(vendor/fonts/ibm-plex-mono-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2190-2199, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(vendor/fonts/ibm-plex-mono-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(vendor/fonts/ibm-plex-mono-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2190-2199, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(vendor/fonts/ibm-plex-mono-latin-ext-500.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #f7f8f5; --fg: #17201b; --muted: #56635c; --card: #fff; --line: #dfe5e0; --head: #f1f3f0;
  --accent: #117a50; --accent-fg: #fff; --accent-soft: #e6f2eb; --warn: #a24a00;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613; --fg: #e8ede9; --muted: #9aa8a0; --card: #1a211d; --line: #2c3631; --head: #151b18;
    --accent: #3ec488; --accent-fg: #06130c; --accent-soft: #173326; --warn: #f0a35c;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--sans); }
a { color: var(--accent); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .r { text-align: right; }
.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top .row { height: 64px; }
.brand { font-weight: 700; text-decoration: none; color: var(--fg); display: flex; align-items: center; gap: 10px; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); }
nav { display: flex; gap: 28px; }
nav a { text-decoration: none; color: var(--muted); font-size: 14px; }
nav a:hover { color: var(--fg); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 48px; }
.hero.loaded { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 32px; }
.hero.loaded h1 { font-size: 30px; }
.hero.loaded .lead, .hero.loaded .trust { display: none; }
h1 { font-size: clamp(32px, 4.2vw, 46px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
.hl { color: var(--accent); }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 24px; text-wrap: pretty; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
h2 { font-size: 26px; margin: 0 0 20px; letter-spacing: -.015em; }
main > section:not(.hero) { padding-top: 40px; padding-bottom: 8px; }

.panel { border: 1.5px dashed var(--accent); border-radius: 14px; background: var(--card); padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.drop { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; border-radius: 10px; margin: -8px; padding: 8px; transition: background .15s; }
.drop:hover, .drop.over, .drop:focus-visible { background: var(--accent-soft); outline: none; }
.drop.busy { opacity: .6; pointer-events: none; }
.drop-title { font-size: 17px; font-weight: 600; margin: 0; }
.drop-sub { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.sample-cap { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.sample table { pointer-events: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.stats { font-size: 14px; color: var(--muted); } .stats b { color: var(--fg); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { font: 600 14px var(--sans); border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 9px; padding: 10px 16px; cursor: pointer; white-space: nowrap; text-decoration: none; text-align: center; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn:disabled { opacity: .6; cursor: wait; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.passinfo { font-size: 13.5px; color: var(--muted); margin: 0; }

.tablewrap { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.tablescroll { overflow: auto; max-height: 460px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
thead th { position: sticky; top: 0; background: var(--card); font-weight: 500; font-size: 12.5px; color: var(--muted); }
th.r, td.r, td.n { text-align: right; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
th.r { font-family: var(--sans); font-size: 12.5px; }
.sample td { max-width: 200px; }
.tag { font: 500 10.5px var(--mono); background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 4px; }
.sheets { display: flex; overflow-x: auto; background: var(--head); border-top: 1px solid var(--line); font-size: 12.5px; }
.sheets > * { flex: none; font: inherit; padding: 7px 16px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--muted); white-space: nowrap; }
.sheets button { cursor: pointer; }
.sheets button:hover { color: var(--fg); }
.sheets .on { background: var(--card); color: var(--accent); font-weight: 600; box-shadow: inset 0 2px 0 var(--accent); }
.sheets .count { font: 500 10.5px var(--mono); margin-left: 4px; color: var(--warn); }
.errs { color: var(--warn); font-size: 14px; }
.errs:empty { display: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.chip { display: inline-block; font: 500 11px var(--mono); color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 4px; margin-bottom: 10px; }
.steps { margin: 22px 0 0; padding-left: 22px; } .steps li { margin: 6px 0; }
.plans { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.plan { display: flex; flex-direction: column; }
.plan h3 { font-size: 15px; }
.plan .price { font-size: 34px; font-weight: 700; letter-spacing: -.02em; color: var(--fg); margin: 4px 0 10px; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { padding-left: 18px; margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.7; flex: 1; }
.plan.best { border: 2px solid var(--accent); }
.plan .btn { width: 100%; }
.plans.compact { margin: 16px 0; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }
.foot { padding: 40px 16px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal[hidden] { display: none; }
.modal-box { position: relative; background: var(--card); border-radius: 14px; max-width: 860px; width: 100%; max-height: 90vh; overflow: auto; padding: 24px; }
.modal-box h2 { margin-top: 0; }
.close { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--muted); }
body.modal-open { overflow: hidden; }
.form { display: flex; gap: 8px; flex-wrap: wrap; } .form.col { flex-direction: column; }
.form input, .form textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--fg); flex: 1; min-width: 200px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 9px; z-index: 20; max-width: calc(100% - 32px); }
.invoice h2 { margin: 2px 0; font-size: 22px; }
.inv-head { padding-right: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--fg); padding-bottom: 10px; }
.parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.party h4 { margin: 0 0 4px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.inv-lines td { white-space: normal; max-width: none; }
.inv-sum { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 14px 0; }
.inv-sum table { width: auto; }
.total { font-size: 20px; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; } }
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; } nav { display: none; } .parties { grid-template-columns: 1fr; }
  .panel { padding: 16px; } .drop { flex-direction: column; align-items: stretch; text-align: center; }
  .sample th:nth-child(2), .sample td:nth-child(2), .sample th:nth-child(4), .sample td:nth-child(4) { display: none; }
}
@media print {
  body * { visibility: hidden; }
  .modal, .modal * { visibility: visible; }
  .modal { position: absolute; inset: 0; background: none; padding: 0; display: block; }
  .modal-box { max-height: none; overflow: visible; box-shadow: none; padding: 0; }
  .close, .noprint { display: none !important; }
  :root { --fg: #000; --muted: #444; --card: #fff; --line: #bbb; }
}
