/*
Theme Name: Fieldline
Theme URI: https://example.com/fieldline
Author: Fieldline Studio
Author URI: https://example.com
Description: Sport media portal — light, newsroom-style reading theme for sports betting analysis content (pillar/cluster content package). Sticky navy header with mega-menu and an automatic "More" overflow, optional sports strip, condensed sport headlines, card grids. All SEO logic (meta, canonical, JSON-LD, breadcrumbs, TOC, FAQ, related content, sitemap hygiene) lives inside the theme — no page builder, no SEO plugin required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fieldline
Tags: blog, one-column, custom-logo, custom-menu, featured-images, translation-ready, editor-style

Design card
------------
Composition   : content column + sticky right-hand sidebar (auto Table of Contents) on
                page.php/single.php; the front page keeps its own PILLAR hero/layout
                untouched, since that markup and its <style> ship with the content.
Header        : one sticky portal header — thin top bar (site tagline with live dot),
                navy brand/nav row, optional second "sports strip" (menu location
                "Sports Strip"). Primary nav: first FLD_NAV_VISIBLE (default 6) items
                stay in the bar, the rest go into an automatic "More" dropdown; items
                with 2 levels of children open as a multi-column mega-menu; mobile is a
                slide-in accordion drawer.
Palette       : Newsroom light — cool grey-white page, white cards, deep navy chrome,
                one electric-blue accent, a red "live" dot. Optional dark variant via
                FLD_THEME_VARIANT.
Typography    : "Barlow Condensed" (bold, uppercase in nav/labels) for headlines and
                navigation, "Inter" for body copy. Fluid scale via clamp().
Cards         : white, 1px rule, 8px radius, soft shadow, blue top rule + lift on hover.
Density       : compact and scannable — tight rhythm, strong hierarchy.

Compatibility notes (read before editing selectors)
----------------------------------------------------
The imported PILLAR page ships its own <style> block (element selectors: body, h1,
h2, h3, p, ul, a[href], figure, blockquote, table, plus content classes such as
.hero, .toc, .card-grid, .site-header, .site-footer, .header-meta, etc.) and that
block is printed by the theme on EVERY page via #pillar-custom-styles (see
inc/pillar-integration.php), positioned in <head> AFTER this stylesheet on purpose,
so content wins any tie on shared selectors. Two consequences drive how this file
is written:

  1. Every class here is prefixed "fld-" — never a bare/generic name like
     .container, .card, .header, .footer, .hero, .toc (those belong to content).
  2. Chrome that must survive the content stylesheet's low-specificity element
     rules (nav links, sidebar, cards, footer fallback, buttons) is scoped under a
     stable ID (#fld-shell, #fld-site-header, #fld-sidebar, #fld-site-footer,
     #fld-related, #fld-articles-grid, #main-content, ...). An ID always outranks
     "a[href]" / "h1" / ".some-content-class" without ever resorting to
     !important, which the brief explicitly forbids for fighting content styles.
*/

/* ============================================================
   1) FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   2) DESIGN TOKENS (all prefixed --fld-)
   ============================================================ */
:root{
  --fld-bg:#f1f4f9;
  --fld-surface:#ffffff;
  --fld-surface-raised:#f7f9fc;
  --fld-ink:#0d1b2e;
  --fld-ink-muted:#4f6078;
  --fld-ink-faint:#8190a5;
  --fld-border:#dce3ed;
  --fld-border-strong:#c3cddc;
  --fld-accent:#1457f5;
  --fld-accent-bright:#4d8bff;
  --fld-accent-ink:#ffffff;
  --fld-accent-wash:#e8efff;
  --fld-danger:#c9302c;
  --fld-live:#ff3b30;
  --fld-navy:#0b2447;
  --fld-navy-2:#102d58;
  --fld-navy-deep:#071a35;

  --fld-font-head:"Barlow Condensed","Arial Narrow",Impact,sans-serif;
  --fld-font-body:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --fld-font-mono:"Inter",system-ui,sans-serif;

  --fld-shell-width:1240px;
  --fld-read-width:780px;
  --fld-radius:8px;
  --fld-gap:1.4rem;
  --fld-shadow-sm:0 1px 2px rgba(13,27,46,.06),0 4px 14px rgba(13,27,46,.05);
  --fld-shadow-md:0 2px 4px rgba(13,27,46,.08),0 12px 28px rgba(13,27,46,.12);
}

/* Dark-variant token overrides live in assets/css/theme-dark.css, enqueued
   conditionally (only when FLD_THEME_VARIANT === 'dark', see functions.php)
   so a light-only install never downloads them. */

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

