:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --ink: #1d2327;
  --muted: #5b6670;
  --line: #e3e5e8;
  --accent: #1f6f5c;
  --accent-soft: #e5f2ee;
  --tax: #c0533a;
  --ni: #d59a2b;
  --loan: #6a5acd;
  --pension: #3a7bc0;
  --net: #1f6f5c;
  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181b; --card: #1e2226; --ink: #e8eaed; --muted: #9aa4ad;
    --line: #2f353b; --accent: #4fb89b; --accent-soft: #1d332d;
  }
}
* { box-sizing: border-box; }
body { margin: 0; }
header.site { background: var(--card); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; }
header.site a { color: var(--ink); text-decoration: none; font-weight: 700; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 1rem; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 1.6rem 0 .3rem; line-height: 1.2; }
.lede { color: var(--muted); margin: 0 0 1.2rem; }
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 820px) { .grid { grid-template-columns: 340px 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
label { display: block; font-weight: 600; font-size: .92rem; margin: .8rem 0 .3rem; }
label:first-child { margin-top: 0; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input, select { width: 100%; padding: .6rem .7rem; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: .5rem; }
.row > * { flex: 1; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin-top: .7rem; }
.check input { width: auto; }
.headline { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.stat { background: var(--accent-soft); border-radius: 10px; padding: .7rem .8rem; }
.stat .k { font-size: .8rem; color: var(--muted); }
.stat .v { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line); margin: .4rem 0 .5rem; }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 1rem; }
th, td { padding: .45rem .4rem; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: .8rem; color: var(--muted); font-weight: 600; }
tr.total td { font-weight: 700; border-bottom: none; }
.note { font-size: .85rem; color: var(--muted); margin-top: .8rem; }
.ad-slot { min-height: 90px; margin: 1.2rem 0; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: .75rem; }
article { margin: 2rem auto; }
article h2 { margin-top: 2rem; font-size: 1.35rem; }
article table { max-width: 620px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; margin: .5rem 0; }
summary { cursor: pointer; font-weight: 600; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 1.5rem 0 2.5rem; margin-top: 2rem; }
footer a { color: var(--muted); }
a { color: var(--accent); }

/* ourtools shared additions */
header.site nav { margin-left: auto; display: flex; gap: 1rem; font-size: .9rem; }
header.site nav a { font-weight: 500; color: var(--muted); }
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.crumbs a { color: var(--muted); }
.verdict { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.verdict.good { background: var(--accent-soft); }
.verdict.bad { background: color-mix(in srgb, var(--tax) 14%, transparent); }
.verdict.meh { background: color-mix(in srgb, var(--ni) 16%, transparent); }
.verdict p { margin: .3rem 0 0; font-weight: 400; font-size: .92rem; }
details.more { background: none; border: none; padding: 0; margin-top: .8rem; }
details.more summary { font-weight: 600; font-size: .92rem; color: var(--accent); }
svg.chart { width: 100%; height: auto; display: block; margin-top: .5rem; }
svg.chart text { font-size: 11px; fill: var(--muted); }
svg.chart .grid line { stroke: var(--line); }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin: 1rem 0 2rem; padding: 0; list-style: none; }
.tools a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; color: var(--ink); text-decoration: none; }
.tools a:hover { border-color: var(--accent); }
.tools strong { display: block; margin-bottom: .2rem; }
.tools span { color: var(--muted); font-size: .9rem; }
.tools .soon { opacity: .55; pointer-events: none; }
td.good { color: var(--accent); } td.bad { color: var(--tax); }
.ad-slot { display: none; }
.ad-slot.on { display: flex; }
.home .find { margin: .4rem 0 .8rem; font-size: 1.05rem; padding: .75rem .9rem; background: var(--card); }
.jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.jump a { font-size: .88rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; color: var(--ink); }
.jump a:hover { border-color: var(--accent); }
.group { scroll-margin-top: 1rem; }
.group h2 { margin: 1.8rem 0 0; font-size: 1.35rem; }
.group h2 small { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: .3rem; }
.group > .note { margin: .2rem 0 0; }
.tools { margin-top: .8rem; }
.chips { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips a { display: inline-block; padding: .35rem .75rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.chips a:hover { border-color: var(--accent); }
[hidden] { display: none !important; }

/* Homepage: search-first hero, popular cards, then every tool in columns */
.home .hero { background: linear-gradient(160deg, var(--accent), #164f42); color: #fff; padding: 2.4rem 0 3.4rem; }
@media (prefers-color-scheme: dark) { .home .hero { background: linear-gradient(160deg, #1d4a3f, #12302a); } }
.home .hero h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); margin: 0 0 .4rem; letter-spacing: -.02em; line-height: 1.15; }
.home .hero p { margin: 0 0 1.2rem; opacity: .92; max-width: 40rem; }
.home .searchbox { position: relative; max-width: 640px; }
.home .searchbox::before { content: "🔍"; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-size: 1rem; pointer-events: none; }
.home .searchbox input { font-size: 1.1rem; padding: 1rem 1.1rem 1rem 2.8rem; border: 0; border-radius: 14px; background: var(--card);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18); }
.home .searchbox input:focus { outline: 3px solid #fff; outline-offset: 2px; }
.home .hero .quick { margin: .8rem 0 0; font-size: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.home .hero .quick a { color: #fff; background: rgba(255, 255, 255, .16); padding: .3rem .7rem; border-radius: 999px; text-decoration: none; }
.home .hero .quick a:hover { background: rgba(255, 255, 255, .28); }
.home h2 { font-size: 1.2rem; margin: 2rem 0 .8rem; }
.home .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.popular { list-style: none; padding: 0; margin: -1.8rem 0 0; position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.popular a { display: flex; flex-direction: column; gap: .3rem; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; color: var(--ink); text-decoration: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .05); }
.popular a:hover { border-color: var(--accent); }
.popular .ic { font-size: 1.4rem; }
.popular span:last-child { color: var(--muted); font-size: .88rem; }
.badge { display: inline-block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .4rem;
  border-radius: 4px; vertical-align: 2px; margin-left: .3rem; background: #fde9c8; color: #8a5a00; }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.6rem 2rem; }
.col { scroll-margin-top: 1rem; }
.col h3 { font-size: 1rem; margin: 0 0 .4rem; }
.col ul { list-style: none; margin: 0; padding: 0; }
.col li a { display: block; padding: .5rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.col li a:hover { color: var(--accent); }
.results { list-style: none; padding: 0; margin: 1.2rem 0 0; max-width: 640px; }
.results a { display: block; padding: .75rem .95rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .45rem;
  text-decoration: none; color: var(--ink); font-weight: 600; }
.results a:hover, .results li:first-child a { border-color: var(--accent); }
.results span:not(.badge) { display: block; color: var(--muted); font-size: .88rem; font-weight: 400; }
