/* ==========================================================================
   LabInformation.org — styles.css
   Original single-file stylesheet. Mobile-first, no frameworks, no @import.
   Design tokens drive every colour; hex values appear only in :root.
   ========================================================================== */

/* ------------------------------ tokens ---------------------------------- */
:root {
  --ink: #10151c;
  --ink-soft: #4a5568;
  --navy: #16324f;
  --teal: #0f8a8a;
  --amber: #e0912f;
  --bone: #f7f6f2;
  --line: #e3e1da;
  --maxw: 1140px;

  --bg: #ffffff;
  --surface: var(--bone);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 21, 28, 0.06), 0 8px 24px rgba(16, 21, 28, 0.06);
  --shadow-sm: 0 1px 2px rgba(16, 21, 28, 0.08);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 1rem;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }

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

/* ------------------------------ layout ---------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: var(--space-6) 0; }
.section-alt { background: var(--surface); }
.section-block { margin-bottom: var(--space-6); }
.section-title { margin-bottom: 0.25em; }
.section-title + .lede { margin-top: 0; }

.lede { font-size: 1.075rem; color: var(--ink-soft); max-width: 64ch; }
.muted { color: var(--ink-soft); }
.updated,
.copyright { font-size: 0.85rem; color: var(--ink-soft); }
.count { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }
.cols { columns: 2; column-gap: 2rem; }

/* --------------------------- a11y utilities ----------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem; top: -100%;
  z-index: 100;
  background: var(--navy); color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; text-decoration: none; }

/* ------------------------------ buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #0f2740; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.cta-inline { display: inline-block; font-weight: 600; margin-top: 0.5rem; }
.cta-inline:hover { text-decoration: underline; }

/* ------------------------------ header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding-block: 0.6rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 1.15rem; }
.brand-tag { font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--teal); color: var(--teal); }

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.nav-links { display: flex; align-items: center; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--navy); font-weight: 500; }
.nav-links a:hover { color: var(--teal); }

.nav-search { display: flex; align-items: center; gap: 0.4rem; }
.nav-search input[type="search"] {
  font: inherit;
  padding: 0.5rem 0.8rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  min-width: 12rem;
  background: #fff;
  color: var(--ink);
}
.nav-search input[type="search"]:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 138, 138, 0.15);
}
.nav-search button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
}
.nav-search button:hover { background: #0c7373; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .nav-search { width: 100%; }
  .nav-search input[type="search"] { flex: 1; min-width: 0; }
}

/* ------------------------------- hero ----------------------------------- */
.hero { background: linear-gradient(180deg, #fff, var(--bone)); border-bottom: 1px solid var(--line); }
.hero-inner {
  padding: var(--space-7) 0 var(--space-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hero-title { margin: 0; max-width: 22ch; }
.hero-sub { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: var(--space-4); }
.hero-search { display: flex; gap: 0.5rem; width: min(100%, 34rem); margin-top: 1.25rem; }
.hero-search input[type="search"] {
  flex: 1; min-width: 0;
  font: inherit;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.hero-search input[type="search"]:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 138, 138, 0.15);
}

/* --------------------------- breadcrumbs -------------------------------- */
.crumbs { font-size: 0.85rem; padding: 0.75rem 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; color: var(--ink-soft); }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--teal); }
.crumbs [aria-current="page"] { color: var(--ink); }

/* ------------------------------- cards ---------------------------------- */
.card-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfd6cf; }
.card-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  height: 100%;
  color: inherit;
}
.card-link:hover { text-decoration: none; }
.card-title { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: 1.05rem; line-height: 1.25; }
.card-meta { font-size: 0.85rem; color: var(--ink-soft); }

/* ------------------------------- chips ---------------------------------- */
.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}
.chip:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }

/* ---------------------- alphabet nav / link lists ----------------------- */
.alphabet-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: var(--space-4) 0 var(--space-5); }
.letter-group { margin-bottom: var(--space-5); }
.letter-group h2 { font-size: 1.25rem; margin-bottom: 0.35rem; padding-bottom: 0.25rem; border-bottom: 2px solid var(--bone); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.link-list a { color: var(--navy); }
.link-list a:hover { color: var(--teal); }
.dir-details { margin-bottom: 1.25rem; }
.dir-details summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 0.5rem 0; }

