:root{
  --bg:#F4F6F7; --surface:#FFFFFF; --fg:#0B1F2A; --muted:#475A66; --line:#D6DFE4;
  --accent:#0B7A75; --accent-fg:#FFFFFF; --accent-soft:#E3F3F1;
  --hero:#0B1F2A; --hero-fg:#F2F7F8; --hero-muted:#B7C6CE; --hero-accent:#5CD1C6; --hero-line:rgba(255,255,255,.14);
  --highlight:#F5B335; --highlight-fg:#0B1F2A;
  --bar:#8A99A4; --track:#E3E9ED; --field:#8FA0AB;
  --shadow:0 1px 2px rgba(11,31,42,.06),0 14px 36px rgba(11,31,42,.12);
  --font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0A1319; --surface:#101C25; --fg:#E9F0F3; --muted:#9DB0BB; --line:#223440;
    --accent:#3CC4B9; --accent-fg:#05201E; --accent-soft:#123330;
    --hero:#060D12; --hero-fg:#EEF5F7; --hero-muted:#9DB0BB; --hero-accent:#5CD1C6; --hero-line:rgba(255,255,255,.12);
    --bar:#5E7381; --track:#1C2C37; --field:#4E6472;
    --shadow:0 1px 2px rgba(0,0,0,.4),0 14px 36px rgba(0,0,0,.45);
  }
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--font);font-size:13px;line-height:1.45;-webkit-font-smoothing:antialiased}
a{color:var(--accent)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
h1,h2,h3{margin:0;letter-spacing:-0.02em;text-wrap:balance}
.wrap{max-width:1040px;margin:0 auto;padding-left:max(24px,env(safe-area-inset-left,0px));padding-right:max(24px,env(safe-area-inset-right,0px))}

/* top band: header and hero */
.top{background:var(--hero);color:var(--hero-fg);background-image:linear-gradient(var(--hero-line) 1px,transparent 1px),linear-gradient(90deg,var(--hero-line) 1px,transparent 1px);background-size:56px 56px;background-position:-1px -1px}
.top-fade{background:linear-gradient(180deg,rgba(0,0,0,0) 40%,var(--hero) 100%)}
.bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 24px;padding-block:6px}
.brand{font-weight:800;font-size:19px;letter-spacing:-0.02em;color:var(--hero-fg);text-decoration:none}
.brand span{color:var(--hero-accent)}
nav{display:flex;flex-wrap:wrap;gap:0 24px;font-size:13px}
nav a{color:var(--hero-muted);text-decoration:none;padding:12px 0}
nav a:hover,nav a[aria-current=page]{color:var(--hero-fg)}
.hero{padding-block:18px 72px;display:flex;flex-direction:column;gap:16px}
.hero.short{padding-block:12px 28px}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--hero-accent)}
.hero h1{font-weight:800;font-size:clamp(24px,3.4vw,32px);line-height:1.08;max-width:800px}
.hero .lead{margin:0;font-size:14px;color:var(--hero-muted);max-width:640px}
.btn{display:inline-flex;align-items:center;min-height:42px;padding:0 24px;background:var(--highlight);color:var(--highlight-fg);text-decoration:none;font-weight:700;border-radius:8px;align-self:flex-start}
.btn:hover{filter:brightness(1.06)}

