/* © 2026 FinanzCalc. All rights reserved. */
:root {
  --bg: #fafaf8; --surface: #ffffff; --text: #1c1d21; --muted: #5d6068; --line: #e4e4df;
  --accent: #d52b1e; --accent-ink: #ffffff; --accent-soft: #fdecea; --ok: #1a7f4b;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.04);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #131416; --surface: #1b1c20; --text: #ecece8; --muted: #a0a3ab; --line: #2c2e34; --accent: #ff5a4d; --accent-ink: #1a0200; --accent-soft: #32201e; --shadow: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-size: .92rem; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.brand small { font-weight: 400; color: var(--muted); font-size: .8rem; display: none; }
@media (min-width: 640px) { .brand small { display: inline; } }
.logo { width: 26px; height: 26px; background: var(--accent); border-radius: 6px; position: relative; display: inline-block; }
.logo::before, .logo::after { content: ""; position: absolute; background: #fff; }
.logo::before { left: 11px; top: 5px; width: 4px; height: 16px; }
.logo::after { left: 5px; top: 11px; width: 16px; height: 4px; }
nav a { margin-left: 16px; text-decoration: none; color: var(--text); font-weight: 500; }
nav a:hover, nav a[aria-current] { color: var(--accent); }
main { padding-top: 28px; padding-bottom: 48px; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin: .2em 0 .4em; }
h2 { font-size: 1.4rem; margin: 2em 0 .6em; line-height: 1.3; }
h3 { font-size: 1.05rem; margin: .3em 0; line-height: 1.3; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 70ch; }
.crumbs { font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); max-width: 18ch; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); padding: 10px 18px; border-radius: 999px; font-weight: 600; text-decoration: none; cursor: pointer; font-size: 1rem; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { padding: 6px 14px; font-size: .9rem; margin-top: 6px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card[hidden], .group[hidden] { display: none; }
.card p { margin: .3em 0 0; color: var(--muted); font-size: .92rem; }
.tag { font-size: .78rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.card.cat .big { font-size: 1.8rem; }
.search input { width: 100%; max-width: 520px; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 1rem; margin: 6px 0 12px; }
.search input:focus, .field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc { display: grid; grid-template-columns: 1fr; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 20px 0; }
@media (min-width: 820px) { .calc { grid-template-columns: 1fr 1.1fr; } }
.fields { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.field { display: block; width: 100%; }
.lbl { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.inp { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.inp input, .inp select { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 10px 12px; font: inherit; }
.inp select { width: 100%; }
.unit { padding: 0 12px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.results { background: var(--accent-soft); border-radius: 10px; padding: 16px; align-self: start; }
.hero-result span { display: block; font-size: .9rem; color: var(--muted); }
.hero-result strong { display: block; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin-top: 2px; word-break: break-word; }
.results dl { margin: 14px 0 0; }
.results dl > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.results dt { color: var(--muted); font-size: .92rem; }
.results dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.tbl { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
.note { background: var(--surface); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 6px; margin: 18px 0; color: var(--muted); font-size: .94rem; }
.article { max-width: 72ch; }
.article h2 { margin-top: 1.6em; }
.article li { margin: .3em 0; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0; font-size: .9rem; color: var(--muted); }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }

/* ---------- language switcher ---------- */
.bar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
nav.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
nav.lang a { margin: 0; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--muted); }
nav.lang a[aria-current] { background: var(--accent); color: var(--accent-ink); }

/* ---------- charts ---------- */
:root {
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --viz-grid: #e4e4df;
}
@media (prefers-color-scheme: dark) {
  :root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --viz-grid: #2c2e34; }
}
.s1 { --c: var(--s1); } .s2 { --c: var(--s2); } .s3 { --c: var(--s3); } .s4 { --c: var(--s4); }
.s5 { --c: var(--s5); } .s6 { --c: var(--s6); } .s7 { --c: var(--s7); } .s8 { --c: var(--s8); }
.vz { margin: 22px 0; padding: 14px 16px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.viz-box .vz { margin: 14px 0 0; }
.vz figcaption { margin-top: 8px; font-size: .84rem; color: var(--muted); }
.vz-note { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.vz-wrap { position: relative; }
.vz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.vz-svg .grid { stroke: var(--viz-grid); stroke-width: 1; }
.vz-svg .base { stroke: var(--muted); stroke-width: 1; }
.vz-svg .ax { fill: var(--muted); font-size: 11px; }
.vz-svg .val { fill: var(--text); font-size: 11px; font-weight: 600; }
.vz-svg .bar { fill: var(--c); stroke: var(--surface); stroke-width: 1; }
.vz-svg .bar:hover { opacity: .8; }
.vz-svg .line { stroke: var(--c); }
.vz-svg .dot { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
.vz-svg .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.vz-svg.on .cross { opacity: 1; }
.vz-line { touch-action: pan-y; cursor: crosshair; }
.vz-tip { position: absolute; top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: .82rem; box-shadow: 0 4px 14px rgba(0,0,0,.12); pointer-events: none; white-space: nowrap; z-index: 2; }
.vz-tip[hidden] { display: none; }
.vz-tip div { display: flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.vz-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0 0 6px; padding: 0; font-size: .84rem; }
.vz-legend li { display: flex; align-items: center; gap: 6px; }
.vz-legend.col { flex-direction: column; gap: 6px; margin: 12px 0 0; }
.vz-legend.col li { gap: 8px; }
.vz-legend.col .vz-l { flex: 1; }
.vz-legend.col .vz-v { color: var(--muted); font-variant-numeric: tabular-nums; }
.vz-bars { display: flex; flex-direction: column; gap: 10px; }
.vz-row { display: grid; grid-template-columns: minmax(90px, 36%) 1fr auto; gap: 10px; align-items: center; font-size: .86rem; }
.vz-track { height: 14px; background: var(--viz-grid); border-radius: 4px; overflow: hidden; }
.vz-fill { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.vz-v { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vz-stack { display: flex; gap: 2px; height: 26px; }
.vz-stack span { background: var(--c); border-radius: 4px; min-width: 3px; }
.vz-donut { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.vz-donut svg { width: 150px; height: 150px; flex: none; }
.vz-donut .vz-legend { flex: 1; min-width: 200px; margin: 0; }
.vz-donut .arc { stroke: var(--c); }
.vz-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.vz-pillars .pil { border-top: 5px solid var(--c); background: var(--bg); border-radius: 8px; padding: 12px 14px; }
.vz-pillars h4 { margin: 4px 0; font-size: .98rem; }
.vz-pillars p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.vz-pillars .tag { color: var(--muted); }
.side { display: flex; flex-direction: column; gap: 0; align-self: start; min-width: 0; }
.calc > * { min-width: 0; }
@media (max-width: 600px) {
  .vz-svg .ax, .vz-svg .val { font-size: 17px; }
  .vz { padding: 12px 10px 8px; }
  .bar-right { gap: 8px; }
}
.side .results { align-self: stretch; }

/* ---------- navigation menus ---------- */
.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.main-nav > a, .menu-link { margin: 0; padding: 8px 10px; border-radius: 8px; }
.main-nav > a:hover, .menu-link:hover { background: var(--accent-soft); }
.menu { position: relative; display: flex; align-items: center; }
.menu-link { text-decoration: none; color: var(--text); font-weight: 500; padding-right: 2px; }
.menu.cur .menu-link, .menu-link[aria-current] { color: var(--accent); }
.menu-btn { border: 0; background: transparent; color: var(--muted); padding: 8px 8px 8px 2px; cursor: pointer; display: flex; border-radius: 8px; }
.menu-btn svg { transition: transform .15s; }
.menu.open .menu-btn svg { transform: rotate(180deg); }
.menu-panel { display: none; position: absolute; top: 100%; left: 0; z-index: 30; min-width: 270px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.menu.open .menu-panel { display: block; }
@media (hover: hover) { .menu:hover .menu-panel, .menu:focus-within .menu-panel { display: block; } }
.menu-panel a { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .94rem; }
.menu-panel a:hover { background: var(--accent-soft); color: var(--accent); }
.menu-panel .all { font-weight: 700; color: var(--accent); border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 4px; }
.menu-panel .ic { width: 22px; text-align: center; }
.menu-panel .nm { flex: 1; }
.menu-panel small { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .menu { position: static; } .menu-panel { left: 0; right: 0; top: 100%; min-width: 0; } .site-header .bar { position: relative; } }

/* ---------- topic chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 500; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip small { color: var(--muted); }
.group { scroll-margin-top: 80px; }

/* ---------- landing page ---------- */
.hero2 { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 28px 0 10px; align-items: center; }
@media (min-width: 900px) { .hero2 { grid-template-columns: 1.1fr 1fr; gap: 44px; padding-top: 44px; } }
.hero2 h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); letter-spacing: -.02em; margin: .3em 0 .3em; max-width: 16ch; }
.hero2 .lead { font-size: 1.15rem; max-width: 52ch; }
.badge { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .82rem; font-weight: 600; }
.hero-search { display: flex; gap: 8px; margin: 22px 0 12px; max-width: 520px; }
.hero-search input { flex: 1; min-width: 0; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 1rem; box-shadow: var(--shadow); }
.hero-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .9rem; }
.quick a { color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--line); }
.quick a:hover { color: var(--accent); border-color: var(--accent); }
.hero-card { background: linear-gradient(180deg, var(--surface), var(--accent-soft)); border: 1px solid var(--line); border-radius: 20px; padding: 20px 20px 16px; box-shadow: 0 18px 50px rgba(213,43,30,.10); }
.hero-card h3 { font-size: 1.15rem; margin: 6px 0 12px; }
.hero-card .vz { background: var(--surface); margin: 14px 0 12px; }
.hero-card .btn.small { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 34px 0 0; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { background: var(--surface); padding: 18px 12px; text-align: center; }
.stats strong { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--accent); }
.stats span { color: var(--muted); font-size: .9rem; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 2em; }
.sec-head h2 { margin: 0 0 .6em; }
.sec-head a { font-size: .92rem; white-space: nowrap; }
.grid.cats .card.cat { background: var(--surface); }
.how { margin-top: 2.4em; }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.how li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.how .n { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.how h3 { margin: 10px 0 4px; }
.how p { margin: 0; color: var(--muted); font-size: .94rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 3em; padding: 26px 28px; border-radius: 20px; background: linear-gradient(120deg, var(--accent), #8f1a11); color: #fff; }
.cta h2 { margin: 0 0 4px; font-size: 1.4rem; }
.cta p { margin: 0; opacity: .92; max-width: 56ch; }
.cta .btn { background: #fff; color: #8f1a11; border-color: #fff; }

/* ---------- contact + footer ---------- */
.contact { max-width: 720px; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px; margin: 22px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.contact-card .ic { font-size: 2rem; }
.contact-card > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.contact-card .mail { font-size: 1.25rem; font-weight: 700; word-break: break-all; }
.foot-links { margin: 0 0 8px; }
.foot-links a { color: var(--text); }
.copy { margin: 0 0 6px; font-size: .86rem; }
.obf-mail { cursor: pointer; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* home v2 */
.hero2.solo { display: block; text-align: center; padding: 56px 0 24px; }
.hero2.solo .hero-search { margin: 24px auto 14px; }
.hero2.solo .quick { justify-content: center; align-items: center; }
.grid.pop { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pop-card { text-align: center; }
.pop-card .big { font-size: 2rem; display: block; margin-bottom: 6px; }
.topic h3 { font-size: .85rem; letter-spacing: .08em; color: var(--muted); }
.topic ul { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 8px; }
.topic .more { font-weight: 600; text-decoration: none; }
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: 640px; margin: 0 auto; box-shadow: var(--shadow); }
.demo-form { display: grid; gap: 12px; margin: 14px 0; }
.trust .card a { font-weight: 600; text-decoration: none; }
.hero2.solo h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 18ch; margin: 0 auto; }
.hero2.solo .hero-search { max-width: 520px; }

/* home v3: navy hero like reference */
.hero3 { background: linear-gradient(135deg, #0b2545, #13315c); color: #fff; margin: 0 calc(50% - 50vw); padding: 56px 0; }
.hero3-in { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: grid; gap: 32px; grid-template-columns: 1.2fr 1fr; align-items: center; }
.hero3 h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; margin: 14px 0; }
.hero3 .lead { color: #c9d6ea; }
.eyebrow { display: inline-block; font-size: .85rem; background: rgba(255,255,255,.12); padding: 5px 12px; border-radius: 999px; }
.hero3 .quick { color: #c9d6ea; align-items: center; }
.chip2 { background: rgba(255,255,255,.12); color: #fff !important; border: 0 !important; padding: 5px 12px; border-radius: 999px; }
.chip2:hover { background: rgba(255,255,255,.22); }
.hero3-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 20px; }
.hero3-card .big { font-size: 2rem; font-weight: 800; margin: 4px 0 8px; }
.hero3-card small { color: #c9d6ea; }
.hero3-card .viz-box, .hero3-card .vz { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: -28px auto 8px; position: relative; }
@media (max-width: 800px) { .hero3-in { grid-template-columns: 1fr; } }

/* footer v2 */
.site-footer { background: #0b2545; color: #c9d6ea; border-top: 0; padding: 40px 0 22px; margin-top: 40px; }
.site-footer a { color: #fff; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.site-footer p { margin: 0 0 8px; }
.fcols { display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1.4fr; }
.fcols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fnote { margin-top: 24px !important; font-size: .85rem; opacity: .85; }
.fbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 14px; margin-top: 14px; font-size: .82rem; }
@media (max-width: 700px) { .fcols { grid-template-columns: 1fr; } }

/* home: compact guide cards */
.guides .card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
