/* ============================================================
   BEACHSIDE FITNESS — Warm Retail-Wellness Stylesheet
   Inspired by Amazon's clean whites + warm accents,
   Walmart's friendly energy, Headspace's calm zen palette.
   ============================================================ */

:root {
  /* ---- Warm zen palette ---- */
  --paper:        #FBF8F2;   /* soft cream — main background */
  --paper-2:      #F4EEE2;   /* warmer accent surface */
  --paper-3:      #EBE2D2;   /* card hover / divider tone */
  --surface:      #FFFFFF;   /* pure white for cards */
  --ink:          #2A241D;   /* warm charcoal — primary text */
  --ink-soft:     #4A4239;   /* secondary text */
  --ink-mute:     #7A7166;   /* muted text */
  --ink-faint:    #B5AB9B;   /* faint hints */
  --rule:         #E8DFCD;   /* soft tan dividers */
  --rule-strong:  #C9BFA9;

  /* ---- Energetic accents (warm + happy) ---- */
  --masthead:     #E8784C;   /* warm coral — primary brand */
  --masthead-deep:#C95A2D;   /* hover darker coral */
  --gold:         #F2B632;   /* sunny gold for CTAs */
  --gold-deep:    #C68F1F;
  --sage:         #6B8E7F;   /* calm sage green */
  --sage-deep:    #4F6E60;
  --sky:          #4A8FB5;   /* friendly clear-sky blue */
  --sky-soft:     rgba(74, 143, 181, 0.08);
  --link:         #1E5FA0;
  --link-hover:   #0F3F70;
  --quote:        #5A4F40;
  --highlight:    #FFE89B;
  --positive:     #4A8B5C;

  /* ---- Typography ---- */
  --serif-display: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --serif-body:    'Source Serif 4', 'Source Serif Pro', 'Charter', Georgia, serif;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:          'JetBrains Mono', 'Courier New', monospace;

  --measure: 64ch;
  --w-content: 740px;
  --w-page: 1240px;
  --leading: 1.75;

  /* ---- Friendly retail shadows + radii ---- */
  --shadow-card:   0 2px 8px rgba(42, 36, 29, 0.06), 0 1px 2px rgba(42, 36, 29, 0.04);
  --shadow-hover:  0 12px 28px -8px rgba(42, 36, 29, 0.18), 0 4px 8px -2px rgba(42, 36, 29, 0.08);
  --shadow-soft:   0 1px 3px rgba(42, 36, 29, 0.05);
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
}

/* Dark mode — kept warmer than before */
html[data-theme="dark"] {
  --paper:        #1B1813;
  --paper-2:      #221E18;
  --paper-3:      #2C2720;
  --surface:      #25201A;
  --ink:          #F2EBDD;
  --ink-soft:     #D9D0BD;
  --ink-mute:     #A89E8B;
  --ink-faint:    #756B5C;
  --rule:         #3F362B;
  --rule-strong:  #5A4F41;
  --masthead:     #FF9466;
  --gold:         #FFCB5C;
  --link:         #93C5FD;
  --link-hover:   #DBEAFE;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html.news { font-size: 18px; scroll-behavior: smooth; scroll-padding-top: 90px; }
body.news {
  margin: 0;
  font-family: var(--serif-body);
  font-size: 1rem;
  line-height: var(--leading);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

body.news h1, body.news h2, body.news h3, body.news h4 {
  font-family: var(--serif-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.4em;
  font-weight: 700;
  letter-spacing: -0.005em;
}
body.news a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(30, 95, 160, 0.3); text-underline-offset: 3px; transition: color 0.18s; }
body.news a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--masthead); outline-offset: 3px; border-radius: 3px; }
.news-skip { position: absolute; left: -9999px; }
.news-skip:focus { left: 0; padding: 0.6em 1em; background: var(--masthead); color: #fff; z-index: 9999; font-family: var(--sans); }

/* =========================================================
   MASTHEAD — friendlier, retail-like, with subtle warmth
   ========================================================= */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 200;
  font-family: var(--sans);
  box-shadow: var(--shadow-soft);
}
.masthead-strip {
  background: linear-gradient(90deg, var(--masthead-deep), var(--masthead));
  color: #fff;
  font-size: 0.78rem;
  padding: 0.4em 0;
  text-align: center;
  letter-spacing: 0.04em;
  font-family: var(--sans);
}
.masthead-strip a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); }
.masthead-strip a:hover { text-decoration-color: #fff; }

.masthead-main {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0.85em 1.5em;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5em;
}
.masthead-logo {
  font-family: var(--serif-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--ink) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.masthead-logo .accent { color: var(--masthead); }
.masthead-logo .small { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); display: block; line-height: 1.2; margin-top: -2px; font-weight: 500; }

.masthead-search {
  position: relative;
  max-width: 520px;
  width: 100%;
  justify-self: center;
}
.masthead-search input {
  width: 100%;
  padding: 0.65em 1em 0.65em 2.4em;
  border: 2px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.masthead-search input:focus {
  border-color: var(--masthead);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(232, 120, 76, 0.15);
}
.masthead-search::before {
  content: '🔍';
  position: absolute;
  left: 0.95em; top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.55;
}
.masthead-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-hover);
  max-height: 70vh;
  overflow-y: auto;
  display: none;
  z-index: 50;
}
.masthead-results.is-open { display: block; }
.masthead-results .res-empty { padding: 1.2em; color: var(--ink-mute); font-style: italic; text-align: center; }
.masthead-results .res-item { display: block; padding: 0.85em 1.1em; border-bottom: 1px solid var(--rule); text-decoration: none !important; color: var(--ink) !important; }
.masthead-results .res-item:last-child { border-bottom: 0; }
.masthead-results .res-item:hover, .masthead-results .res-item.is-active { background: var(--paper-2); }
.masthead-results .res-cat { display: inline-block; font-family: var(--sans); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--masthead); margin-bottom: 0.15em; font-weight: 700; }
.masthead-results .res-title { display: block; font-family: var(--serif-display); font-weight: 700; font-size: 1rem; line-height: 1.25; }
.masthead-results .res-meta { display: block; font-family: var(--sans); font-size: 0.8rem; color: var(--ink-mute); margin-top: 0.2em; }

