/* Water Softener Ratings - analytical dashboard-report theme
   Chrome: slate #334155 | Data accents: sky #0ea5e9 | Cards: white
   Fonts: Chivo (UI/headlines), Roboto Slab (body). Tabular numerals on data. */

:root {
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --sky-600: #0284c7;
  --sky-500: #0ea5e9;
  --sky-400: #38bdf8;
  --sky-300: #7dd3fc;
  --sky-100: #e0f2fe;
  --sky-50: #f0f9ff;
  --green-700: #15803d;
  --green-50: #f0fdf4;
  --red-700: #b91c1c;
  --red-50: #fef2f2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.05);
  --font-ui: "Chivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Roboto Slab", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate-800);
  background: var(--slate-100);
  padding-bottom: 88px; /* room for sticky CTA bar */
}

h1, h2, h3, h4, .btn, nav, table th, .kicker, .stat-num, .num {
  font-family: var(--font-ui);
}

.num, td.score, .score-big, .stat-num, .weight-val, .scale-band {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

a { color: var(--sky-600); }
a:hover { color: var(--sky-500); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--sky-500);
  color: #fff; padding: 8px 14px; z-index: 100; font-family: var(--font-ui);
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Top data strip ---------- */
.data-strip {
  background: var(--slate-900);
  color: var(--slate-400);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.data-strip .wrap {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap;
}
.data-strip strong { color: var(--sky-400); font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  background: var(--slate-700);
  color: #fff;
  border-bottom: 3px solid var(--sky-500);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; }
.brand svg { display: block; flex: 0 0 auto; }
.brand-name {
  font-family: var(--font-ui); font-weight: 900; font-size: 19px;
  letter-spacing: 0.01em; line-height: 1.15; text-transform: uppercase;
}
.brand-sub {
  display: block; font-weight: 400; font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sky-300);
}
.site-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.site-nav a {
  color: var(--slate-200); text-decoration: none; font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 4px 2px; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a.active { color: #fff; border-bottom-color: var(--sky-400); }
.site-nav a.nav-phone { color: var(--sky-300); }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(248, 250, 252, 0.92), rgba(248, 250, 252, 0.92)),
    linear-gradient(var(--slate-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--slate-200) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  background-color: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
  padding: 54px 0 46px;
}
.kicker {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky-600);
  border: 1px solid var(--sky-300); background: var(--sky-50);
  padding: 4px 10px; border-radius: 3px; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 46px); font-weight: 900; line-height: 1.08;
  color: var(--slate-900); max-width: 21ch;
}
.hero h1 .accent { color: var(--sky-600); }
.hero-sub {
  margin-top: 18px; max-width: 62ch; font-size: 17px; color: var(--slate-700);
}
.hero-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 15px;
  letter-spacing: 0.02em; padding: 13px 22px; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--sky-500); color: #fff; }
