/* MobiSaver — site styles. No external fonts or assets. */
:root {
  --ink: #17221e;
  --ink-2: #3d4b45;
  --muted: #5a6762;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --line: #dde3df;
  --line-2: #c7d0cb;
  --brand: #0b3d33;
  --brand-2: #0d6b53;
  --accent: #38d39f;
  --accent-soft: #e3f7ef;
  --warn-bg: #fff6df;
  --warn-ink: #6b4a00;
  --bad-bg: #fde8e6;
  --bad-ink: #8a1f14;
  --info-bg: #e8f0fb;
  --info-ink: #1d4b8f;
  --focus: #1f6feb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 26, .06), 0 6px 20px rgba(16, 32, 26, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--brand-2); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--brand); text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--brand); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.1vw, 1.85rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.22rem; margin: 1.8em 0 .5em; }
h4 { font-size: 1.05rem; margin: 1.4em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
code { font-size: .92em; background: #eef1ee; padding: .1em .3em; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 2.5rem); }

.skip { position: absolute; left: .75rem; top: -3rem; background: var(--surface); color: var(--brand); padding: .6rem 1rem; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { top: .75rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; color: var(--brand); font-weight: 800; font-size: 1.2rem; text-decoration: none; letter-spacing: -.02em; }
.logo-mark { color: var(--brand); flex: none; }
.nav-list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; padding: .5rem .8rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .96rem; }
.nav-list a:hover { background: var(--accent-soft); color: var(--brand); }
.nav-list a[aria-current="page"] { background: var(--brand); color: #fff; }
.nav-toggle { display: none; font: inherit; font-weight: 700; color: var(--brand); background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; }
@media (max-width: 860px) {
  .js .nav-toggle { display: inline-block; }
  .js .nav-list { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem; box-shadow: var(--shadow); }
  .js .nav-list.open { display: flex; }
  .js .nav-list a { border-radius: 10px; padding: .75rem .9rem; }
  .nav-list { flex-wrap: wrap; }
}

/* hero and home */
.hero { background: radial-gradient(1200px 400px at 85% -20%, rgba(56, 211, 159, .28), transparent 60%), linear-gradient(160deg, #0b3d33 0%, #0e4f41 60%, #0f5a49 100%); color: #fff; padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(4.5rem, 8vw, 7rem); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .eyebrow { color: #a7f0d3; }
.hero .lede { color: #e2f3ec; max-width: 56ch; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand-2); margin: 0; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 62ch; }
.cards { list-style: none; padding: 0; margin: -3.2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; position: relative; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 32, 26, .06), 0 12px 28px rgba(16, 32, 26, .10); }
.card-link { display: flex; flex-direction: column; height: 100%; padding: 1.5rem 1.5rem 1.35rem; color: inherit; text-decoration: none; border-radius: var(--radius); }
.card h2 { font-size: 1.3rem; margin: .9rem 0 .5rem; }
.card p { color: var(--ink-2); flex: 1; }
.card-icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--accent-soft); color: var(--brand-2); }
.card-icon svg { width: 1.6rem; height: 1.6rem; }
.card-cta { font-weight: 700; color: var(--brand-2); }
.card-link:hover .card-cta { text-decoration: underline; }
.facts { margin: 3.5rem 0 1rem; }
.fact-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.fact-list li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 1.1rem 1.25rem; }
.fact-list h3 { margin: 0 0 .35rem; font-size: 1.08rem; }
.fact-list p { color: var(--ink-2); margin-bottom: .5rem; }
.trust { margin: 3rem 0 4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.75rem; }
.trust h2 { margin-top: 0; }
.trust-list { padding-left: 1.2rem; }
.trust-list li { margin-bottom: .5rem; }

/* page head, breadcrumbs */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 1.25rem 0 0; font-size: .92rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--line-2); }
.breadcrumbs a { color: var(--muted); }
.page-head { padding: 1rem 0 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; max-width: 52rem; }
.meta { color: var(--muted); font-size: .95rem; margin: 0; }

/* article layout */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.prose { max-width: 46rem; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose li { margin-bottom: .35em; }
.prose ul ul, .prose ol ul { margin-top: .35em; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; font-size: .95rem; align-self: start; }
.toc h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .5rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin: .25rem 0; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
@media (min-width: 1100px) {
  .article-layout { grid-template-columns: 15.5rem minmax(0, 1fr); }
  .toc { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow: auto; }
}
.prose .callout { background: var(--accent-soft); border-left: 4px solid var(--brand-2); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.prose .callout p:last-child, .prose .template p:last-child { margin-bottom: 0; }
.prose .template { background: var(--surface); border: 1px dashed var(--line-2); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.25rem 0; font-style: italic; }
.formula { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; font-size: 1.02rem; }
ul.checklist { list-style: none; padding-left: 0; }
ul.checklist li { display: flex; gap: .65rem; align-items: flex-start; }
ul.checklist .check { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .3rem; border: 2px solid var(--brand-2); border-radius: 4px; background: var(--surface); }

/* tables */
.table-wrap { position: relative; overflow-x: auto; margin: 1.25rem 0 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 3px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.45; }
caption { text-align: left; padding: .75rem 1rem; color: var(--muted); font-size: .9rem; caption-side: top; }
th, td { text-align: left; vertical-align: top; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
thead th { background: #eef3f0; color: var(--brand); font-weight: 700; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:nth-child(even) > * { background: #fafbfa; }
.prose table { min-width: 34rem; }
.prose .table-wrap table { min-width: 30rem; }

/* network table */
.dataset { margin: 1.5rem 0; }
.table-wrap.wide { max-height: 80vh; }
.network-table { min-width: 72rem; }
.network-table thead th { position: sticky; top: 0; z-index: 2; }
.network-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 9.5rem; box-shadow: 1px 0 0 var(--line); }
.network-table tbody tr:nth-child(even) th { background: #fafbfa; }
.network-table thead th:first-child { left: 0; z-index: 3; }
.network-table .sub { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.network-table td { min-width: 8rem; }
.network-table details summary { cursor: pointer; color: var(--brand-2); font-weight: 600; }
.network-table details ul { margin: .5rem 0 0; padding-left: 1rem; font-size: .85rem; min-width: 22rem; }
.network-table tr[hidden] { display: none; }
.status { display: inline-block; font-size: .74rem; font-weight: 700; line-height: 1.2; padding: .15rem .45rem; border-radius: 999px; margin-left: .15rem; white-space: nowrap; vertical-align: .05em; }
.status-secondary { background: var(--info-bg); color: var(--info-ink); }
.status-conflicting { background: var(--warn-bg); color: var(--warn-ink); }
.status-unknown, .status-unavailable { background: #eceeed; color: #44504b; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .85rem 1rem; }
.filters label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .92rem; }
.filter-checks { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: .9rem 0 .5rem; }
.filter-checks label { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.filter-note { font-size: .88rem; color: var(--muted); margin: .25rem 0 .75rem; }
.table-count { font-weight: 600; color: var(--ink-2); }
.downloads { font-size: .95rem; }

/* forms and calculators */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: clamp(1.1rem, 2.5vw, 2rem); margin: 2rem 0; }
.calc-head h2 { margin-top: 0; }
.calc fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 1.25rem 0 .5rem; min-width: 0; }
.calc legend { font-weight: 800; color: var(--brand); font-size: 1.08rem; padding: 0 .4rem 0 0; }
.calc fieldset.inner { border-top: 1px dashed var(--line); padding-top: .9rem; }
.calc fieldset.inner legend { font-size: .98rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .25rem 1rem; }
.field { display: flex; flex-direction: column; margin: .35rem 0 .6rem; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; margin-bottom: .2rem; }
.req { font-weight: 400; color: var(--muted); font-size: .85rem; }
.hint { color: var(--muted); font-size: .85rem; line-height: 1.4; margin-bottom: .3rem; }
input[type="text"], input[type="date"], select { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1.5px solid #8b9993; border-radius: 10px; padding: .55rem .7rem; width: 100%; min-height: 2.75rem; }
input:hover, select:hover { border-color: var(--brand-2); }
input[aria-invalid="true"] { border-color: var(--bad-ink); background: #fffafa; }
.money, .unit { display: flex; align-items: stretch; }
.money span { display: grid; place-items: center; padding: 0 .65rem; background: #eef3f0; border: 1.5px solid #8b9993; border-right: 0; border-radius: 10px 0 0 10px; font-weight: 700; color: var(--ink-2); }
.money input { border-radius: 0 10px 10px 0; }
.unit span { display: grid; place-items: center; padding: 0 .65rem; color: var(--muted); font-size: .9rem; }
.unit span:empty { display: none; }
.error { color: var(--bad-ink); font-size: .88rem; font-weight: 600; min-height: 0; }
.error:empty { display: none; }
.check-inline { display: flex; gap: .55rem; align-items: flex-start; margin: .45rem 0; font-size: .97rem; }
.check-inline input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--brand-2); }
.filters input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--brand-2); }
details.more { margin: .5rem 0 0; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--brand-2); padding: .5rem 0; }
.calc-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: .5rem; }
.btn { font: inherit; font-weight: 700; font-size: 1rem; border: 2px solid var(--brand-2); background: var(--brand-2); color: #fff; padding: .7rem 1.3rem; border-radius: 999px; cursor: pointer; min-height: 2.9rem; }
.btn:hover { background: var(--brand); border-color: var(--brand); }
.btn-secondary { background: #fff; color: var(--brand-2); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--brand); }
.btn-link { background: none; border-color: transparent; color: var(--brand-2); text-decoration: underline; padding-inline: .5rem; }
.btn-link:hover { background: none; border-color: transparent; color: var(--brand); }
.example-note, .notice { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: .75rem 1rem; font-size: .95rem; }
.form-errors { background: var(--bad-bg); color: var(--bad-ink); border-radius: 10px; padding: .9rem 1.1rem; margin-top: 1rem; }
.form-errors ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.form-errors a { color: var(--bad-ink); font-weight: 600; }

/* results */
.results:empty { display: none; }
.results { margin-top: 1.5rem; border-top: 2px solid var(--brand); padding-top: 1.25rem; }
.results:focus { outline: none; }
.verdict { font-size: 1.2rem; font-weight: 700; color: var(--brand); background: var(--accent-soft); border-radius: 12px; padding: 1rem 1.2rem; margin: 0 0 1rem; }
.verdict.neutral { background: #eef1ee; color: var(--ink); }
.verdict small { display: block; font-weight: 500; font-size: .95rem; color: var(--ink-2); margin-top: .3rem; }
.big { font-size: 1.6rem; }
.result-table td.num, .result-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-table thead th { white-space: normal; vertical-align: bottom; }
.result-table { font-size: .9rem; }
.result-table tr.best > * { background: var(--accent-soft) !important; }
.chart { margin: 1rem 0; }
.chart svg { display: block; width: 100%; height: auto; }
.chart figcaption { font-size: .9rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; padding: 0; margin: .5rem 0; font-size: .9rem; }
.legend li { display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.legend .swatch { width: 1.6rem; height: .3rem; border-radius: 2px; display: inline-block; }
.assumptions { font-size: .95rem; color: var(--ink-2); }
.assumptions li { margin-bottom: .3rem; }
.deadline { border: 2px solid var(--brand-2); border-radius: 12px; padding: 1rem 1.2rem; margin: 1rem 0; }
.deadline strong.date { font-size: 1.4rem; color: var(--brand); display: block; }
.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: .75rem 1rem; }

/* footer */
.site-footer { background: var(--brand); color: #d8ece4; margin-top: 4rem; padding: 2.5rem 0; font-size: .95rem; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; }
.site-footer a { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.1rem; color: #fff; margin-bottom: .5rem; }
.footer-brand .logo-mark { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.site-footer li { margin-bottom: .45rem; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .wrap { width: calc(100% - 1.75rem); }
  .calc { border-radius: 14px; margin-inline: -.25rem; }
  .verdict { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .toc, .calc-actions, .filters { display: none; } body { background: #fff; } }

/* let the dataset use the full content width next to the table of contents */
.prose .dataset { width: min(1180px, 100vw - 2.5rem); max-width: none; }
@media (min-width: 1100px) { .prose .dataset { width: calc(min(1180px, 100vw - 2.5rem) - 17.5rem); } }
@media (max-width: 600px) { .prose .dataset { width: calc(100vw - 1.75rem); } }

.bar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.bar-list li { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr auto; align-items: center; gap: .75rem; }
.bar-label { font-size: .92rem; font-weight: 600; }
.bar-track { background: #eef1ee; border-radius: 6px; height: 1.4rem; overflow: hidden; }
.bar { display: block; height: 100%; border-radius: 6px; }
.bar-value { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .bar-list li { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }
