/* Reliable Medical Billing and Coding LLC
   Mobile-first. Base styles = phone layout (designed at 390px).
   Tablet layout  : viewport >= 45em   (720px at default text size)
   Desktop layout : viewport >= 68.75em (1100px at default text size)
   Breakpoints are in em so they also respond to a larger browser text size. */

/* Fonts are self-hosted (see fonts/). Both are variable fonts, so one file covers
   regular and bold. License: SIL Open Font License 1.1 (copies in fonts/). */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
}

:root {
  --green-900: #1F3D2B;
  --green-700: #355E3B;
  --gold: #C8A24A;
  --gold-ink: #7A5C12;
  --ink: #1C2421;
  --muted: #45524B;
  --line: #D5DDD6;
  --cream: #F7F5EE;
  --sage: #E6EFE8;
  --mist: #DCE8DF;
  --charcoal: #1C2421;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
}

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

h1, h2, h3, p, figure { margin: 0; }

a { color: var(--green-700); }
a:focus-visible { outline: 3px solid var(--green-900); outline-offset: 3px; }
.on-dark a:focus-visible { outline-color: var(--gold); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 10;
  background: var(--green-900); color: #FFFFFF;
  padding: 12px 18px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* ---------- Shared pieces ---------- */

.btn {
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.contact-link, .nav-link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color .15s ease;
}

.section-inner { max-width: 1120px; margin-inline: auto; padding: 56px 20px; }
.section-head { display: flex; flex-direction: column; gap: 12px; }
.section-title {
  font-family: var(--serif); font-size: 2rem; line-height: 1.15; color: var(--green-900);
  font-weight: 700;
}
.section-lede { font-size: 1.0625rem; line-height: 1.6; color: var(--muted); }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 32px; }

.label {
  font-size: .875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}

/* ---------- Header ---------- */

.site-header { background: var(--cream); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 1120px; margin-inline: auto; padding: 12px 20px 4px;
  display: grid; grid-template-columns: auto 1fr;
  grid-template-areas: "logo phone" "nav nav";
  align-items: center; column-gap: 12px;
}
.logo { grid-area: logo; display: block; line-height: 0; }
.logo img { width: 68px; }
.header-phone { grid-area: phone; justify-self: end; }
.main-nav { grid-area: nav; display: flex; align-items: center; justify-content: space-between; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 1rem; color: var(--ink);
}
.btn-header {
  display: inline-flex; align-items: center; min-height: 48px;
  font-size: 1.0625rem; font-weight: 700; color: #FFFFFF; background: var(--green-700);
  padding: 0 20px; border-radius: 999px;
}

/* ---------- Hero ---------- */

.hero { background: var(--green-900); }
.hero-inner {
  max-width: 1000px; margin-inline: auto; padding: 56px 20px 64px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.5; color: var(--gold); }