.masthead-actions { display: flex; align-items: center; gap: 0.75em; }
.masthead-actions button, .masthead-actions a {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55em 1.05em;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.18s;
}
.masthead-actions .theme-tog { border-color: var(--rule); }
.masthead-actions .theme-tog:hover { border-color: var(--masthead); color: var(--masthead); }
.masthead-actions .cta {
  background: var(--gold);
  color: var(--ink) !important;
  border-color: var(--gold-deep);
  font-weight: 700;
  box-shadow: 0 2px 0 var(--gold-deep);
}
.masthead-actions .cta:hover { background: var(--gold-deep); color: #fff !important; transform: translateY(1px); box-shadow: 0 1px 0 var(--gold-deep); }

/* Section nav strip — softer */
.sections-bar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--sans);
  overflow-x: auto;
}
.sections-bar nav {
  max-width: var(--w-page); margin: 0 auto;
  padding: 0.5em 1.5em;
  display: flex; gap: 1.6em; white-space: nowrap;
}
.sections-bar a {
  color: var(--ink-soft);
  text-decoration: none !important;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.35em 0;
  position: relative;
  transition: color 0.18s;
}
.sections-bar a:hover { color: var(--masthead); }
.sections-bar a[aria-current="page"] { color: var(--masthead); }
.sections-bar a[aria-current="page"]::after {
  content: '';
  position: absolute; bottom: -0.5em; left: 0; right: 0;
  height: 3px; background: var(--masthead);
  border-radius: 2px 2px 0 0;
}
@media (max-width: 880px) {
  .masthead-main { grid-template-columns: auto 1fr auto; gap: 0.75em; }
  .masthead-search { max-width: none; grid-column: 1 / -1; order: 3; }
  .masthead-actions .theme-tog { display: none; }
}

/* =========================================================
   FRONT PAGE / HUB
   ========================================================= */
.front-page { max-width: var(--w-page); margin: 0 auto; padding: 2.5em 1.5em 4em; }
.front-banner {
  font-family: var(--sans); text-align: center;
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-mute);
  padding: 0.85em 1.5em;
  background: var(--paper-2);
  border-radius: var(--r-md);
  margin-bottom: 2em;
}
.front-banner strong { color: var(--masthead-deep); }

