/* wellpumpreplacementcost.net - cool-editorial design (talaria-site-designer v1.5)
   Home & Construction archetype: rugged worksite readout.
   Oswald UPPERCASE heads, Roboto body, IBM Plex Mono figures/spec labels.
   Signature element: the depth scale (well depth is the real cost driver
   on this topic) - tick marks inside the mascot shaft, the result gauge,
   and the spec-sheet section labels.
   Targets the site's real class names: header .wrap, .logo, .logomark,
   .logotype, .lt-name, .lt-tag, .hgrad, .hero, .calc, .fld, .qty,
   .result, .bar, .feats, .feat, .faq, .ad, .guides, .gcard,
   .related, .disc, .lead, .cta, footer .wrap, .cols, cc-banner */

:root {
  --t-accent:    #D4963A;
  --t-accent-dk: #976821;
  --t-accent2:   #F1E4D0;
  --t-paper:     #F9F8F6;
  --t-panel:     #FFFFFF;
  --t-ink:       #1E2429;
  --t-ink2:      #454C54;
  --t-muted:     #6A737C;
  --t-rule:      #E8E4DE;
  --t-rule2:     #D8D2CA;
  --t-nav:       #26211C;
  --t-r:         4px;
  --t-maxw:      1040px;
  --t-head:      'Oswald', 'Arial Narrow', sans-serif;
  --t-body:      'Roboto', system-ui, sans-serif;
  --t-mono:      'IBM Plex Mono', ui-monospace, monospace;
}

/* ---- reset / base ---- */
*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  font-family: var(--t-body);
  color: var(--t-ink);
  background: var(--t-paper);
  font-size: 16px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img { max-width: 100%; display: block }
a { color: var(--t-accent-dk); text-underline-offset: 2px }
a:hover { text-decoration: underline }
.wrap { max-width: var(--t-maxw); margin: 0 auto; padding: 0 24px }
h1, h2, h3, h4 {
  font-family: var(--t-head);
  font-weight: 600;
  line-height: 1.14;
  color: var(--t-ink);
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 600; text-transform: uppercase; letter-spacing: .01em }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); text-transform: uppercase; letter-spacing: .015em }
h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .01em }
p { margin: 0 0 1rem }
ul { padding-left: 1.4em; margin: .5rem 0 1rem }
li { margin-bottom: .4em }
:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 2px }
a, button, select, input { transition: background-color .14s ease, border-color .14s ease, color .14s ease, transform .1s ease }
button:active, .cta:active { transform: scale(.98) }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto } }

/* ---- header ---- */
header {
  background: var(--t-nav);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
header .wrap {
  max-width: var(--t-maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none }
.logo:hover { text-decoration: none }
.logomark {
  width: 40px;
  height: 40px;
  border-radius: var(--t-r);
  background: var(--t-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.logomark svg { width: 23px; height: 23px }
.logotype { display: flex; flex-direction: column; line-height: 1.1 }
.lt-name {
  font-family: var(--t-head);
  font-weight: 600;
  font-size: 1.14rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.lt-name .ac { color: var(--t-accent) }
.lt-tag {
  font-family: var(--t-mono);
  font-size: .58rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-top: 3px;
}
header nav a {
  color: rgba(255,255,255,.72);
  text-decoration: none;
  margin-left: 15px;
  font-family: var(--t-head);
  font-size: .84rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
header nav a:hover { color: #fff; border-bottom-color: var(--t-accent); text-decoration: none }

.hgrad { height: 3px; background: var(--t-accent) }

/* ---- hero (homepage: two-column split-screen) ---- */
.hero { background: var(--t-paper); border-bottom: 1px solid var(--t-rule); color: var(--t-ink); overflow: hidden }
.hero .wrap { max-width: var(--t-maxw); margin: 0 auto; padding: 0 24px; display: block }
.hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); color: var(--t-ink); margin: .14em 0 .4em; max-width: 16ch; line-height: 1.08 }
.hero p { font-size: 1.06rem; color: var(--t-ink2); max-width: 50ch; margin-bottom: .5rem }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--t-accent2); color: var(--t-accent-dk);
  padding: 4px 12px; border-radius: 20px;
  font-family: var(--t-mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px;
}
.hero .art { display: none } /* replaced by mascot markup positioned via hero-left */

/* byline */
.byline { display: flex; align-items: center; gap: 10px; color: var(--t-muted); font-size: .84rem; margin: 10px 0 0 }
.byline b { color: var(--t-ink); font-weight: 600 }
.byline .av { width: 32px; height: 32px; border-radius: 50%; background: var(--t-accent2); display: inline-block; object-fit: cover; border: 1px solid var(--t-rule) }
.hero .byline, .hero-left .byline { display: none } /* no byline on homepage hero */
.byline.light { color: var(--t-muted); display: flex }
.byline.light b { color: var(--t-ink) }

/* ---- main content ---- */
main { max-width: var(--t-maxw); margin: 0 auto; padding: 30px 24px }
main h2 {
  font-size: clamp(1.15rem, 2.1vw, 1.4rem);
  margin: 1.9em 0 .5em;
  padding-bottom: .35em;
  border-bottom: 2px solid var(--t-rule);
  display: flex; align-items: center; gap: 10px;
}
main h2:first-child { margin-top: 0 }
main p { color: var(--t-ink2) }
main ul li { color: var(--t-ink2) }
main strong { color: var(--t-ink) }
main h1 {
  font-family: var(--t-head); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem); color: var(--t-ink); line-height: 1.1; margin: 0 0 .4em;
}
main > .byline { margin-bottom: 18px }

/* spec-sheet section numbering - depth-scale tick before the label */
.spec-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--t-mono); font-size: .72rem; letter-spacing: .1em;
  color: var(--t-accent-dk); text-transform: uppercase;
}
.spec-label::before { content: ''; width: 3px; height: 14px; background: var(--t-accent) }

/* ---- calculator card ---- */
.calc {
  background: var(--t-panel);
  border: 1px solid var(--t-rule);
  border-radius: var(--t-r);
  padding: 26px;
  margin: -36px 0 24px;
  position: relative;
  border-top: 4px solid var(--t-accent);
}
.calc h2 {
  font-family: var(--t-head); font-size: 1.2rem; font-weight: 600;
  text-transform: uppercase; border: none; margin: 0 0 16px; padding: 0;
}

.fld { display: flex; flex-direction: column; gap: 5px; margin: 13px 0; font-weight: 500; font-size: .9rem; color: var(--t-ink2) }
.fld select, .qty input {
  padding: 11px 13px; border: 1px solid var(--t-rule2); border-radius: 3px;
  font-size: 1rem; font-family: var(--t-body); background: var(--t-paper); color: var(--t-ink);
}
.fld select:focus, .qty input:focus {
  outline: none; border-color: var(--t-accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(212,150,58,.18);
}
.hint { display: block; color: var(--t-muted); font-weight: 400; font-size: .78rem; margin-top: 3px }

.qty { display: flex; align-items: center; gap: 12px; margin: 13px 0; font-weight: 500; font-size: .9rem; color: var(--t-ink2) }
.qty input { width: 88px }

/* result display - mono, tabular figures */
.result {
  margin-top: 18px; padding: 20px 22px; background: var(--t-panel);
  border: 1px solid var(--t-rule); border-radius: var(--t-r); text-align: center;
}
.result > div:first-child {
  font-family: var(--t-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--t-muted);
}
.result .big {
  font-family: var(--t-mono); font-size: 2.05rem; font-weight: 600;
  color: var(--t-accent-dk); font-variant-numeric: tabular-nums;
  letter-spacing: -.01em; display: block; margin: 6px 0;
}
/* depth-scale gauge bar: tick marks like a bore-hole readout */
.bar {
  height: 10px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--t-accent2) 0 8%, var(--t-rule2) 8% 9%),
              linear-gradient(90deg, var(--t-accent2), var(--t-accent));
  margin: 16px 0 4px; position: relative;
}
.bar i { position: absolute; top: -5px; width: 3px; height: 20px; background: var(--t-nav); border-radius: 1px }

