/* HomeSystemsSizing.com — warm slate/amber palette, mobile-first, system fonts, no libraries */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #1b2530;
  --ink-soft: #45525f;
  --muted: #6b7884;
  --line: #e0e5ea;
  --brand: #1f6f8b;
  --brand-dark: #15526a;
  --brand-soft: #e4f0f4;
  --accent: #e08a1e;
  --accent-soft: #fbeed6;
  --green: #1f9d6b;
  --green-soft: #e2f5ec;
  --amber: #c77f12;
  --amber-soft: #fbf0db;
  --red: #c0392b;
  --red-soft: #fbe7e4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(27,37,48,.06), 0 6px 20px rgba(27,37,48,.06);
  --maxw: 880px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 12px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.12rem; color: var(--ink); text-decoration: none;
  letter-spacing: -.01em;
}
.brand .logo {
  width: 26px; height: 26px; display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--brand-dark));
  border-radius: 7px;
  position: relative;
}
.brand .logo::after {
  content: ""; position: absolute; left: 6px; right: 6px; top: 6px; bottom: 6px;
  border: 2px solid rgba(255,255,255,.85); border-radius: 4px;
}
.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--brand); }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--brand-soft), #f6f7f9 70%);
  border-bottom: 1px solid var(--line);
  padding: 38px 0 30px;
}
.hero h1 { margin: 0 0 10px; font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--ink-soft); font-size: 1.08rem; max-width: 640px; }

h1 { font-size: 1.9rem; line-height: 1.18; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; margin-top: 1.8em; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; margin-top: 1.4em; }

/* Cards / sections */
main { padding: 28px 0 10px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.grid { display: grid; gap: 16px; }
@media (min-width: 620px) { .grid.cols-3 { grid-template-columns: repeat(3,1fr); } .grid.cols-2 { grid-template-columns: repeat(2,1fr); } }

.tool-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 26px rgba(27,37,48,.12); }
.tool-card h3 { margin: 0 0 6px; color: var(--ink); }
.tool-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.tool-card .pill { display:inline-block; margin-bottom:10px; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--brand-dark); background:var(--brand-soft); padding:3px 9px; border-radius:20px; }
.tool-card .pill.soon { color:var(--muted); background:#eef1f4; }
.tool-card.disabled { opacity:.72; cursor:default; }
.tool-card.disabled:hover { transform:none; border-color:var(--line); box-shadow:var(--shadow); }

/* Forms */
label { display: block; font-weight: 600; margin: 0 0 6px; font-size: .95rem; }
.field { margin-bottom: 16px; }
input[type=number], input[type=text], select {
  width: 100%; padding: 11px 12px; font-size: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-family: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline > .field { flex: 1 1 140px; margin-bottom: 0; }
.field-grid { display: grid; gap: 14px; }
@media (min-width: 560px){ .field-grid.two { grid-template-columns: repeat(2,1fr); } }

.mode-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 18px; flex-wrap:wrap; }
.mode-toggle button {
  border: 0; background: #fff; padding: 11px 16px; cursor: pointer;
  font-weight: 700; color: var(--ink-soft); font-family: inherit; font-size: .95rem;
}
.mode-toggle button.active { background: var(--brand); color: #fff; }

.btn {
  display: inline-block; background: var(--brand); color: #fff; border: 0;
  padding: 12px 20px; font-size: 1rem; font-weight: 700; border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit; text-decoration: none;
}
.btn:hover { background: var(--brand-dark); color:#fff; }
.btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn-block { width: 100%; }

/* Result panel */
.result { margin-top: 6px; }
.verdict { font-size: 1.25rem; font-weight: 800; margin: 6px 0; }
.verdict.ok { color: var(--green); }
.verdict.warn { color: var(--amber); }
.verdict.bad { color: var(--red); }
.stat-row { display: grid; gap: 12px; margin: 14px 0; }
@media (min-width: 520px){ .stat-row { grid-template-columns: repeat(3,1fr); } }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.stat .big { font-size: 1.4rem; font-weight: 800; color: var(--brand-dark); }
.stat .lbl { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.echo { font-size:.9rem; color:var(--ink-soft); margin:8px 0 0; }
.echo strong { color:var(--ink); }

/* Callout / answer box (GEO) */
.answer {
  background: var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 22px;
}
.answer p:first-child { margin-top: 0; }
.answer p:last-child { margin-bottom: 0; }
.note { font-size: .88rem; color: var(--muted); }
.disclaimer {
  background: var(--amber-soft); border: 1px solid #f0dcae; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: .88rem; color: #6f4e0d; margin: 18px 0;
}
.aff-slot {
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: 14px; margin: 18px 0; font-size: .92rem; color: var(--ink-soft);
}
.aff-slot strong { color: var(--ink); }
.aff-tag { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.prod-grid { display:grid; gap:12px; margin:12px 0 0; }
@media (min-width: 560px){ .prod-grid { grid-template-columns: repeat(3,1fr); } }
.prod {
  display:flex; flex-direction:column; border:1px solid var(--line); border-radius:var(--radius-sm);
  padding:12px; background:var(--bg); text-decoration:none; color:inherit;
}
.prod:hover { border-color:var(--accent); }
.prod .pname { font-weight:700; color:var(--ink); margin-bottom:4px; }
.prod .pmeta { font-size:.85rem; color:var(--muted); flex:1 1 auto; }
.prod .pcta { margin-top:10px; font-weight:700; color:var(--brand); font-size:.9rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { background: var(--brand-soft); color: var(--brand-dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }

/* Breadcrumbs */
.crumbs { font-size: .85rem; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 14px; margin-bottom: 10px; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; padding: 10px 0; }
.faq details[open] summary { color: var(--brand-dark); }

/* Footer */
.site-footer {
  background: var(--ink); color: #c4d0db; margin-top: 40px; padding: 30px 0;
  font-size: .92rem;
}
.site-footer a { color: #9fcede; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .cols { display: grid; gap: 18px; }
@media (min-width: 620px){ .site-footer .cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: #fff; margin: 0 0 8px; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .fine { margin-top: 18px; border-top: 1px solid #2a3744; padding-top: 14px; color: #8b9aa8; font-size: .82rem; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.center { text-align: center; }
.lead { font-size: 1.08rem; color: var(--ink-soft); }
ul.clean { padding-left: 1.1em; }
ul.clean li { margin-bottom: 6px; }
.hidden { display: none !important; }
