:root {
  --bg: #f6f9fc; --surface: #ffffff; --ink: #14263a; --muted: #52667c; --line: #d8e2ec;
  --brand: #1f4e78; --brand-ink: #ffffff; --accent: #1e8e3e; --bad: #c0392b; --soft: #eaf2fb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1722; --surface: #16212f; --ink: #e6edf5; --muted: #9db0c4; --line: #2a3a4d;
    --brand: #6fa8dc; --brand-ink: #0f1722; --accent: #4cc27a; --bad: #ff7b6b; --soft: #1b2a3b;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1722; --surface: #16212f; --ink: #e6edf5; --muted: #9db0c4; --line: #2a3a4d;
  --brand: #6fa8dc; --brand-ink: #0f1722; --accent: #4cc27a; --bad: #ff7b6b; --soft: #1b2a3b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--brand); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
header.top { border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .wrap { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 16px; flex-wrap: wrap; }
.logo { font-weight: 700; text-decoration: none; color: var(--ink); }
nav a { margin-left: 14px; font-size: 14px; text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--brand); }
h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.15; margin: 28px 0 8px; }
h2 { font-size: 22px; margin: 32px 0 8px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 20px; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .calc { grid-template-columns: 1fr; } nav a { margin: 0 12px 0 0; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card h3 { margin: 0 0 10px; font-size: 17px; }
label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0; font-size: 15px; }
label span small { display: block; color: var(--muted); font-size: 12px; }
input { width: 120px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; text-align: right; }
input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.row:last-child { border-bottom: 0; }
.big { font-size: 28px; font-weight: 700; }
.pos { color: var(--accent); } .neg { color: var(--bad); }
.note { font-size: 13px; color: var(--muted); }
details { margin-top: 10px; } summary { cursor: pointer; color: var(--brand); font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
.table-scroll { overflow-x: auto; }
.cta { margin: 32px 0; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; }
.cta img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 720px) { .cta { grid-template-columns: 1fr; } }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); padding: 11px 18px; border-radius: 9px; text-decoration: none; font-weight: 700; }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tools a { text-decoration: none; color: var(--ink); }
.tools .card:hover { border-color: var(--brand); }
.faq h3 { font-size: 17px; margin: 18px 0 4px; }
footer { margin: 40px 0 0; padding: 20px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
