:root {
  --bg: #f6f7f9; --card: #ffffff; --fg: #14181f; --muted: #5b6575; --line: #e3e7ee;
  --accent: #2563eb; --accent-ink: #ffffff; --soft: #eef3ff;
  --good: #15803d; --warn: #b45309; --bad: #b91c1c;
  --radius: 16px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --card: #161b22; --fg: #e8edf4; --muted: #9aa6b6; --line: #262e3a;
    --accent: #6ea0ff; --accent-ink: #0b1220; --soft: #17233a;
    --good: #4ade80; --warn: #fbbf24; --bad: #f87171; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --card: #161b22; --fg: #e8edf4; --muted: #9aa6b6; --line: #262e3a;
  --accent: #6ea0ff; --accent-ink: #0b1220; --soft: #17233a;
  --good: #4ade80; --warn: #fbbf24; --bad: #f87171; --shadow: none;
}
.t-hvac { --accent: #0e7490; --soft: #e6f6f9; }
.t-elec { --accent: #b45309; --soft: #fff5e0; }
.t-coat { --accent: #7c3aed; --soft: #f3edff; }
.t-days { --accent: #b91c1c; --soft: #fdecec; }
.t-pool { --accent: #0e7490; --soft: #e3f6fa; }
.t-bread { --accent: #92400e; --soft: #fbf0e3; }
.t-soap { --accent: #9d174d; --soft: #fcebf3; }
.t-focus { --accent: #7c3aed; --soft: #f1ebff; }
.t-water { --accent: #0369a1; --soft: #e5f4fc; }
.t-fast { --accent: #0f766e; --soft: #e3f5f2; }
.t-roof { --accent: #9a3412; --soft: #fdeee6; }
.t-slab { --accent: #57534e; --soft: #f1efed; }
.t-paint { --accent: #4338ca; --soft: #eceafd; }
.t-site { --accent: #15803d; --soft: #e6f6ec; }
.t-lid { --accent: #1d4ed8; --soft: #e8effd; }
.t-wash { --accent: #0f766e; --soft: #e3f5f2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-hvac { --accent: #38bdf8; --soft: #0f2530; }
  :root:not([data-theme="light"]) .t-elec { --accent: #fbbf24; --soft: #2a2110; }
  :root:not([data-theme="light"]) .t-coat { --accent: #a78bfa; --soft: #221a35; }
  :root:not([data-theme="light"]) .t-days { --accent: #f87171; --soft: #2c1515; }
  :root:not([data-theme="light"]) .t-pool { --accent: #67e8f9; --soft: #0d2a30; }
  :root:not([data-theme="light"]) .t-bread { --accent: #fbbf24; --soft: #2a1f10; }
  :root:not([data-theme="light"]) .t-soap { --accent: #f9a8d4; --soft: #2c1622; }
  :root:not([data-theme="light"]) .t-focus { --accent: #a78bfa; --soft: #221a35; }
  :root:not([data-theme="light"]) .t-water { --accent: #7dd3fc; --soft: #0f2533; }
  :root:not([data-theme="light"]) .t-fast { --accent: #5eead4; --soft: #0f2a27; }
  :root:not([data-theme="light"]) .t-roof { --accent: #fdba74; --soft: #2c1a10; }
  :root:not([data-theme="light"]) .t-slab { --accent: #d6d3d1; --soft: #24221f; }
  :root:not([data-theme="light"]) .t-paint { --accent: #a5b4fc; --soft: #1c1d3a; }
  :root:not([data-theme="light"]) .t-site { --accent: #86efac; --soft: #10261a; }
  :root:not([data-theme="light"]) .t-lid { --accent: #93c5fd; --soft: #122038; }
  :root:not([data-theme="light"]) .t-wash { --accent: #5eead4; --soft: #0f2a27; }
}
:root[data-theme="dark"] .t-days { --accent: #f87171; --soft: #2c1515; }
:root[data-theme="dark"] .t-pool { --accent: #67e8f9; --soft: #0d2a30; }
:root[data-theme="dark"] .t-bread { --accent: #fbbf24; --soft: #2a1f10; }
:root[data-theme="dark"] .t-soap { --accent: #f9a8d4; --soft: #2c1622; }
:root[data-theme="dark"] .t-focus { --accent: #a78bfa; --soft: #221a35; }
:root[data-theme="dark"] .t-water { --accent: #7dd3fc; --soft: #0f2533; }
:root[data-theme="dark"] .t-fast { --accent: #5eead4; --soft: #0f2a27; }
:root[data-theme="dark"] .t-hvac { --accent: #38bdf8; --soft: #0f2530; }
:root[data-theme="dark"] .t-elec { --accent: #fbbf24; --soft: #2a2110; }
:root[data-theme="dark"] .t-coat { --accent: #a78bfa; --soft: #221a35; }
:root[data-theme="dark"] .t-roof { --accent: #fdba74; --soft: #2c1a10; }
:root[data-theme="dark"] .t-slab { --accent: #d6d3d1; --soft: #24221f; }
:root[data-theme="dark"] .t-paint { --accent: #a5b4fc; --soft: #1c1d3a; }
:root[data-theme="dark"] .t-site { --accent: #86efac; --soft: #10261a; }
:root[data-theme="dark"] .t-lid { --accent: #93c5fd; --soft: #122038; }
:root[data-theme="dark"] .t-wash { --accent: #5eead4; --soft: #0f2a27; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--fg); text-decoration: none; }
.brand i { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #f59e0b, #ef4444); display: block; }
.top nav { display: flex; gap: 18px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); }
@media (max-width: 560px) { .top nav a.hide-sm { display: none; } }

.hero { padding: 44px 0 20px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.02em; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
a.card { color: inherit; text-decoration: none; display: block; transition: border-color .15s; }
a.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--accent); margin-bottom: 10px; }

section { margin: 36px 0; }
h2 { font-size: 24px; margin: 0 0 12px; letter-spacing: -0.01em; }

/* calculators */
.calc { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.fields { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.fields .full { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
label small { font-weight: 400; color: var(--muted); }
input, select { width: 100%; font: inherit; font-size: 17px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; font: inherit; font-size: 15px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 8px 6px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.result { background: var(--soft); border-radius: var(--radius); padding: 20px; }
.big { font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.big small { font-size: 20px; font-weight: 700; }
.rows { margin: 14px 0 0; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.rows div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
.rows span:first-child { color: var(--muted); }
.verdict { margin-top: 12px; font-weight: 700; }
.verdict.good { color: var(--good); } .verdict.warn { color: var(--warn); } .verdict.bad { color: var(--bad); }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* app promo */
.promo { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius); padding: 20px; }
.promo img.icon, .appicon { width: 72px; height: 72px; border-radius: 18px; }
.promo h3 { margin: 0 0 4px; }
.promo p { margin: 0 0 12px; color: var(--muted); }
@media (max-width: 560px) { .promo { grid-template-columns: 1fr; } }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 11px 16px; border-radius: 12px; text-decoration: none; background: var(--accent); color: var(--accent-ink); border: 0; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.off { background: var(--line); color: var(--muted); pointer-events: none; }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 15px; }
th, td { padding: 7px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { position: sticky; top: 0; background: var(--card); font-size: 13px; color: var(--muted); }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--soft) 45%, transparent); }
td.vac { color: var(--muted); }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--muted); }
.prose { max-width: 720px; }
.prose p { color: var(--muted); }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: 14px; }

.shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shots img { width: 220px; flex: 0 0 auto; border-radius: 18px; border: 1px solid var(--line); scroll-snap-align: start; }
ul.ticks { list-style: none; padding: 0; display: grid; gap: 8px; }
ul.ticks li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 10px; }
.crumbs { font-size: 14px; color: var(--muted); padding-top: 16px; }
.crumbs a { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 600; }
.chips a[aria-current="page"] { border-color: var(--accent); color: var(--accent); }

footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

[hidden] { display: none !important; }
#oils { display: grid; gap: 8px; }
.oilrow { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 8px; align-items: center; }
.oilrow .btn { padding: 8px 12px; }
