:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f8fafc;
    --card: #ffffff;
    --accent: #1d4ed8;
    --accent-soft: #eff6ff;
    --good: #15803d;
    --bad: #b91c1c;
    --radius: 12px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}
a { color: var(--accent); }

.site-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    max-width: 960px; margin: 0 auto; padding: 16px 20px;
}
.brand { font-weight: 700; font-size: 20px; text-decoration: none; color: var(--ink); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-header nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.site-header nav a:hover { color: var(--ink); }

.wrap { max-width: 960px; margin: 0 auto; padding: 8px 20px 48px; }

.site-footer {
    max-width: 960px; margin: 0 auto; padding: 24px 20px 48px;
    border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.disclaimer { margin: 0 0 6px; }

h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; margin: 8px 0 12px; }
h2 { font-size: 22px; margin: 28px 0 12px; }
.lead { color: var(--muted); font-size: 17px; max-width: 60ch; }

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; margin: 18px 0;
}

/* forms */
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=number], input[type=password], input[type=date], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
    font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.radios { display: flex; flex-wrap: wrap; gap: 10px; }
.radios label {
    display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-weight: 500;
}
.radios input { width: auto; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.btn {
    display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 9px;
    padding: 11px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
    margin-top: 16px;
}
.btn:hover { filter: brightness(1.08); }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }

/* honeypot — hidden from humans, visible to naive bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* calculator result */
.result { background: var(--accent-soft); border-color: #bfdbfe; }
.result .big { font-size: 30px; font-weight: 700; }
.breakdown { list-style: none; padding: 0; margin: 10px 0; }
.breakdown li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.breakdown li:last-child { border-bottom: 0; }
.tax-note { color: var(--muted); font-size: 13px; margin-top: 6px; }
.summary { margin-top: 12px; font-weight: 600; }

/* tables */
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; }
td.num, th.num { text-align: right; }
.small-sample { color: var(--muted); font-style: italic; }

.errors { background: #fef2f2; border: 1px solid #fecaca; color: var(--bad); border-radius: 9px; padding: 12px 16px; }
.errors ul { margin: 6px 0 0; padding-left: 18px; }
.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--good); border-radius: 9px; padding: 12px 16px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
