/* ==========================================================================
   CalcHub — single stylesheet, two full skins
   Theme A: "modern"  (default) — clean cards, blue/teal, soft shadows
   Theme B: "classic" — calculator.net-like: white, green header, tight grid
   Switch by data-theme on <html>; persisted in localStorage (ch_theme)
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html[data-theme="modern"] {
  --bg: #f4f7fb;
  --bg-soft: #e9eff8;
  --card: #ffffff;
  --card-2: #f8fafd;
  --ink: #0b1220;
  --ink-2: #24324a;
  --muted: #5b6b83;
  --line: #e1e8f2;
  --line-strong: #cbd6e6;
  --accent: #2563eb;
  --accent-2: #0ea5e9;
  --accent-ink: #ffffff;
  --accent-soft: #eaf1ff;
  --accent-line: #bcd3ff;
  --header-bg: linear-gradient(118deg, #0a1120 0%, #122a52 55%, #123a63 100%);
  --header-ink: #ffffff;
  --header-line: rgba(255,255,255,.14);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 34px rgba(11,18,32,.07);
  --shadow-sm: 0 3px 10px rgba(11,18,32,.05);
  --table-head: #f1f5fb;
  --table-head-ink: #24324a;
  --ok: #0f9d58;
  --warn: #c2410c;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Inter", "Segoe UI", system-ui, sans-serif;
  --btn-radius: 10px;
}
html[data-theme="classic"] {
  --bg: #ffffff;
  --bg-soft: #f4f6f4;
  --card: #ffffff;
  --card-2: #fbfcfb;
  --ink: #1d1d1d;
  --ink-2: #333333;
  --muted: #555555;
  --line: #d9e2d9;
  --line-strong: #b8cbb8;
  --accent: #3a7d3f;
  --accent-2: #4f9a54;
  --accent-ink: #ffffff;
  --accent-soft: #f0f6f0;
  --accent-line: #cfe0cf;
  --header-bg: #3d7f42;
  --header-ink: #ffffff;
  --header-line: rgba(255,255,255,.25);
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: none;
  --shadow-sm: none;
  --table-head: #eaf2ea;
  --table-head-ink: #2d4a2d;
  --ok: #2e7d32;
  --warn: #b45309;
  --font: Verdana, "DejaVu Sans", Arial, Helvetica, sans-serif;
  --font-head: Georgia, "Times New Roman", Verdana, serif;
  --btn-radius: 3px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 2.4vw, 2.15rem); font-weight: 700; }
h2 { font-size: 1.28rem; font-weight: 700; margin-top: 2em; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main { flex: 1 0 auto; }
.wrap-narrow { max-width: 880px; }

/* ---------- header ---------- */
.header {
  background: var(--header-bg);
  color: var(--header-ink);
  position: sticky; top: 0; z-index: 60;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
html[data-theme="classic"] .header { box-shadow: none; border-bottom: 3px solid #2f6533; }
.header-in { display: flex; align-items: center; gap: 18px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--header-ink); font-family: var(--font-head); font-weight: 800; font-size: 1.22rem; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
}
html[data-theme="classic"] .brand .mark { border-radius: 3px; background: #2f6533; }
.brand small { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .72; line-height: 1; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav a {
  color: rgba(255,255,255,.9); font-size: .92rem; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
html[data-theme="classic"] .nav a { border-radius: 2px; font-size: .86rem; font-weight: 700; }
.nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.nav a.on { background: rgba(255,255,255,.18); color: #fff; }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search {
  position: relative; display: flex; align-items: center;
  background: rgba(255,255,255,.14); border: 1px solid var(--header-line);
  border-radius: 999px; padding: 6px 12px; width: 240px;
}
html[data-theme="classic"] .search { border-radius: 2px; background: #fff; width: 210px; }
.search input {
  border: 0; background: transparent; color: var(--header-ink); outline: none;
  font: inherit; font-size: .9rem; width: 100%; padding: 2px 4px;
}
html[data-theme="classic"] .search input { color: #222; }
.search input::placeholder { color: rgba(255,255,255,.68); }
html[data-theme="classic"] .search input::placeholder { color: #888; }
.search .ico { opacity: .8; font-size: .95rem; }
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; display: none;
  max-height: 320px; overflow-y: auto; z-index: 80;
}
.suggest.show { display: block; }
.suggest a { display: flex; gap: 10px; align-items: center; padding: 9px 14px; color: var(--ink); font-size: .92rem; }
.suggest a:hover { background: var(--accent-soft); text-decoration: none; }
.suggest .tag { margin-left: auto; font-size: .72rem; color: var(--muted); text-transform: capitalize; }

.theme-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14); border: 1px solid var(--header-line);
  color: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 600; white-space: nowrap;
}
html[data-theme="classic"] .theme-btn { border-radius: 2px; }
.theme-btn:hover { background: rgba(255,255,255,.22); }
.theme-btn .sw { width: 10px; height: 10px; border-radius: 50%; background: #7cc4ff; }

.burger { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 4px 6px; }
.mobile-nav { display: none; }

/* ---------- hero / home ---------- */
.hero { padding: 34px 0 8px; }
html[data-theme="classic"] .hero { background: #f7faf7; border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 22px; }
.hero h1 { margin-bottom: .35em; }
.hero p.lede { color: var(--muted); max-width: 760px; font-size: 1.02rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge {
  font-size: .78rem; font-weight: 700; letter-spacing: .01em; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  padding: 4px 11px; border-radius: 999px;
}
html[data-theme="classic"] .badge { border-radius: 2px; font-weight: 700; }

/* home columns */
.home-grid { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; padding: 26px 0 10px; }
@media (max-width: 940px) { .home-grid { grid-template-columns: 1fr; } }

.allcal {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px; position: sticky; top: 84px;
}
html[data-theme="classic"] .allcal { box-shadow: none; }
.allcal h3 { font-size: 1rem; margin-bottom: 12px; }
.allcal .cat-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .93rem;
  border: 1px solid transparent;
}
html[data-theme="classic"] .allcal .cat-link { border-radius: 2px; }
.allcal .cat-link:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.allcal .cat-link span.n { color: var(--muted); font-weight: 600; font-size: .8rem; }

.cat-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
@media (max-width: 720px) { .cat-cards { grid-template-columns: 1fr; } }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px 22px; display: flex; flex-direction: column;
}
html[data-theme="classic"] .cat-card { box-shadow: none; border-radius: 3px; }
.cat-card h2 { margin: 0 0 6px; font-size: 1.15rem; display: flex; align-items: center; gap: 9px; }
.cat-card h2 .ic { font-size: 1.1rem; }
.cat-card .sub { color: var(--muted); font-size: .86rem; margin-bottom: 12px; }
.cat-card ul { list-style: none; padding: 0; margin: 0 0 14px; }
.cat-card li a { display: block; padding: 6px 0; color: var(--ink-2); font-size: .93rem; border-bottom: 1px dashed var(--line); }
.cat-card li a:hover { color: var(--accent); text-decoration: none; }
.cat-card .more { margin-top: auto; font-weight: 700; font-size: .9rem; }
.cat-card .more::after { content: " →"; }

/* ---------- page ---------- */
.page { padding: 26px 0 10px; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumbs span.sep { opacity: .6; }
.page-head { margin-bottom: 18px; }
.page-head p { color: var(--muted); max-width: 820px; }

.calc-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 26px; align-items: start; }
@media (max-width: 1000px) { .calc-layout { grid-template-columns: 1fr; } }
.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 1000px) { .side { position: static; order: 2; } }

/* ---------- calculator card ---------- */
.calc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px;
}
html[data-theme="classic"] .calc-card { box-shadow: none; border-radius: 3px; border: 1px solid #cfe0cf; }
.calc-card > h2 { margin: 0 0 16px; font-size: 1.08rem; display: flex; align-items: center; gap: 8px; }
.calc-card > h2 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 20px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 620px) { .form-grid, .form-grid.three { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .flabel { font-size: .84rem; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.field .hint { font-size: .76rem; color: var(--muted); font-weight: 400; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--btn-radius); background: var(--card); overflow: hidden; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-group input, .input-group select {
  border: 0; outline: none; background: transparent; color: var(--ink);
  font: inherit; font-size: .95rem; padding: 9px 11px; min-width: 0; width: 100%;
}
.input-group .unit {
  display: flex; align-items: center; padding: 0 11px; background: var(--bg-soft);
  color: var(--muted); font-size: .82rem; border-left: 1px solid var(--line); white-space: nowrap;
}
.input-group.pre .unit { border-left: 0; border-right: 1px solid var(--line); }
select.input-group-select, .plain-select {
  border: 1px solid var(--line-strong); border-radius: var(--btn-radius);
  background: var(--card); color: var(--ink); font: inherit; font-size: .95rem; padding: 9px 11px; width: 100%;
}
.plain-input {
  border: 1px solid var(--line-strong); border-radius: var(--btn-radius); background: var(--card);
  color: var(--ink); font: inherit; font-size: .95rem; padding: 9px 11px; width: 100%;
}
textarea.plain-input { min-height: 90px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }

.checkline { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 4px; }
.checkline label { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.checkline input[type="checkbox"], .checkline input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; align-items: center; }
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 700;
  padding: 11px 24px; border-radius: var(--btn-radius); background: var(--accent); color: var(--accent-ink);
  letter-spacing: .01em; transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--accent-line); }
html[data-theme="classic"] .btn { background: linear-gradient(#4a8f50, #3a7d3f); border-color: #2f6533; }
html[data-theme="classic"] .btn.ghost { background: #fff; color: #2f6533; border-color: #6b9c70; }
html[data-theme="classic"] .btn.ghost:hover { background: var(--accent-soft); }

/* ---------- result ---------- */
.result { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; display: none; }
.result.show { display: block; }
.result .rhead { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin-bottom: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; }
.kpi { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: 13px 15px; }
html[data-theme="classic"] .kpi { border-radius: 2px; border-color: #cfe0cf; }
.kpi .k { font-size: .78rem; color: var(--muted); font-weight: 700; display: block; margin-bottom: 3px; }
.kpi .v { font-size: 1.22rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.kpi.big { grid-column: span 2; }
@media (max-width: 620px) { .kpi.big { grid-column: auto; } }
.kpi.big .v { font-size: 1.9rem; color: var(--accent); }

.rmsg { margin-top: 14px; font-size: .95rem; }
.rmsg strong { color: var(--accent); }
.rwarn { color: var(--warn); font-weight: 700; }

.tbl-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.data { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 480px; }
table.data th, table.data td { padding: 8px 11px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { background: var(--table-head); color: var(--table-head-ink); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; }
table.data tbody tr:nth-child(even) { background: var(--card-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
.tbl-cap { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }

/* ---------- prose / article ---------- */
.article { max-width: none; }
.article h2 { margin-top: 1.6em; }
.article h2:first-child { margin-top: 0; }
.article p { color: var(--ink-2); }
.article ul li { margin-bottom: .4em; }
.note {
  background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 12px 16px;
  border-radius: var(--radius-sm); font-size: .9rem; color: var(--ink-2);
}

/* ---------- sidebar ---------- */
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
html[data-theme="classic"] .side-card { box-shadow: none; border-radius: 3px; }
.side-card h3 { font-size: .95rem; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li a { display: flex; gap: 8px; padding: 7px 0; color: var(--ink-2); font-size: .89rem; border-bottom: 1px dashed var(--line); }
.side-card li:last-child a { border-bottom: 0; }
.side-card li a:hover { color: var(--accent); text-decoration: none; }
.side-card li a.on { color: var(--accent); font-weight: 700; }
.side-card .ico { opacity: .7; }

/* ---------- ads ---------- */
.ad { margin: 20px 0; }
.ad-inner {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--card-2) 14px 28px);
  display: grid; place-items: center; text-align: center; color: var(--muted);
  padding: 10px; overflow: hidden;
}
.ad-inner .ad-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; opacity: .85; }
.ad-size { font-size: .98rem; font-weight: 800; color: var(--ink); margin-top: 6px; }
.ad-note { font-size: .72rem; margin-top: 4px; opacity: .8; }
.ad-cap {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted);
  font-weight: 800; text-align: center; margin-bottom: 6px;
}
.ad-link {
  display: block; line-height: 0; overflow: hidden; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card);
  transition: box-shadow .16s, border-color .16s, transform .16s;
}
.ad-link img { display: block; width: 100%; height: auto; }
.ad-link:hover { border-color: var(--accent-line); box-shadow: 0 10px 26px rgba(11,18,32,.14); transform: translateY(-1px); }
html[data-theme="classic"] .ad-link:hover { box-shadow: none; transform: none; }

.ad-lb { min-height: 90px; }.ad-mr { min-height: 250px; }
.ad-sq { min-height: 250px; }
.ad-sk { min-height: 600px; }
.sticky-ad { position: sticky; top: 84px; }

/* ---------- related lists ---------- */
.link-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.link-chips a {
  font-size: .84rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); background: var(--card);
}
html[data-theme="classic"] .link-chips a { border-radius: 2px; }
.link-chips a:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); text-decoration: none; }

/* category listing page */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 16px; margin: 18px 0 10px; }
.tool-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .1s;
}
html[data-theme="classic"] .tool-card { box-shadow: none; border-radius: 3px; }
.tool-card:hover { border-color: var(--accent-line); text-decoration: none; transform: translateY(-1px); }
.tool-card .t { font-weight: 700; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.tool-card .d { color: var(--muted); font-size: .84rem; margin-top: 5px; line-height: 1.45; }
.tool-card .t .ic { font-size: 1rem; }

/* ---------- footer ---------- */
.footer { margin-top: 46px; background: var(--card); border-top: 1px solid var(--line); padding: 34px 0 22px; }
html[data-theme="classic"] .footer { background: #f4f6f4; border-top: 3px solid var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 26px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; color: var(--ink-2); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li a { color: var(--muted); font-size: .86rem; padding: 3px 0; display: block; }
.footer li a:hover { color: var(--accent); }
.footer .about p { color: var(--muted); font-size: .86rem; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.footer-bottom a { color: var(--muted); }

/* ---------- scientific keypad ---------- */
.sci-out {
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-sm);
  padding: 14px 16px; font-family: ui-monospace, Consolas, monospace; font-size: 1.45rem;
  font-weight: 700; text-align: right; color: var(--ink); overflow-x: auto; white-space: nowrap;
  margin-bottom: 12px; min-height: 56px;
}
.sci-out.err { color: var(--warn); }
.sci-pad { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.sci-pad .k {
  appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-size: 1.02rem; font-weight: 600; padding: 13px 0; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .12s, border-color .12s;
}
.sci-pad .k:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.sci-pad .k:active { transform: translateY(1px); }
.sci-pad .k.fn { font-size: .84rem; color: var(--muted); background: var(--bg-soft); }
.sci-pad .k.op { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.sci-pad .k.eq { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 800; }
@media (max-width: 560px) { .sci-pad { gap: 5px; } .sci-pad .k { padding: 11px 0; font-size: .9rem; } }

/* ---------- misc ---------- */
.searchpage-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.empty { color: var(--muted); padding: 16px 0; }

@media (max-width: 900px) {
  .nav { display: none; }
  .search { width: 150px; }
  .burger { display: block; }
  .mobile-nav {
    display: none; background: var(--header-bg); border-top: 1px solid var(--header-line);
    padding: 8px 0 14px;
  }
  .mobile-nav.open { display: block; }
  .mobile-nav a { display: block; color: #fff; padding: 10px 20px; font-size: .95rem; font-weight: 600; }
  .mobile-nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
  .hero { padding-top: 22px; }
  h1 { font-size: 1.5rem; }
  .calc-card { padding: 16px; }
  .footer-grid { gap: 18px; }
}
@media (max-width: 560px) {
  .header-tools .search { display: none; }
  .brand small { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi.big .v { font-size: 1.4rem; }
}