/* ============================================================
   3) SHELL — everything the theme owns lives inside #fld-shell so
      content's global body{background/color/font} rule (printed
      after this file) cannot repaint the theme's own chrome.
   ============================================================ */
#fld-shell{
  background:var(--fld-bg);
  color:var(--fld-ink);
  font-family:var(--fld-font-body);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
#fld-shell img{max-width:100%;height:auto;}
#fld-shell :focus-visible{outline:3px solid var(--fld-accent);outline-offset:2px;}

.fld-skip-link{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:9999;
  background:var(--fld-accent);
  color:var(--fld-accent-ink);
  padding:.8em 1.2em;
  font-family:var(--fld-font-mono);
  font-size:.85rem;
  text-decoration:none;
}
.fld-skip-link:focus{left:1rem;top:1rem;}

.fld-visually-hidden{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* ============================================================
   4) HEADER — top bar, sticky brand+nav row, mega-menu, "More"
      overflow, sports strip, mobile accordion drawer
   ============================================================ */
#fld-topbar{background:var(--fld-navy-deep);color:#c9d3e6;}
#fld-topbar .fld-topbar-inner{
  max-width:var(--fld-shell-width);margin:0 auto;padding:.4rem 1.5rem;
  font-family:var(--fld-font-body);font-size:.74rem;font-weight:500;letter-spacing:.02em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#fld-topbar .fld-topbar-inner span::before{
  content:"";display:inline-block;width:7px;height:7px;border-radius:50%;
  background:var(--fld-live);margin-right:.6em;vertical-align:middle;
  box-shadow:0 0 0 3px rgba(255,59,48,.22);
}

#fld-site-header{
  background:var(--fld-navy);
  color:#fff;
  position:sticky;
  top:0;
  z-index:40;
  box-shadow:0 2px 0 var(--fld-accent),0 6px 18px rgba(8,18,40,.18);
}
#fld-site-header .fld-header-row{
  max-width:var(--fld-shell-width);
  margin:0 auto;
  padding:0 1.5rem;
  min-height:62px;
  display:flex;
  align-items:stretch;
  gap:1.25rem;
}
#fld-site-header .fld-brand{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  text-decoration:none;
  color:#fff;
  flex:0 0 auto;
}
#fld-site-header .custom-logo-link{display:inline-flex;align-items:center;flex:0 0 auto;}
#fld-site-header .custom-logo-link img,
#fld-site-header .fld-brand img{display:block;height:36px;width:auto;}
#fld-site-header .fld-brand .fld-brand-mark{
  width:26px;height:26px;border-radius:50%;
  background:conic-gradient(from 20deg,var(--fld-accent) 0 25%,#fff 0 50%,var(--fld-accent) 0 75%,#fff 0);
  box-shadow:inset 0 0 0 5px var(--fld-navy);
  border:2px solid #fff;
}
#fld-site-header .fld-brand .fld-brand-name{
  font-family:var(--fld-font-head);
  font-weight:800;
  font-size:1.55rem;
  letter-spacing:.01em;
  text-transform:uppercase;
  line-height:1;
}

/* primary nav */
#fld-site-header .fld-nav{display:flex;flex:1 1 auto;min-width:0;align-items:stretch;}
#fld-site-header .fld-nav .fld-menu{
  list-style:none;margin:0;padding:0;
  display:flex;flex-wrap:nowrap;align-items:stretch;gap:.1rem;
  width:100%;
}
#fld-site-header .fld-nav li{position:relative;margin:0;}
#fld-site-header .fld-nav .fld-nav-item--l0{display:flex;align-items:stretch;flex:0 0 auto;}
#fld-site-header .fld-nav .fld-nav-item--l0 > .fld-nav__link,
#fld-site-header .fld-nav .fld-more-btn{
  display:flex;align-items:center;
  font-family:var(--fld-font-head);
  font-weight:700;
  font-size:1.02rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#fff;
  text-decoration:none;
  padding:0 .8rem;
  border:0;background:none;cursor:pointer;
  border-bottom:3px solid transparent;
  transition:background .15s ease,border-color .15s ease;
  white-space:nowrap;
}
#fld-site-header .fld-nav .fld-nav-item--l0:hover > .fld-nav__link,
#fld-site-header .fld-nav .fld-nav-item--l0 > .fld-nav__link:focus-visible,
#fld-site-header .fld-nav .fld-more-btn:hover,
#fld-site-header .fld-nav .fld-is-current > .fld-nav__link{
  background:rgba(255,255,255,.08);
  border-bottom-color:var(--fld-accent-bright);
}
#fld-site-header .fld-nav .fld-more-btn i{
  width:7px;height:7px;margin-left:.5em;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
}