.lead-story {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5em;
  padding-bottom: 2.5em;
  margin-bottom: 2.5em;
  border-bottom: 1px solid var(--rule);
}
.lead-story figure { margin: 0; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-card); background: var(--surface); }
.lead-story img { width: 100%; height: auto; display: block; aspect-ratio: 4/3; object-fit: cover; }
.lead-story .lead-meta { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--masthead); font-weight: 700; margin-bottom: 0.7em; }
.lead-story h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); margin: 0 0 0.45em; line-height: 1.08; }
.lead-story h1 a { color: var(--ink) !important; text-decoration: none !important; }
.lead-story h1 a:hover { color: var(--masthead) !important; }
.lead-story .deck { font-family: var(--serif-body); font-size: 1.18rem; color: var(--ink-soft); line-height: 1.5; margin: 0 0 1em; }
.lead-story .byline { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-mute); }
.lead-story .byline strong { color: var(--ink); }
@media (max-width: 880px) { .lead-story { grid-template-columns: 1fr; gap: 1.5em; } }

.section-block { padding: 2.5em 0; }
.section-block-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1em;
  margin-bottom: 1.5em; padding-bottom: 0.7em;
  border-bottom: 2px solid var(--ink);
  flex-wrap: wrap;
}
.section-block-head h2 { font-size: 1.7rem; margin: 0; }
.section-block-head .more { font-family: var(--sans); font-size: 0.88rem; font-weight: 700; color: var(--masthead) !important; text-decoration: none !important; }
.section-block-head .more:hover { color: var(--masthead-deep) !important; }

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5em;
}
.story-card {
  display: block;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1em 1em 1.2em;
  text-decoration: none !important;
  color: inherit;
  box-shadow: var(--shadow-card);
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.story-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--rule); }
.story-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 0.85em; background: var(--paper-2); }
.story-card .kicker {
  font-family: var(--sans); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--masthead); font-weight: 700;
  display: block; margin-bottom: 0.4em;
}
.story-card h3 { font-size: 1.25rem; line-height: 1.2; color: var(--ink) !important; margin: 0 0 0.45em; }
.story-card:hover h3 { color: var(--masthead) !important; }
.story-card .blurb { font-family: var(--serif-body); font-size: 0.95rem; color: var(--ink-soft); line-height: 1.55; margin: 0 0 0.55em; }
.story-card .meta { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-mute); }

.ribbon-section {
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 2.5em -1.5em;
  padding: 2.5em 1.5em;
  border-radius: var(--r-md);
}
@media (min-width: 1240px) { .ribbon-section { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-left: max(1.5em, calc(50vw - 600px)); padding-right: max(1.5em, calc(50vw - 600px)); border-radius: 0; } }
.ribbon-section h2 { font-size: 1.7rem; }

/* =========================================================
   IMAGE PLACEHOLDERS & captions
   ========================================================= */
.img-placeholder {
  position: relative;
  background: linear-gradient(135deg, var(--paper-3), var(--paper-2));
  border: 2px dashed var(--rule-strong);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; justify-content: center;
  padding: 1.25em 1.5em;
  font-family: var(--sans);
  color: var(--ink-soft);
  overflow: hidden;
  min-height: 160px;
}
.img-placeholder::before {
  content: '📷  IMAGE TO GENERATE';
  position: absolute; top: 0.7em; left: 1em;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--masthead-deep);
  text-transform: uppercase;
}
.img-placeholder .ip-meta { position: absolute; top: 0.7em; right: 1em; font-size: 0.68rem; color: var(--ink-mute); font-family: var(--mono); text-align: right; line-height: 1.3; }
.img-placeholder .ip-prompt { font-family: var(--serif-body); font-style: italic; font-size: 0.95rem; line-height: 1.45; color: var(--ink-soft); margin: 1.6em 0 0; max-width: 60ch; }
.img-placeholder .ip-prompt::before { content: 'Prompt: '; font-style: normal; font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.img-caption {
  font-family: var(--sans); font-size: 0.82rem;
  color: var(--ink-mute); margin: 0.6em 0 0;
  line-height: 1.5; font-style: italic;
}
.img-caption strong { color: var(--ink); font-style: normal; }

/* =========================================================
   ARTICLE PAGE
   ========================================================= */
.article-page { background: var(--paper); }
.art-hero { max-width: var(--w-page); margin: 0 auto; padding: 2.5em 1.5em 0; }
.art-breadcrumb { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 1.2em; }
.art-breadcrumb a { color: var(--ink-mute); text-decoration: none; }
.art-breadcrumb a:hover { color: var(--masthead); }

.art-kicker {
  font-family: var(--sans); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--masthead); font-weight: 800;
  display: block; margin-bottom: 0.7em;
}
.art-headline {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.012em;
  margin: 0 0 0.55em;
  max-width: 24ch;
}
.art-deck {
  font-family: var(--serif-body);
  font-size: clamp(1.12rem, 1.5vw, 1.32rem);
  color: var(--ink-soft); line-height: 1.5; font-weight: 400;
  margin: 0 0 1.5em; max-width: 65ch;
}
.art-byline {
  display: flex; align-items: center; gap: 1.5em;
  flex-wrap: wrap; font-family: var(--sans);
  font-size: 0.9rem; color: var(--ink-mute);
  padding: 1em 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.art-byline strong { color: var(--ink); }
.art-byline .author-block { display: flex; align-items: center; gap: 0.7em; }
.art-byline .author-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--masthead), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-display); font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.art-hero-image { margin: 1.5em 0; }
.art-hero-image img { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: var(--r-md); box-shadow: var(--shadow-card); background: var(--paper-2); }
.art-hero-image .img-placeholder { aspect-ratio: 21/9; min-height: 240px; }