/* lead / CTA block */
.lead { margin-top: 16px; background: var(--t-paper); border: 1px solid var(--t-rule); border-radius: var(--t-r); padding: 18px 20px; text-align: left }
.lead h3 { margin: 0 0 4px; font-size: 1rem; font-family: var(--t-head); font-weight: 600 }
.lead small { color: var(--t-muted); font-size: .8rem }
.cta {
  display: inline-block; margin-top: 10px; background: var(--t-accent); color: #1c1712;
  padding: 12px 22px; border-radius: 3px; text-decoration: none;
  font-family: var(--t-head); font-weight: 600; font-size: .92rem; letter-spacing: .03em;
  text-transform: uppercase; border-bottom: 3px solid var(--t-accent-dk);
}
.cta:hover { background: #e3a34a; color: #1c1712; text-decoration: none }
.cta:active { transform: scale(.98) }

/* ---- feature cards (unequal row, not identical triplet) ---- */
.feats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; margin: 22px 0 }
.feat {
  background: var(--t-panel); border: 1px solid var(--t-rule); border-radius: var(--t-r);
  padding: 16px; display: flex; gap: 12px; align-items: flex-start;
}
.feat span { font-weight: 600; display: block; font-size: .9rem; color: var(--t-ink); font-family: var(--t-head); text-transform: uppercase; letter-spacing: .01em }
.feat small { color: var(--t-muted); font-size: .8rem }
@media (max-width: 700px) { .feats { grid-template-columns: 1fr } }

/* ---- data tables ---- */
table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; background: var(--t-panel); border: 1px solid var(--t-rule); border-radius: var(--t-r); overflow: hidden; font-size: .93rem }
th {
  font-family: var(--t-mono); font-weight: 600; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--t-muted); text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--t-rule); background: var(--t-accent2);
}
td { text-align: left; border-bottom: 1px solid var(--t-rule); padding: 11px 14px; color: var(--t-ink2); font-variant-numeric: tabular-nums }
tr:last-child td { border-bottom: 0 }
tr td:first-child { font-weight: 600; color: var(--t-ink) }

/* ---- FAQ ---- */
.faq { background: var(--t-panel); border: 1px solid var(--t-rule); border-radius: var(--t-r); padding: 2px 18px; margin: 8px 0 }
.faq summary, details.faq summary {
  font-family: var(--t-head); font-weight: 600; font-size: 1rem; text-transform: none;
  cursor: pointer; padding: 14px 0; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 14px; color: var(--t-ink);
}
.faq summary::-webkit-details-marker { display: none }
.faq summary::after { content: "+"; font-family: var(--t-mono); font-size: 1.3rem; color: var(--t-accent-dk); font-weight: 400; flex: 0 0 auto }
.faq details[open] summary::after { content: "\2212" }

/* ---- guide cards ---- */
.guides { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 10px 0 20px }
.gcard {
  display: block; border: 1px solid var(--t-rule); border-radius: var(--t-r);
  padding: 16px 18px; background: var(--t-panel); text-decoration: none; color: var(--t-ink);
  border-left: 3px solid transparent; transition: border-color .14s, transform .12s;
}
.gcard:hover { border-left-color: var(--t-accent); transform: translateY(-2px); text-decoration: none }
.gcard strong { display: block; color: var(--t-accent-dk); font-family: var(--t-head); font-size: .98rem; font-weight: 600; margin-bottom: 5px; line-height: 1.28; text-transform: none }
.gcard small { color: var(--t-muted); font-size: .8rem }

/* ---- related tags ---- */
.related { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 }
.related a { text-decoration: none; border: 1px solid var(--t-rule2); background: var(--t-panel); padding: 7px 14px; border-radius: 22px; font-size: .88rem; color: var(--t-ink2) }
.related a:hover { border-color: var(--t-accent); color: var(--t-accent-dk); text-decoration: none }