.hero-title {
  font-family: var(--serif); font-size: 2.125rem; line-height: 1.15; font-weight: 700;
  color: #FFFFFF; text-wrap: balance;
}
.hero-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 420px; margin-top: 4px; }
.btn-call, .btn-email {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; font-size: 1.125rem; font-weight: 700; padding: 0 24px; border-radius: 999px;
}
.btn-call { color: var(--ink); background: var(--gold); }
.btn-email { color: #FFFFFF; background: transparent; border: 2px solid var(--mist); }
.hero-note { font-size: 1rem; line-height: 1.5; color: var(--gold); }

/* ---------- Services Slider ---------- */

.slider {
  display: flex; gap: 12px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-left: 20px;
  margin-inline: -20px; padding: 0 20px 12px;
  scrollbar-width: thin; scrollbar-color: var(--green-700) var(--mist);
}
.slider:focus-visible { outline: 3px solid var(--green-900); outline-offset: -3px; }
.slider > .card { flex: 0 0 calc(100% - 36px); scroll-snap-align: start; }
/* Mouse users can drag the slider (see js/main.js). Snapping pauses until it settles. */
.slider.is-dragging { scroll-snap-type: none; user-select: none; }

.card {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.card-title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; color: var(--green-900); font-weight: 700; }
.card-text { font-size: 1.0625rem; line-height: 1.6; color: var(--muted); }

/* ---------- Who we work with ---------- */

.section--sage { background: var(--sage); }
.client-list { display: flex; flex-direction: column; gap: 16px; }
.client-card { background: #FFFFFF; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.client-card .card-title { font-size: 1.5rem; }

/* ---------- About ---------- */

.about-grid { display: grid; gap: 32px; }
.about-photo { display: flex; flex-direction: column; gap: 12px; }
.about-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 15%; border-radius: 14px; }
.about-photo figcaption { display: flex; flex-direction: column; gap: 2px; }
.person-name { font-family: var(--serif); font-size: 1.375rem; line-height: 1.2; color: var(--green-900); }
.person-role { font-size: 1rem; line-height: 1.5; color: var(--muted); }
.about-text { display: flex; flex-direction: column; gap: 16px; }
.about-text p { font-size: 1.0625rem; line-height: 1.7; color: var(--muted); }
.credentials {
  margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 24px;
}
.credential { display: flex; flex-direction: column; gap: 6px; }
.credential .label { color: var(--gold-ink); }
.credential h3 { font-family: var(--serif); font-size: 1.375rem; line-height: 1.25; color: var(--green-900); font-weight: 700; }
.credential p { font-size: 1.0625rem; line-height: 1.5; color: var(--muted); }

/* ---------- Contact ---------- */

.section--green { background: var(--green-900); }
.section--green .section-title { color: #FFFFFF; }
.section--green .section-lede { color: var(--mist); }
.contact-grid { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; flex-direction: column; gap: 4px; }
.contact-item .label { color: var(--gold); }
.contact-link, .contact-value {
  font-family: var(--serif); font-size: 1.625rem; color: #FFFFFF; line-height: 1.4;
}
.contact-link {
  display: inline-flex; align-items: center; align-self: flex-start; min-height: 48px;
  overflow-wrap: anywhere;
}
.contact-hours { display: flex; flex-direction: column; gap: 2px; font-size: 1.125rem; line-height: 1.5; color: #FFFFFF; }
.contact-hours .tz { font-size: 1rem; color: var(--mist); }
.privacy-note {
  padding: 16px 18px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 12px;
  font-size: 1rem; line-height: 1.6; font-weight: 700; color: var(--mist);
}

/* ---------- Footer ---------- */

.site-footer { background: var(--charcoal); }
.footer-inner {
  max-width: 1120px; margin-inline: auto; padding: 28px 20px;
  display: flex; flex-direction: column-reverse; align-items: flex-start; text-align: left; gap: 12px;
  color: #D5DDD6;
}
.footer-copy { font-size: 1rem; line-height: 1.5; }
.footer-tagline { font-family: var(--serif); font-size: 1.125rem; }
.footer-links { display: flex; align-items: center; gap: 1rem; }

/* ---------- Hover (only on devices that can hover) ---------- */

@media (hover: hover) {
  .btn-header:hover { background: var(--green-900); }
  .btn-call:hover { background: #E3C57A; }
  .btn-email:hover { background: var(--cream); color: var(--green-900); border-color: var(--cream); }
  .contact-link:hover, .nav-link:hover { text-decoration-color: currentColor; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .btn, .contact-link, .nav-link { transition: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* =====================================================
   TABLET  (viewport >= 45em)
   ===================================================== */
@media (min-width: 45em) {
  .section-inner { padding: 72px 32px; }
  .stack { gap: 40px; }
  .section-head { max-width: 600px; }
  .section-title { font-size: 2.375rem; line-height: 1.12; }
  .section-lede { font-size: 1.125rem; }

  /* Header: one row */
  .header-inner { display: flex; gap: 20px; padding: 12px 32px; }
  .logo img { width: 72px; }
  .main-nav { margin-left: auto; justify-content: flex-start; gap: 20px; }
  .btn-header { font-size: 1rem; }

  /* Hero */
  .hero-inner { padding: 80px 40px 88px; gap: 24px; }
  .eyebrow { font-size: .875rem; letter-spacing: .14em; }
  .hero-title { font-size: 2.75rem; line-height: 1.12; }
  .hero-actions { flex-direction: row; justify-content: center; width: auto; max-width: none; gap: 16px; margin-top: 8px; }
  .btn-call, .btn-email { padding: 0 28px; }
  .hero-note { font-size: 1.0625rem; }

  /* Services: still a slider. --visible whole cards fit, plus a --peek-wide
    sliver of the next one. The window is exactly as wide as the container, so
    the row lines up with the Who we serve cards. */
  .slider {
    --visible: 2; --gap: 20px; --peek: 56px;
    gap: var(--gap); margin-inline: 0; padding: 0 0 16px; scroll-padding-left: 8px;
  }
  .slider > .card {
    flex: 0 0 calc((100% - var(--visible) * var(--gap) - var(--peek)) / var(--visible));
  }
  .card { padding: 28px; gap: 12px; }

  /* Who we work with: 3 columns */
  .client-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .client-card { gap: 12px; }
  .client-card .card-title { font-size: 1.375rem; }

  /* About: photo beside text, title above the text */
  .about-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr;
    column-gap: 20px; row-gap: 0; align-items: start;
  }
  .about-title { grid-column: 6 / -1; grid-row: 1; padding-left: 24px; margin-bottom: 20px; }
  .about-photo { grid-column: 1 / span 5; grid-row: 1 / span 2; gap: 14px; }
  .about-photo img { aspect-ratio: 4 / 5; object-position: center top; }
  .about-text { grid-column: 6 / -1; grid-row: 2; padding-left: 24px; gap: 20px; }
  .about-text p { font-size: 1.125rem; }

  /* Contact: 2 columns */
  .contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; row-gap: 24px; }
  .contact-item { gap: 6px; }
  .contact-link, .contact-value { font-size: 1.75rem; }
  .privacy-note { padding: 18px 22px; font-size: 1.0625rem; }

  /* Footer */
  .footer-inner {
    flex-direction: row; justify-content: space-between; flex-wrap: wrap;
    text-align: left; gap: 16px 24px; padding: 28px 32px;
  }
}

/* =====================================================
   DESKTOP  (viewport >= 68.75em)
   ===================================================== */
@media (min-width: 68.75em) {
  .section-inner { padding: 96px 32px; }
  .stack { gap: 48px; }
  .section-head { max-width: 640px; }
  .section-title { font-size: 2.75rem; line-height: 1.1; }
  .section-lede { font-size: 1.1875rem; }

  .header-inner { padding: 16px 32px; gap: 32px; }
  .logo img { width: 88px; }
  .main-nav { gap: 32px; }
  .nav-link { font-size: 1.0625rem; }
  .btn-header { font-size: 1.0625rem; min-height: 48px; padding: 0 22px; }

  .hero-inner { padding: 104px 32px 112px; }
  .hero-title { font-size: 3.375rem; line-height: 1.1; }
  .btn-call, .btn-email { min-height: 56px; }

  .slider { --visible: 3; --gap: 24px; --peek: 64px; }
  .client-list { gap: 24px; }
  .client-card { padding: 32px; }
  .client-card .card-title { font-size: 1.625rem; }

  .about-grid { column-gap: 24px; }
  .about-title { padding-left: 40px; }
  .about-photo { gap: 16px; }
  .person-name { font-size: 1.5rem; }
  .person-role { font-size: 1.0625rem; }
  .about-text { padding-left: 40px; }
  .about-text p { font-size: 1.1875rem; }
  .credentials { margin-top: 12px; padding-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .credential { gap: 8px; }

  .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .contact-item { gap: 8px; }
  .contact-item--wide { grid-column: 1 / -1; }
  .contact-hours { font-size: 1.1875rem; }
  .contact-link, .contact-value { font-size: 1.875rem; }
  .privacy-note { padding: 20px 24px; }

  .footer-inner { padding: 32px; }
}

/* 
---------- Email Address Sizing ---------- 
Sets the size of the email address, per screen width, so it stays on one line.
If it does wrap, it does so after the @ symbol. The <wbr> in the HTML allows for this clean break
*/

/*  Phones (default): a bit smaller than the phone number so it fits a narrow card. */
.contact-link[href^="mailto:"] { font-size: 1.4rem; }

/* Very small phones (360px and narrower): smaller again so it doesn't split in the middle of the domain. */
@media (max-width: 22.5em) {
  .contact-link[href^="mailto:"] { font-size: 1.2rem; }
}

/*  Tablets (720px and wider): the contact info is in two columns, so each column is narrow.
    1.3rem is the largest size that fits on one line for the email address. */
@media (min-width: 45em) {
  .contact-link[href^="mailto:"] { font-size: 1.3rem; }
}

/* Small laptops (1024px and wider): the columns are wide enough for a larger size. */
@media (min-width: 64em) {
  .contact-link[href^="mailto:"] { font-size: 1.75rem; }
}

/*  Desktop (1100px and wider):
    - The three columns fit their content, and spread accross the row, so the email address can be larger.
    - The email address now matches the phone and fax number sizes.
*/
@media (min-width: 68.75em) {
  .contact-grid { grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .contact-link[href^="mailto:"] { font-size: 1.875rem; }
}

/* =====================================================
   DARK THEME
   Applies only when the visitor's device or browser is set to dark mode.
   Everyone else keeps the light design above, unchanged.
   Dark values are set per element (not by changing the shared color tokens),
   because some tokens are used both as a background and as text color.
   Contrast was checked for every text and background pair.
   ===================================================== */

/* Tell the browser the page supports both, so built-in parts
   (scrollbars, form controls) match the active theme. */
:root { color-scheme: light dark; }

@media (prefers-color-scheme: dark) {

  /* Page and text */
  body { background: #171818; color: #EDEBE4; }
  a { color: #8CC79B; }

  /* Keyboard focus outlines: the dark green outline would vanish on a dark page,
     so use gold instead. */
  a:focus-visible { outline-color: var(--gold); }
  .slider:focus-visible { outline-color: var(--gold); }

  /* Header. The logo's text is black on a transparent background, so it sits on a
     round cream backing. The negative margin cancels the padding so the header
     layout does not shift. content-box is needed because the page-wide rule is
     border-box, which would shrink the logo instead. */
  .site-header { background: #171818; border-bottom-color: #3F4543; }
  .logo img {
    background: var(--cream); border-radius: 50%;
    padding: 4px; margin: -4px; box-sizing: content-box;
  }
  .nav-link { color: #EDEBE4; }
  .btn-header { background: #3F7249; }

  /* Section headings and intro text. The green and contact sections keep their own
     light-on-green text (set by more specific rules above), so they are not touched. */
  .section-title { color: #CFE6D5; }
  .section-lede { color: #CDCBC4; }

  /* Services cards and the slider scrollbar */
  .slider { scrollbar-color: #7FB48B #2E3231; }
  .card { background: #242727; border-color: #3F4543; }
  .card-title { color: #CFE6D5; }
  .card-text { color: #CDCBC4; }

  /* Who we serve: a lighter sage-gray band, with cards styled like the Services cards. */
  .section--sage { background: #3B4740; }
  .section--sage .section-title { color: #F2F2EE; }
  .section--sage .section-lede { color: #DADAD4; }
  .client-card { background: #242727; border: 1px solid #3F4543; }

  /* About */
  .person-name { color: #CFE6D5; }
  .person-role, .about-text p, .credential p { color: #CDCBC4; }
  .credentials { border-top-color: #3F4543; }
  .credential .label { color: #D9B65F; }
  .credential h3 { color: #CFE6D5; }

  /* Footer: slightly darker than the page so it still reads as a separate band. */
  .site-footer { background: #0C0D0D; }

  /* Hover (only on devices that can hover). The header button gets lighter on hover
     in dark mode; the light version darkens it. */
  @media (hover: hover) {
    .btn-header:hover { background: #4A7C55; }
  }
}

/* =====================================================
   PRIVACY POLICY PAGE + FOOTER LINK
   Added at the END of styles.css (after the email sizing block and the dark mode block).
   Mobile-first, same breakpoints as the rest of the file:
   tablet >= 45em, desktop >= 68.75em.
   ===================================================== */

/* ---------- Footer link (on every page) ----------
   The footer is a column-reverse flex box on phones, so the link shows above the
   copyright line there, and sits opposite it on tablet and desktop. */
.footer-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 1rem; color: #D5DDD6;
  text-decoration: underline; text-underline-offset: 4px;
}
.footer-link:focus-visible { outline-color: var(--gold); }

/* ---------- Page header band ---------- */

.page-hero { background: var(--green-900); }
.page-hero-inner {
  max-width: 1120px; margin-inline: auto; padding: 16px 20px 44px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.back-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 1rem; color: var(--mist); text-underline-offset: 4px;
}
.page-title {
  font-family: var(--serif); font-size: 2.375rem; line-height: 1.12; font-weight: 700;
  color: #FFFFFF;
}

/* ---------- Policy text ---------- */

.policy-inner {
  max-width: 1120px; margin-inline: auto; padding: 40px 20px 64px;
}
.policy-body { display: flex; flex-direction: column; gap: 36px; }
.policy-section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 24px; }
.policy-section h2 {
  font-family: var(--serif); font-size: 1.625rem; line-height: 1.2; color: var(--green-900);
  font-weight: 700;
}
.policy-section p { font-size: 1.0625rem; line-height: 1.7; color: var(--muted); }
.policy-section a { text-underline-offset: 3px; overflow-wrap: anywhere; }

/* The "Patient health information" section is boxed so it stands out. */
.policy-callout {
  background: var(--sage); border: 1px solid var(--sage); border-radius: 14px; padding: 22px;
}

/* "On this page" list: desktop only (see the desktop block below). */
.policy-toc { display: none; }
.toc-list { list-style: none; margin: 12px 0 0; padding: 0; border-left: 2px solid var(--line); }
.policy-toc .label { color: var(--gold-ink); }
.toc-link {
  display: flex; align-items: center; min-height: 44px; padding: 6px 0 6px 16px;
  font-size: 1rem; line-height: 1.35;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: text-decoration-color .15s ease;
}

@media (hover: hover) {
  .footer-link:hover { color: #FFFFFF; }
  .back-link:hover { color: #FFFFFF; }
  .toc-link:hover { text-decoration-color: currentColor; }
}
@media (prefers-reduced-motion: reduce) {
  .toc-link { transition: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 45em) {
  .page-hero-inner { padding: 24px 32px 60px; gap: 16px; }
  .back-link { font-size: 1.0625rem; }
  .page-title { font-size: 2.75rem; }

  .policy-inner { padding: 56px 32px 88px; }
  .policy-body { gap: 40px; }
  .policy-section h2 { font-size: 1.75rem; }
  .policy-section p { font-size: 1.125rem; max-width: 680px; }
  .policy-callout { padding: 28px; }
}

/* ---------- Desktop: text on the left, "On this page" list on the right ---------- */
@media (min-width: 68.75em) {
  .page-hero-inner { padding: 40px 32px 72px; gap: 20px; }
  .page-title { font-size: 3.375rem; line-height: 1.1; }

  .policy-inner {
    padding: 72px 32px 112px;
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start;
  }
  .policy-body { grid-column: span 8; gap: 48px; }
  .policy-section { gap: 14px; }
  .policy-section h2 { font-size: 1.875rem; }
  .policy-callout { max-width: 744px; padding: 32px; }

  .policy-toc { display: block; grid-column: 10 / span 3; position: sticky; top: 24px; align-self: start; }
}

/* ---------- Dark mode (follows the visitor's device setting, like the rest of the site) ---------- */
@media (prefers-color-scheme: dark) {
  .policy-section h2 { color: #CFE6D5; }
  .policy-section p { color: #CDCBC4; }
  .policy-section a, .toc-link { color: #8CC79B; }
  .policy-callout { background: #242727; border-color: #3F4543; }
  .toc-list { border-left-color: #3F4543; }
  .policy-toc .label { color: #D9B65F; }
}

/* =====================================================
   FAQ PAGE
   Added at the END of styles.css. Mobile-first, same breakpoints as the
   rest of the file: tablet >= 45em, desktop >= 68.75em.
   ===================================================== */

/* ---------- Hero intro text (under the page-hero heading) ---------- */
.page-lede { max-width: 640px; font-size: 1.0625rem; line-height: 1.6; color: var(--mist); }

/* ---------- Category tabs ----------
   A horizontally scrolling row of pill buttons that filter which cards show.
   Scrolls natively on touch and trackpads; no custom drag handling needed. */
.faq-tabs-wrap { position: relative; margin: -4px -20px 20px; }
.faq-tabs {
  display: flex; gap: 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-inline: 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 4px 20px 14px;
}
.faq-tabs::-webkit-scrollbar { display: none; }
/* Custom scroll indicator: its width/position are set from script (see js/faq.js)
   to track how far the row has scrolled. Hidden when nothing to scroll. */
.faq-track { position: absolute; left: 20px; right: 20px; bottom: 4px; height: 4px; pointer-events: none; }
.faq-tabs-wrap:not(.has-overflow) .faq-track { display: none; }
.faq-thumb {
  height: 4px; width: 0; border-radius: 2px; background: var(--green-700);
  opacity: 0; transition: opacity .3s ease;
}
.faq-tabs-wrap.is-scrolling .faq-thumb { opacity: 1; }
.faq-tab {
  flex: none; white-space: nowrap; scroll-snap-align: start;
  min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px;
  background: #FFFFFF; color: var(--ink);
  font: 600 .9375rem/1 var(--sans); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.faq-tab.active { background: var(--green-900); border-color: var(--green-900); color: #FFFFFF; }
.faq-tab:focus-visible { outline: 3px solid var(--green-900); outline-offset: 3px; }

/* ---------- Category cards and question list ---------- */
.faq-groups { display: flex; flex-direction: column; gap: 24px; }
.faq-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.faq-card-title {
  margin: 0; padding-bottom: 16px; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 1.375rem; line-height: 1.2; color: var(--green-900); font-weight: 700;
}
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item-heading { margin: 0; font-size: inherit; }
.faq-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 56px; padding: 14px 0; margin: 0; border: 0; background: none; text-align: left;
  cursor: pointer; font: inherit; color: inherit;
}
.faq-q { font-size: 1.0625rem; line-height: 1.35; font-weight: 600; color: var(--green-900); transition: color .15s ease; }
.faq-icon {
  position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sage);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), background-color .3s ease;
}
.faq-icon .bar {
  position: absolute; left: 50%; top: 50%; background: var(--green-900); border-radius: 1px;
  transform: translate(-50%, -50%); transition: background-color .3s ease;
}
.faq-icon .h { width: 12px; height: 2px; }
.faq-icon .v { width: 2px; height: 12px; }
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--green-900); }
.faq-item.open .faq-icon .bar { background: #FFFFFF; }

/* The grid-rows trick animates height without knowing the answer's height in advance. */
.faq-panel { display: grid; grid-template-rows: 0fr; overflow: hidden; transition: grid-template-rows .35s cubic-bezier(.4, 0, .2, 1); }
.faq-item.open .faq-panel { grid-template-rows: 1fr; }
.faq-panel-inner { min-height: 0; overflow: hidden; }
.faq-a { margin: 0; padding: 0 0 20px; font-size: 1rem; line-height: 1.6; color: var(--muted); }

@media (hover: hover) {
  .faq-tab:not(.active):hover { background: var(--sage); border-color: var(--green-700); }
  .faq-btn:hover .faq-q { color: var(--green-700); }
}
@media (prefers-reduced-motion: reduce) {
  .faq-tab, .faq-icon, .faq-icon .bar, .faq-panel, .faq-thumb { transition: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 45em) {
  .page-lede { font-size: 1.125rem; }
  .faq-card { padding: 32px; }
  .faq-card-title { font-size: 1.5rem; }
  .faq-q { font-size: 1.125rem; }
}

/* ---------- Desktop ---------- */
@media (min-width: 68.75em) {
  .page-lede { font-size: 1.1875rem; }
  .faq-card { padding: 40px; }
  .faq-card-title { font-size: 1.75rem; }
}

/* ---------- Dark mode (follows the visitor's device setting, like the rest of the site) ---------- */
@media (prefers-color-scheme: dark) {
  .page-lede { color: #DCE8DF; }
  .faq-tab { background: #242727; border-color: #3F4543; color: #EDEBE4; }
  .faq-tab.active { background: #3F7249; border-color: #3F7249; }
  .faq-thumb { background: #7FB48B; }
  .faq-card { background: #242727; border-color: #3F4543; }
  .faq-card-title { color: #CFE6D5; border-bottom-color: #3F4543; }
  .faq-item { border-bottom-color: #3F4543; }
  .faq-q { color: #CFE6D5; }
  .faq-icon { background: #3B4740; }
  .faq-icon .bar { background: #CFE6D5; }
  .faq-item.open .faq-icon { background: #3F7249; }
  .faq-a { color: #CDCBC4; }

  @media (hover: hover) {
    .faq-tab:not(.active):hover { background: #3B4740; border-color: #7FB48B; }
    .faq-btn:hover .faq-q { color: #8CC79B; }
  }
}