.art-body {
  max-width: var(--w-content); margin: 0 auto;
  padding: 2em 1.5em 4em;
}
.art-body p { font-size: 1.08rem; line-height: 1.78; margin: 0 0 1.2em; max-width: var(--measure); color: var(--ink); }
.art-body p:first-of-type::first-letter {
  font-family: var(--serif-display);
  font-weight: 800;
  font-size: 4.4em;
  float: left;
  line-height: 0.9;
  margin: 0.05em 0.1em 0 0;
  color: var(--masthead);
}
.art-body h2 {
  font-size: 1.7rem;
  margin: 2em 0 0.6em;
  padding-top: 0.4em;
  border-top: 1px solid var(--rule);
}
.art-body h3 {
  font-family: var(--sans);
  font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--masthead);
  font-weight: 700; margin: 1.6em 0 0.5em;
}
.art-body strong { color: var(--ink); font-weight: 700; }
.art-body em { font-style: italic; color: var(--quote); }
.art-body ul, .art-body ol { font-size: 1.05rem; line-height: 1.7; padding-left: 1.5em; margin: 0 0 1.2em; max-width: var(--measure); color: var(--ink); }
.art-body li { margin-bottom: 0.5em; }
.art-body li::marker { color: var(--masthead); }

/* Lay summary box — sage green for warmth */
.lay-summary {
  margin: 2em 0;
  padding: 1.4em 1.6em;
  background: linear-gradient(135deg, #F0EAD9, #F4EEE2);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  box-shadow: var(--shadow-soft);
}
.lay-summary h4 {
  margin: 0 0 0.5em;
  font-family: var(--sans);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--gold-deep);
}
.lay-summary p { margin: 0; font-size: 1.02rem; line-height: 1.55; color: var(--ink); max-width: none; }
.lay-summary p:first-of-type::first-letter { font-size: 1em; float: none; color: inherit; font-family: inherit; font-weight: inherit; line-height: inherit; margin: 0; }

/* Pull quote — soft cream surface, coral accents */
.pull-quote {
  margin: 2.5em 0;
  padding: 2em 1.5em;
  background: var(--paper-2);
  border-radius: var(--r-md);
  text-align: center;
  max-width: none;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--rule);
}
.pull-quote blockquote {
  font-family: var(--serif-display);
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
  font-style: italic;
}
.pull-quote blockquote::before { content: '"'; color: var(--masthead); font-size: 1.5em; line-height: 0; vertical-align: -0.4em; margin-right: 0.05em; }
.pull-quote blockquote::after { content: '"'; color: var(--masthead); font-size: 1.5em; line-height: 0; vertical-align: -0.4em; margin-left: 0.05em; }
.pull-quote cite { display: block; margin-top: 0.8em; font-family: var(--sans); font-size: 0.86rem; color: var(--ink-mute); font-style: normal; }
.pull-quote cite strong { color: var(--masthead-deep); }

