:root {
  --bg: #f4f8f7;
  --card: #ffffff;
  --ink: #14302b;
  --muted: #4a635e;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --line: #d5e5e1;
  --warn: #92400e;
  --warn-bg: #fff7ed;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20,48,43,.08);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9f5ef 0%, transparent 60%),
    radial-gradient(900px 400px at 100% 0%, #e8f2ff 0%, transparent 55%),
    var(--bg);
  line-height: 1.6;
  font-size: 1.05rem;
}
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { width: min(1080px, calc(100% - 2rem)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(244,248,247,.9);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 0; flex-wrap: wrap;
}
.brand { display: flex; gap: .75rem; align-items: center; text-decoration: none; color: inherit; }
.brand-mark {
  width: 2.5rem; height: 2.5rem; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #14b8a6, #0f766e); color: #fff; font-size: 1.2rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; }
.brand-text span { font-size: .85rem; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: .35rem .85rem; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .35rem .2rem; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.hero { padding: 2.5rem 0 1.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.2fr .9fr; align-items: center; } }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 .75rem; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.25rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.15rem; border-radius: 999px; font-weight: 700;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0d5f59; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem 1.35rem;
}
.panel { padding: 1.5rem 0 2.5rem; }
.grid-3 { display: grid; gap: 1rem; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); margin: 0 0 .75rem; }
h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.muted { color: var(--muted); }
.note, .caveat {
  background: var(--warn-bg); border: 1px solid #fdba74; color: var(--warn);
  border-radius: 12px; padding: .9rem 1rem; margin: 1rem 0;
}
.pill {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: .8rem; padding: .2rem .55rem; border-radius: 999px;
  margin-bottom: .6rem;
}
ul.check { padding-left: 1.1rem; }
ul.check li { margin: .35rem 0; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
th, td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #ecf8f5; font-size: .9rem; }
.site-footer {
  border-top: 1px solid var(--line); padding: 2rem 0; margin-top: 1rem;
  background: #eef6f4; color: var(--muted); font-size: .95rem;
}
.footer-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.2fr 1fr; } }
.fine { font-size: .85rem; }
label { display: block; font-weight: 650; margin: .85rem 0 .35rem; }
input, select {
  width: 100%; padding: .7rem .8rem; border-radius: 10px;
  border: 1px solid var(--line); font: inherit; background: #fff;
}
fieldset {
  border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin: 1rem 0 0;
}
legend { font-weight: 700; padding: 0 .35rem; }
.result {
  margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 12px;
  background: linear-gradient(180deg, #ecfdf8, #fff); border: 1px solid #99f6e4;
}
.result strong { font-size: 1.35rem; color: var(--accent); }
.sources a { color: var(--accent); }
label.inline { display: flex; gap: .5rem; align-items: flex-start; font-weight: 500; }
label.inline input { width: auto; margin-top: .25rem; }
/* ===== Contractor kit (calculator pages) ===== */
.calc-head h1 { margin: 0 0 .35rem; }
.calc-head .lede { margin-bottom: .8rem; }
.calc-grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
.calc-grid input, .calc-grid select, .calc-grid textarea { min-height: 48px; font-size: 16px; }
.calc-grid textarea { width: 100%; padding: .7rem .8rem; border-radius: 10px; border: 1px solid var(--line); font: inherit; min-height: 84px; }
.calc-grid label.inline { min-height: 44px; align-items: center; margin: .15rem 0; padding: .2rem 0; }
.calc-grid label.inline input { width: 1.4rem; height: 1.4rem; min-height: 0; margin: 0; flex: 0 0 auto; }
.row2 { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.row2 label { margin-top: .6rem; }
.row3 { display: grid; gap: .55rem; grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .4rem 0 .2rem; }
.chip, .seg label {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  padding: .45rem .85rem; border: 2px solid var(--line); border-radius: 999px; background: #fff;
  font-weight: 650; font-size: .95rem; cursor: pointer; color: var(--ink); margin: 0;
}
.chip:hover, .seg label:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg { display: flex; flex-wrap: wrap; gap: .45rem; border: 0; padding: 0; margin: .35rem 0 0; }
.seg legend { font-weight: 650; padding: 0; margin: .85rem 0 .35rem; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg input:checked + span { color: #fff; }
.seg label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-big { width: 100%; min-height: 54px; font-size: 1.1rem; margin-top: 1rem; }
.form-msg { color: var(--warn); font-weight: 650; margin: .6rem 0 0; }
details.ck { margin-bottom: 1rem; border: 2px solid var(--accent); }
details.ck summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: .5rem; align-items: center; min-height: 48px; }
details.ck summary::-webkit-details-marker { display: none; }
details.ck summary::after { content: "▾"; color: var(--muted); }
details.ck[open] summary::after { content: "▴"; }
.ck-state { font-size: .85rem; color: var(--muted); font-weight: 600; margin-left: auto; }
body.ck-mode .ck-state { color: var(--accent); }
body.ck-mode details.ck { box-shadow: 0 0 0 3px var(--accent-soft); }
.switch { display: flex; align-items: center; gap: .6rem; font-weight: 700; min-height: 44px; margin: .5rem 0; }
.switch input { width: 1.5rem; height: 1.5rem; min-height: 0; }
.ck-fields .fine { margin: .4rem 0 0; }
.ck-logo-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: .5rem 0; }
.ck-logo-preview { max-height: 48px; max-width: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; }
.ck-costs { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .6rem; }
.ck-costs h4 { margin: 0 0 .4rem; font-size: .95rem; }
.cost-grid { display: grid; gap: .45rem; }
.cost-grid .cost-row { display: grid; grid-template-columns: 4.5rem 1fr 1fr; gap: .4rem; align-items: center; }
.cost-grid .cost-row span { font-weight: 650; font-size: .9rem; }
.cost-grid input { min-height: 42px; }
.btn-sm { padding: .55rem .9rem; font-size: .92rem; min-height: 44px; }
.shared-banner { background: var(--accent-soft); border-radius: 12px; padding: .7rem 1rem; margin-bottom: .8rem; font-weight: 600; }
.sheet { padding: 1.25rem 1.3rem; scroll-margin-top: .5rem; }
@media (max-width: 899px) { body:has(.calc-grid) .site-header { position: static; } }
.sheet-brand { display: flex; gap: .8rem; align-items: center; border-bottom: 2.5px solid var(--accent); padding-bottom: .75rem; margin-bottom: .75rem; }
.sheet-brand > div { display: flex; flex-direction: column; gap: .1rem; }
.sheet-logo { max-height: 64px; max-width: 160px; object-fit: contain; }
.sheet strong.sheet-co { font-size: 1.3rem; color: var(--ink); letter-spacing: -0.01em; }
.sheet-meta { color: var(--muted); font-size: .92rem; }
.sheet-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .15rem; font-weight: 700; }
.sheet-stamp { font-size: .92rem; color: var(--muted); margin: 0 0 .85rem; }
.big { display: flex; flex-direction: column; background: var(--accent-soft); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: .85rem; }
.big-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.big-num { font-size: clamp(1.85rem, 6.5vw, 2.55rem); font-weight: 800; line-height: 1.12; color: var(--accent); letter-spacing: -0.02em; }
.big-sub { font-size: .95rem; color: var(--ink); margin-top: .3rem; }
.twin { display: grid; gap: .6rem; }
@media (min-width: 520px) { .twin { grid-template-columns: 1fr 1fr; } }
.twin > div { border: 1px solid var(--line); border-radius: 12px; padding: .65rem .85rem; background: #fff; }
.twin b { font-size: 1.15rem; color: var(--accent); }
.mini-label { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .15rem; }
.sheet-h { margin: 1.05rem 0 .5rem; font-size: 1.05rem; }
.shortlist { display: grid; gap: .6rem; }
@media (min-width: 620px) { .shortlist { grid-template-columns: repeat(3, 1fr); } }
.opt { border: 1px solid var(--line); border-radius: 12px; padding: .75rem .85rem; display: flex; flex-direction: column; gap: .15rem; background: #fff; }
.opt-rec { border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt-tier { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.result.sheet strong { font-size: inherit; color: inherit; }
.sheet .opt strong { font-size: 1.2rem; color: var(--ink); }
.opt-name { font-weight: 650; font-size: .92rem; }
.opt p { margin: .25rem 0 0; font-size: .88rem; color: var(--muted); }
.opt-price { margin: .45rem 0 0 !important; font-size: .9rem !important; font-weight: 700 !important; color: var(--ink) !important; border-top: 1px dashed var(--line); padding-top: .4rem; }
.edu-callout { background: #f8fafc; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: .65rem .85rem; margin: .7rem 0; font-size: .93rem; }
table.kv { box-shadow: none; font-size: .93rem; width: 100%; border-collapse: collapse; }
table.kv th { width: 34%; text-align: left; vertical-align: top; padding: .4rem .55rem; border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 650; }
table.kv td { padding: .4rem .55rem; border-bottom: 1px solid var(--line); }
table.room-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
ul.loadlist { columns: 2 220px; padding-left: 1.1rem; margin: .3rem 0; font-size: .93rem; }
.sheet-disclaimer { border: 2px solid #f59e0b; background: #fffbeb; color: #78350f; border-radius: 12px; padding: .85rem 1rem; margin: 1rem 0 .4rem; font-size: .93rem; }
.sheet-contact h3 { margin: .85rem 0 .3rem; font-size: 1.05rem; }
.sheet-contact p { margin: 0; }
.sheet-foot { font-size: .78rem; color: var(--muted); margin: .6rem 0 0; }
.photo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; margin: .4rem 0 .2rem; }
.photo-fig { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.photo-fig img { display: block; width: 100%; height: 120px; object-fit: cover; }
.photo-fig figcaption { font-size: .78rem; padding: .3rem .5rem; color: var(--muted); }
.photo-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.photo-chip { display: inline-flex; align-items: center; gap: .35rem; background: var(--accent-soft); border-radius: 999px; padding: .25rem .55rem .25rem .7rem; font-size: .85rem; font-weight: 650; }
.photo-chip button { border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; line-height: 1; color: var(--muted); min-height: 28px; min-width: 28px; }
.room-list { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-direction: column; gap: .45rem; }
.room-item { display: flex; justify-content: space-between; gap: .6rem; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; background: #fff; }
.mode-label { font-weight: 650; margin: .2rem 0 .15rem; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .4rem 0 .8rem; }
.actions .btn, .actions a.btn { min-height: 50px; width: 100%; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; box-sizing: border-box; }
@media (min-width: 520px) { .actions-3 { grid-template-columns: 1fr 1fr 1fr; } }
.handoff h2 { font-size: 1.2rem; }
.visit-box { border-left: 4px solid var(--accent); padding-left: .9rem; margin-top: .6rem; }
.ck-bar {
  position: fixed; left: .55rem; right: .55rem; bottom: .55rem; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  background: var(--ink); color: #fff; border-radius: 14px; padding: .55rem .6rem .55rem 1rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.ck-bar b { font-size: .98rem; line-height: 1.2; }
.ck-bar .btn { min-height: 44px; padding: .5rem .95rem; background: #fff; color: var(--ink); font-weight: 700; border: 0; border-radius: 10px; cursor: pointer; }
@media (min-width: 900px) { .ck-bar { display: none !important; } }
@media (max-width: 899px) { body.has-bar main { padding-bottom: 4.8rem; } }
.ck-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 5.2rem; z-index: 40; background: #111; color: #fff; padding: .65rem 1.05rem; border-radius: 10px; font-size: .95rem; max-width: 92vw; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
[hidden] { display: none !important; }
.print-only { display: none; }
@media print {
  @page { size: letter; margin: 11mm 12mm; }
  html, body { background: #fff !important; font-size: 9.4pt; line-height: 1.3; color: #111; }
  .opt p, .fine, .sheet-disclaimer, .edu-callout { font-size: 8.2pt !important; }
  .big { padding: .45rem .7rem !important; margin-bottom: .5rem !important; }
  .big-num { font-size: 20pt !important; }
  .sheet-h { margin: .4rem 0 .25rem !important; font-size: 10.5pt !important; }
  .sheet-brand { padding-bottom: .4rem !important; margin-bottom: .4rem !important; }
  .sheet-logo { max-height: 48px !important; }
  ul.loadlist { columns: 3 !important; font-size: 8pt; }
  table.kv th, table.kv td { padding: .22rem .4rem; font-size: 8.5pt; }
  .site-header, .site-footer, .skip, .no-print, .ck-bar, .ck-toast, #ck-shared { display: none !important; }
  main, .wrap, .panel { width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .calc-grid { display: block !important; }
  .sheet { display: block !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; background: #fff !important; page-break-inside: avoid; }
  .print-only { display: block !important; }
  .big { background: #f3f4f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .opt-rec { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .shortlist { grid-template-columns: repeat(3, 1fr) !important; display: grid !important; gap: .35rem !important; }
  .twin { grid-template-columns: 1fr 1fr !important; display: grid !important; }
  .opt, .twin > div, .big, .edu-callout, .sheet-disclaimer { break-inside: avoid; }
  .photo-fig img { height: 90px !important; }
  .opt-price { color: #111 !important; }
  a { color: #000; text-decoration: none; }
  .sheet-disclaimer { border-color: #999; background: #fff !important; color: #000; }
  .sheet-foot { margin-top: .35rem; }
}
