/*
 * Flockline Learn · palette D skin (2026-11-09)
 * Matches flockline.com: warm cream ground, forest green trust colour, orange only for
 * actions, Fraunces headings in sentence case, Atkinson Hyperlegible Next text.
 * Loaded after skin-e.css. Roll back by removing the 'flockline-learn-skin-d' enqueue
 * in functions.php (and restoring the old font URL there).
 * Tokens: docs/design/brand/BRAND.md
 */

:root {
  --burnt: #B4500F;          /* actions and links */
  --burnt-deep: #8F3F0C;
  --forest: #1F4D3A;         /* trust colour */
  --forest-mist: #D6E4DA;    /* text on forest */
  --yolk: #E8661C;           /* fills only */
  --eggshell: #FFF8EE;       /* page */
  --cream: #FFFCF7;          /* cards */
  --cream-2: #F3E8D6;        /* oat bands */
  --sage: #2F6B4A;
  --sage-deep: #1F4D3A;
  --taupe: #8C7B6B;
  --roost: #2B241E;
  --roost-soft: #5A4D42;
  --ink: #2B241E;
  --paper: #FFFCF7;
  --line: rgba(43, 36, 30, 0.12);
  --line-2: rgba(43, 36, 30, 0.2);
  --urgent: #A3352B;
  --urgent-bg: #F9E3DF;
  --ok: #2F6B4A;
  --ok-bg: #E3ECE5;
  --f-display: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --f-anton: "Fraunces", Georgia, serif;
  --f-script: "Fraunces", Georgia, serif;
  --e-border: #EADFCB;
  --e-peach: #F3E8D6;
  --e-shadow-btn: none;
  --shadow-soft: 0 12px 28px -22px rgba(43, 36, 30, 0.35);
}

body { background: var(--eggshell); color: var(--ink); font-size: 18px; line-height: 1.6; }
a { color: var(--burnt); }
a:hover { color: var(--burnt-deep); }

/* Headings: Fraunces, sentence case, no caps shouting */
.fl-hero h1, .fl-home-hero h1, .fl-health-hero h1, .fl-products-hero__copy h1, .fl-reviews-hero h1,
.fl-cases-hero h1, .fl-conditions-hero h1, .fl-symptoms-hero h1, .fl-drugs-hero h1, .fl-herbs-hero h1,
.fl-infographics-hero h1, .fl-archive-hero h1, .fl-archive-hero--centered h1, .fl-article > header h1,
.fl-main h1.entry-title, .fle-display, .fl-cta h2 {
  font-family: var(--f-anton) !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: -0.015em !important;
  line-height: 1.08 !important;
}
.fl-hero h1, .fl-article > header h1 { font-size: clamp(34px, 4.4vw, 54px) !important; }
.fle-hero h1.fle-display { font-size: clamp(40px, 5.2vw, 70px) !important; line-height: 1.05 !important; }
.fle-h2 { font-size: clamp(30px, 3.6vw, 46px) !important; }
.fle-h3 { font-size: clamp(28px, 3.2vw, 40px) !important; color: var(--forest) !important; }
.fl-content h2, .fl-main h2 { font-family: var(--f-anton); font-weight: 600; letter-spacing: -0.01em; }
.fl-content h3, .fl-main h3 { font-family: var(--f-body); font-weight: 800; }
.fle-script, .fle-script--green { font-style: italic; font-weight: 500; font-size: 21px; color: var(--burnt); }
.fle-script--green { color: var(--forest); }