/* Stat block — friendly white card */
.stat-block {
  margin: 2em 0; padding: 1.5em 1.7em;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.stat-block h4 { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.15em; margin: 0 0 1em; color: var(--ink-mute); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1.25em; }
.stat-cell { text-align: center; }
.stat-num { font-family: var(--serif-display); font-size: 2.4rem; font-weight: 800; color: var(--masthead); line-height: 1; display: block; }
.stat-lbl { display: block; font-family: var(--sans); font-size: 0.78rem; color: var(--ink-mute); margin-top: 0.4em; line-height: 1.35; }

/* Inline chart — sage-tinted */
.chart-block {
  margin: 2em 0; padding: 1.4em 1.7em;
  background: var(--paper-2);
  border-left: 4px solid var(--sage);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.chart-block h4 { font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 0.4em; }
.chart-block .source { font-family: var(--sans); font-size: 0.75rem; color: var(--ink-mute); margin-top: 0.6em; font-style: italic; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 0.8em; margin-bottom: 0.55em; font-family: var(--sans); font-size: 0.85rem; }
.bar-row .lbl { color: var(--ink-soft); font-weight: 500; }
.bar-row .bar-track { height: 14px; background: var(--paper-3); border-radius: 4px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: linear-gradient(90deg, var(--masthead), var(--gold)); border-radius: 4px; }
.bar-row .val { text-align: right; font-family: var(--mono); color: var(--ink); font-weight: 600; }

/* APA citation chip */
.apa-cite {
  font-family: var(--sans); font-size: 0.85em;
  color: var(--link); text-decoration: none;
  border-bottom: 1px dotted var(--link);
  white-space: nowrap;
}
.apa-cite:hover { border-bottom-style: solid; }

/* Product recommendation — Amazon-friendly card */
.product-rec {
  margin: 2.5em 0;
  padding: 1.6em 1.7em;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  position: relative;
  box-shadow: var(--shadow-card);
}
.product-rec::before {
  content: '⭐ EDITOR\'S PICK';
  position: absolute; top: -0.7em; left: 1.5em;
  background: var(--gold);
  color: var(--ink);
  padding: 0.25em 0.85em;
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.12em;
  border-radius: var(--r-sm);
  box-shadow: 0 2px 0 var(--gold-deep);
}
.product-rec h4 { margin: 0.4em 0 0.3em; font-family: var(--serif-display); font-size: 1.3rem; color: var(--ink); }
.product-rec p { margin: 0 0 0.8em; font-size: 0.97rem; color: var(--ink-soft); }
.product-rec .product-cta {
  display: inline-flex; align-items: center; gap: 0.5em;
  background: var(--masthead);
  color: #fff !important;
  padding: 0.7em 1.3em;
  border-radius: var(--r-sm);
  text-decoration: none !important;
  font-family: var(--sans);
  font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 2px 0 var(--masthead-deep);
  transition: all 0.18s;
}
.product-rec .product-cta:hover { background: var(--masthead-deep); transform: translateY(1px); box-shadow: 0 1px 0 var(--masthead-deep); }
.product-rec small { display: block; margin-top: 0.85em; font-family: var(--sans); font-size: 0.74rem; color: var(--ink-mute); }
.product-rec small a { color: var(--ink-mute); }

/* References */
.refs { margin-top: 3em; padding-top: 2em; border-top: 2px solid var(--ink); }
.refs h2 { font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink-mute); border: 0; padding: 0; margin: 0 0 1em; }
.refs ol { font-family: var(--sans); font-size: 0.88rem; line-height: 1.55; color: var(--ink-soft); padding-left: 1.4em; max-width: none; }
.refs li { margin-bottom: 0.85em; }
.refs li em { color: var(--ink); font-style: italic; }
.refs li a { color: var(--link); word-break: break-word; }

/* Fact-check tag — sage green */
.fact-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--positive);
  background: rgba(74, 139, 92, 0.1);
  border: 1px solid rgba(74, 139, 92, 0.3);
  padding: 0.18em 0.6em;
  border-radius: var(--r-sm);
  margin-right: 0.4em;
}

/* "More from this section" */
.more-section { max-width: var(--w-page); margin: 0 auto; padding: 3em 1.5em; border-top: 1px solid var(--rule); }
.more-section h3 { font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink-mute); margin: 0 0 1.5em; }

/* =========================================================
   FOOTER — soft cream, friendly
   ========================================================= */