#fld-site-header .fld-nav .fld-nav-item--more[hidden]{display:none;}

/* chevron toggle button next to parent links */
#fld-site-header .fld-subtoggle{
  display:flex;align-items:center;justify-content:center;
  width:22px;margin-left:-.65rem;padding:0 .35rem 0 0;
  background:none;border:0;cursor:pointer;color:#fff;
}
#fld-site-header .fld-subtoggle span{
  width:7px;height:7px;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
  transition:transform .15s ease;
}
#fld-site-header .fld-nav .fld-nav-item--l0:hover > .fld-subtoggle,
#fld-site-header .fld-nav .fld-nav-item--l0.fld-open > .fld-subtoggle{background:rgba(255,255,255,.08);}
#fld-site-header .fld-open > .fld-subtoggle span{transform:rotate(-135deg) translateY(-2px);}

/* dropdown / mega panel */
#fld-site-header .fld-nav .fld-sub{
  list-style:none;margin:0;padding:.5rem 0;
  position:absolute;left:0;top:100%;
  min-width:230px;
  background:var(--fld-surface);
  color:var(--fld-ink);
  border-top:3px solid var(--fld-accent);
  border-radius:0 0 var(--fld-radius) var(--fld-radius);
  box-shadow:0 18px 40px rgba(8,18,40,.22);
  display:none;
  z-index:50;
}
#fld-site-header .fld-nav .fld-sub .fld-nav-item{display:block;}
#fld-site-header .fld-nav .fld-sub .fld-nav__link{
  display:block;
  font-family:var(--fld-font-body);
  font-weight:600;
  font-size:.92rem;
  letter-spacing:0;text-transform:none;
  color:var(--fld-ink);
  text-decoration:none;
  padding:.55rem 1.1rem;
  border:0;
}
#fld-site-header .fld-nav .fld-sub .fld-nav__link:hover,
#fld-site-header .fld-nav .fld-sub .fld-nav__link:focus-visible{background:var(--fld-accent-wash);color:var(--fld-accent);}
@media (hover:hover){
  #fld-site-header .fld-nav .fld-nav-item--l0:hover > .fld-sub{display:block;}
}
#fld-site-header .fld-nav .fld-nav-item--l0.fld-open > .fld-sub,
#fld-site-header .fld-nav .fld-nav-item--l0:focus-within > .fld-sub{display:block;}

/* mega layout: a level-1 item that itself has children => multi-column panel */
#fld-site-header .fld-nav .fld-nav-item--l0:has(.fld-sub--l2){position:static;}
#fld-site-header .fld-nav .fld-nav-item--l0:has(.fld-sub--l2) > .fld-sub--l1{
  left:0;right:0;margin:0 auto;
  width:min(900px,calc(100vw - 3rem));
  padding:1.1rem 1.2rem 1.3rem;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:1.2rem 1.6rem;
}
@media (hover:hover){
  #fld-site-header .fld-nav .fld-nav-item--l0:has(.fld-sub--l2):hover > .fld-sub--l1{display:grid;}
}
#fld-site-header .fld-nav .fld-nav-item--l0.fld-open:has(.fld-sub--l2) > .fld-sub--l1,
#fld-site-header .fld-nav .fld-nav-item--l0:has(.fld-sub--l2):focus-within > .fld-sub--l1{display:grid;}
#fld-site-header .fld-nav .fld-sub--l1 > .fld-nav-item--parent > .fld-nav__link{
  font-family:var(--fld-font-head);
  font-weight:800;font-size:.95rem;letter-spacing:.07em;text-transform:uppercase;
  color:var(--fld-accent);
  padding:0 0 .45rem;margin-bottom:.35rem;
  border-bottom:2px solid var(--fld-border);
  border-radius:0;
}
#fld-site-header .fld-nav .fld-sub--l1 > .fld-nav-item--parent > .fld-nav__link:hover{background:none;}
#fld-site-header .fld-nav .fld-sub--l1 > .fld-nav-item--parent > .fld-subtoggle{display:none;}
#fld-site-header .fld-nav .fld-sub--l2{
  position:static;display:block;min-width:0;padding:0;
  background:none;border:0;box-shadow:none;
}
#fld-site-header .fld-nav .fld-sub--l2 .fld-nav__link{padding:.32rem 0;font-weight:500;font-size:.9rem;border-radius:4px;}
#fld-site-header .fld-nav .fld-sub--l2 .fld-nav__link:hover{padding-left:.4rem;}
/* last items: open panel to the left so it never leaves the viewport */
#fld-site-header .fld-nav .fld-nav-item--l0:nth-last-child(-n+2) > .fld-sub,
#fld-site-header .fld-nav .fld-nav-item--more > .fld-sub{left:auto;right:0;}