/* ---- ad placeholder ---- */
.ad {
  margin: 24px 0; min-height: 90px; background: none; border: 1px solid var(--t-rule); border-radius: var(--t-r);
  display: flex; align-items: center; justify-content: center; color: var(--t-muted);
  font-family: var(--t-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
}

/* ---- disclaimer ---- */
.disc { font-size: .8rem; color: var(--t-muted); background: var(--t-panel); border: 1px solid var(--t-rule); border-radius: var(--t-r); padding: 13px 16px; margin-top: 18px; line-height: 1.6 }

/* ---- ctabar ---- */
.ctabar { margin: 14px 0 18px }
.ctabar .cta { display: inline-block }

/* ---- form card (contact) ---- */
.form-card { background: var(--t-panel); border: 1px solid var(--t-rule); border-radius: var(--t-r); padding: 24px; max-width: 560px }
.field { display: flex; flex-direction: column; gap: 5px; margin: 12px 0; font-weight: 500; font-size: .9rem; color: var(--t-ink2) }
.field input, .field textarea { padding: 11px 13px; border: 1px solid var(--t-rule2); border-radius: 3px; font-size: 1rem; font-family: var(--t-body); background: var(--t-paper); color: var(--t-ink) }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--t-accent); background: #fff; box-shadow: 0 0 0 3px rgba(212,150,58,.18) }
#formResult { margin-top: 10px; font-weight: 600; color: var(--t-accent-dk) }

/* ---- about banner ---- */
.aboutbanner { border-radius: var(--t-r); padding: 22px; display: flex; align-items: center; justify-content: center; margin: 10px 0 18px; background: var(--t-accent2); border: 1px solid var(--t-rule) }

