/* ==========================================================================
   LabRequests design system
   Direction: "editorial health authority" — deep teal + burnt coral on a
   cool mint paper, serif display headings over a clean system UI sans.
   No external font fetches; all type is system/web-safe.
   ========================================================================== */

:root {
  /* Brand — deep clinical teal */
  --brand: #0e7c6b;
  --brand-dark: #0a5c50;
  --brand-deep: #083f38;
  --brand-light: #5fd0bd;
  --brand-soft: #e6f6f2;
  --brand-tint: #f2faf8;

  /* Action — burnt coral (distinct from any blue) */
  --accent: #c9502b;
  --accent-dark: #a53b1a;
  --accent-soft: #fdeee7;

  /* Ink & text */
  --ink: #0b2422;
  --ink-2: #16423d;
  --text: #213b38;
  --muted: #5b7370;
  --faint: #8aa39f;

  /* Surfaces */
  --bg: #f4faf8;
  --surface: #ffffff;
  --surface-2: #fbfefd;
  --border: #d9e9e5;
  --border-strong: #bcd9d2;

  /* Notice */
  --warn-bg: #fff8ed;
  --warn-border: #f0d6a4;
  --warn-text: #8a5811;

  /* Shape */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(11, 36, 34, 0.05);
  --shadow-sm: 0 2px 8px rgba(11, 36, 34, 0.06);
  --shadow: 0 14px 30px -18px rgba(11, 36, 34, 0.28);
  --shadow-lg: 0 26px 54px -24px rgba(11, 36, 34, 0.34);

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", system-ui, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
    Palatino, Georgia, "Times New Roman", serif;

  --container: 1180px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(14, 124, 107, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Visible, consistent keyboard focus */
:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
  color: #fff;
  text-decoration: none;
}

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 52%, var(--accent) 100%);
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}

.logo-img {
  max-height: 46px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-xs);
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff !important;
  padding: 0.6rem 1.15rem !important;
  border-radius: var(--radius-xs) !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  box-shadow: 0 3px 10px rgba(169, 59, 26, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.site-nav a.nav-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 8px 18px rgba(169, 59, 26, 0.32);
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  padding: 0.55rem;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink-2);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------------------------------------------------------- Breadcrumbs */
.breadcrumbs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.breadcrumbs a {
  color: var(--brand-dark);
  font-weight: 500;
}
.breadcrumbs a:hover {
  color: var(--brand);
}
.breadcrumbs .sep {
  margin: 0 0.45rem;
  color: var(--border-strong);
}

/* ------------------------------------------------------------- Content */
main {
  padding: 2.75rem 0 1.5rem;
}

.page-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.page-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.35rem + 2.4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1rem;
  text-wrap: balance;
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 2.6rem 0 1rem;
  scroll-margin-top: 5rem;
}

/* Signature accent rule above top-level section headings (money pages only) */
.page-content > section > h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  margin-bottom: 0.7rem;
}

.page-content h3 {
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--ink-2);
  margin: 1.75rem 0 0.5rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--muted);
  line-height: 1.75;
}

.page-content ul,
.page-content ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--muted);
}
.page-content li {
  margin-bottom: 0.55rem;
  line-height: 1.65;
}
.page-content strong {
  color: var(--text);
  font-weight: 700;
}

.lead {
  font-size: 1.16rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 66ch;
  margin-bottom: 1.85rem;
}

/* ---------------------------------------------------------------- Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card:hover::before {
  transform: scaleX(1);
}
.card:hover h3 {
  color: var(--brand-dark);
}

.card h3 {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 0.45rem;
  transition: color 0.15s ease;
}
.card p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.card .meta {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand);
  margin-top: 0.8rem;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9rem;
}
.card-cta::after {
  content: " \2192";
  margin-left: 0.3rem;
  display: inline-block;
  transition: transform 0.15s ease;
}
.card:hover .card-cta::after {
  transform: translateX(4px);
}

/* ------------------------------------------------------------- CTA units */
.cta-bar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--ink) 0%, var(--brand-deep) 55%, var(--brand-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  margin: 1.75rem 0;
  text-align: center;
  box-shadow: 0 20px 40px -24px rgba(11, 36, 34, 0.6);
}
.cta-bar::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 208, 189, 0.28), transparent 68%);
  pointer-events: none;
}
.cta-bar-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.cta-bar-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.4;
  max-width: 46rem;
}
.cta-bar-text strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}
.cta-bar-text span {
  font-size: 0.96rem;
  opacity: 0.92;
}
.cta-bar .affiliate-note {
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  margin: 0.95rem auto 0;
  max-width: 46rem;
  font-size: 0.78rem;
}
.cta-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.96rem;
  white-space: nowrap;
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.cta-bar-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  color: #fff;
  text-decoration: none;
}

