/*
 * /water-hardness (Nov 11 2026): the ZIP lookup and the softest-to-hardest chart. The card itself uses the
 * age lookup's classes (page-wh-age.css, loaded first); only what's new is here.
 * Colors follow the USGS categories: soft, moderately hard, hard, very hard.
 */
:root { --whd-soft: #cfe7f7; --whd-moderate: #cdeccf; --whd-hard: #fbe3a6; --whd-very: #f6c0a0; }
.whd-c--soft { background: var(--whd-soft); }
.whd-c--moderate { background: var(--whd-moderate); }
.whd-c--hard { background: var(--whd-hard); }
.whd-c--very { background: var(--whd-very); }
.whd-pill.whd-c--soft { color: #18507a; }
.whd-pill.whd-c--moderate { color: #24612b; }
.whd-pill.whd-c--hard { color: #7a5208; }
.whd-pill.whd-c--very { color: #8a3a0c; }
.whd-input { text-transform: none; letter-spacing: .02em; }

/* one supplier in the result */
.whd-sup { display: grid; gap: 8px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.whd-sup:last-of-type { border-bottom: 0; padding-bottom: 0; }
.whd-sup__name { margin: 0; font: 700 17px/1.3 var(--font-sans); color: var(--ink); }
.whd-sup__name span { display: block; font-weight: 500; font-size: 14px; color: var(--muted); margin-top: 2px; }
.whd-sup .wa-out__date { margin: 0; }
.whd-sup__sub { margin: 0; font-size: 15px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.whd-sup__sub .wa-out__age { margin: 0; }
.whd-srcs { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; color: var(--ink-2); }
.whd-srcs b { color: var(--ink); font-family: var(--font-mono); font-weight: 600; }
.whd-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.whd-note b { color: var(--ink); }

/* the meter: four colored bands, a dot for one number or a bar for a range */
.whd-meter { display: grid; gap: 6px; }
.whd-meter__track { position: relative; height: 14px; border-radius: var(--radius-pill); overflow: visible; }
.whd-meter__track > i { position: absolute; top: 0; bottom: 0; }
.whd-meter__track > i:first-child { border-radius: 999px 0 0 999px; }
.whd-meter__track > i:nth-child(4) { border-radius: 0 999px 999px 0; }
.whd-meter__dot { transition: none; }
.whd-meter__range { position: absolute; top: -5px; bottom: -5px; border-radius: 999px; background: rgba(21, 32, 43, .82); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(21, 32, 43, .3); }
.whd-meter .wa-meter__scale span { flex: 0 0 auto; }
.whd-meter .wa-meter__scale { position: relative; height: 12px; display: block; }
.whd-meter .wa-meter__scale span { position: absolute; transform: translateX(-50%); }
.whd-meter .wa-meter__scale span:nth-child(1) { left: 0; transform: none; }
.whd-meter .wa-meter__scale span:nth-child(2) { left: 10%; }
.whd-meter .wa-meter__scale span:nth-child(3) { left: 20%; }
.whd-meter .wa-meter__scale span:nth-child(4) { left: 30%; }
.whd-meter .wa-meter__scale span:nth-child(5) { left: 50%; }
.whd-meter .wa-meter__scale span:nth-child(6) { right: 0; left: auto; transform: none; }

/* softest to hardest */
.whd-rank { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(10px, 1.6vw, 18px); }
.whd-rank__row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .8fr); gap: 8px 18px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.whd-rank__row:last-child { border-bottom: 0; }
.whd-rank__name { font: 700 15px/1.3 var(--font-sans); color: var(--ink); text-decoration: none; }
.whd-rank__name:hover { color: var(--blue); text-decoration: underline; }
.whd-rank__where { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.whd-rank__bar { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--whd-soft) 0 10%, var(--whd-moderate) 10% 20%, var(--whd-hard) 20% 30%, var(--whd-very) 30% 100%); opacity: .55; }
.whd-rank__fill { position: absolute; top: -3px; bottom: -3px; border-radius: 999px; background: var(--ink) !important; opacity: 1; min-width: 10px; box-shadow: 0 0 0 2px #fff; }
.whd-rank__row:hover .whd-rank__bar { opacity: .85; }
.whd-rank__val { font-size: 13px; color: var(--muted); line-height: 1.35; }
.whd-rank__val b { display: block; font: 700 15px/1.25 var(--font-mono); color: var(--ink); }
@media (max-width: 720px) {
  .whd-rank__row { grid-template-columns: minmax(0, 1fr) auto; }
  .whd-rank__bar { grid-column: 1 / -1; grid-row: 2; }
  .whd-rank__val { text-align: right; }
}

/* the scale cards */
.whd-scale { display: grid; gap: 10px; }
@media (min-width: 760px) { .whd-scale { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.whd-scale .dp-card { border-top: 6px solid transparent; }
.whd-scale .dp-card.whd-b--soft { border-top-color: #9ccbe9; }
.whd-scale .dp-card.whd-b--moderate { border-top-color: #9bd3a0; }
.whd-scale .dp-card.whd-b--hard { border-top-color: #f2c656; }
.whd-scale .dp-card.whd-b--very { border-top-color: #ec9a6b; }
.whd-tops { display: grid; gap: 10px; margin: 0 0 clamp(16px, 2.5vw, 26px); padding: 0; list-style: none; }
@media (min-width: 760px) { .whd-tops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.whd-tops li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.whd-tops b { color: var(--ink); }

/* every town, A to Z (the links that let Google find each town page) */
.whd-towns { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.whd-towns a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); transition: border-color .12s; }
.whd-towns a:hover { border-color: var(--blue); }
.whd-towns b { font-weight: 700; font-size: 15px; color: var(--ink); }
.whd-towns span { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--font-mono); color: var(--muted); white-space: nowrap; }
.whd-towns li[aria-current] a { border-color: var(--blue); background: var(--blue-tint); }
.whd-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(21, 32, 43, .15); }
