/* Mirovi Home — site styles. System fonts only (no web-font download). */
:root {
  color-scheme: light;
  --bg: #f6f4ee;
  --surface: #fffefa;
  --surface-2: #f0ede4;
  --ink: #15201c;
  --ink-2: #3e4a45;
  --muted: #5d6863;
  --line: #e0dbcf;
  --line-2: #cfc8b8;
  --brand: #0c5a48;
  --brand-ink: #ffffff;
  --brand-soft: #e3efe9;
  --accent: #9a5a12;
  --link: #0b5f4c;
  --focus: #c77a1c;
  --panel: #0e3b31;
  --panel-ink: #f4f1e8;
  --panel-muted: #b9ccc3;
  --good: #1d6b3a;
  --bad: #a3322a;
  --warn-bg: #fbf1de;
  --warn-line: #e3c48a;
  --s1: #0b8a6c; --s2: #c9822b; --s3: #3a6ea5; --s4: #a4506b; --s5: #8a8f3a;
  --chart-surface: #fcfbf8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 6px 24px rgba(20, 30, 25, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, "Bitstream Charter", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1412; --surface: #151c1a; --surface-2: #1b2421; --ink: #e8ede9; --ink-2: #c9d2cd; --muted: #9fada6;
    --line: #26312d; --line-2: #34423d; --brand: #5cc3a6; --brand-ink: #06231c; --brand-soft: #173029; --accent: #e0a55a; --link: #7fd3b9;
    --focus: #e0a55a; --panel: #10302a; --panel-ink: #f1f5f2; --panel-muted: #a8c2b8; --good: #74c98f; --bad: #f08a80; --warn-bg: #2a2416; --warn-line: #5d4b25;
    --s1: #239a7c; --s2: #c0832f; --s3: #5b8fd0; --s4: #cf6f8f; --s5: #8f9440; --chart-surface: #141a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1412; --surface: #151c1a; --surface-2: #1b2421; --ink: #e8ede9; --ink-2: #c9d2cd; --muted: #9fada6;
  --line: #26312d; --line-2: #34423d; --brand: #5cc3a6; --brand-ink: #06231c; --brand-soft: #173029; --accent: #e0a55a; --link: #7fd3b9;
  --focus: #e0a55a; --panel: #10302a; --panel-ink: #f1f5f2; --panel-muted: #a8c2b8; --good: #74c98f; --bad: #f08a80; --warn-bg: #2a2416; --warn-line: #5d4b25;
  --s1: #239a7c; --s2: #c0832f; --s3: #5b8fd0; --s4: #cf6f8f; --s5: #8f9440; --chart-surface: #141a18;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.75rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); margin: 2em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
code, .formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: .6em 1em; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.28rem; font-weight: 600; letter-spacing: -.01em; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo .mark-roof { fill: var(--brand); }
.logo .mark-door { fill: var(--accent); }
.logo small { font-family: var(--sans); font-size: .72rem; color: var(--muted); display: block; font-weight: 500; letter-spacing: .02em; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; font-size: .95rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { background: var(--brand-soft); color: var(--ink); }
.theme-btn { border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); border-radius: 999px; width: 38px; height: 38px; display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .hdr { flex-wrap: wrap; gap: 8px; padding-top: 8px; }
  .nav { order: 3; width: 100%; margin: 0 -16px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .theme-btn { margin-left: auto; }
}

/* breadcrumbs */
.crumbs { font-size: .88rem; color: var(--muted); margin: 18px 0 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line-2); }
.crumbs a { color: var(--muted); }

.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 760px; }
.meta-line { font-size: .88rem; color: var(--muted); margin-top: -.4em; }