/* calculator panel */
.lift{margin-top:-56px;padding-bottom:24px;position:relative}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px 20px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow)}
.slider-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 24px}
.slider-head label{font-weight:700;font-size:15px}
.big{font-weight:800;font-size:31px;line-height:1;font-variant-numeric:tabular-nums;color:var(--accent)}
input[type=range]{width:100%;min-height:40px;margin:0;accent-color:var(--accent)}
.scale{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.filters{display:flex;flex-wrap:wrap;gap:16px 32px;align-items:flex-end;border-top:1px solid var(--line);padding-top:14px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:700;font-size:13px}
select{min-height:40px;min-width:220px;padding:0 12px;font:inherit;color:var(--fg);background:var(--surface);border:1px solid var(--field);border-radius:8px}
.check{display:flex;align-items:center;gap:10px;min-height:40px;font-weight:600;font-size:13px;cursor:pointer}
.check input{width:20px;height:20px;margin:0;accent-color:var(--accent)}
#results{display:flex;flex-direction:column;gap:6px}
.row{display:flex;flex-direction:column;gap:5px;min-width:0;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.row.best{border-color:var(--accent);background:var(--accent-soft)}
.row.off{opacity:.65;border-style:dashed}
.row-top{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px}
.row-name{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;min-width:0}
.row-name strong{font-size:17px;letter-spacing:-0.01em}
.plan{font-size:12px;color:var(--muted)}
.tag{font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--highlight-fg);background:var(--highlight);padding:2px 8px;border-radius:999px}
.row-cost{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;font-variant-numeric:tabular-nums}
.row-cost strong{font-size:19px;font-weight:800}
.row-cost span{font-size:12px;color:var(--muted)}
.track{height:10px;background:var(--track);border-radius:999px;overflow:hidden}
.fill{height:10px;border-radius:999px;background:var(--bar)}
.fill.best{background:var(--accent)}
.meta{display:flex;flex-wrap:wrap;align-items:center;gap:0 16px;font-size:12px;color:var(--muted)}
.meta a{display:inline-flex;align-items:center;min-height:40px;font-weight:700}
.note{margin:0;font-size:12px;color:var(--muted);max-width:780px}

/* sections */
section{padding-block:2px 26px}
.h2{font-weight:800;font-size:clamp(19px,2.4vw,23px);margin-bottom:12px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr));gap:10px}
.fit{display:flex;flex-direction:column;gap:5px;min-width:0;padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:14px}
.fit h3{margin:0;font-size:15px}
.fit p,.how p{margin:0;color:var(--muted)}
.icon{width:34px;height:34px;border-radius:10px;background:var(--accent-soft);display:flex;align-items:center;justify-content:center}
.icon svg{width:20px;height:20px;stroke:var(--accent);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.band{background:var(--surface);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.band section{padding-block:26px}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:10px}
.card{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--bg);min-width:0}
.card h3{margin:0;font-size:18px}
.card p{margin:0;color:var(--muted);flex-grow:1}
.card .small{font-size:12px;color:var(--muted)}
.card .price{border-top:1px solid var(--line);padding-top:12px}
.ghost{display:inline-flex;align-items:center;min-height:40px;padding:0 18px;border:1.5px solid var(--accent);border-radius:8px;font-weight:700;text-decoration:none;align-self:flex-start}
.ghost:hover{background:var(--accent-soft)}
.how{display:flex;flex-direction:column;gap:8px;min-width:0;padding-top:16px;border-top:3px solid var(--accent)}
.how h3{margin:0;font-size:15px}
.prose{max-width:720px;display:flex;flex-direction:column;gap:8px}
.prose p{margin:0;color:var(--muted)}
.prose h3{font-size:17px;margin-top:8px}
.cta{display:flex;flex-direction:column;gap:14px;align-items:flex-start}
.cta .btn{background:var(--accent);color:var(--accent-fg)}

/* table */
.tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}
table{border-collapse:collapse;width:100%;min-width:860px;font-size:12px}
th,td{text-align:left;vertical-align:top;padding:8px 12px;border-bottom:1px solid var(--line)}
th{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);background:var(--bg)}
tr:last-child td{border-bottom:0}
td .name{font-weight:800;font-size:14px;display:block}
td .checked{font-size:12px;color:var(--muted)}
.yes{font-weight:700;color:var(--accent)}
.no{font-weight:700;color:var(--muted)}
td p{margin:0}
.crumbs{font-size:12px;color:var(--hero-muted)}
.crumbs a{color:var(--hero-muted)}

