/* Softspoken Water Co. layout.
   Color, type, radius and spacing come from tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-m);
  font-weight: 400;
  line-height: var(--leading-body);
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-head);
  line-height: var(--leading-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--head-l);
  font-weight: 800;
}

h2 {
  font-size: var(--head-m);
  font-weight: 800;
}

h3 {
  font-size: var(--head-s);
  font-weight: 700;
}

p,
li,
dd {
  max-width: var(--measure);
}

a {
  color: var(--link);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

::selection {
  background: var(--mist);
  color: var(--ink);
}

.wrap {
  width: min(100%, var(--wrap));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: var(--s-3);
  z-index: 50;
  transform: translateY(-150%);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: var(--s-2) var(--s-4);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.icon {
  width: var(--s-5);
  height: var(--s-5);
  display: block;
  flex: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100%, var(--wrap));
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--s-8);
  max-height: 4.5rem;
}

.logo {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 0;
}

.logo img {
  width: auto;
  height: auto;
  max-height: var(--s-6);
  max-width: 100%;
}

.nav-wide {
  display: none;
  flex: none;
  align-items: center;
  gap: var(--s-5);
}

.nav-wide a,
.nav-panel a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-s);
  white-space: nowrap;
}

.nav-wide a:hover,
.nav-panel a:hover,
.nav-wide a[aria-current="page"],
.nav-panel a[aria-current="page"] {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.header-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--s-3);
  margin-left: auto;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink);
  font-size: var(--text-s);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--link);
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 2.75rem;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-control);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-s);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms, color 150ms, border-color 150ms;
}

.btn-primary {
  background: var(--copper);
  color: var(--on-copper);
}

.btn-primary:hover {
  background: var(--copper-deep);
  color: var(--on-copper);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--link);
  color: var(--ink);
}

.nav-menu {
  position: relative;
  display: block;
}

.nav-menu summary {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 2.75rem;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--text-s);
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s-2));
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  width: min(20rem, calc(100vw - 2 * var(--gutter)));
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  max-height: calc(100vh - 5rem);
  max-height: calc(100dvh - 5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-panel .btn {
  width: 100%;
}

.nav-panel nav {
  display: flex;
  flex-direction: column;
}

.nav-panel nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--s-2);
}

.action-bar {
  display: none;
}

main {
  display: block;
}

.section {
  padding-block: var(--s-8);
}

.mist-band {
  background: var(--mist);
}

.lead {
  font-size: var(--text-l);
  max-width: var(--measure);
}

.stack > * + * {
  margin-top: var(--s-4);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

.hero {
  padding-top: var(--s-7);
  padding-bottom: var(--s-6);
}

.hero > .wrap {
  width: min(100%, var(--wrap));
}

.home h1 {
  font-size: var(--head-xl);
  text-wrap: balance;
}

.home h2 {
  font-size: var(--head-l);
}

.home .section-intro > p {
  font-size: var(--text-l);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  min-width: 0;
}

.hero-copy .actions {
  margin-top: 0;
}

.icon-rows {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  margin-top: var(--s-5);
}

.icon-row {
  display: grid;
  grid-template-columns: var(--s-7) minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
}

.icon-mark {
  display: grid;
  place-items: center;
  width: var(--s-7);
  height: var(--s-7);
  background: var(--mist);
  color: var(--ink);
  border-radius: var(--r-control);
}

.icon-mark .icon {
  width: calc(var(--s-6) - var(--s-1));
  height: calc(var(--s-6) - var(--s-1));
}

.icon-row h3,
.qa h3,
.wont h3,
.step-row h3,
.system h3 {
  font-size: var(--head-s);
  margin-bottom: var(--s-2);
}

.nuisance-close {
  margin-top: var(--s-5);
}

.mini-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  margin-top: var(--s-5);
  max-width: none;
  font-weight: 700;
}

.mini-flow .icon {
  color: var(--ink-2);
}

.system-stack {
  display: grid;
  gap: var(--s-4);
  min-width: 0;
}

.systems {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-5);
}

.system {
  min-width: 0;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.system--lead {
  background: var(--mist);
  border-color: transparent;
  padding: var(--s-6);
}

.system p,
.icon-row p,
.wont p,
.step-row p,
.provider p,
.timeline p {
  max-width: none;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  list-style: none;
  padding: 0;
  margin-top: var(--s-4);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.pill:hover {
  border-color: var(--link);
  color: var(--link);
}

.step-row {
  list-style: none;
  padding: 0;
  margin-top: var(--s-5);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
}

.step-row li {
  min-width: 0;
  padding-left: var(--s-4);
  border-left: 1px solid var(--line);
}

.step-row .icon-mark {
  margin-bottom: var(--s-3);
}

.wont-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-5);
}

.qa-list {
  margin-top: var(--s-5);
}

.qa {
  padding-top: var(--s-4);
  margin-top: var(--s-4);
  border-top: 1px solid var(--line);
  max-width: 70ch;
}

.qa-list > .qa:first-child {
  margin-top: 0;
}

.qa-block .qa {
  max-width: none;
}

.qa p {
  max-width: var(--measure);
}

.closing {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s-7) var(--s-5);
  text-align: center;
}

.closing h2,
.closing p {
  max-width: none;
}

.closing .actions {
  justify-content: center;
}

.section-intro {
  max-width: var(--measure);
  margin-bottom: var(--s-5);
}

.section-intro h2 {
  margin-bottom: var(--s-4);
}

.prose {
  max-width: 46rem;
}

.wrap.prose {
  max-width: var(--wrap);
}

.prose > * + * {
  margin-top: var(--s-4);
}

.prose > * + h2,
.prose > * + .qa-block {
  margin-top: var(--s-7);
}

.prose > ul + p,
.prose > ol + p,
.step-row + p {
  margin-top: var(--s-5);
}

.crumbs {
  font-size: var(--text-s);
  color: var(--ink-3);
}

.page-top > .crumbs {
  margin-bottom: var(--s-4);
}

.prose > .crumbs + * {
  margin-top: 0;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  max-width: none;
}

.crumbs li + li {
  margin-top: 0;
}

.crumbs li + li::before {
  content: "/";
  color: var(--ink-3);
}

.crumbs a {
  color: var(--link);
}

.service-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.prose ul,
.prose ol {
  padding-left: var(--s-5);
}

.prose li + li {
  margin-top: var(--s-2);
}

.prose a,
.source-line a,
.quiet a {
  overflow-wrap: anywhere;
}

blockquote {
  padding-left: var(--s-4);
  border-left: 1px solid var(--line);
  max-width: var(--measure);
}

.layout-service {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  padding-block: var(--s-7);
}

.service-intro {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  min-width: 0;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.side-panel .btn {
  width: 100%;
}

.glance {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.glance li {
  max-width: none;
}

.glance span {
  display: block;
  font-weight: 600;
  font-size: var(--text-s);
  color: var(--ink-2);
}

.page-top {
  padding-top: var(--s-7);
  padding-bottom: var(--s-4);
}

.page-top h1 {
  margin-bottom: var(--s-4);
}

.figure {
  margin-block: var(--s-5);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  min-width: 0;
}

.figure--compact {
  margin: 0;
  border: 0;
  box-shadow: var(--shadow-card);
}

.figure--compact .hard-chart {
  grid-template-columns: minmax(9rem, 11.5rem) minmax(0, 1fr) auto;
}

.figure--compact .hard-label {
  overflow-wrap: normal;
  word-break: normal;
}

.figure-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--head-s);
  letter-spacing: var(--tracking-head);
  line-height: var(--leading-tight);
  margin-bottom: var(--s-2);
}

.figure-sub {
  color: var(--ink-2);
  max-width: var(--measure);
  margin-bottom: var(--s-4);
}

.hard-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-4);
}

.hard-legend li {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  max-width: none;
  font-size: var(--text-s);
  font-weight: 600;
}

.swatch {
  width: var(--s-4);
  height: var(--s-4);
  border-radius: var(--r-control);
  flex: none;
}

.swatch--1 { background: var(--data-1); }
.swatch--2 { background: var(--data-2); }
.swatch--3 { background: var(--data-3); }
.swatch--4 { background: var(--data-4); }

.hard-classes {
  display: none;
}

.hard-chart {
  display: grid;
  grid-template-columns: minmax(0, 11.5rem) minmax(calc(var(--s-10) + var(--s-7)), 1fr) auto;
  column-gap: var(--s-3);
  align-items: center;
  width: 100%;
}

.hard-rows {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: subgrid;
  row-gap: var(--s-3);
  list-style: none;
  padding: 0;
  margin: 0;
}

.hard-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
}

.hard-classbar {
  display: grid;
  grid-template-columns: 17.5% 17.5% 17.5% 47.5%;
  min-height: var(--s-3);
}

.hard-class {
  min-height: var(--s-3);
  padding: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.hard-class--soft { background: var(--data-1); }
.hard-class--mod { background: var(--data-2); }
.hard-class--hard { background: var(--data-3); }
.hard-class--very { background: var(--data-4); }

.hard-label {
  font-weight: 600;
  min-width: 0;
}

.hard-track {
  position: relative;
  min-width: 0;
  height: calc(var(--s-5) - (var(--s-1) / 2));
  border-radius: var(--r-control);
  overflow: hidden;
  background: var(--paper);
}

.hard-bands {
  position: absolute;
  inset: 0;
  display: flex;
}

.hard-band--soft { width: 17.5%; background: var(--data-1); }
.hard-band--mod { width: 17.5%; background: var(--data-2); }
.hard-band--hard { width: 17.5%; background: var(--data-3); }
.hard-band--very { width: 47.5%; background: var(--data-4); }

.hard-bar {
  position: absolute;
  top: 50%;
  height: calc(var(--s-4) - (var(--s-1) / 2));
  border-radius: var(--s-5);
  background: var(--data);
  transform: translateY(-50%);
}

.hard-bar--dot {
  width: calc(var(--s-4) - (var(--s-1) / 2));
  transform: translate(-50%, -50%);
}

.hard-bar--wentzville-wells { left: 86.5%; }
.hard-bar--ofallon { left: 36%; width: 46.5%; }
.hard-bar--pwsd2 { left: 41.5%; width: 12.5%; }
.hard-bar--st-peters { left: 50.5%; }
.hard-bar--st-charles { left: 44.5%; }
.hard-bar--missouri-american {
  left: 25%;
  width: 10%;
  background: transparent;
  border: 1px solid var(--data);
}

.hard-row--dim .hard-bar {
  opacity: 0.55;
}

.hard-row--dim .hard-label,
.hard-row--dim .hard-value {
  color: var(--ink-2);
}

.hard-value {
  justify-self: end;
  max-width: var(--s-10);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.hard-value strong {
  font-weight: 700;
}

.hard-unit,
.hard-note {
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--ink-2);
}

.hard-note {
  display: block;
}

.hard-axis {
  grid-column: 2;
  grid-row: 2;
  margin-top: var(--s-2);
  min-width: 0;
}

.hard-ticks {
  display: block;
  position: relative;
  width: 100%;
  height: var(--s-5);
}

.hard-tick {
  position: absolute;
  top: 0;
  font-size: var(--text-s);
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.hard-tick--0 { left: 0; }
.hard-tick--35 { left: 17.5%; transform: translateX(-50%); }
.hard-tick--7 { left: 35%; transform: translateX(-50%); }
.hard-tick--105 { left: 52.5%; transform: translateX(-50%); }
.hard-tick--20 { right: 0; }

.source-line {
  margin-top: var(--s-4);
  color: var(--ink-3);
  font-size: var(--text-s);
  max-width: none;
}

.hard-caption {
  margin-top: var(--s-3);
  color: var(--ink-3);
  font-size: var(--text-s);
  max-width: none;
}

.figure--full {
  width: 100%;
}

.wash-band {
  background: var(--wash);
}

.wash-band .figure {
  margin-block: 0;
}

.wash-band .figure + * {
  margin-top: var(--s-5);
}

.scale-bar {
  display: flex;
  min-width: 0;
  border-radius: var(--r-card);
  overflow: hidden;
}

.scale-seg {
  min-width: 0;
  padding: var(--s-2) var(--s-1);
}

.scale-seg p {
  max-width: none;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: var(--text-s);
}

.scale-seg--soft { width: 17.5%; background: var(--data-1); }
.scale-seg--mod { width: 17.5%; background: var(--data-2); }
.scale-seg--hard { width: 17.5%; background: var(--data-3); }
.scale-seg--very { width: 47.5%; background: var(--data-4); }

.scale-name {
  font-weight: 700;
}

.scale-bracket {
  margin-top: var(--s-2);
  margin-left: 35%;
  width: 65%;
}

.scale-bracket span {
  display: block;
  border-top: 1px solid var(--ink-2);
  padding-top: var(--s-2);
  text-align: center;
  font-weight: 600;
  font-size: var(--text-s);
}

.scale-key {
  display: none;
  list-style: none;
  padding: 0;
  margin-top: var(--s-4);
}

.scale-key li {
  display: grid;
  grid-template-columns: var(--s-4) minmax(0, 1fr);
  gap: var(--s-2);
  align-items: start;
  max-width: none;
  margin-top: var(--s-2);
}

.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-3);
  justify-items: center;
}

.flow-step {
  width: min(100%, 18rem);
  text-align: left;
}

.flow-step p,
.do-panel li,
.dont-panel li {
  max-width: none;
}

.flow-kicker {
  display: block;
  font-weight: 700;
  margin-top: var(--s-2);
}

.flow-salt {
  border-top: 1px solid var(--line);
  padding-top: var(--s-4);
  margin-top: var(--s-2);
}

.flow-arrow {
  color: var(--ink-2);
  transform: rotate(90deg);
}

.do-dont {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
}

.do-panel,
.dont-panel {
  min-width: 0;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--paper);
}

.panel-label {
  font-weight: 700;
  margin-bottom: var(--s-4);
}

.do-panel ul,
.dont-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.do-panel li,
.dont-panel li {
  display: grid;
  grid-template-columns: var(--s-5) minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
}

.do-panel .icon,
.dont-panel .icon {
  color: var(--ink-2);
  margin-top: var(--s-1);
}

.providers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
}

.provider {
  min-width: 0;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.provider h3 {
  margin-bottom: var(--s-3);
}

.provider-gpg {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--head-s);
  letter-spacing: var(--tracking-head);
  line-height: var(--leading-tight);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-3);
}

.town-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.town-list a {
  font-weight: 700;
  font-size: var(--head-s);
  font-family: var(--font-display);
  letter-spacing: var(--tracking-head);
}

.timeline {
  list-style: none;
  padding: 0;
  margin-top: var(--s-6);
  display: flex;
  flex-direction: column;
}

.timeline li {
  position: relative;
  padding-left: var(--s-6);
  padding-bottom: var(--s-6);
  border-left: 1px solid var(--line);
  max-width: 40rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: var(--s-1);
  left: calc(var(--s-2) * -1);
  width: var(--s-4);
  height: var(--s-4);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-control);
}

.timeline h2 {
  font-size: var(--head-s);
  margin-bottom: var(--s-2);
}

.quiet {
  color: var(--ink-2);
  max-width: var(--measure);
}

.source-note {
  color: var(--ink-3);
  font-size: var(--text-s);
  max-width: 70ch;
  margin-top: var(--s-5);
}

.contact-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-3);
  max-width: 40rem;
  margin-top: var(--s-5);
}

.contact-actions .btn {
  min-height: var(--s-8);
  font-size: var(--text-l);
  white-space: normal;
}

.address {
  font-style: normal;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  max-width: 28rem;
}

.field label {
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: var(--s-2) var(--s-3);
  min-height: 2.75rem;
  width: 100%;
}

.field-error {
  color: var(--ink);
  font-size: var(--text-s);
  font-weight: 600;
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s-8);
  background: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
}

.footer-tagline {
  font-weight: 600;
  margin-top: var(--s-3);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-label {
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: var(--tracking-head);
}

.footer-base {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--s-9);
  }

  .systems {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .system-stack {
    grid-template-rows: 1fr 1fr;
  }

  .system-stack .system {
    height: 100%;
  }

  .step-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-4);
    position: relative;
    padding-top: var(--s-4);
  }

  .step-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-top: 1px solid var(--line);
  }

  .step-row li {
    border-left: 0;
    padding-left: 0;
    padding-top: var(--s-2);
  }

  .wont-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-6) var(--s-7);
  }

  .layout-service {
    grid-template-columns: minmax(0, 1fr) 18rem;
    grid-template-areas: "intro panel" "body panel";
    align-items: start;
  }

  .service-intro { grid-area: intro; }
  .side-panel {
    grid-area: panel;
    position: sticky;
    top: calc(4.5rem + var(--s-4));
  }
  .service-body { grid-area: body; }

  .hard-legend {
    display: flex;
  }

  .do-dont,
  .providers,
  .contact-actions,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .scale-key {
    display: none;
  }
}

@media (max-width: 767px) {
  .hard-chart,
  .hard-rows,
  .hard-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    min-width: 0;
  }

  .hard-chart,
  .hard-rows {
    gap: var(--s-4);
  }

  .hard-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "value"
      "track";
    row-gap: var(--s-2);
    align-items: start;
    width: 100%;
  }

  .hard-label { grid-area: label; }
  .hard-value {
    grid-area: value;
    max-width: none;
    text-align: right;
  }
  .hard-track { grid-area: track; width: 100%; }

  .hard-axis {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    margin-top: 0;
  }

  .scale-seg {
    min-height: var(--s-4);
    padding: 0;
  }

  .scale-seg p {
    display: none;
  }

  .scale-key {
    display: grid;
  }

  .logo {
    max-width: calc(100% - 6.5rem);
  }

  .header-book {
    display: none;
  }

  .action-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--surface);
    border-top: 1px solid var(--line);
  }

  .action-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 2.75rem;
    padding: var(--s-3);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
  }

  .action-bar a + a {
    border-left: 1px solid var(--line);
  }

  .footer-links a,
  .not-found main a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
  }

  body {
    padding-bottom: calc(2.75rem + var(--s-4));
  }
}

@media (max-width: 1099px) {
  .header-phone {
    display: none;
  }
}

@media (min-width: 1100px) and (max-width: 1279px) {
  .header-phone {
    display: inline-flex;
    justify-content: center;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
  }

  .header-phone-label {
    display: none;
  }
}

@media (min-width: 900px) {
  .nuisance {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--s-7);
    align-items: start;
  }

  .nuisance .section-intro {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
  }

  .nuisance-close {
    grid-column: 1;
    grid-row: 2;
  }

  .nuisance .icon-rows {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }

  .qa-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: var(--s-6);
    align-items: start;
  }

  .qa-block > h2 {
    position: sticky;
    top: calc(4.5rem + var(--s-3));
    z-index: 2;
    margin: 0;
    padding-bottom: var(--s-3);
    background: var(--paper);
  }

  .qa-block .qa-list {
    margin-top: 0;
  }

  .flow {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas:
      "in a1 resin a2 out"
      "salt salt salt salt salt";
    justify-items: stretch;
    align-items: start;
  }

  .flow-in { grid-area: in; }
  .flow-a1 { grid-area: a1; }
  .flow-resin { grid-area: resin; }
  .flow-a2 { grid-area: a2; }
  .flow-out { grid-area: out; }
  .flow-salt { grid-area: salt; }
  .flow-step { width: auto; }
  .flow-a1,
  .flow-a2 {
    transform: none;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--s-7);
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
  }

  .step-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home h1 {
    font-size: 3.5rem;
  }

  .figure--full .hard-legend {
    flex-wrap: nowrap;
  }
}

@media (min-width: 1100px) {
  .nav-wide {
    display: flex;
    margin-left: auto;
  }

  .nav-menu {
    display: none;
  }

  .header-tools {
    margin-left: 0;
  }
}

@media (prefers-color-scheme: dark) {
  .btn-primary:hover {
    background: var(--copper);
    color: var(--on-copper);
    border-color: var(--copper-deep);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-primary:active {
    transition: none;
    transform: none;
  }
}

/* Review pass (release): one content width for every section, and the softener
   card's flow sits at the bottom of the card instead of leaving it half empty. */
.system--lead {
  display: flex;
  flex-direction: column;
}

.system--lead .mini-flow {
  margin-top: auto;
  padding-top: var(--s-6);
}

.system.system--lead > h3 {
  font-size: var(--head-m);
}

.system--lead > p:first-of-type {
  font-size: var(--text-l);
}

@media (max-width: 767px) {
  .system--lead .mini-flow {
    flex-direction: column;
    align-items: flex-start;
  }

  .system--lead .mini-flow .icon {
    transform: rotate(90deg);
  }
}