/* "More" dropdown — nested menus show as indented, always-open groups */
#fld-site-header .fld-nav .fld-sub--more{min-width:260px;}
#fld-site-header .fld-nav .fld-sub--more .fld-subtoggle{display:none;}
#fld-site-header .fld-nav .fld-sub--more .fld-sub{
  position:static;display:block;min-width:0;padding:0 0 .3rem 1rem;
  background:none;border:0;box-shadow:none;
}
#fld-site-header .fld-nav .fld-sub--more .fld-sub .fld-nav__link{font-weight:500;font-size:.88rem;color:var(--fld-ink-muted);padding:.32rem 1.1rem;}
#fld-site-header .fld-nav .fld-sub--more .fld-sub--l2{padding-left:.8rem;display:block;}

/* burger */
#fld-site-header .fld-header-aside{display:none;align-items:center;margin-left:auto;}
#fld-site-header .fld-burger{
  display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  width:44px;height:44px;border:1px solid rgba(255,255,255,.3);border-radius:var(--fld-radius);
  background:transparent;cursor:pointer;padding:0;
}
#fld-site-header .fld-burger span,
#fld-site-header .fld-burger::before,
#fld-site-header .fld-burger::after{
  content:"";display:block;width:20px;height:2px;background:#fff;position:relative;
}

/* sports strip */
#fld-sports-strip{background:var(--fld-navy-2);border-top:1px solid rgba(255,255,255,.08);}
#fld-sports-strip .fld-sports-inner{max-width:var(--fld-shell-width);margin:0 auto;padding:0 1.5rem;}
#fld-sports-strip .fld-sportsbar{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;}
#fld-sports-strip .fld-sportsbar::-webkit-scrollbar{display:none;}
#fld-sports-strip .fld-sports-menu{list-style:none;margin:0;padding:.45rem 0;display:flex;gap:.45rem;white-space:nowrap;}
#fld-sports-strip .fld-sports-menu .fld-nav__link{
  display:inline-flex;align-items:center;
  font-family:var(--fld-font-body);font-weight:600;font-size:.82rem;
  color:#d6def0;text-decoration:none;
  padding:.38rem .9rem;border-radius:999px;
  background:rgba(255,255,255,.07);
  transition:background .15s ease,color .15s ease;
}
#fld-sports-strip .fld-sports-menu .fld-nav__link:hover,
#fld-sports-strip .fld-sports-menu .fld-is-current > .fld-nav__link{background:var(--fld-accent);color:#fff;}

/* mobile drawer (accordion) */
#fld-mobile-drawer{
  position:fixed;
  inset:0 0 0 auto;
  width:min(88vw,360px);
  background:var(--fld-navy);
  color:#fff;
  transform:translateX(100%);
  transition:transform .28s ease;
  z-index:60;
  padding:1rem 1.25rem 2rem;
  overflow-y:auto;
}
#fld-mobile-drawer.fld-is-open{transform:translateX(0);}
#fld-mobile-drawer ul{list-style:none;margin:0;padding:0;}
#fld-mobile-drawer li{position:relative;border-bottom:1px solid rgba(255,255,255,.12);}
#fld-mobile-drawer .fld-nav__link{
  display:block;
  padding:.9em 3rem .9em 0;
  font-family:var(--fld-font-head);font-weight:700;font-size:1.1rem;letter-spacing:.05em;text-transform:uppercase;
  color:#fff;text-decoration:none;
}
#fld-mobile-drawer .fld-sub{display:none;padding:0 0 .6rem .9rem;}
#fld-mobile-drawer .fld-open > .fld-sub{display:block;}
#fld-mobile-drawer .fld-sub li{border-bottom:0;}
#fld-mobile-drawer .fld-sub .fld-nav__link{
  font-family:var(--fld-font-body);font-weight:500;font-size:.95rem;letter-spacing:0;text-transform:none;
  color:#d6def0;padding:.55em 3rem .55em 0;
}
#fld-mobile-drawer .fld-sub--l2 .fld-nav__link{font-size:.9rem;color:#aebbd6;}
#fld-mobile-drawer .fld-subtoggle{
  position:absolute;right:0;top:0;width:46px;height:46px;
  display:flex;align-items:center;justify-content:center;
  background:none;border:0;border-left:1px solid rgba(255,255,255,.12);color:#fff;cursor:pointer;
}
#fld-mobile-drawer .fld-sub .fld-subtoggle{height:38px;width:40px;border-left:0;}
#fld-mobile-drawer .fld-subtoggle span{
  width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px);transition:transform .15s ease;
}
#fld-mobile-drawer .fld-open > .fld-subtoggle span{transform:rotate(-135deg) translateY(-2px);}
#fld-mobile-drawer .fld-drawer-close{
  border:1px solid rgba(255,255,255,.3);background:none;color:#fff;border-radius:var(--fld-radius);
  width:38px;height:38px;font-size:1.2rem;cursor:pointer;margin-bottom:.8rem;
}
#fld-drawer-overlay{
  position:fixed;inset:0;
  background:rgba(8,18,40,.55);
  opacity:0;pointer-events:none;
  transition:opacity .25s ease;
  z-index:55;
}
#fld-drawer-overlay.fld-is-open{opacity:1;pointer-events:auto;}

