:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --ok: #059669;
  --err: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #f8fafc;
  line-height: 1.55;
}

.site-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand span { color: #93c5fd; }

.tagline { color: #cbd5e1; font-size: 0.9rem; }

main { max-width: 900px; margin: 0 auto; padding: 0 20px 60px; }

.hero { padding: 30px 0 24px; color: #e2e8f0; }

.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  margin: 0 0 12px;
  color: #fff;
  letter-spacing: -0.02em;
}

.lede { max-width: 42rem; color: #cbd5e1; margin: 0 0 14px; }

.privacy-note {
  display: inline-block;
  margin: 0;
  font-size: 0.9rem;
  color: #bbf7d0;
  background: rgba(5, 150, 105, 0.15);
  border: 1px solid rgba(5, 150, 105, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fbfdff;
}

.dropzone:hover,
.dropzone:focus { border-color: var(--brand); background: #f0f7ff; outline: none; }

.dropzone.dragover { border-color: var(--brand); background: #e0efff; }

.dz-strong { margin: 0; font-weight: 700; }
.dz-sub { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }

.file-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #f1f5f9;
  border-radius: 10px;
  font-size: 0.92rem;
}

.file-info #fileName { font-weight: 600; word-break: break-all; }

.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  padding: 2px 4px;
  text-decoration: underline;
}

.link-btn:hover { color: var(--brand-dark); }

.targets { border: none; padding: 0; margin: 22px 0 0; }

.targets legend { font-weight: 700; padding: 0; margin-bottom: 10px; }

.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  user-select: none;
  background: #fff;
}

.chip:has(input:checked) { border-color: var(--brand); background: #eff6ff; color: var(--brand-dark); font-weight: 600; }

.chip input { accent-color: var(--brand); }

.custom-wrap { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.input-group { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }

.input-group input { border: none; padding: 9px 10px; font: inherit; width: 110px; }

.input-group input:focus { outline: 2px solid var(--brand); outline-offset: -2px; }

.input-group .unit { display: inline-flex; align-items: center; padding: 0 12px; background: #f1f5f9; color: var(--muted); font-size: 0.85rem; }

button.primary {
  display: inline-block;
  width: 100%;
  margin-top: 20px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}

button.primary:hover:not(:disabled) { background: var(--brand-dark); }

button.primary:disabled { background: #cbd5e1; cursor: not-allowed; }

a.primary { width: auto; display: inline-block; }

.status { min-height: 1.4em; margin: 14px 0 0; font-size: 0.93rem; color: var(--muted); }
.status.error { color: var(--err); }
.status.ok { color: var(--ok); }

.result { margin-top: 18px; padding: 18px; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: var(--radius); }

.result-line { margin: 0 0 14px; }

.result .link-btn { margin-top: 8px; }

.how, .faq { margin-top: 40px; color: var(--ink); }

.how h2, .faq h2 { font-size: 1.3rem; margin: 0 0 12px; }

.steps { padding-left: 20px; margin: 0 0 12px; }

.steps li { margin-bottom: 8px; }

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: #fff;
}

.faq summary { cursor: pointer; font-weight: 600; }

.faq details p { margin: 10px 0 0; color: #334155; }

.site-footer { max-width: 900px; margin: 0 auto; padding: 24px 20px 50px; color: var(--muted); font-size: 0.88rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (max-width: 520px) {
  .card { padding: 18px; }
  .dropzone { padding: 26px 14px; }
}

/* StatementSieve additions */
:root { --warn: #b45309; }

button.secondary {
  padding: 11px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--brand-dark);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  cursor: pointer;
}
button.secondary:hover:not(:disabled) { background: #dbeafe; }
button.secondary:disabled { color: #94a3b8; background: #f1f5f9; border-color: var(--line); cursor: not-allowed; }

.password-form { margin-top: 16px; padding: 14px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; }
.password-form p { margin: 6px 0 10px; }
.password-row { display: flex; gap: 8px; flex-wrap: wrap; }
.password-row input { flex: 1 1 200px; padding: 10px; font: inherit; border: 1px solid var(--line); border-radius: 8px; }

.results { margin-top: 18px; }

.verdict { padding: 14px 16px; border-radius: 10px; border: 1px solid; }
.verdict p { margin: 4px 0 0; font-size: 0.92rem; }
.verdict.ok { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.verdict.warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.verdict.bad { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 14px 0; font-size: 0.92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.checks, .warnings { list-style: none; padding: 0; margin: 0 0 10px; font-size: 0.88rem; }
.checks li.ok { color: var(--ok); }
.checks li.bad { color: var(--err); font-weight: 600; }
.warnings li { color: var(--warn); }
.warnings li::before { content: "⚠ "; }

.export { margin: 14px 0; }
.ack { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; font-size: 0.9rem; color: #7f1d1d; }
.export-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.export-buttons button.primary { width: auto; margin-top: 0; }

.table-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; font-size: 0.9rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; max-height: 70vh; }
table { border-collapse: collapse; width: 100%; font-size: 0.84rem; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #f8fafc; font-weight: 700; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td:first-child { white-space: nowrap; }
td.check { font-weight: 700; font-size: 0.75rem; }
tr.row-ok td.check { color: var(--ok); }
tr.row-mismatch td { background: #fef2f2; }
tr.row-mismatch td.check { color: var(--err); }
tr.row-unverifiable td { background: #fffbeb; }
tr.row-unverifiable td.check { color: var(--warn); }
tr.reason-row td { background: #fff; color: var(--err); font-size: 0.8rem; padding-top: 0; }

.support { padding-left: 20px; }
.support li { margin-bottom: 6px; }

/* Dark band that grows with the hero text instead of a fixed-height gradient. */
.top { background: var(--bg); padding-bottom: 8px; }
.hero-wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
main { padding-top: 24px; }

.report { margin-top: 1rem; }
.report summary { cursor: pointer; }
.report-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* Guide pages */
.hero-guide { padding-bottom: 18px; }
.hero-guide h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
.eyebrow { margin: 0 0 6px; color: #93c5fd; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.article { color: #1e293b; }
.article > :first-child { margin-top: 0; }
.article h2 { font-size: 1.25rem; margin: 30px 0 10px; color: var(--ink); }
.article h3 { font-size: 1.05rem; margin: 22px 0 8px; color: var(--ink); }
.article li { margin-bottom: 8px; }
.article a { color: var(--brand-dark); }
.article code, .article kbd { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.88em; background: #f1f5f9; border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }
.article pre { overflow-x: auto; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.article pre code { background: none; border: none; padding: 0; font-size: 0.85rem; }
.article .table-wrap { max-height: none; margin: 10px 0; }
.formula-line { padding: 10px 14px; background: #eff6ff; border-left: 4px solid var(--brand); border-radius: 6px; }
.article-cta { margin: 30px 0 0; }
.article-cta a.primary { margin-top: 0; color: #fff; }
.guide-nav { margin-top: 40px; }
.guide-nav h2 { font-size: 1.3rem; margin: 0 0 12px; }
.guide-nav ul { padding-left: 20px; }
.guide-nav li { margin-bottom: 6px; }
