/* humidityinhouse.com — design system
   Generated pages share this sheet. Tokens first, then components. */

:root {
  --bg: #f6f9fb;
  --surface: #ffffff;
  --surface-alt: #eef4f8;
  --text: #10222e;
  --text-muted: #4d6373;
  --border: #d8e3ea;
  --border-soft: #e8eff4;
  --accent: #0f7d9b;
  --accent-dark: #0a5d74;
  --accent-soft: #e2f2f7;
  --dry: #b8721b;
  --ideal: #1c8d4c;
  --humid: #2f6fd0;
  --danger: #c0392b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 34, 46, .06), 0 8px 24px rgba(16, 34, 46, .06);
  --maxw: 1120px;
  --prose: 72ch;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d161c;
    --surface: #142129;
    --surface-alt: #1a2b35;
    --text: #e8f1f5;
    --text-muted: #9db3c0;
    --border: #243a46;
    --border-soft: #1c2f3a;
    --accent: #3fb6d4;
    --accent-dark: #63c9e2;
    --accent-soft: #16323c;
    --dry: #dfa257;
    --ideal: #4bc885;
    --humid: #6da5f0;
    --danger: #e97264;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.prose { max-width: var(--prose); }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.015em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 4.4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin-top: 0; }
h3 { font-size: 1.1rem; }
h4 { font-size: .97rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.02em;
  flex: none;
}
.brand b { color: var(--accent); }
.brand svg { color: var(--accent); }
.nav { display: flex; gap: 19px; flex-wrap: wrap; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--accent); }
@media (max-width: 700px) {
  .site-header .wrap { min-height: 54px; }
  .nav { gap: 14px; font-size: .86rem; }
  .nav a { font-size: .86rem; }
}

/* ---------- breadcrumbs ---------- */
.crumbs {
  font-size: .84rem;
  color: var(--text-muted);
  padding: 14px 0 0;
}
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.crumbs li { margin: 0; display: flex; gap: 7px; align-items: center; }
.crumbs li + li::before { content: "/"; color: var(--border); }
.crumbs a { text-decoration: none; }

/* ---------- page head ---------- */
.page-head { padding: 26px 0 30px; border-bottom: 1px solid var(--border); background: var(--surface); }
.page-head .lead { font-size: 1.1rem; color: var(--text-muted); max-width: var(--prose); margin-bottom: 0; }