@media (max-width:900px){
  #fld-site-header .fld-nav{display:none;}
  #fld-site-header .fld-header-aside{display:flex;}
  #fld-site-header .fld-header-row{align-items:center;min-height:56px;}
}

/* ============================================================
   5) LAYOUT — main content grid with sticky sidebar
   ============================================================ */
#main-content{max-width:var(--fld-shell-width);margin:0 auto;padding:2.5rem 1.5rem 4rem;width:100%;flex:1;}

#fld-page-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:3rem;
  align-items:start;
}
#fld-page-grid.fld-no-sidebar{grid-template-columns:minmax(0,1fr);}
#fld-page-grid .fld-primary{min-width:0;}

#fld-sidebar{
  position:sticky;
  top:5.5rem;
  display:flex;
  flex-direction:column;
  gap:1.5rem;
}
#fld-sidebar .fld-sidebar-box{
  border:1px solid var(--fld-border);
  border-top:3px solid var(--fld-accent);
  border-radius:var(--fld-radius);
  box-shadow:var(--fld-shadow-sm);
  padding:1.25rem 1.35rem;
  background:var(--fld-surface);
}
#fld-sidebar .fld-sidebar-title{
  font-family:var(--fld-font-head);
  font-size:.95rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--fld-ink-muted);
  margin:0 0 .9em;
  padding-bottom:.6em;
  border-bottom:1px solid var(--fld-border);
}
/* Portable TOC component — .fld-toc + two-class children only, so it keeps
   priority over content's element-level rules (a[href], h2...) whether it's
   dropped in #fld-sidebar (page.php/single.php) or standalone in
   #fld-front-toc (front page, replacing the manual [data-content="toc"]
   block — see inc/table-of-contents.php). Two classes = specificity (0,2,0),
   which beats a[href]'s (0,1,1) without an ID wrapper or !important. */
.fld-toc .fld-toc__title{
  font-family:var(--fld-font-head);
  font-size:.95rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--fld-ink-muted);
  margin:0 0 .9em;
  padding-bottom:.6em;
  border-bottom:1px solid var(--fld-border);
}
.fld-toc .fld-toc__list,
.fld-toc .fld-toc__list ol{list-style:none;margin:0;padding:0;}
.fld-toc .fld-toc__list li{margin:0;}
.fld-toc .fld-toc__link{
  display:block;
  padding:.4em 0;
  font-size:.88rem;
  line-height:1.35;
  color:var(--fld-ink-muted);
  text-decoration:none;
  border-left:2px solid transparent;
  padding-left:.6em;
  margin-left:-.6em;
}
.fld-toc .fld-toc__link:hover,
.fld-toc .fld-toc__link:focus-visible,
.fld-toc .fld-toc__link.fld-is-active{
  color:var(--fld-ink);
  border-left-color:var(--fld-accent);
}
#fld-front-toc{
  max-width:var(--fld-read-width);
  margin:1.6rem auto;
  border-radius:var(--fld-radius);
  border:1px solid var(--fld-border);
  background:var(--fld-surface);
  padding:1.3rem 1.5rem;
}
#fld-sidebar .fld-toc{display:block;}

@media (max-width:1000px){
  #fld-page-grid{grid-template-columns:minmax(0,1fr);}
  #fld-sidebar{position:static;}
}

/* ============================================================
   6) BREADCRUMBS
   ============================================================ */
#fld-breadcrumbs{max-width:var(--fld-shell-width);margin:0 auto;padding:1.1rem 1.5rem 0;}
#fld-breadcrumbs .fld-crumbs{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:.4em;
  margin:0;padding:0;
  font-family:var(--fld-font-mono);
  font-size:.76rem;
  color:var(--fld-ink-faint);
}
#fld-breadcrumbs .fld-crumbs li:not(:last-child)::after{content:"/";margin-left:.4em;color:var(--fld-border-strong);}
#fld-breadcrumbs .fld-crumbs a{color:var(--fld-ink-muted);text-decoration:none;}
#fld-breadcrumbs .fld-crumbs a:hover{color:var(--fld-accent);text-decoration:underline;}
#fld-breadcrumbs .fld-crumbs [aria-current="page"]{color:var(--fld-ink);}