/* ------------------------- fact / stat rows ----------------------------- */
.test-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin: 1.25rem 0;
  padding: var(--space-4);
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fact { margin: 0; }
.fact-label { margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 600; }
.fact-value { margin: 0.15rem 0 0; font-weight: 600; color: var(--navy); }

.stat-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.stat {
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  text-align: center;
  min-width: 8rem;
}
.stat-num { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.stat-label { display: block; font-size: 0.78rem; color: var(--ink-soft); }

/* --------------------- measures / steps / prose ------------------------- */
.measures { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.measures li { position: relative; padding-left: 1.5rem; }
.measures li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  background: var(--teal);
}
.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: var(--space-3); }
.steps li { counter-increment: step; position: relative; padding-left: 2.5rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 1.8rem; height: 1.8rem;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem;
}
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { margin-bottom: 1em; }

/* -------------------------------- FAQ ----------------------------------- */
.faq { display: grid; gap: var(--space-3); }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-4) 1.1rem; background: #fff; }
.faq-q { margin: 0 0 0.4rem; font-size: 1.05rem; }
.faq-a { margin: 0; color: var(--ink-soft); }

/* ------------------ callout / disclaimer / disclosure ------------------- */
.callout {
  background: #fdf6e8;
  border: 1px solid #f0d9a8;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: var(--space-4) 1.1rem;
  margin: 1.25rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.disclosure,
.disclaimer { font-size: 0.82rem; color: var(--ink-soft); }
.disclosure { background: var(--bone); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; }

/* --------------------------- affiliate box ------------------------------ */
.affiliate-box {
  margin: 1.5rem 0;
  padding: 1.25rem 1.35rem;
  background: #f2fbfb;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
}
.affiliate-kicker { margin: 0; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal); }
.affiliate-title { margin: 0.35rem 0 0.5rem; font-size: 1.25rem; }
.affiliate-cta { margin-top: 0.5rem; }
.affiliate-box .disclosure { margin-top: 0.9rem; background: transparent; border: 0; padding: 0; }

/* ------------------------------ CTA band -------------------------------- */
.cta-band {
  text-align: center;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: var(--space-6) var(--gutter);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 55ch; margin-inline: auto; }
.cta-band .btn-primary { background: var(--amber); color: var(--navy); }
.cta-band .btn-primary:hover { background: #c97f22; }

/* ---------------------- state / city / guide blocks --------------------- */
.state-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.state-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4) 1.1rem; box-shadow: var(--shadow-sm); }
.state-head { padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); margin-bottom: var(--space-4); }
.state-name { margin: 0; }
.state-meta,
.city-test { font-size: 0.9rem; color: var(--ink-soft); }
.city-head { margin-top: var(--space-5); }
.guide { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem; margin-bottom: var(--space-4); }
.test-head .lede { max-width: 72ch; }
.test-detail { display: block; }

/* ------------------------------ footer ---------------------------------- */
.site-footer { background: var(--navy); color: #e8eef2; margin-top: var(--space-7); }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.6rem; }
.site-footer a { color: #cfe4e4; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: var(--space-6) 0;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.92rem; }
.footer-about p { color: #b9c8d3; }
.brand-footer { margin-bottom: 0.6rem; }
.brand-footer .brand-name { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25rem 0 2rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #b9c8d3;
}
.footer-bottom .disclosure,
.footer-bottom .disclaimer,
.footer-bottom .copyright { color: #b9c8d3; margin: 0; }

/* --------------------------- responsive --------------------------------- */
@media (max-width: 640px) {
  .hero-inner { padding: var(--space-6) 0 var(--space-5); }
  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; justify-content: center; }
  .cols { columns: 1; }
  .test-facts { grid-template-columns: 1fr 1fr; }
}

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

@media print {
  .site-header, .site-footer, .nav-search, .hero-actions, .affiliate-box, .cta-band { display: none !important; }
  body { color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: underline; }
  .card, .callout, .faq-item { break-inside: avoid; }
}
