/* PA Water Guide: designed for easy reading
   Large type, high contrast, big click targets, underlined links. */

:root {
  --ink: #12202a;
  --text: #22313c;
  --muted: #45555f;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --line: #d9e1e7;
  --brand: #0d5a7d;
  --brand-dark: #08415b;
  --brand-soft: #e5f0f6;
  --warn: #8a4b08;
  --warn-soft: #fdf3e4;
  --danger: #9b2121;
  --danger-soft: #fbeaea;
  --ok: #24643a;
  --ok-soft: #e8f4ec;
  --radius: 14px;
  --font: "Atkinson Hyperlegible", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

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

a { color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
a:focus-visible, .btn:focus-visible, .door:focus-visible, .card-link:focus-visible {
  outline: 3px solid #f2a93b; outline-offset: 3px; border-radius: 6px;
}

h1, h2, h3 { color: var(--ink); line-height: 1.2; font-weight: 700; }
h1 { font-size: 44px; margin: 0 0 18px; letter-spacing: -0.5px; }
h2 { font-size: 30px; margin: 56px 0 16px; }
h3 { font-size: 23px; margin: 0 0 8px; }
p { margin: 0 0 20px; }
ul, ol { padding-left: 28px; margin: 0 0 20px; }
li { margin-bottom: 10px; }
strong { color: var(--ink); }

.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 12px 16px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 28px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 23px; }
.logo svg { width: 34px; height: 34px; flex: none; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.main-nav a {
  display: inline-block; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; color: var(--text); font-size: 19px; font-weight: 700;
}
.main-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.main-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }

/* Breadcrumb */
.crumbs { font-size: 17px; color: var(--muted); padding: 28px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 8px; }

/* Hero */
.hero { background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); padding: 72px 0 56px; }
.hero h1 { font-size: 52px; max-width: 820px; }
.hero .lead { font-size: 24px; color: var(--muted); max-width: 720px; margin-bottom: 40px; }

.page-head { padding: 12px 0 8px; }
.page-head .lead { font-size: 23px; color: var(--muted); max-width: 760px; }

/* Three big "doors" on the homepage */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.door {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 24px; text-decoration: none; color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.door:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13,90,125,.10); color: var(--text); }
.door .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 21px; margin-bottom: 8px;
}
.door strong { font-size: 24px; line-height: 1.25; }
.door span.go { margin-top: auto; padding-top: 10px; color: var(--brand); font-weight: 700; }

