:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e2e6ec;
  --text: #17202e;
  --muted: #637083;
  --brand: #13795b;
  --brand-hover: #0f6149;
  --brand-soft: #e7f4ef;
  --pass: #137a4b;
  --pass-bg: #e5f4ec;
  --fail: #b42318;
  --fail-bg: #fdecea;
  --warn-bg: #fff5d6;
  --row-alt: #fafbfc;
  --radius: 12px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --surface: #1a1f26;
    --border: #2c333d;
    --text: #e8ebf0;
    --muted: #96a0ae;
    --brand: #3ccb94;
    --brand-hover: #5cd9a8;
    --brand-soft: #153328;
    --pass: #4cc38a;
    --pass-bg: #15301f;
    --fail: #ff7b72;
    --fail-bg: #3a1a18;
    --warn-bg: #3a3214;
    --row-alt: #1e242c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 10px; }
h2 { font-size: 22px; margin: 0 0 14px; }
h3 { font-size: 17px; margin: 18px 0 8px; }
code { font-family: var(--mono); font-size: 0.9em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 480px; }
.section { padding: 40px 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; }
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 10px 18px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-ghost { background: transparent; }
.btn-small { padding: 6px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: none; }
.busy .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* hero */
.hero { padding: 48px 0 28px; }
.hero h1 { max-width: 820px; }
.hero-small { padding: 40px 0 20px; }
.lead { font-size: 19px; color: var(--muted); margin: 0; max-width: 680px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.big-number { font-size: 36px; font-weight: 700; margin: 4px 0; }

/* converter */
.drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 40px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over, .drop:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.drop strong { display: block; font-size: 18px; margin-bottom: 4px; }
.drop span { color: var(--muted); font-size: 14px; }
.file-list { list-style: none; padding: 0; margin: 14px 0 0; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; font-size: 14px; }
.file-list .page { color: var(--muted); font-size: 12px; min-width: 52px; }
.file-list .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .size { color: var(--muted); font-size: 12px; }
.file-list button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.file-list button:hover { color: var(--fail); }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 9px; background: var(--brand-soft); font-size: 15px; }
.notice-error { background: var(--fail-bg); color: var(--fail); }
.notice-ok { background: var(--pass-bg); color: var(--pass); }
.notice .btn { margin-top: 8px; }

.start-card { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.start-card h2 { margin-bottom: 6px; }
.start-card p { margin: 0; }
.start-form { display: flex; gap: 10px; flex-wrap: wrap; }
.start-form input[type="email"] { flex: 1 1 220px; }
@media (max-width: 760px) { .start-card { grid-template-columns: 1fr; } }

/* result */
.summary-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.bank { font-size: 19px; font-weight: 650; }
.badge { font-weight: 800; font-size: 18px; padding: 6px 18px; border-radius: 9px; letter-spacing: .05em; }
.badge.pass { color: var(--pass); background: var(--pass-bg); }
.badge.fail { color: var(--fail); background: var(--fail-bg); }
.fail-note { margin-top: 12px; padding: 10px 14px; border-radius: 9px; background: var(--fail-bg); color: var(--fail); font-weight: 600; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0 12px; }
.fig { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; }
.fig .value { font-family: var(--mono); font-size: 18px; font-weight: 600; margin-top: 2px; }
.fig.good .value { color: var(--pass); }
.fig.bad .value { color: var(--fail); }
.errors { margin: 0 0 12px; padding: 10px 14px; border-radius: 9px; background: var(--fail-bg); color: var(--fail); font-size: 14px; }
.errors:empty { display: none; }
.downloads { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.date-format {
  font: inherit; font-size: 14px; padding: 0 10px; border: 1px solid var(--border); border-left: 0;
  border-radius: 0 9px 9px 0; background: var(--surface); color: var(--text); cursor: pointer;
}
.soon { font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 0 7px; }

.table-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.table-head h2 { font-size: 17px; margin: 0; }
.legend { font-size: 12px; color: var(--muted); display: flex; gap: 14px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.swatch-fatal { background: var(--fail-bg); border: 1px solid var(--fail); }
.swatch-warn { background: var(--warn-bg); border: 1px solid var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.tx td.date { white-space: nowrap; font-family: var(--mono); }
.tx td.row { color: var(--muted); font-family: var(--mono); }
.tx tbody tr:nth-child(even) { background: var(--row-alt); }
.tx tr.fatal { background: var(--fail-bg) !important; }
.tx tr.warn { background: var(--warn-bg) !important; }
.issue { display: block; font-size: 12px; color: var(--fail); margin-top: 2px; }
.tx tr.warn .issue { color: var(--muted); }
.credit { color: var(--pass); }

/* marketing */
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; padding-top: 30px; }
.proof-item h3 { margin-top: 0; }
.proof-item p { margin: 0; color: var(--muted); }
.compare td.yes { color: var(--pass); font-weight: 600; }
.compare td:first-child { font-weight: 600; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* pricing */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 10px; }
.pack { text-align: center; position: relative; }
.pack-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pack-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.pack-credits { font-weight: 600; font-size: 18px; }
.pack-price { font-size: 44px; font-weight: 800; margin: 6px 0 2px; }
.pack form { margin-top: 18px; }
.checklist { margin-top: 26px; padding-left: 20px; color: var(--muted); }
.checklist li { margin: 6px 0; }

/* account / admin / forms */
.account-grid, .admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.pill-pass { color: var(--pass); background: var(--pass-bg); }
.pill-fail { color: var(--fail); background: var(--fail-bg); }
.stack { display: flex; flex-direction: column; gap: 10px; }
input[type="email"] { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); }
input[type="email"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* legal */
.prose { max-width: 760px; padding-top: 40px; }
.prose h2 { margin-top: 32px; }
.prose li { margin: 6px 0; }
table.plain { font-size: 14px; }

/* consent */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.15); z-index: 10; }
.consent p { margin: 0 0 12px; font-size: 14px; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 600px) {
  .nav { gap: 12px; }
  .hero { padding: 32px 0 20px; }
  .lead { font-size: 17px; }
  .card { padding: 16px; }
}