/* ============================================================
   7) ENTRY HEADER (page.php / single.php)
   ============================================================ */
#fld-entry-header{max-width:var(--fld-read-width);margin:1.4rem 0 1.6rem;}
#fld-entry-header .fld-eyebrow{
  display:inline-block;
  font-family:var(--fld-font-head);
  font-size:.9rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:#fff;background:var(--fld-accent);
  padding:.15em .7em;border-radius:3px;
  margin-bottom:.8em;
}
#fld-entry-header .fld-entry-title{
  font-family:var(--fld-font-head);
  font-weight:800;
  font-size:clamp(2.3rem,5vw,3.5rem);
  line-height:1.04;
  letter-spacing:.005em;
  text-transform:uppercase;
  margin:0 0 .5em;
  color:var(--fld-ink);
}
.fld-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:1.1em;
  font-family:var(--fld-font-body);
  font-size:.8rem;
  color:var(--fld-ink-muted);
  padding-top:.9em;
  border-top:1px solid var(--fld-border);
}
.fld-meta-row .fld-meta-item{display:inline-flex;align-items:center;gap:.4em;}
/* .fld-meta-row .fld-meta-item a — two classes (0,2,1), not ".fld-meta-row
   a" (0,1,1), which would tie with content's global a[href] and lose since
   content's stylesheet is printed after this one (see compatibility note
   at the top of this file). */
.fld-meta-row .fld-meta-item a{color:var(--fld-ink-muted);text-decoration:none;}
.fld-meta-row .fld-meta-item a:hover{color:var(--fld-accent);text-decoration:underline;}

#fld-featured-figure{margin:0 0 2rem;max-width:var(--fld-shell-width);}
#fld-featured-figure img{width:100%;height:auto;display:block;border:1px solid var(--fld-border);border-radius:var(--fld-radius);}

/* ============================================================
   8) ENTRY CONTENT — keep specificity low here on purpose: the
      imported article HTML (h2/p/ul/figure/table/[data-content]
      blocks) must be styled by the content's own <style>, not by
      this file. We only constrain width via the wrapper below.
   ============================================================ */
.fld-entry-content{max-width:var(--fld-read-width);}
.fld-entry-content table{width:100%;}
.fld-table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch;width:100%;margin:1.5em 0;}
.fld-table-responsive table{min-width:520px;margin:0;}

/* ============================================================
   9) CARDS — flat, thin rule, zero radius, accent rule on hover
   ============================================================ */
.fld-card{
  position:relative;
  display:flex;
  flex-direction:column;
  border:1px solid var(--fld-border);
  border-top:3px solid var(--fld-border);
  border-radius:var(--fld-radius);
  background:var(--fld-surface);
  box-shadow:var(--fld-shadow-sm);
  overflow:hidden;
  transition:transform .18s ease,box-shadow .18s ease,border-top-color .18s ease;
}
.fld-card:hover,.fld-card:focus-within{border-top-color:var(--fld-accent);box-shadow:var(--fld-shadow-md);transform:translateY(-2px);}
.fld-card .fld-card__media{display:block;aspect-ratio:16/10;overflow:hidden;background:var(--fld-surface-raised);}
.fld-card .fld-card__media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease;}
.fld-card:hover .fld-card__media img{transform:scale(1.04);}
.fld-card .fld-card__body{padding:1rem 1.15rem 1.2rem;display:flex;flex-direction:column;gap:.5rem;flex:1;}
.fld-card .fld-card__eyebrow{font-family:var(--fld-font-head);font-size:.85rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--fld-accent);}
.fld-card .fld-card__title{font-family:var(--fld-font-head);font-weight:700;font-size:1.4rem;line-height:1.12;margin:0;}
.fld-card .fld-card__title a{color:var(--fld-ink);text-decoration:none;}
.fld-card:hover .fld-card__title a{color:var(--fld-accent);}
.fld-card .fld-card__title a::after{content:"";position:absolute;inset:0;}
.fld-card .fld-card__title{position:relative;}
.fld-card .fld-card__excerpt{font-size:.92rem;line-height:1.55;color:var(--fld-ink-muted);margin:0;}
.fld-card .fld-card__foot{margin-top:auto;font-family:var(--fld-font-body);font-size:.74rem;color:var(--fld-ink-faint);display:flex;gap:.9em;}