.order-card {
  position: relative;
  background: linear-gradient(135deg, var(--brand-soft), var(--surface) 78%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.85rem 1.9rem;
  margin: 1.25rem 0 1.85rem;
  overflow: hidden;
}
.order-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(var(--brand), var(--accent));
}
.order-card-content h2 {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.order-card-content h2::before {
  display: none;
}
.order-card-content p {
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.order-card-meta {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.order-card-meta strong {
  color: var(--ink-2);
}

.inline-cta {
  background: var(--brand-tint);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.85rem;
  margin: 2rem 0;
  text-align: center;
}
.inline-cta p {
  color: var(--ink-2);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
}

.cta-btn,
.action-btn,
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 0.8rem 1.85rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(169, 59, 26, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.cta-btn:hover,
.action-btn:hover,
.cta-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 16px 28px -12px rgba(169, 59, 26, 0.65);
}

/* --------------------------------------------------- Editorial / notice */
.editorial-box {
  margin-top: 2.5rem;
  padding: 1.3rem 1.5rem;
  background: var(--brand-tint);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
}
.editorial-box p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}
.editorial-box p:last-child {
  margin-bottom: 0;
}
.editorial-box strong {
  color: var(--ink-2);
}

.disclaimer-box {
  margin-top: 1.5rem;
  padding: 1.05rem 1.3rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--warn-text);
}
.disclaimer-box strong {
  color: #6f460c;
}

/* ----------------------------------------------------------------- FAQs */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease;
}
.faq-item[open] {
  border-color: var(--border-strong);
  border-left: 4px solid var(--brand);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}
.faq-item[open] summary::after {
  content: "\2212";
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.faq-item p {
  margin-top: 0.8rem;
  margin-bottom: 0;
  color: var(--muted);
}

/* --------------------------------------------------------------- Footer */
.site-footer {
  position: relative;
  background: var(--ink);
  color: #bcd6d0;
  padding: 3.25rem 0 1.6rem;
  margin-top: 3.5rem;
  font-size: 0.9rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-light), var(--brand), var(--accent));
}
.site-footer a {
  color: #a9cfc7;
}
.site-footer a:hover {
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-grid h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-grid ul {
  list-style: none;
}
.footer-grid li {
  margin-bottom: 0.55rem;
}
.footer-base {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: #8fb3ac;
}
.footer-base p {
  margin-bottom: 0.35rem;
}

/* ------------------------------------------------------ Tags & search */
.tag {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0.15rem;
}
.tag:hover {
  background: #d5f0ea;
  text-decoration: none;
}

.search-result {
  padding: 0.6rem 0.2rem;
  border-bottom: 1px solid var(--border);
}
.search-result:last-child {
  border-bottom: none;
}
.search-result a {
  font-weight: 600;
}
#search-results h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.stats-box {
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--brand);
}
.stats-box p {
  margin-bottom: 0.35rem;
  color: var(--ink-2);
  font-size: 0.97rem;
}
.stats-box p:last-child {
  margin-bottom: 0;
}

.text-center {
  text-align: center;
}

.affiliate-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.55rem 0 0;
  line-height: 1.4;
}

/* --------------------------------------------------------------- Mobile */
@media (max-width: 820px) {
  .header-inner {
    flex-wrap: nowrap;
  }
  .menu-toggle {
    display: flex;
  }
  .logo-img {
    max-height: 38px;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    box-shadow: var(--shadow);
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a {
    width: 100%;
    border-radius: var(--radius-xs);
  }
  .nav-cta {
    justify-content: center;
    margin-top: 0.35rem;
  }
  main {
    padding: 1.75rem 0 1rem;
  }
  .page-content {
    padding: 1.6rem 1.35rem;
    border-radius: var(--radius-sm);
  }
  .page-content h1 {
    font-size: clamp(1.6rem, 1.2rem + 4vw, 2.1rem);
  }
  .cta-bar {
    padding: 1.6rem 1.25rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------- Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover,
  .cta-btn:hover,
  .action-btn:hover,
  .cta-button:hover,
  .cta-bar-btn:hover,
  .site-nav a.nav-cta:hover {
    transform: none;
  }
}