/* Card directory */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card-link {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.card-link:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(13,90,125,.08); color: var(--text); }
.card-link h3 { margin-bottom: 4px; }
.card-link p { margin: 0 0 8px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.card-link .go { color: var(--brand); font-weight: 700; font-size: 18px; }
.swatch { width: 52px; height: 52px; border-radius: 12px; flex: none; border: 1px solid rgba(0,0,0,.08); }

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trust div { background: var(--surface); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.trust p { margin: 0; color: var(--muted); font-size: 18px; }

/* Buttons */
.btn {
  display: inline-block; background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 20px; padding: 16px 28px; border-radius: 12px; min-height: 56px;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--brand); border: 2px solid var(--brand); }
.btn.secondary:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* Callouts */
.box { border-radius: var(--radius); padding: 22px 26px; margin: 0 0 28px; border: 1px solid transparent; }
.box > :last-child { margin-bottom: 0; }
.box .label { display: block; font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.box.summary { background: var(--brand-soft); border-color: #c5dde9; }
.box.summary .label { color: var(--brand-dark); }
.box.warn { background: var(--warn-soft); border-color: #f0d6ad; }
.box.warn .label { color: var(--warn); }
.box.danger { background: var(--danger-soft); border-color: #efc3c3; }
.box.danger .label { color: var(--danger); }
.box.ok { background: var(--ok-soft); border-color: #c4e2cd; }
.box.ok .label { color: var(--ok); }

/* Tables */
.table-scroll { overflow-x: auto; margin: 0 0 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 18px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: #eef3f6; color: var(--ink); font-size: 17px; }
td.num { white-space: nowrap; font-weight: 700; color: var(--ink); }
.source { font-size: 16px; color: var(--muted); }

/* Article layout */
.article { padding-bottom: 24px; }
.article h2:first-of-type { margin-top: 40px; }
.next-steps { display: flex; flex-wrap: wrap; gap: 14px; margin: 36px 0 0; }

/* Quote call-to-action in the nav and in pages */
.main-nav a.nav-cta { background: var(--brand); color: #fff; }
.main-nav a.nav-cta:hover, .main-nav a.nav-cta[aria-current="page"] { background: var(--brand-dark); color: #fff; }
.cta-band {
  background: var(--brand); color: #fff; border-radius: var(--radius); padding: 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin: 56px 0 0;
}
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: 28px; }
.cta-band p { margin: 0; color: #dcebf3; }
.cta-band .btn { background: #fff; color: var(--brand-dark); }
.cta-band .btn:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* Quote page layout */
.quote-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; }
.side-card h3 { margin-bottom: 12px; }
.side-card ol, .side-card ul { margin-bottom: 0; }
.side-card p:last-child { margin-bottom: 0; }
.person { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 24px; flex: none; border: 2px dashed #9cc3d6; }

/* Forms: big, clear, forgiving */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
fieldset { border: 0; padding: 0; margin: 0 0 32px; }
legend { font-size: 24px; font-weight: 700; color: var(--ink); margin-bottom: 4px; padding: 0; }
.step-hint { color: var(--muted); font-size: 18px; margin: 0 0 18px; }
.field { margin-bottom: 22px; }
.field label, .group-label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.field .optional { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; font: inherit; font-size: 20px; color: var(--ink);
  padding: 14px 16px; min-height: 58px; border: 2px solid #b9c7d1; border-radius: 10px; background: #fff;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: 3px solid #f2a93b; outline-offset: 1px; border-color: var(--brand); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.choices { display: grid; gap: 10px; }
.choices.cols { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--line);
  border-radius: 10px; cursor: pointer; background: #fff; font-weight: 400; margin: 0;
}
.field label.choice { display: flex; font-weight: 400; color: var(--text); margin-bottom: 0; }
.choice:hover { border-color: var(--brand); }
.choice input { width: 26px; height: 26px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
input[type=file] { font-size: 18px; padding: 12px; border: 2px dashed #b9c7d1; border-radius: 10px; width: 100%; background: #fff; }
.consent { background: var(--bg); border-radius: 10px; padding: 18px; }
.consent .choice { background: transparent; border: 0; padding: 0; }
.consent small { display: block; margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
button.btn { border: 0; cursor: pointer; font-family: inherit; }
.hidden-field { position: absolute; left: -9999px; }

/* Results interpreter */
.unit-row { display: flex; gap: 10px; }
.unit-row input { flex: 1 1 auto; min-width: 0; }
.unit-row select { flex: 0 0 auto; width: auto; }
#out { margin-top: 36px; }
#out h2:focus { outline: none; }
.result-list { display: grid; gap: 16px; margin-top: 8px; }
.result { background: var(--surface); border: 1px solid var(--line); border-left-width: 8px; border-radius: 12px; padding: 20px 22px; }
.result p { margin: 0 0 10px; }
.result p:last-child { margin-bottom: 0; }
.result-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.result-top h3 { margin: 0; }
.result-nums { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--muted); font-size: 18px; }
.pill { font-weight: 700; font-size: 16px; padding: 4px 12px; border-radius: 999px; }
.lv-health { border-left-color: var(--danger); }
.lv-health .pill { background: var(--danger-soft); color: var(--danger); }
.lv-watch { border-left-color: #c47a12; }
.lv-watch .pill { background: var(--warn-soft); color: var(--warn); }
.lv-cosmetic { border-left-color: #8a7a5a; }
.lv-cosmetic .pill { background: #f1ede4; color: #5e5136; }
.lv-ok { border-left-color: var(--ok); }
.lv-ok .pill { background: var(--ok-soft); color: var(--ok); }

/* Lab report photo upload */
.upload-card { background: var(--brand-soft); border: 2px dashed #9cc3d6; border-radius: var(--radius); padding: 28px; margin-bottom: 8px; }
.article .upload-card h2 { margin: 0 0 8px; font-size: 26px; }
.upload-btn { cursor: pointer; margin: 6px 0 14px; position: relative; overflow: hidden; }
.visually-hidden { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#report-photo:focus-visible + .read-status, .upload-btn:focus-within { outline: 3px solid #f2a93b; }
.read-status:empty { display: none; }
.read-status { border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: #fff; border: 1px solid var(--line); }
.read-status.busy { border-color: #9cc3d6; }
.read-status.ok { background: var(--ok-soft); border-color: #c4e2cd; }
.read-status.warn { background: var(--warn-soft); border-color: #f0d6ad; }
.or-divider { text-align: center; color: var(--muted); margin: 22px 0; font-weight: 700; }
input.autofilled, select.autofilled { background: #fff8e1; border-color: #c47a12; }

/* County data tables */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.stat strong { display: block; font-size: 38px; line-height: 1.1; color: var(--brand-dark); }
.stat span { font-size: 17px; color: var(--muted); }
@media (max-width: 600px) { .stat-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { margin-top: 88px; background: var(--ink); color: #d7e1e8; padding: 48px 0 36px; font-size: 18px; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-size: 19px; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.fine { margin-top: 36px; padding-top: 20px; border-top: 1px solid #2c3d49; font-size: 16px; color: #b3c2cc; }

/* Phones and tablets */
@media (max-width: 860px) {
  .doors, .trust { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .quote-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 19px; }
  .wrap { padding: 0 16px; }
  h1, .hero h1 { font-size: 36px; }
  h2 { font-size: 27px; margin-top: 44px; }
  .hero { padding: 44px 0 36px; }
  .hero .lead, .page-head .lead { font-size: 21px; }
  .cards { grid-template-columns: 1fr; }
  .main-nav a { padding: 8px 12px; font-size: 18px; }
  .btn { display: block; text-align: center; }
  .two-col, .choices.cols { grid-template-columns: 1fr; }
  .form-card { padding: 22px 18px; }
  .cta-band { padding: 24px 20px; }
}
input.autofilled.check { background: #fdeaea; border-color: var(--danger); }

/* Homepage: free screening offer first */
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 0 0 48px; }
.hero-cta span { color: var(--muted); font-size: 19px; }
.btn.big { font-size: 23px; padding: 20px 34px; }
.doors-head { font-size: 24px; margin: 0 0 18px; color: var(--muted); }
.hero .lead { margin-bottom: 28px; }

/* Get tested: the two options */
.test-option { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 0 0 24px; }
.test-option.primary { border-color: var(--brand); background: var(--brand-soft); }
.test-option .label { display: block; font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: .6px; color: var(--brand-dark); margin-bottom: 6px; }
.article .test-option h2 { margin: 0 0 12px; }
.test-option > :last-child { margin-bottom: 0; }

/* Short request form */
.short-form h2 { margin: 0 0 22px; font-size: 26px; }
.short-form .consent { margin-bottom: 22px; }
.btn.full { display: block; width: 100%; text-align: center; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .choices.three { grid-template-columns: 1fr; } }
.steps { margin: 0; padding-left: 26px; }
.steps li { margin-bottom: 14px; }
.steps li:last-child { margin-bottom: 0; }