#fld-articles-grid,#fld-related-grid,#fld-news-grid,#fld-predictions-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:var(--fld-gap);
  margin:1.5rem 0;
}
#fld-related{max-width:var(--fld-read-width);margin:3rem auto 0;padding-top:2rem;border-top:1px solid var(--fld-border);}
#fld-related .fld-section-title{
  font-family:var(--fld-font-head);
  font-weight:800;
  font-size:1.9rem;
  text-transform:uppercase;
  margin:0 0 1.2rem;
  padding-left:.6rem;border-left:5px solid var(--fld-accent);line-height:1;
}

/* featured/hero card used at top of page-news.php */
.fld-card--feature{grid-column:1/-1;flex-direction:row;}
.fld-card--feature .fld-card__media{flex:0 0 52%;aspect-ratio:auto;min-height:300px;}
.fld-card--feature .fld-card__body{flex:1;justify-content:center;padding:1.6rem 1.8rem;}
.fld-card--feature .fld-card__title{font-size:2.3rem;}
@media (max-width:700px){
  .fld-card--feature{flex-direction:column;}
  .fld-card--feature .fld-card__media{flex:none;aspect-ratio:16/10;min-height:0;}
}

/* ============================================================
   9b) FAQ accordion — output of the [faq] shortcode (inc/faq.php).
       Two-class selectors again, so it isn't clobbered by content's
       generic details/summary rules on pages where both appear.
   ============================================================ */
.fld-faq{display:flex;flex-direction:column;gap:.7rem;margin:1.8em 0;max-width:var(--fld-read-width);}
.fld-faq .fld-faq__item{border:1px solid var(--fld-border);border-radius:var(--fld-radius);background:var(--fld-surface);box-shadow:var(--fld-shadow-sm);}
.fld-faq .fld-faq__summary{
  list-style:none;
  cursor:pointer;
  padding:1em 1.2em;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1em;
}
.fld-faq .fld-faq__summary::-webkit-details-marker{display:none;}
.fld-faq .fld-faq__summary::after{
  content:"+";
  font-family:var(--fld-font-mono);
  flex-shrink:0;
  color:var(--fld-accent);
  font-size:1.2rem;
}
.fld-faq .fld-faq__item[open] .fld-faq__summary::after{content:"\2212";}
.fld-faq .fld-faq__question{
  font-family:var(--fld-font-body);
  font-weight:600;
  font-size:1rem;
  margin:0;
  color:var(--fld-ink);
}
.fld-faq .fld-faq__answer{padding:0 1.2em 1.1em;color:var(--fld-ink-muted);font-size:.95rem;line-height:1.6;}
.fld-faq .fld-faq__answer p{margin:0;}

/* ============================================================
   10) PAGINATION / PREV-NEXT
   ============================================================ */
.fld-pagination{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  margin:2.5rem 0 0;
  padding-top:1.5rem;
  border-top:1px solid var(--fld-border);
  font-family:var(--fld-font-mono);
  font-size:.85rem;
}
/* .fld-pagination .fld-pagination__link — two classes (0,2,1), not
   ".fld-pagination a" (0,1,1), which would tie with content's global
   a[href] and lose since content's stylesheet is printed after this one. */
.fld-pagination .fld-pagination__link,.fld-pagination .fld-pagination__disabled{
  color:var(--fld-ink);
  text-decoration:none;
  padding:.5em .9em;
  border:1px solid var(--fld-border);
  border-radius:var(--fld-radius);
  background:var(--fld-surface);
  display:inline-block;
}
.fld-pagination .fld-pagination__link:hover{border-color:var(--fld-accent);color:var(--fld-accent);}
.fld-pagination .fld-pagination__disabled{color:var(--fld-ink-faint);}

/* ============================================================
   11) AUTHOR BIO / FALLBACK MESSAGE
   ============================================================ */
.fld-author-bio{
  display:flex;
  gap:1rem;
  align-items:center;
  max-width:var(--fld-read-width);
  margin:2.5rem 0 0;
  padding-top:1.5rem;
  border-top:1px solid var(--fld-border);
  font-size:.85rem;
  color:var(--fld-ink-muted);
}
.fld-empty-notice{
  border:1px dashed var(--fld-border-strong);
  border-radius:var(--fld-radius);
  padding:2rem;
  text-align:center;
  font-family:var(--fld-font-head);
  font-size:.9rem;
  color:var(--fld-ink-muted);
  margin:1.5rem 0;
}

/* ============================================================
   12) FOOTER FALLBACK (#fld-site-footer) — only rendered when
       _pillar_custom_footer is not available yet (pre-import).
   ============================================================ */