.btn-primary:hover { background: var(--sky-600); color: #fff; }
.btn-ghost { background: transparent; color: var(--slate-700); border-color: var(--slate-400); }
.btn-ghost:hover { border-color: var(--slate-700); color: var(--slate-900); }

.stat-row {
  margin-top: 36px; display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.stat {
  background: #fff; border: 1px solid var(--slate-200); border-top: 3px solid var(--sky-500);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-num { font-size: 28px; font-weight: 900; color: var(--slate-900); line-height: 1.1; }
.stat-label {
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-500);
  margin-top: 4px;
}

/* ---------- Report sections ---------- */
.section { padding: 52px 0 8px; }
.section-head { margin-bottom: 22px; }
.fig-ref {
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky-600);
}
.section-head h2 {
  font-size: clamp(23px, 3vw, 30px); font-weight: 900; color: var(--slate-900);
  margin-top: 4px; line-height: 1.15;
}
.section-head p { margin-top: 8px; max-width: 68ch; color: var(--slate-700); }

.card {
  background: #fff; border: 1px solid var(--slate-200);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- Ratings table ---------- */
.table-card { overflow: hidden; }
.table-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; padding: 14px 18px; background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}
.table-toolbar .tt-title {
  font-family: var(--font-ui); font-weight: 700; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate-700);
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.legend li {
  list-style: none; display: flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: 12px; color: var(--slate-500);
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.ratings {
  border-collapse: collapse; width: 100%; min-width: 860px;
  font-size: 14.5px;
}
table.ratings caption, table.scale caption {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
table.ratings th, table.ratings td {
  padding: 12px 14px; text-align: center; vertical-align: middle;
  border-bottom: 1px solid var(--slate-200);
}
table.ratings thead th {
  background: var(--slate-700); color: #fff; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.3;
}
table.ratings thead th .w {
  display: block; color: var(--sky-300); font-size: 10.5px; letter-spacing: 0.1em;
}
table.ratings th[scope="row"], table.ratings td.provider {
  text-align: left; font-family: var(--font-ui); font-weight: 700;
  color: var(--slate-900); white-space: nowrap;
}
table.ratings tbody tr:nth-child(even) { background: var(--slate-50); }
table.ratings td.score { font-family: var(--font-ui); font-weight: 700; font-size: 16px; color: var(--slate-800); }
table.ratings td.total { font-family: var(--font-ui); font-weight: 900; }
table.ratings td.total .ns { color: var(--slate-400); font-weight: 700; font-size: 13px; }

tr.top-pick {
  background: var(--sky-50) !important;
  box-shadow: inset 4px 0 0 var(--sky-500);
}
tr.top-pick th[scope="row"] { color: var(--sky-600); }
.rank-badge {
  display: inline-block; background: var(--sky-500); color: #fff;
  font-size: 11px; font-weight: 900; border-radius: 3px; padding: 2px 7px;
  margin-right: 8px; letter-spacing: 0.05em; vertical-align: 1px;
}
.score-big {
  font-size: 20px; font-weight: 900; color: var(--sky-600); white-space: nowrap;
}
.score-big small { font-size: 12px; color: var(--slate-500); font-weight: 700; }

/* Dots */
.dot {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  vertical-align: middle;
}
.dot-strong { background: var(--sky-500); border: 2px solid var(--sky-500); }
.dot-adequate {
  border: 2px solid var(--sky-500);
  background: linear-gradient(90deg, var(--sky-500) 50%, #fff 50%);
}
.dot-varies { background: #fff; border: 2px dashed var(--slate-400); }
.dot-cell { line-height: 1.2; }
.dot-cell .dot-label {
  display: block; font-family: var(--font-ui); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-500);
  margin-top: 4px;
}

.table-foot {
  padding: 13px 18px; font-size: 13px; color: var(--slate-500);
  background: var(--slate-50); border-top: 1px solid var(--slate-200);
}
.table-foot strong { color: var(--slate-700); }

/* ---------- Weights bars ---------- */
.weights-card { padding: 24px 24px 18px; }
.weight-row {
  display: grid; grid-template-columns: 250px 1fr 56px; align-items: center;
  gap: 14px; padding: 9px 0;
}
.weight-name {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 700;
  color: var(--slate-800); line-height: 1.25;
}
.weight-track { background: var(--slate-100); border-radius: 4px; height: 22px; overflow: hidden; }
.weight-bar { height: 100%; border-radius: 4px 0 0 4px; background: var(--sky-500); }
.weight-bar.alt { background: var(--sky-400); }
/* Bar widths proportional to criterion weight: 25% -> 100%, 20% -> 80%, 15% -> 60% */
.wb-100 { width: 100%; }
.wb-80 { width: 80%; }
.wb-60 { width: 60%; }
.weight-val {
  font-family: var(--font-ui); font-weight: 900; font-size: 15px;
  color: var(--slate-700); text-align: right;
}
.weights-note { margin-top: 12px; font-size: 13px; color: var(--slate-500); }

/* Stacked 100% bar (methodology) */
.stacked-bar {
  display: flex; width: 100%; height: 40px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--slate-200);
}
.stacked-bar .seg {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-ui); font-weight: 900; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.seg-1 { background: var(--sky-600); }
.seg-2 { background: var(--sky-500); }
.seg-3 { background: var(--sky-400); }
.seg-4 { background: var(--slate-700); }
.seg-5 { background: var(--slate-500); }
/* Segment widths equal the exact criterion weights (sum: 100%) */
.stacked-bar .seg-1, .stacked-bar .seg-2 { width: 25%; }
.stacked-bar .seg-3 { width: 20%; }
.stacked-bar .seg-4, .stacked-bar .seg-5 { width: 15%; }
.stacked-legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.stacked-legend li {
  list-style: none; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 13px; color: var(--slate-700);
}
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- Top pick + quote form ---------- */
.pick-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; overflow: hidden; }
.pick-info { padding: 28px 30px; }
.pick-info h3 { font-size: 24px; font-weight: 900; color: var(--slate-900); }
.pick-score-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.pick-facts { margin: 18px 0 0; padding: 0; }
.pick-facts li {
  list-style: none; padding: 8px 0 8px 26px; position: relative;
  border-bottom: 1px dashed var(--slate-200); font-size: 15px;
}
.pick-facts li:last-child { border-bottom: none; }
.pick-facts li::before {
  content: ""; position: absolute; left: 2px; top: 15px;
  width: 12px; height: 12px; border-radius: 3px; background: var(--sky-500);
  clip-path: polygon(14% 44%, 0 60%, 40% 100%, 100% 16%, 84% 2%, 40% 70%);
}
.pick-links { margin-top: 16px; font-family: var(--font-ui); font-size: 14px; }

.quote-panel {
  background: var(--slate-700); color: #fff; padding: 28px 30px;
}
.quote-panel h3 { font-size: 20px; font-weight: 900; }
.quote-panel .qp-sub { color: var(--slate-200); font-size: 14px; margin-top: 6px; }
.quote-form { margin-top: 18px; }
.quote-form label {
  display: block; font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-300);
  margin: 14px 0 5px;
}
.quote-form input {
  width: 100%; padding: 12px 13px; border-radius: 6px; border: 1px solid var(--slate-500);
  background: #fff; color: var(--slate-900); font-family: var(--font-body); font-size: 15px;
}
.quote-form input:focus { outline: 3px solid var(--sky-400); border-color: var(--sky-400); }
.quote-form button { width: 100%; margin-top: 18px; border: none; }
.quote-form button[disabled] { opacity: 0.6; cursor: wait; }
.q-note { font-size: 12.5px; color: var(--slate-400); margin-top: 12px; }
.form-msg { margin-top: 14px; font-size: 14.5px; border-radius: 6px; padding: 0; }
.form-msg.ok { background: var(--green-50); color: var(--green-700); padding: 12px 14px; }
.form-msg.err { background: var(--red-50); color: var(--red-700); padding: 12px 14px; }
.form-msg a { color: inherit; font-weight: 700; }

/* ---------- Provider profile cards ---------- */
.profile-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.profile {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.profile.top { border: 2px solid var(--sky-500); background: var(--sky-50); }
.profile-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.profile-head h3 { font-size: 17px; font-weight: 900; color: var(--slate-900); line-height: 1.25; }
.profile-score {
  font-family: var(--font-ui); font-weight: 900; font-size: 15px; color: var(--sky-600);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.profile-pending {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--slate-400); white-space: nowrap; text-align: right;
}
.profile p { font-size: 14px; color: var(--slate-700); }
.profile-meta {
  margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--slate-200);
  font-family: var(--font-ui); font-size: 12.5px; color: var(--slate-500);
}
.profile-meta a { font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-family: var(--font-ui);
  font-weight: 700; font-size: 15.5px; color: var(--slate-900); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 20px; color: var(--sky-500); font-weight: 900; flex: 0 0 auto;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--slate-700); font-size: 14.5px; }

