/* ============================================================
   FSA Eligible Water Filter — design system
   Subject: trustworthy health-finance resource on FSA/HSA-eligible
   water filtration. Accent system encodes meaning:
   green = eligibility/approval, amber = money/savings.
   Display: Newsreader (editorial authority)
   Body/UI: Public Sans (US-government typeface → regulatory trust)
   ============================================================ */

:root {
  --ink:        #122a23;   /* deep green-slate, primary text + dark surfaces */
  --ink-2:      #2c4a40;
  --paper:      #fbfaf5;   /* warm clinical off-white */
  --surface:    #ffffff;
  --line:       #e3dfd2;   /* warm hairline */
  --line-2:     #cfcab8;
  --eligible:   #137a56;   /* approval green */
  --eligible-dk:#0c5a3f;
  --eligible-soft:#e7f2ec;
  --savings:    #a9741a;   /* money amber/gold */
  --savings-dk: #845a12;
  --savings-soft:#f7efdc;
  --muted:      #5e6b64;
  --danger:     #9c3a2d;
  --danger-soft:#f6e9e6;

  --maxw: 1140px;
  --measure: 68ch;
  --radius: 4px;
  --radius-lg: 10px;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(18,42,35,.06), 0 2px 8px rgba(18,42,35,.05);
  --shadow-md: 0 6px 24px rgba(18,42,35,.10);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--eligible-dk); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--eligible); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.prose { max-width: var(--measure); }