.news-footer {
  background: var(--paper-2);
  color: var(--ink);
  padding: 3em 1.5em 1.5em;
  font-family: var(--sans);
  font-size: 0.92rem;
  border-top: 1px solid var(--rule);
}
.news-footer-inner { max-width: var(--w-page); margin: 0 auto; }
.news-footer .brand-row { display: flex; align-items: baseline; gap: 1.5em; padding-bottom: 1.5em; border-bottom: 1px solid var(--rule); margin-bottom: 1.5em; }
.news-footer .brand-row .footer-logo { font-family: var(--serif-display); font-size: 1.8rem; font-weight: 800; }
.news-footer .brand-row .footer-logo .accent { color: var(--masthead); }
.news-footer .brand-row .tag { font-family: var(--serif-body); font-style: italic; color: var(--ink-mute); font-size: 1rem; }
.news-footer .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2em; }
.news-footer h5 { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink); margin: 0 0 0.7em; font-weight: 700; }
.news-footer a { display: block; padding: 0.2em 0; color: var(--ink-soft); text-decoration: none !important; }
.news-footer a:hover { color: var(--masthead); }
.news-footer .copy { margin-top: 2em; padding-top: 1.5em; border-top: 1px solid var(--rule); text-align: center; font-size: 0.82rem; color: var(--ink-mute); line-height: 1.5; }

/* Print */
@media print {
  .masthead, .sections-bar, .more-section, .news-footer, .product-rec { display: none; }
  body.news { background: #fff; color: #000; }
  .img-placeholder { border-color: #999; background: #f5f5f5; }
}


/* ============================================================
   Welcome banner (Reader homepage) + Wasaga location pill (Gym)
   ============================================================ */
.welcome-banner {
  background: linear-gradient(135deg, var(--paper-2, #F4EEE2), var(--paper-3, #EBE2D2));
  border: 1px solid var(--rule, #E8DFCD);
  border-radius: var(--r-md, 12px);
  padding: 1.5em 1.75em;
  margin: 0 auto 2em;
  max-width: var(--w-page, 1240px);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.welcome-banner-inner { max-width: 780px; margin: 0 auto; }
.welcome-flag {
  display: inline-block;
  font-family: var(--sans, "Inter", sans-serif);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--masthead, #E8784C);
  font-weight: 700;
  margin-bottom: 0.7em;
}
.welcome-text {
  font-family: var(--serif-body, "Source Serif 4", Georgia, serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft, #4A4239);
  margin: 0;
}
.welcome-text strong { color: var(--ink, #2A241D); }
@media (max-width: 880px) {
  .welcome-banner { padding: 1.25em; border-radius: 8px; }
  .welcome-text { font-size: 0.95rem; }
}

/* ============================================================
   MOBILE SAFETY: prevent any image from overflowing its container
   Catch-all rule for unwrapped imgs that bypass article styles
   ============================================================ */
img { max-width: 100%; height: auto; }

.art-hero img,
.art-hero figure,
.art-hero figure img,
.article-hero,
.article-hero img,
.art-body img,
.art-body figure,
.art-body figure img {
  max-width: 100% !important;
  height: auto;
  display: block;
}

.art-hero figure,
.article-hero,
.art-figure {
  margin: 1.5em auto;
  border-radius: var(--r-md, 12px);
  overflow: hidden;
  background: var(--paper-2, #F4EEE2);
  max-width: var(--w-content, 740px);
}

.art-hero figure img,
.article-hero img,
.art-figure img,
.art-body figure img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Mid-article bare imgs */
.art-body > img,
article.art-body > img {
  width: 100%;
  margin: 2em auto;
  border-radius: 8px;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Mobile-only — make article hero hug edges, no rounded corners */
@media (max-width: 760px) {
  .art-hero figure,
  .article-hero,
  .art-figure {
    margin-left: -1.5em;
    margin-right: -1.5em;
    border-radius: 0;
    max-width: none;
  }
  .art-body {
    overflow-x: hidden;  /* belt-and-suspenders */
  }
  /* Make sections-bar truly horizontal-scrollable on mobile */
  .sections-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sections-bar::-webkit-scrollbar { display: none; }
}

/* Gym page hero also constrain on mobile */
@media (max-width: 760px) {
  .hero {
    overflow: hidden;
  }
  .hero-buttons {
    flex-wrap: wrap;
  }
}

/* Prevent ANY page from horizontal-scrolling */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ============================================================
   Back-to-top floating button
   ============================================================ */
.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--masthead, #E8784C);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px -4px rgba(232, 120, 76, 0.5), 0 2px 6px rgba(0,0,0,0.1);
  z-index: 999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s, background 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans, "Inter", sans-serif);
  line-height: 1;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--masthead-deep, #C95A2D);
  transform: translateY(-2px);
}
.back-to-top:focus-visible {
  outline: 3px solid var(--gold, #F2B632);
  outline-offset: 3px;
}
@media (max-width: 540px) {
  .back-to-top { right: 0.8rem; bottom: 0.8rem; width: 44px; height: 44px; }
}
@media print { .back-to-top { display: none; } }