.disclosure{background:var(--hero);color:var(--hero-fg)}
.disclosure .wrap{padding-block:22px;display:flex;flex-direction:column;gap:12px}
.disclosure h2{font-size:20px;font-weight:800}
.disclosure p{margin:0;color:var(--hero-muted);max-width:680px}
footer{padding-block:12px;font-size:12px;color:var(--muted)}
footer p{margin:0 0 6px}
footer a{color:var(--muted)}
@media (max-width:560px){.panel{padding:20px}.big{font-size:29px}.hero{padding-block:14px 72px}}
/* ad slots: hidden until SITE.adsEnabled is true in vendors.js; they then reserve space so the page does not jump */
.ad[hidden]{display:none}
.ad{padding-block:2px 18px}
.ad-label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.ad-box{min-height:100px}
.ad-box:empty{border:1px dashed var(--line);border-radius:8px}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* ===== compact calculator: the whole tool fits on the first screen ===== */
.bar{padding-block:2px}
nav a{padding:8px 0}
.hero{padding-block:4px 12px;gap:4px}
.hero h1{font-size:clamp(19px,2.6vw,24px);line-height:1.15}
.hero .lead{font-size:13px}
.lift{margin-top:10px;padding-bottom:12px}
.panel{padding:10px 12px;gap:8px;border-radius:12px;box-shadow:var(--shadow)}
.controls{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(150px,.8fr) auto;gap:8px 20px;align-items:end}
.slider-head{gap:4px 12px;align-items:baseline}
.slider-head label,.field label{font-size:12px;font-weight:700;color:var(--muted)}
.big{font-size:18px}
input[type=range]{min-height:26px}
select{min-height:34px;min-width:0;width:100%;padding:0 8px}
.check{min-height:34px;font-size:13px}
details.row{padding:0;gap:0;display:block}
details.row>summary{list-style:none;display:grid;grid-template-columns:minmax(150px,200px) 1fr minmax(110px,150px) 14px;gap:4px 12px;align-items:center;padding:5px 10px;cursor:pointer}
details.row>summary::-webkit-details-marker{display:none}
details.row>summary:focus-visible{outline:3px solid var(--accent);outline-offset:-3px;border-radius:8px}
.who{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.nm{display:flex;align-items:center;gap:6px}
.nm strong{font-size:14px}
.who .plan{font-size:11px;color:var(--muted)}
.row .tag{font-size:10px;padding:1px 6px}
.row .track{height:7px;display:block}
.row .fill{height:7px;display:block}
.amt{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2;font-variant-numeric:tabular-nums}
.amt strong{font-size:14px}
.amt span{font-size:11px;color:var(--muted)}
.chev::before{content:"";display:block;width:6px;height:6px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:-3px 0 0 2px}
details[open] .chev::before{transform:rotate(225deg);margin-top:3px}
.detail{padding:0 10px 8px;font-size:12px;color:var(--muted)}
.detail a{font-weight:700;margin-left:6px}
#results{gap:4px}
.mini{margin:0;font-size:11px;color:var(--muted)}
@media (max-width:700px){
  .controls{grid-template-columns:1fr 1fr}
  .ctl-clients{grid-column:1 / -1}
  details.row>summary{grid-template-columns:1fr auto 14px}
  details.row>summary .track{grid-column:1 / -1;grid-row:2}
}

/* narrow windows: drop the extras so the calculator still fits the first screen */
@media (max-width:820px){
  .hero .lead,.mini{display:none}
  .hero{padding-block:2px 8px}
  .bar{flex-wrap:nowrap;gap:12px}
  nav{display:flex;gap:14px;overflow-x:auto;white-space:nowrap;min-width:0}
  nav a{padding:6px 0}
  .controls{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
  .ctl-clients{grid-column:1 / -1}
  details.row>summary{grid-template-columns:1fr auto 14px;padding:4px 10px}
  details.row>summary .track{display:none}
  .lift{margin-top:8px}
}

/* ===== fit-to-window sizing: calculator fills most of the first screen, scaling with window height ===== */
@media (min-width:821px){
  .hero{padding-block:clamp(6px,1.6vh,18px) clamp(14px,3vh,32px)}
  .hero h1{font-size:clamp(22px,3.6vh,34px)}
  .hero .lead{font-size:clamp(13px,1.7vh,16px)}
  nav a{padding-block:clamp(8px,1.4vh,14px)}
  .panel{padding:clamp(10px,1.8vh,22px) clamp(12px,1.6vw,24px);gap:clamp(8px,1.4vh,16px)}
  .slider-head label,.field label{font-size:clamp(12px,1.5vh,15px)}
  .big{font-size:clamp(18px,2.8vh,26px)}
  input[type=range]{min-height:clamp(26px,3.4vh,36px)}
  select{min-height:clamp(34px,4.4vh,46px);font-size:clamp(13px,1.7vh,16px)}
  .check{font-size:clamp(13px,1.7vh,16px)}
  #results{gap:clamp(4px,.9vh,10px)}
  details.row>summary{padding-block:clamp(5px,1.3vh,14px)}
  .nm strong,.amt strong{font-size:clamp(14px,2vh,19px)}
  .who .plan,.amt span{font-size:clamp(11px,1.5vh,14px)}
  .row .track,.row .fill{height:clamp(7px,1.1vh,12px)}
  .mini{font-size:clamp(11px,1.4vh,13px)}
}