/* Header */
.fl-site-header { background: rgba(255, 248, 238, 0.94); border-bottom: 1px solid var(--line); }
.fl-brand__pill { background: var(--forest); color: #FFFFFF; }
.fl-dropdown-heading { color: var(--roost-soft); }
.fl-dropdown-item:hover { background: var(--cream-2); }
.fl-item-count, .fl-chip--cluster { background: var(--cream-2); color: var(--forest); }
.fl-chip--type { background: var(--ok-bg); color: var(--forest); }

/* Buttons: flat, no 3D press */
.fl-btn, .fl-nav .fl-btn, a.fl-btn { background: var(--burnt) !important; font-weight: 800 !important; box-shadow: none !important; }
.fl-btn:hover, .fl-nav .fl-btn:hover { background: var(--burnt-deep) !important; filter: none; box-shadow: none !important; }
.fl-btn:active { transform: scale(.98) !important; box-shadow: none !important; }
.fl-btn--secondary, a.fl-btn--secondary { background: transparent !important; color: var(--ink) !important; box-shadow: inset 0 0 0 2px var(--ink) !important; }
.fle-btn--orange { background: var(--burnt) !important; }
.fle-btn--dark { background: var(--forest) !important; box-shadow: none !important; }

/* Article furniture */
.fl-quick-answer h2 { color: var(--forest) !important; font-family: var(--f-body) !important; font-weight: 800 !important; }
.fl-takeaway { color: #17362A; }
.fl-safety { background: var(--urgent-bg) !important; color: #5C1F18; }
.fl-urgency { background: #FCEFD2; color: #6B4600; font-weight: 800; }
.fl-urgency--low { background: var(--ok-bg); color: var(--forest); }
.fl-urgency--high { background: var(--urgent-bg); color: var(--urgent); }
.fl-urgency--urgent, .fl-urgency--emergency, .fl-urgency--critical { background: var(--urgent); color: #FFFFFF; }
.fl-content th { background: var(--cream-2); }

/* Dark trust blocks: forest instead of brown, orange for the action */
.fl-inline-scan, .fle-worry { background: var(--forest); color: var(--forest-mist); }
.fl-inline-scan__copy span, .fle-worry p { color: var(--forest-mist); }
.fle-worry__small { color: var(--forest-mist) !important; }
.fl-inline-scan .fl-btn { background: var(--burnt) !important; }
.fle-search button { background: var(--forest); font-weight: 800; }
.fle-search { box-shadow: inset 0 0 0 2px var(--e-border), 0 18px 30px -24px rgba(43, 36, 30, .35); color: var(--roost-soft); }
.fle-popular span, .fle-topic small, .fle-guides small { color: var(--roost-soft); }
.fle-chips button[aria-pressed="true"] { background: var(--forest); }

/* Closing calls to action: forest band (white on orange failed contrast) */
.fl-cta, .fle-cta { background: var(--forest) !important; }
.fl-cta p, .fle-cta p { color: var(--forest-mist) !important; }
.fl-cta .fl-btn, .fle-cta .fl-btn { background: var(--burnt) !important; box-shadow: none !important; }
.fle-cta img { border-color: #16110D; }

/* Numbers and small labels */
.fle-num { background: var(--yolk); font-family: var(--f-body); font-weight: 800; }
.fle-tool:first-child { background: var(--ok-bg); }
.fle-tool span, .fl-article-card__cta { color: var(--burnt); font-weight: 800; }
.fl-article-card__title, .fle-tile span, .fle-topic strong, .fle-tool strong { font-weight: 800; }
.fle-tile img { background: var(--cream-2); }
.fl-byline__creds { color: var(--roost-soft); }
.fl-product-card__spec span { color: var(--roost-soft); }

/* Footer */
.fl-site-footer { background: var(--eggshell); border-top: 1px solid var(--line); }
.fl-article-card__placeholder { background-image: url("images/photo-puffed.jpg"); }

/* Mobile sticky scan bar (2026-11-23). Built by assets/scan-cta.js on guides, posts and
   condition pages. Fixed + transform only, so it never shifts page content (CLS safe).
   Hidden by default; never shown above 768px. */
.fl-sticky-scan { display: none; }
@media (max-width: 768px) {
  .fl-sticky-scan {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: center; gap: 10px;
    margin: 0;
    padding: 10px 6px 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--forest); color: var(--forest-mist);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -10px 24px -18px rgba(43, 36, 30, 0.6);
    transform: translateY(110%); visibility: hidden;
    transition: transform 220ms ease, visibility 0s linear 220ms;
  }
  .fl-sticky-scan.is-visible {
    transform: translateY(0); visibility: visible;
    transition: transform 220ms ease, visibility 0s;
  }
  .fl-sticky-scan__copy {
    flex: 1 1 auto; min-width: 0; margin: 0;
    font-size: 14px; line-height: 1.3; color: var(--forest-mist);
  }
  .fl-sticky-scan__copy strong { color: #FFFFFF; font-weight: 800; }
  .fl-sticky-scan .fl-sticky-scan__btn {
    flex: none; padding: 11px 16px; font-size: 15px; white-space: nowrap;
    background: var(--burnt) !important; transform: none;
  }
  .fl-sticky-scan__close {
    flex: none; width: 44px; height: 44px; margin: 0; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; border-radius: 50%;
    color: var(--forest-mist); font-size: 24px; line-height: 1; cursor: pointer;
  }
  .fl-sticky-scan__close:focus-visible, .fl-sticky-scan .fl-sticky-scan__btn:focus-visible {
    outline: 2px solid #FFFFFF; outline-offset: 2px;
  }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .fl-sticky-scan, .fl-sticky-scan.is-visible { transition: none; }
}
@media print { .fl-sticky-scan { display: none !important; } }