/* ---------- Methodology page ---------- */
.method-hero { padding: 44px 0 36px; }
.criteria-list { display: grid; gap: 16px; }
.criterion { padding: 22px 24px; }
.criterion-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.criterion-head h3 { font-size: 19px; font-weight: 900; color: var(--slate-900); }
.criterion-weight {
  font-family: var(--font-ui); font-weight: 900; font-size: 17px; color: var(--sky-600);
  font-variant-numeric: tabular-nums;
}
.criterion p { margin-top: 8px; font-size: 14.5px; color: var(--slate-700); }
.criterion ul { margin: 10px 0 0 18px; font-size: 14px; color: var(--slate-700); }
.criterion li { margin: 4px 0; }

table.scale { border-collapse: collapse; width: 100%; font-size: 14.5px; }
table.scale th, table.scale td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--slate-200); }
table.scale thead th {
  background: var(--slate-700); color: #fff; font-family: var(--font-ui);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
}
table.scale tbody tr:nth-child(even) { background: var(--slate-50); }
.scale-band { font-family: var(--font-ui); font-weight: 900; color: var(--sky-600); white-space: nowrap; }

.statement {
  border-left: 4px solid var(--sky-500); padding: 22px 26px;
}
.statement p { color: var(--slate-700); font-size: 15px; }
.statement p + p { margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px; background: var(--slate-800); color: var(--slate-400);
  padding: 36px 0 30px; font-size: 13.5px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.site-footer h4 {
  color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.site-footer a { color: var(--sky-300); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { list-style: none; }
.footer-links li { margin: 6px 0; }
.disclosure {
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--slate-700);
  font-size: 12.5px; line-height: 1.7; color: var(--slate-400);
}

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--slate-900); border-top: 3px solid var(--sky-500);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.25);
}
.sticky-cta .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap;
}
.sticky-msg {
  color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 14.5px;
}
.sticky-msg .sub { display: block; color: var(--slate-400); font-weight: 400; font-size: 12px; }
.sticky-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sticky-actions .btn { padding: 10px 18px; font-size: 14px; }
.sticky-phone {
  color: var(--sky-300); font-family: var(--font-ui); font-weight: 700;
  font-size: 14px; text-decoration: none; white-space: nowrap;
}
.sticky-phone:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick-grid { grid-template-columns: 1fr; }
  .weight-row { grid-template-columns: 1fr 56px; }
  .weight-name { grid-column: 1 / -1; padding-top: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { padding-bottom: 118px; }
  .site-header .wrap { justify-content: center; text-align: center; }
  .site-nav { justify-content: center; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 36px; }
  .section { padding: 40px 0 6px; }
  .sticky-cta .wrap { justify-content: center; text-align: center; }
  .data-strip .wrap { justify-content: center; }
}
