.water-finding {
  border-color: #8a7457;
  background: #f3ede2;
}

.water-explainer {
  --water-ink: #17211d;
  --water-deep: #24483f;
  --water-blue: #356f78;
  --water-sand: #c9ab7b;
  --water-ivory: #f7f3ea;
  margin: 2.6rem 0 3rem;
  padding: 1.25rem;
  overflow: hidden;
  color: var(--water-ink);
  background: var(--water-ivory);
  border: 1px solid rgba(23, 33, 29, .18);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(44, 38, 29, .08);
}

.water-explainer:focus-visible,
.water-controls button:focus-visible {
  outline: 3px solid #b56c35;
  outline-offset: 3px;
}

.water-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(13rem, .8fr);
  gap: 1.5rem;
  align-items: end;
  padding: .3rem .25rem 1.1rem;
  border-bottom: 1px solid rgba(23, 33, 29, .16);
}

.water-head h3 {
  max-width: 24ch;
  margin: .3rem 0 0;
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.water-head p {
  margin: 0;
  color: #5a615c;
  font-size: .9rem;
  line-height: 1.45;
}

.water-eyebrow {
  color: #765c3d;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .13em;
}

.water-stage {
  position: relative;
  min-height: 280px;
  margin: 1rem 0;
  padding: 2.6rem 1.4rem 1.2rem;
  background:
    radial-gradient(circle at 12% 10%, rgba(201, 171, 123, .18), transparent 28%),
    linear-gradient(145deg, #1c2a25, #233c34);
  border-radius: 14px;
}

.water-network {
  display: grid;
  grid-template-columns: 74px 1fr 74px 74px;
  align-items: center;
  max-width: 660px;
  margin: 1.2rem auto 0;
}

.water-network > span:not(.water-pipe) {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: .55rem;
}

.water-network b {
  color: rgba(255, 255, 255, .72);
  font-size: .56rem;
  letter-spacing: .11em;
}

.water-source i,
.water-users i,
.water-meter i {
  display: block;
  width: 42px;
  height: 42px;
  background: #f4ecdc;
  border: 5px solid #a9895c;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(244, 236, 220, .08);
}

.water-source i {
  border-radius: 50% 50% 50% 12%;
  transform: rotate(-45deg);
  background: #7fa8ad;
}

.water-users i {
  border-radius: 5px 5px 14px 14px;
  background: linear-gradient(90deg, #dfc89e 0 28%, #f4ecdc 28% 72%, #dfc89e 72%);
}

.water-meter i::after {
  content: '';
  display: block;
  width: 15px;
  height: 3px;
  margin: 14px 0 0 9px;
  background: var(--water-deep);
  transform: rotate(-35deg);
  transform-origin: right center;
}

.water-pipe {
  position: relative;
  height: 16px;
  background: rgba(235, 225, 205, .22);
  border: 2px solid rgba(235, 225, 205, .5);
  border-radius: 999px;
  overflow: visible;
}

.water-pipe > i {
  display: block;
  width: 9%;
  height: 100%;
  background: repeating-linear-gradient(90deg, #5d9399 0 13px, #8db9bd 13px 20px);
  border-radius: inherit;
  transition: width 850ms cubic-bezier(.2, .8, .2, 1);
}

.water-pipe > em {
  position: absolute;
  left: 38%;
  top: 12px;
  width: 17px;
  height: 27px;
  background: #6e9fa4;
  border-radius: 50% 50% 55% 45%;
  clip-path: polygon(50% 0, 100% 68%, 78% 100%, 22% 100%, 0 68%);
  opacity: .95;
  transform: scale(1);
  transform-origin: top center;
  transition: transform 650ms ease, opacity 650ms ease;
}

.water-stage[data-state="1"] .water-pipe > i { width: 28%; }
.water-stage[data-state="2"] .water-pipe > i { width: 48%; }
.water-stage[data-state="3"] .water-pipe > i { width: 76%; }
.water-stage[data-state="4"] .water-pipe > i { width: 100%; }
.water-stage[data-state="3"] .water-pipe > em,
.water-stage[data-state="4"] .water-pipe > em { transform: scale(.55); opacity: .45; }

.water-readout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
  max-width: 660px;
  margin: 2.5rem auto 0;
}

.water-readout div {
  min-width: 0;
  padding: .75rem;
  background: rgba(247, 243, 234, .07);
  border: 1px solid rgba(247, 243, 234, .14);
  border-radius: 8px;
}

.water-readout span,
.water-file > span {
  display: block;
  color: rgba(255, 255, 255, .58);
  font-size: .57rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.water-readout strong {
  display: block;
  margin-top: .2rem;
  color: #fff9ed;
  font-size: 1.25rem;
  transition: transform 350ms ease, color 350ms ease;
}

.water-stage[data-state="4"] .water-readout strong { color: #b7d6c2; transform: translateY(-2px); }

.water-file {
  display: grid;
  grid-template-columns: 5.7rem minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  max-width: 660px;
  margin: .75rem auto 0;
  padding: .75rem;
  color: #fff9ed;
  background: rgba(247, 243, 234, .08);
  border-left: 3px solid var(--water-sand);
}

.water-file strong { font-size: .83rem; }
.water-file small { color: #ddc69f; font-size: .72rem; text-align: right; }

.water-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .35rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.water-track li {
  min-width: 0;
  padding: .75rem .6rem;
  background: #ede5d7;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background 300ms ease, transform 300ms ease, border-color 300ms ease;
}

.water-track li.is-past { background: #dae3da; }
.water-track li.is-active { background: #fffaf0; border-color: #866b49; transform: translateY(-4px); }
.water-track b,.water-track strong,.water-track small { display: block; }
.water-track b { color: #8b7252; font-size: .63rem; letter-spacing: .08em; }
.water-track strong { margin-top: .25rem; font-size: .8rem; }
.water-track small { margin-top: .2rem; color: #66645f; font-size: .65rem; line-height: 1.25; }

.water-live {
  min-height: 108px;
  padding: 1rem 1.1rem;
  background: #fffaf0;
  border-left: 4px solid var(--water-blue);
}

.water-live > span { color: #826846; font-size: .61rem; font-weight: 700; letter-spacing: .1em; }
.water-live strong { display: block; margin: .3rem 0; font-size: 1rem; }
.water-live p { margin: 0; color: #505650; font-size: .83rem; line-height: 1.5; }

.water-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-top: .75rem;
}

.water-controls[hidden] { display: none; }
.water-controls button {
  padding: .55rem .75rem;
  color: var(--water-ink);
  background: transparent;
  border: 1px solid rgba(23, 33, 29, .35);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: .72rem;
  font-weight: 600;
}
.water-controls button:hover { background: #e8decc; }
.water-controls > span { margin-left: auto; color: #716f68; font-size: .72rem; }

.water-state-copy {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .55rem;
  margin: 1.1rem 0 .5rem;
  padding: 0;
  list-style: none;
}

.water-state-copy li { padding-top: .65rem; border-top: 2px solid #c8b18d; }
.water-state-copy strong,.water-state-copy span { display: block; }
.water-state-copy strong { font-size: .72rem; }
.water-state-copy span { margin-top: .25rem; color: #65635e; font-size: .66rem; line-height: 1.4; }
.water-explainer figcaption { margin: 1rem .2rem .1rem; color: #66645f; font-size: .72rem; line-height: 1.45; }

@media (max-width: 700px) {
  .water-explainer { margin-inline: -.5rem; padding: .8rem; border-radius: 12px; }
  .water-head { grid-template-columns: 1fr; gap: .7rem; }
  .water-stage { min-height: 340px; padding: 1.8rem .75rem 1rem; }
  .water-network { grid-template-columns: 48px 1fr 48px 48px; }
  .water-source i,.water-users i,.water-meter i { width: 34px; height: 34px; border-width: 4px; }
  .water-network b { font-size: .46rem; }
  .water-readout { grid-template-columns: repeat(2, 1fr); margin-top: 2.2rem; }
  .water-file { grid-template-columns: 1fr; gap: .25rem; }
  .water-file small { text-align: left; }
  .water-track { grid-template-columns: 1fr; }
  .water-track li { display: grid; grid-template-columns: 2rem 5.5rem 1fr; gap: .3rem; align-items: center; }
  .water-track strong,.water-track small { margin: 0; }
  .water-state-copy { grid-template-columns: 1fr; }
  .water-state-copy li { display: grid; grid-template-columns: 7.5rem 1fr; gap: .6rem; }
  .water-state-copy span { margin: 0; }
  .water-controls > span { width: 100%; margin: .2rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .water-explainer *, .water-explainer *::before, .water-explainer *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