/* ---------- Type scale ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; line-height: 1.15; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); margin: 2.2em 0 .55em; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); margin: 1.8em 0 .4em; }
h4 { font-size: 1.08rem; margin: 1.4em 0 .3em; font-weight: 600; }
p { margin: 0 0 1.15em; }
strong { font-weight: 700; }
.lede { font-size: 1.22rem; line-height: 1.6; color: var(--ink-2); }

.eyebrow {
  font-family: var(--sans);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--eligible-dk);
  display: inline-flex; align-items: center; gap: .5em;
}
.eyebrow.amber { color: var(--savings-dk); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,245,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand .seal {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1.5px solid var(--eligible); border-radius: 50%;
  color: var(--eligible); background: var(--eligible-soft);
}
.brand .seal svg { width: 18px; height: 18px; }
.brand b { font-family: var(--serif); font-weight: 600; font-size: 1.18rem; letter-spacing: -.02em; line-height: 1; }
.brand small { display: block; font-family: var(--sans); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

.nav-links { display: flex; gap: 1.35rem; margin-left: auto; align-items: center; }
.nav-links a {
  font-size: .93rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  padding: .4rem 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--eligible-dk); border-bottom-color: var(--eligible); }
.nav-cta {
  font-size: .9rem !important; font-weight: 600 !important;
  background: var(--eligible); color: #fff !important;
  padding: .55rem .95rem !important; border-radius: var(--radius); border-bottom: none !important;
}
.nav-cta:hover { background: var(--eligible-dk); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); width: 42px; height: 38px; cursor: pointer; color: var(--ink); }

@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .5rem 22px 1rem; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-top: .7rem; text-align: center; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(2.2rem, 5vw, 4rem) 0 1.5rem; }
.hero .meta { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; color: var(--muted); font-size: .85rem; margin-top: .4rem; }
.hero .meta span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- Signature: eligibility stamp ---------- */
.verdict {
  position: relative;
  border: 2px solid var(--eligible);
  background: var(--eligible-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem 1.4rem 5.4rem;
  margin: 1.8rem 0;
  box-shadow: var(--shadow-sm);
}
.verdict::before {
  content: "";
  position: absolute; left: 1.1rem; top: 1.25rem;
  width: 3.1rem; height: 3.1rem; border-radius: 50%;
  border: 2px dashed var(--eligible);
  background:
    radial-gradient(circle at center, var(--surface) 60%, transparent 61%);
}
.verdict .seal-check {
  position: absolute; left: 1.55rem; top: 1.7rem;
  color: var(--eligible); width: 2.2rem; height: 2.2rem;
}
.verdict .status { font-family: var(--sans); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; color: var(--eligible-dk); margin: 0 0 .25rem; }
.verdict .ruling { font-family: var(--serif); font-size: 1.28rem; line-height: 1.32; margin: 0; color: var(--ink); }
.verdict .ruling b { color: var(--eligible-dk); font-weight: 600; }
.verdict.caution { border-color: var(--savings); background: var(--savings-soft); }
.verdict.caution::before { border-color: var(--savings); }
.verdict.caution .seal-check { color: var(--savings-dk); }
.verdict.caution .status { color: var(--savings-dk); }

@media (max-width: 520px) {
  .verdict { padding: 1.2rem 1.1rem; }
  .verdict::before, .verdict .seal-check { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  background: var(--eligible); color: #fff; text-decoration: none;
  padding: .8rem 1.4rem; border-radius: var(--radius); border: none; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--eligible-dk); color: #fff; transform: translateY(-1px); }
.btn.amber { background: var(--savings); }
.btn.amber:hover { background: var(--savings-dk); }
.btn.ghost { background: transparent; color: var(--eligible-dk); border: 1.5px solid var(--eligible); }
.btn.ghost:hover { background: var(--eligible-soft); color: var(--eligible-dk); }
.btn .arr { transition: transform .15s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- CTA box (affiliate) ---------- */
.cta-box {
  border: 1px solid var(--line); border-left: 4px solid var(--eligible);
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem; margin: 1.8rem 0; box-shadow: var(--shadow-sm);
}
.cta-box .kicker { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--eligible-dk); }
.cta-box h3, .cta-box h4 { margin: .3rem 0 .5rem; }
.cta-box p { color: var(--ink-2); margin-bottom: 1rem; }
.cta-box .price { font-family: var(--serif); font-size: 1.15rem; color: var(--savings-dk); }
.cta-box .price s { color: var(--muted); font-size: .9rem; }

/* ---------- Savings math table ---------- */
.math {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; margin: 1.6rem 0;
}
.math > div { background: var(--surface); padding: 1.2rem 1.3rem; }
.math .head { font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.math .row { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.math .row:last-child { border-bottom: none; font-weight: 700; }
.math .savings-col { background: var(--savings-soft); }
.math .savings-col .big { font-family: var(--serif); font-size: 1.6rem; color: var(--savings-dk); }
@media (max-width: 520px) { .math { grid-template-columns: 1fr; } }

/* ---------- Generic tables ---------- */
.tbl-scroll { overflow-x: auto; margin: 1.6rem 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 540px; }
table.data th, table.data td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--ink); color: #fff; font-weight: 600; font-size: .84rem; letter-spacing: .02em; }
table.data tbody tr:nth-child(even) { background: rgba(231,242,236,.4); }
table.data .yes { color: var(--eligible-dk); font-weight: 700; }
table.data .no { color: var(--danger); font-weight: 700; }

/* ---------- Callouts ---------- */
.note { border-radius: var(--radius-lg); padding: 1.1rem 1.3rem; margin: 1.5rem 0; font-size: .96rem; }
.note .lab { display: block; font-weight: 700; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .35rem; }
.note.key { background: var(--eligible-soft); border: 1px solid #cfe6da; }
.note.key .lab { color: var(--eligible-dk); }
.note.warn { background: var(--danger-soft); border: 1px solid #ecd2cc; }
.note.warn .lab { color: var(--danger); }
.note.tip { background: var(--savings-soft); border: 1px solid #ecdcbb; }
.note.tip .lab { color: var(--savings-dk); }

/* ---------- TOC ---------- */
.toc { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-lg); padding: 1.2rem 1.4rem; margin: 2rem 0; }
.toc .lab { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .35rem; font-size: .95rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--eligible-dk); text-decoration: underline; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.6rem 0; }
.steps li { position: relative; padding-left: 3.2rem; margin-bottom: 1.3rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: var(--eligible); color: #fff;
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  display: grid; place-items: center;
}
.steps li h4 { margin: .1rem 0 .25rem; }

/* ---------- FAQ ---------- */
.faq { margin: 1.6rem 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative; font-family: var(--serif); font-size: 1.12rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: .85rem; font-size: 1.5rem; color: var(--eligible); font-family: var(--sans); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 1.1rem; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Pros / cons ---------- */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.6rem 0; }
.proscons > div { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem 1.3rem; background: var(--surface); }
.proscons h4 { margin-top: 0; }
.proscons ul { margin: 0; padding-left: 1.1rem; }
.proscons li { margin-bottom: .5rem; }
.proscons .pro { border-top: 3px solid var(--eligible); }
.proscons .con { border-top: 3px solid var(--danger); }
@media (max-width: 560px) { .proscons { grid-template-columns: 1fr; } }

/* ---------- Rating ---------- */
.rating { display: flex; align-items: baseline; gap: .6rem; margin: .4rem 0 1rem; }
.rating .score { font-family: var(--serif); font-size: 2.4rem; color: var(--eligible-dk); line-height: 1; }
.rating .out { color: var(--muted); font-size: .95rem; }
.rating .stars { color: var(--savings); letter-spacing: 2px; }

/* ---------- Author / trust strip ---------- */
.byline { display: flex; align-items: center; gap: .8rem; padding: 1.2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1.5rem 0; }
.byline .av { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 1.2rem; flex: none; }
.byline .who { font-size: .92rem; }
.byline .who b { display: block; }
.byline .who span { color: var(--muted); font-size: .85rem; }

/* ---------- Cards grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.3rem; margin: 1.8rem 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.card h3 { margin: .2rem 0 .4rem; font-size: 1.22rem; }
.card p { color: var(--ink-2); font-size: .95rem; flex-grow: 1; }
.card .tag { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--eligible-dk); }
.card a.more { font-weight: 600; text-decoration: none; }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .82rem; color: var(--muted); padding: 1rem 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--eligible-dk); }

/* ---------- Disclosure ---------- */
.disclosure { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: .7rem 1rem; font-size: .82rem; color: var(--muted); margin: 1.2rem 0; }
.disclosure b { color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd8d1; margin-top: 4rem; padding: 3rem 0 1.5rem; font-size: .92rem; }
.site-footer a { color: #cdd8d1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.foot-grid h5 { font-family: var(--sans); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: #8fa69a; margin: 0 0 .9rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: .55rem; }
.foot-brand b { font-family: var(--serif); font-size: 1.3rem; color: #fff; }
.foot-brand p { color: #9fb1a7; max-width: 34ch; margin-top: .6rem; }
.foot-bottom { border-top: 1px solid #284a3e; margin-top: 2.4rem; padding-top: 1.3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: #8fa69a; font-size: .82rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Section divider ---------- */
.rule { border: none; border-top: 1px solid var(--line); margin: 2.4rem 0; }
.section-pad { padding: 2.5rem 0; }
.bg-soft { background: var(--eligible-soft); }

/* ---------- Misc ---------- */
.updated { font-size: .82rem; color: var(--muted); }
.sources { font-size: .88rem; color: var(--muted); }
.sources ol { padding-left: 1.2rem; }
.sources li { margin-bottom: .4rem; }
.center { text-align: center; }
.mt0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

:focus-visible { outline: 3px solid var(--savings); outline-offset: 2px; border-radius: 2px; }

/* LMN template box */
.lmn-template { border: 1px solid var(--line-2); border-left: 4px solid var(--ink); background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1.4rem 0; font-size: .95rem; }
.lmn-template h4 { margin: .2rem 0 .8rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--muted); }
.lmn-template p { margin: 0 0 .7rem; }
.lmn-template .blank { color: var(--eligible-dk); font-style: italic; }

/* ---- Founder image, byline avatar, footer contact, HTML sitemap ---- */
.byline .av { overflow: hidden; }
.byline .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.founder { display: flex; gap: 1.3rem; align-items: center; margin: 1.4rem 0 1.8rem; padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.founder img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--line); }
.founder .fname { font-family: var(--serif); font-size: 1.3rem; margin: 0; }
.founder .frole { color: var(--muted); font-size: .9rem; margin: .2rem 0 0; }
.contact-block { font-style: normal; line-height: 1.6; margin: .4rem 0 1rem; }
.foot-contact { margin-top: 1rem; font-style: normal; font-size: .85rem; line-height: 1.55; color: #9fb4a8; }
.foot-contact a { color: #cfe3d8; }
.smap-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.4rem 0 2.2rem; }
.smap-stats .stat { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1.1rem; }
.smap-stats .num { font-family: var(--serif); font-size: 1.5rem; color: var(--eligible); display: block; line-height: 1.1; }
.smap-stats .lbl { font-size: .8rem; color: var(--muted); }
.smap-cat { margin: 1.9rem 0; }
.smap-cat h2 { margin-bottom: .25rem; }
.smap-cat .cnt { color: var(--muted); font-size: .85rem; }
.smap-cat ul { columns: 2; column-gap: 2.2rem; margin: .7rem 0 0; padding-left: 1.1rem; }
.smap-cat li { margin-bottom: .45rem; break-inside: avoid; }
@media (max-width: 640px) { .smap-cat ul { columns: 1; } }

/* ---- Contact page: details cards + form ---- */
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.4rem 0 1.8rem; }
.contact-cards .cc { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; background: #fff; }
.contact-cards .cc h3 { margin: .1rem 0 .35rem; font-size: 1rem; }
.contact-cards .cc p { margin: 0; }
.contact-cards .cc a { word-break: break-word; }
@media (max-width: 560px) { .contact-cards { grid-template-columns: 1fr; } }
.cform { display: grid; gap: 1.05rem; margin: 1.3rem 0 1.6rem; max-width: 660px; }
.cform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
@media (max-width: 560px) { .cform .row2 { grid-template-columns: 1fr; } }
.cform label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.cform input, .cform select, .cform textarea { width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.cform textarea { min-height: 150px; resize: vertical; }
.cform input:focus, .cform select:focus, .cform textarea:focus { outline: 2px solid var(--eligible); outline-offset: 1px; border-color: var(--eligible); }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform button { justify-self: start; }

/* ---- Footer legal links row ---- */
.foot-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; }
.foot-legal a { color: #9fb4a8; }
.foot-legal a:hover { color: #fff; }

/* ---- Homepage featured (hero) image ---- */
.hero-figure { margin: 1.7rem 0 .4rem; }
.hero-figure img { width: 100%; height: auto; border-radius: 16px; display: block; border: 1px solid var(--line); }
.hero-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