/* calculator layout */
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; margin: 24px 0 8px; }
@media (max-width: 900px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.inputs { padding: 20px; }
.inputs fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.inputs legend { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; padding: 0; margin: 0 0 10px; float: left; width: 100%; }
.inputs legend + * { clear: both; }
.inputs fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
@media (max-width: 340px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-size: .9rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field .help { font-size: .8rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.field .err { font-size: .8rem; color: var(--bad); min-height: 0; }
.inp { position: relative; display: flex; align-items: stretch; }
.inp input, .inp select, .field select { width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 46px; font-variant-numeric: tabular-nums; }
.inp input:focus, .field select:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 25%, transparent); outline-offset: 0; }
.inp .pre, .inp .suf { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; color: var(--muted); pointer-events: none; font-size: .98rem; }
.inp .pre { left: 12px; } .inp .suf { right: 12px; }
.inp.has-pre input { padding-left: 26px; } .inp.has-suf input { padding-right: 52px; }
.inp input[aria-invalid="true"] { border-color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; margin-bottom: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
details.more { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--link); padding: 6px 0 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn { font: inherit; font-size: .92rem; border-radius: 999px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.btn-link { font: inherit; background: none; border: 0; color: var(--link); text-decoration: underline; cursor: pointer; padding: 0; }

.results { padding: 0; overflow: hidden; }
@media (min-width: 901px) { .results { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; } }
.results-inner { padding: 20px; }
.hero-result { background: var(--panel); color: var(--panel-ink); margin: -20px -20px 18px; padding: 22px 20px 20px; }
.hero-label { font-size: .92rem; color: var(--panel-muted); font-weight: 500; }
.hero-value { font-family: var(--serif); font-size: clamp(2.3rem, 1.6rem + 3vw, 3.4rem); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 4px 0 6px; color: var(--panel-ink); }
.hero-sub { font-size: .95rem; color: var(--panel-muted); }
.kv { margin: 0 0 16px; }
.kv-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
.kv-row dt { color: var(--ink-2); }
.kv-row dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.kv-row.good dd { color: var(--good); } .kv-row.bad dd { color: var(--bad); } .kv-row.strong dd { font-size: 1.05rem; }
.result-note { font-size: .9rem; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; color: var(--ink-2); }
.result-note.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.checks { list-style: none; padding: 0; font-size: .93rem; }
.checks li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.checks li span { display: inline-block; width: 1.2em; font-weight: 700; }
.checks .ok span { color: var(--good); } .checks .no span { color: var(--bad); }

/* breakdown bar */
.breakdown { margin: 0 0 16px; }
.stack { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; margin-bottom: 12px; background: var(--chart-surface); }
.seg { min-width: 3px; }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); } .s4 { background: var(--s4); } .s5 { background: var(--s5); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .93rem; }
.legend li { display: grid; grid-template-columns: 14px 1fr auto 3.2em; gap: 10px; align-items: center; }
.legend .lg-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend .lg-pct { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 6px; }
.legend-inline li { display: inline-flex; gap: 6px; align-items: center; }

/* charts */
.chart { margin: 8px 0 18px; }
.chart figcaption { font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.chart-box { position: relative; background: var(--chart-surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px 0; }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 12px; font-family: var(--sans); }
.chart .ln { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.s1 { stroke: var(--s1); } .chart .ln.s2 { stroke: var(--s2); } .chart .ln.s3 { stroke: var(--s3); }
.chart .dot { stroke: var(--chart-surface); stroke-width: 2; }
.chart .dot.s1 { fill: var(--s1); } .chart .dot.s2 { fill: var(--s2); } .chart .dot.s3 { fill: var(--s3); }
.chart .xhair { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; cursor: crosshair; }
.tip { position: absolute; top: 8px; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font-size: .82rem; box-shadow: var(--shadow); pointer-events: none; white-space: nowrap; line-height: 1.5; }
.tip .swatch { margin-right: 6px; vertical-align: -1px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap.tall { max-height: 420px; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 600; padding: 10px 12px; font-size: .95rem; }
th, td { padding: 8px 12px; border-top: 1px solid var(--line); text-align: left; }
thead th { background: var(--surface-2); font-weight: 600; font-size: .85rem; color: var(--ink-2); position: sticky; top: 0; }
tbody th { font-weight: 500; }
.num { text-align: right; }
th[data-sort] { cursor: pointer; }
th[data-sort]::after { content: " ↕"; color: var(--muted); font-size: .8em; }
th[aria-sort="ascending"]::after { content: " ↑"; } th[aria-sort="descending"]::after { content: " ↓"; }
details.schedule { margin-bottom: 10px; }
details.schedule > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }

/* content */
.content { max-width: 780px; min-width: 0; overflow-wrap: break-word; }
.content a { overflow-wrap: anywhere; }
.content h2:first-child { margin-top: 1em; }
.formula { display: block; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; padding: 12px 14px; overflow-x: auto; white-space: pre; margin: 0 0 1em; line-height: 1.5; }
.example { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 1.2em; }
.example h3 { margin-top: 0; }
.sources { font-size: .9rem; color: var(--ink-2); }
.sources li { margin-bottom: .4em; }
.callout { background: var(--brand-soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 1.2em; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; }
.faq details p { margin: .6em 0 0; color: var(--ink-2); }
.page-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
@media (max-width: 1000px) { .page-cols { grid-template-columns: minmax(0, 1fr); } }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.aside-box h2 { font-size: 1.05rem; margin: 0 0 .6em; }
.aside-box ul { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.aside-box li { padding: 4px 0; }
@media (min-width: 1001px) { .sticky-aside { position: sticky; top: 16px; } }

/* hub cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 0 0 12px; }
.tool-card { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.tool-card strong { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 4px; }
.tool-card span { font-size: .9rem; color: var(--muted); line-height: 1.45; display: block; }
.tool-card .ico { width: 30px; height: 30px; margin-bottom: 8px; color: var(--brand); }
.home-hero { padding: 36px 0 12px; }
.home-hero h1 { max-width: 820px; font-size: clamp(2.1rem, 1.3rem + 3vw, 3.3rem); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 18px 0 8px; }
.quick a { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--panel); color: var(--panel-ink); border-radius: 12px; padding: 14px 16px; text-decoration: none; font-weight: 600; }
.quick a::after { content: "→"; color: var(--panel-muted); }
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 28px 0; }
.trust-strip div { border-top: 3px solid var(--brand); padding-top: 10px; font-size: .95rem; color: var(--ink-2); }
.trust-strip strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.08rem; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; font-size: .92rem; background: var(--surface); }
.pill-list a:hover { border-color: var(--brand); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.7rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { font-size: .85rem; color: var(--muted); }

/* ads: reserved slots stay invisible until an ad unit is placed inside */
.ad-slot { margin: 24px auto; text-align: center; }
.ad-slot:empty { display: none; }

/* footer */
.site-footer { margin-top: 64px; background: var(--surface); border-top: 1px solid var(--line); padding: 36px 0 28px; font-size: .92rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1rem; margin: 0 0 .6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--ink-2); }
.fine { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; }

@media print {
  .site-header, .site-footer, .inputs .actions, .nav, .ad-slot, .theme-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .results { position: static; max-height: none; }
  details.schedule { display: block; } details.schedule > * { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a.btn { display: inline-block; text-decoration: none; }
.mobile-sum { display: none; }
@media (max-width: 900px) {
  .mobile-sum { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: 10px; justify-content: space-between;
    background: var(--panel); color: var(--panel-ink); border-radius: 14px; padding: 10px 16px; text-decoration: none; box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: .9rem; }
  .mobile-sum[hidden] { display: none; }
  .mobile-sum strong { font-family: var(--serif); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
  .mobile-sum .ms-label { color: var(--panel-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-sum .ms-go { color: var(--panel-muted); white-space: nowrap; }
}
@media print { .mobile-sum { display: none !important; } }
.field[hidden] { display: none; }
/* contact form (golive-mirovi-2026-11-11) */
.cform { display: grid; gap: 6px; max-width: 560px; margin: 0 0 24px; }
.cform label { font-weight: 600; font-size: .95rem; margin-top: 8px; }
.cform input, .cform textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 46px; box-sizing: border-box; }
.cform input:focus, .cform textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 25%, transparent); outline-offset: 0; }
.cform .btn { justify-self: start; margin-top: 12px; min-height: 44px; }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