/* ---- footer (dark bookend, GRID never flex - hard rule) ---- */
footer { background: var(--t-nav); color: rgba(255,255,255,.62); margin-top: 36px; border-top: 3px solid var(--t-accent) }
footer .wrap { max-width: var(--t-maxw); margin: 0 auto; padding: 40px 24px 24px; font-size: .88rem }
footer a { color: rgba(255,255,255,.72); text-decoration: none }
footer a:hover { color: var(--t-accent); text-decoration: none }
footer .cols { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 32px; align-items: start; margin-bottom: 18px }
footer .cols a { display: block; margin: 0 0 9px }
footer .cols > div { min-width: 0 }
footer strong { color: #fff }
footer small { color: rgba(255,255,255,.48) }
footer p { color: rgba(255,255,255,.55); margin: 6px 0 0 }
@media (max-width: 760px) { footer .cols { grid-template-columns: 1fr 1fr } }

/* brand mark on the dark footer must stay visible */
.site-footer .brand svg rect, footer .brand svg rect { fill: #fff }
.site-footer .brand .name, footer .brand .name { color: #fff }

/* related mesh in footer */
.related-mesh { margin-top: 14px; font-size: .8rem; line-height: 1.8; color: rgba(255,255,255,.42); border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px }
.related-mesh a { color: rgba(255,255,255,.55); text-decoration: underline; text-underline-offset: 2px; margin-right: 0 }
.related-mesh a:hover { color: var(--t-accent) }

/* ---- cookie consent banner ---- */
#cc-banner { background: var(--t-nav) !important; border-top: 1px solid rgba(255,255,255,.12) }
#cc-acc { background: var(--t-accent) !important; color: #1c1712 !important; border: 0 !important; border-radius: 3px !important; padding: 8px 16px !important; cursor: pointer !important; font-weight: 700 !important }
#cc-acc:hover { background: #e3a34a !important }
#cc-rej { background: transparent !important; color: rgba(255,255,255,.8) !important; border: 1px solid rgba(255,255,255,.2) !important; border-radius: 3px !important }

/* ---- number highlights (mono) ---- */
.num, .mono, .big { font-family: var(--t-mono); font-variant-numeric: tabular-nums }

/* ---- mobile nav ---- */
@media (max-width: 640px) {
  header .wrap { padding: 12px 16px }
  header nav a { margin-left: 10px; font-size: .78rem }
  .lt-name { font-size: 1rem }
  .lt-tag { display: none }
  main { padding: 20px 16px }
  .calc { margin: -24px 0 18px; padding: 18px }
  .result .big { font-size: 1.6rem }
  footer .wrap { padding: 28px 16px 18px }
  footer .cols { gap: 20px }
}

/* ---- prose-width alignment: tool-hero title matches the 760 prose body ---- */
body:not(:has(.calc-layout)) .tool-hero .wrap { max-width: 760px }

/* ---- homepage two-column split-screen hero ---- */
.hero-row {
  display: grid !important;
  grid-template-columns: 1fr 1.05fr;
  gap: 30px;
  align-items: stretch;
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}
.hero-left { display: flex; flex-direction: column; min-width: 0 }
.hero-left .pill { margin-bottom: 14px }
.hero-left h1 { margin-bottom: .4em }
.hero-left > p { margin-bottom: 0; flex-shrink: 0 }
.hero-mascot-wrap { margin-top: auto; padding-top: 20px; display: flex; align-items: flex-end }
.hero-mascot-wrap svg { width: 100%; max-width: 320px; height: auto }
.hero-right { display: flex; flex-direction: column; min-width: 0 }
.hero-right .calc { margin: 0 !important; flex: 1 }
.authority-strip {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--t-rule); font-family: var(--t-mono); font-size: .72rem;
  color: var(--t-muted); letter-spacing: .01em;
}
.authority-strip b { color: var(--t-ink2); font-weight: 600 }
.tool-cta-row { margin-top: 14px; display: flex; flex-direction: column; gap: 10px }
.browse-all { text-align: center; font-family: var(--t-head); font-size: .84rem; letter-spacing: .03em; text-transform: uppercase; color: var(--t-ink2); border: 1px solid var(--t-rule2); border-radius: 3px; padding: 10px; text-decoration: none; display: block }
.browse-all:hover { border-color: var(--t-accent); color: var(--t-accent-dk); text-decoration: none }

@media (max-width: 860px) {
  .hero-row { grid-template-columns: 1fr !important; gap: 0 !important; padding-bottom: 0 !important; padding-top: 26px !important }
  .hero-left { padding-bottom: 18px }
  .hero-mascot-wrap { display: none }
  .hero-right { padding-bottom: 24px }
}

/* ---- voice band (one blunt display sentence, full-bleed accent) ---- */
.voice-band { background: var(--t-nav); color: #fff; padding: 30px 0; margin: 30px 0 }
.voice-band .wrap { max-width: var(--t-maxw); margin: 0 auto; padding: 0 24px }
.voice-band p { font-family: var(--t-head); text-transform: uppercase; letter-spacing: .01em; font-size: clamp(1.1rem, 2.6vw, 1.5rem); color: #fff; margin: 0; max-width: 44ch }
.voice-band .ac { color: var(--t-accent) }

/* ---- dataset page: table + cite block ---- */
.dataset-table { font-variant-numeric: tabular-nums }
.cite-box { background: var(--t-accent2); border: 1px solid var(--t-rule2); border-radius: var(--t-r); padding: 14px 18px; font-family: var(--t-mono); font-size: .8rem; color: var(--t-ink2); margin: 16px 0 }
.methodology { background: var(--t-panel); border: 1px solid var(--t-rule); border-radius: var(--t-r); padding: 18px 20px; margin: 16px 0 }
.csv-link { display: inline-block; margin-top: 8px; font-family: var(--t-mono); font-size: .82rem; color: var(--t-accent-dk); border: 1px solid var(--t-accent-dk); border-radius: 3px; padding: 8px 14px; text-decoration: none }
.csv-link:hover { background: var(--t-accent-dk); color: #fff; text-decoration: none }