#fld-site-footer{
  margin-top:auto;
  background:var(--fld-navy-deep);
  color:#b4c0d6;
  border-top:4px solid var(--fld-accent);
}
#fld-site-footer .fld-footer-row{
  max-width:var(--fld-shell-width);
  margin:0 auto;
  padding:3rem 1.5rem 2rem;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:2rem;
}
#fld-site-footer .fld-footer-title{
  font-family:var(--fld-font-head);
  font-size:1.1rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:#fff;
  margin:0 0 .8em;
}
#fld-site-footer p{color:#b4c0d6;font-size:.82rem;line-height:1.6;margin:0 0 .6em;}
#fld-site-footer ul{list-style:none;margin:0;padding:0;}
#fld-site-footer li{margin:.35em 0;}
#fld-site-footer a{color:#d6def0;text-decoration:none;font-size:.85rem;}
#fld-site-footer a:hover{color:var(--fld-accent-bright);text-decoration:underline;}
#fld-site-footer .fld-footer-bottom{
  max-width:var(--fld-shell-width);
  margin:0 auto;
  padding:1.1rem 1.5rem 2rem;
  border-top:1px solid rgba(255,255,255,.1);
  font-family:var(--fld-font-mono);
  font-size:.72rem;
  color:#8190a5;
}
@media (max-width:800px){#fld-site-footer .fld-footer-row{grid-template-columns:1fr 1fr;}}
@media (max-width:480px){#fld-site-footer .fld-footer-row{grid-template-columns:1fr;}}

/* ============================================================
   13) BACK TO TOP
   ============================================================ */
#fld-back-to-top{
  position:fixed;
  right:1.5rem;
  bottom:1.5rem;
  width:44px;height:44px;
  border:1px solid var(--fld-border-strong);
  background:var(--fld-surface);
  color:var(--fld-ink);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  transition:opacity .2s ease,transform .2s ease,border-color .2s ease;
  z-index:45;
}
#fld-back-to-top.fld-is-visible{opacity:1;visibility:visible;transform:translateY(0);}
#fld-back-to-top:hover{border-color:var(--fld-accent);color:var(--fld-accent);}

/* ============================================================
   14) 404
   ============================================================ */
#fld-404{max-width:var(--fld-read-width);margin:3rem auto;text-align:center;}
#fld-404 .fld-404-code{
  font-family:var(--fld-font-mono);
  font-size:.85rem;
  letter-spacing:.2em;
  color:var(--fld-accent);
}
#fld-404 h1{font-family:var(--fld-font-head);font-weight:800;text-transform:uppercase;font-size:clamp(2.4rem,6vw,3.6rem);margin:.3em 0;}
#fld-404 .fld-404-subtitle{
  font-family:var(--fld-font-head);
  font-size:.95rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--fld-ink-muted);
  margin:2rem 0 0;
}
#fld-404 .fld-404-list{list-style:none;margin:.8rem 0 0;padding:0;text-align:left;display:inline-block;}
#fld-404 .fld-404-list li{border-bottom:1px solid var(--fld-border);}
#fld-404 .fld-404-list a{display:block;padding:.7em 0;color:var(--fld-ink);text-decoration:none;font-family:var(--fld-font-body);}
#fld-404 .fld-404-list a:hover{color:var(--fld-accent);}

/* ============================================================
   15) SITEMAP TEMPLATE
   ============================================================ */
.fld-sitemap-tree{max-width:var(--fld-read-width);}
.fld-sitemap-tree ul{list-style:none;margin:0 0 0 1.1rem;padding:0;border-left:1px solid var(--fld-border);}
.fld-sitemap-tree > ul{margin-left:0;border-left:none;}
.fld-sitemap-tree li{margin:.15em 0;padding-left:1rem;}
/* .fld-sitemap-tree .fld-sitemap-link — two classes (0,2,1), not
   ".fld-sitemap-tree a" (0,1,1), which would tie with content's global
   a[href] and lose since content's stylesheet is printed after this one. */
.fld-sitemap-tree .fld-sitemap-link{color:var(--fld-ink);text-decoration:none;font-size:.95rem;}
.fld-sitemap-tree .fld-sitemap-link:hover{color:var(--fld-accent);text-decoration:underline;}
.fld-sitemap-section-title{font-family:var(--fld-font-head);font-weight:700;text-transform:uppercase;letter-spacing:.1em;font-size:.75rem;color:var(--fld-ink-muted);margin:2rem 0 .6rem;}
.fld-sitemap-section-title:first-child{margin-top:0;}

/* ============================================================
   16) PRINT
   ============================================================ */
@media print{
  #fld-site-header,#fld-sidebar,#fld-back-to-top,#fld-mobile-drawer,#fld-drawer-overlay,#fld-site-footer{display:none!important;}
}