.hero { background: linear-gradient(170deg, var(--accent-soft), transparent 72%); padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.hero .lead { font-size: 1.13rem; color: var(--text-muted); max-width: 62ch; }

/* ---------- sections ---------- */
section { padding: 46px 0; border-bottom: 1px solid var(--border-soft); }
section:last-of-type { border-bottom: 0; }
section > .wrap > p, section > .wrap > ul, section > .wrap > ol { max-width: var(--prose); }
section > .wrap > p { color: var(--text-muted); }
section > .wrap > p strong, li strong { color: var(--text); }

.grid { display: grid; gap: 16px; margin-top: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p, .card ul, .card ol { color: var(--text-muted); }
.card > :last-child { margin-bottom: 0; }

/* ---------- answer / verdict ---------- */
.answer-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  max-width: 74ch;
  margin: 24px 0;
}
.answer-box > :last-child { margin-bottom: 0; }
.answer-box strong { color: var(--accent-dark); }
.answer-box.warn { border-left-color: var(--danger); }
.answer-box.warn strong { color: var(--danger); }

/* ---------- humidity scale ---------- */
.scale { margin: 26px 0 6px; max-width: 780px; }
.scale-bar {
  display: flex; height: 44px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: #fff; text-align: center;
}
.scale-bar span { display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.s-vdry { background: #b8721b; flex: 3; }
.s-dry { background: #cf9440; flex: 1; }
.s-ok { background: #1c8d4c; flex: 2; }
.s-high { background: #3d7fd8; flex: 1; }
.s-vhigh { background: #29529c; flex: 4; }
.scale-ticks { display: flex; justify-content: space-between; font-size: .77rem; color: var(--text-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ---------- calculators ---------- */
.calc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin: 22px 0;
}
.calc-fields { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: .92rem; margin-bottom: 8px; gap: 10px; }
.field label output { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.1rem; color: var(--accent); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 26px; }
select, input[type="number"] {
  width: 100%; font: inherit; font-size: .95rem; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-alt); color: var(--text);
}
.unit-toggle { margin-top: 16px; display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--text-muted); flex-wrap: wrap; }
.unit-toggle button {
  font: inherit; font-weight: 600; font-size: .88rem; padding: 5px 13px;
  border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface-alt); color: var(--text-muted); cursor: pointer;
}
.unit-toggle button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.verdict {
  margin-top: 20px; padding: 17px 20px; border-radius: 10px;
  background: var(--surface-alt); border-left: 4px solid var(--accent);
}
.verdict h3 { margin: 0 0 6px; font-size: 1.12rem; }
.verdict p { margin: 0; color: var(--text-muted); }
.verdict p + p { margin-top: .6em; }
.verdict[data-state="dry"] { border-left-color: var(--dry); }
.verdict[data-state="dry"] h3 { color: var(--dry); }
.verdict[data-state="ideal"] { border-left-color: var(--ideal); }
.verdict[data-state="ideal"] h3 { color: var(--ideal); }
.verdict[data-state="humid"] { border-left-color: var(--humid); }
.verdict[data-state="humid"] h3 { color: var(--humid); }
.verdict[data-state="danger"] { border-left-color: var(--danger); }
.verdict[data-state="danger"] h3 { color: var(--danger); }

.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin-top: 16px; }
.readout { background: var(--surface-alt); border-radius: 9px; padding: 12px 14px; }
.readout dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 4px; }
.readout dd { margin: 0; font-size: 1.2rem; font-weight: 700; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.plan { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.plan-item {
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  padding: 13px 15px; background: var(--surface-alt); border-radius: 9px;
  border-left: 3px solid var(--accent);
}
.plan-item .tier {
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent); align-self: start; padding-top: 3px; white-space: nowrap;
}
.plan-item p { margin: 0; font-size: .93rem; color: var(--text-muted); }
.plan-item strong { color: var(--text); }
.plan-item[data-tier="free"] { border-left-color: var(--ideal); }
.plan-item[data-tier="free"] .tier { color: var(--ideal); }
.plan-item[data-tier="cheap"] { border-left-color: var(--dry); }
.plan-item[data-tier="cheap"] .tier { color: var(--dry); }
.plan-item[data-tier="kit"] { border-left-color: var(--humid); }
.plan-item[data-tier="kit"] .tier { color: var(--humid); }
.plan-item[data-tier="build"] { border-left-color: var(--danger); }
.plan-item[data-tier="build"] .tier { color: var(--danger); }

.plan-heading { margin: 24px 0 0; font-size: 1rem; }
.tier-heading { margin-top: 26px; }
.byline { margin: 14px 0 0; font-size: .87rem; color: var(--text-muted); }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; margin: 22px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
caption { text-align: left; padding: 15px 18px 2px; color: var(--text-muted); font-size: .87rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); font-size: .93rem; vertical-align: top; }
thead th {
  background: var(--surface-alt); font-size: .73rem; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); font-weight: 600;
}
tbody tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v-yes { color: var(--ideal); font-weight: 650; }
.v-mid { color: var(--dry); font-weight: 650; }
.v-no { color: var(--danger); font-weight: 650; }

/* ---------- steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 22px 0; display: flex; flex-direction: column; gap: 14px; }
.steps li {
  counter-increment: step; position: relative; padding-left: 46px; margin: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .85rem; font-weight: 700;
}
.steps h4 { margin: 3px 0 4px; }
.steps p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ---------- limits / mistakes ---------- */
.limit-list { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.limit-list li {
  margin: 0; padding: 14px 17px; background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--danger);
  border-radius: 0 9px 9px 0;
}
.limit-list strong { display: block; margin-bottom: 3px; }
.limit-list p { margin: 0; color: var(--text-muted); font-size: .93rem; }

/* ---------- key numbers ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 22px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 15px 17px; }
.stat dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 5px; }
.stat dd { margin: 0 0 4px; font-size: 1.3rem; font-weight: 700; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--accent-dark); }
.stat .note { font-size: .82rem; color: var(--text-muted); }

/* ---------- link lists / hubs ---------- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-top: 24px; }
.link-card {
  display: flex; flex-direction: column; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
}
.link-card:hover { border-color: var(--accent); color: inherit; }
.link-card h3 { margin: 0; font-size: 1.02rem; color: var(--accent); }
.link-card p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.link-card .meta { font-family: var(--mono); font-size: .74rem; color: var(--text-muted); letter-spacing: .03em; }

.related { background: var(--surface-alt); }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 18px 0 0; }
.related li { margin: 0; }
.related a { display: block; padding: 12px 15px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; text-decoration: none; font-size: .93rem; font-weight: 500; }
.related a:hover { border-color: var(--accent); }

/* ---------- faq ---------- */
details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 15px 19px; margin-bottom: 11px; box-shadow: var(--shadow);
}
details[open] { border-color: var(--accent); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: "\2212"; }
details p { margin: 11px 0 0; color: var(--text-muted); }

/* ---------- ad slots (reserved height, no CLS) ---------- */
.ad-slot {
  margin: 30px auto; max-width: 728px; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text-muted); font-size: .74rem; font-family: var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
}
@media (max-width: 620px) { .ad-slot { min-height: 250px; max-width: 320px; } }

/* ---------- notice ---------- */
.notice {
  margin: 22px 0 0; font-size: .87rem; color: var(--text-muted);
  border-top: 1px dashed var(--border); padding-top: 15px; max-width: var(--prose);
}

/* ---------- footer ---------- */
.site-footer { padding: 34px 0; color: var(--text-muted); font-size: .88rem; background: var(--surface); border-top: 1px solid var(--border); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 22px; margin-bottom: 24px; }
.footer-cols h2 { margin: 0 0 9px; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 5px; }
.footer-cols a { text-decoration: none; color: var(--text-muted); }
.footer-cols a:hover { color: var(--accent); }
.footer-base { border-top: 1px solid var(--border-soft); padding-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.footer-base p { margin: 0; }

/* ---------- 404 ---------- */
.center-page { min-height: 62vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; }
