/*
Theme Name: BLE Editorial
Theme URI: https://betterlivingeveryday.com/
Author: Better Living Every Day
Author URI: https://betterlivingeveryday.com/
Description: Clean editorial theme for Better Living Every Day. Serif headlines, strong article rows, text-forward topic discovery, dark mode, sticky article TOC. System fonts only, no frameworks, no page builder.
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: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ble-editorial
*/

/* ============================================================
   Design tokens (Concept 1 — Clean Editorial)
   ============================================================ */
:root {
  --font-serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #1c1b17;
  --muted: #6b675e;
  --line: #e5e2da;
  --line-strong: #d5d1c6;
  --accent: #1e6a52;
  --accent-hover: #16523f;
  --accent-ink: #ffffff;
  --gold: #a07c3f;
  --gold-bright: #b08d4e;
  --tint: #eef3f0;
  --shadow: 0 1px 2px rgba(28,27,23,.04);

  /* article surfaces */
  --callout-bg: #fff9f0;
  --stat-bg: #f0f5f9;
  --stat-border: #5a8bb8;
  --box-bg: #f5f5f2;
  --card-bg: #f9f9f7;
  --red-row: #ffe6e6;
  --orange-row: #fff4e6;
  --green-row: #f0f9f0;
  --cta-bg: #f0f9ff;
  --cta-border: #4a90e2;
  --counter-bg: #faf5f5;
  --counter-border: #c27878;
  --counter-ink: #8b4444;

  --radius: 4px;
  --radius-lg: 8px;
  --maxw: 1140px;
  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 40px; --space-5: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141412; --surface: #1d1d1a; --ink: #ece9e2; --muted: #a29d92;
    --line: #2c2b27; --line-strong: #3a3934; --accent: #5cb694; --accent-hover: #74c5a6;
    --accent-ink: #10201a; --gold: #cfa969; --gold-bright: #cfa969; --tint: #1e2622; --shadow: none;
    --callout-bg: #262019; --stat-bg: #1b2229; --stat-border: #6f9cc4; --box-bg: #201f1b;
    --card-bg: #21201c; --red-row: #3a2323; --orange-row: #37301f; --green-row: #1f2e22;
    --cta-bg: #182430; --counter-bg: #2b2020; --counter-ink: #d99;
  }
}
:root[data-theme="dark"] {
  --bg: #141412; --surface: #1d1d1a; --ink: #ece9e2; --muted: #a29d92;
  --line: #2c2b27; --line-strong: #3a3934; --accent: #5cb694; --accent-hover: #74c5a6;
  --accent-ink: #10201a; --gold: #cfa969; --gold-bright: #cfa969; --tint: #1e2622; --shadow: none;
  --callout-bg: #262019; --stat-bg: #1b2229; --stat-border: #6f9cc4; --box-bg: #201f1b;
  --card-bg: #21201c; --red-row: #3a2323; --orange-row: #37301f; --green-row: #1f2e22;
  --cta-bg: #182430; --counter-bg: #2b2020; --counter-ink: #d99;
}

/* ============================================================
   Base
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-3); }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 0; clip: auto; clip-path: none; width: auto; height: auto; }

/* WP core alignment / captions */
.alignleft { float: left; margin: 6px 20px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 20px; }
.aligncenter { display: block; margin: 12px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: 13px; color: var(--muted); padding: 6px 0; }

/* ============================================================
   Header
   ============================================================ */
.topbar { border-bottom: 1px solid var(--line); font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar span { color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 999px; width: 30px; height: 30px; cursor: pointer; color: var(--ink); font-size: 14px; line-height: 1; }
.theme-toggle:hover { border-color: var(--line-strong); }

.masthead { padding: var(--space-3) 0 var(--space-2); text-align: center; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo svg { flex: none; }
.logo-word { font-family: var(--font-serif); font-size: 30px; letter-spacing: .02em; font-weight: 700; color: var(--ink); }
.logo-word .accent { color: var(--accent); font-style: italic; }
.site-tagline { font-size: 13px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; }

.mainnav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 50; }
.mainnav ul { display: flex; gap: 4px; justify-content: safe center; list-style: none; overflow-x: auto; }
.mainnav li, .mainnav .sub-menu { display: contents; } /* flatten all menu levels into one row */
.mainnav a { display: block; padding: 12px 14px; font-size: 14px; font-weight: 600; text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.mainnav a:hover,
.mainnav .current-menu-item > a,
.mainnav .current_page_item > a { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.mainnav a[href="#"] { display: none; } /* hide placeholder parent items */

/* ============================================================
   Shared bits
   ============================================================ */
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.meta { font-size: 13px; color: var(--muted); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: none; padding: 12px 22px; font-size: 15px; font-weight: 700; border-radius: var(--radius); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.thumb-fallback { background: linear-gradient(140deg, #dce8e2, #c2d6cc); border: 1px solid var(--line); }
:root[data-theme="dark"] .thumb-fallback { background: linear-gradient(140deg, #23302b, #1b2622); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-3); }
.section-head h2 { font-family: var(--font-serif); font-size: 26px; }
.section-head a { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }

/* ============================================================
   Front page
   ============================================================ */
.lead-section { padding: var(--space-4) 0; }
.lead-grid { display: grid; grid-template-columns: 7fr 5fr; gap: var(--space-4); }
.lead-story .thumb { display: block; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; }
.lead-story .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead-story h2 { font-family: var(--font-serif); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; margin: var(--space-2) 0 var(--space-1); }
.lead-story h2 a { text-decoration: none; }
.lead-story h2 a:hover { color: var(--accent); }
.lead-story .excerpt { color: var(--muted); font-size: 19px; }
.lead-story .meta { margin-top: 8px; }
.lead-list { display: flex; flex-direction: column; }
.lead-list h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-bottom: var(--space-2); border-bottom: 2px solid var(--ink); }
.lead-list article { padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.lead-list article h4 { font-family: var(--font-serif); font-size: 18px; line-height: 1.3; margin-top: 2px; font-weight: 700; }
.lead-list article h4 a { text-decoration: none; }
.lead-list article h4 a:hover { color: var(--accent); }

.topics-section { padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.topic-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s; }
.topic-card:hover { border-color: var(--accent); }
.topic-card strong { display: block; font-size: 16px; margin-bottom: 2px; }
.topic-card span { font-size: 13px; color: var(--muted); }

.latest-section { padding: var(--space-4) 0; border-top: 1px solid var(--line); }

/* ============================================================
   Post rows (front page + archives)
   ============================================================ */
.post-row { display: grid; grid-template-columns: 1fr 220px; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); align-items: center; }
.post-row .thumb { display: block; aspect-ratio: 3/2; border-radius: var(--radius-lg); overflow: hidden; }
.post-row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-row h3 { font-family: var(--font-serif); font-size: 22px; line-height: 1.25; margin: 6px 0; }
.post-row h3 a { text-decoration: none; }
.post-row h3 a:hover { color: var(--accent); }
.post-row .excerpt { color: var(--muted); font-size: 15px; max-width: 60ch; }
.post-row .excerpt p { margin: 0; }
.post-row .meta { margin-top: 8px; }

/* ============================================================
   Archive header + pagination
   ============================================================ */
.archive-head { padding: var(--space-4) 0 var(--space-2); border-bottom: 2px solid var(--ink); }
.archive-head h1 { font-family: var(--font-serif); font-size: clamp(28px, 4vw, 42px); }
.archive-head .archive-desc { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; padding: var(--space-2) 0; }
.subnav a { font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.subnav a:hover, .subnav a.is-current { border-color: var(--accent); color: var(--accent); }

.pagination-nav { display: flex; gap: 8px; justify-content: center; padding: var(--space-4) 0; flex-wrap: wrap; }
.pagination-nav .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; text-decoration: none; }
.pagination-nav .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ============================================================
   Single article layout
   ============================================================ */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-5); padding: var(--space-4) 0; }
.no-rail .article-layout { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }
.article-header h1 { font-family: var(--font-serif); font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 10px 0; }
.article-header .meta-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: var(--space-2); }
.featured-hero { margin: var(--space-3) 0 0; }
.featured-hero img { width: 100%; max-height: 360px; object-fit: cover; object-position: center 30%; border-radius: var(--radius-lg); display: block; }
@media (max-width: 768px) { .featured-hero img { max-height: 240px; } }

/* Per-post hero crop overrides (portrait product photos) */
.postid-511 .featured-hero img { object-position: center 35%; }
.postid-67 .featured-hero img,
.postid-371 .featured-hero img,
.postid-387 .featured-hero img { object-position: center 50%; }

/* ============================================================
   Article content (canonical classes, re-themed)
   Existing posts wrap content in .article-container — neutralize
   its own width so the theme grid controls layout.
   ============================================================ */
.entry-content { max-width: 70ch; font-size: 17px; }
.entry-content .article-container { max-width: none; margin: 0; padding: 0; font-family: inherit; color: inherit; line-height: inherit; }

.entry-content h2, .entry-content .article-container h2 {
  font-family: var(--font-serif); font-size: 27px; margin: var(--space-4) 0 var(--space-2);
  font-weight: 700; border-bottom: 2px solid var(--line); padding-bottom: 12px;
}
.entry-content h3, .entry-content .article-container h3 { font-family: var(--font-serif); font-size: 21px; margin: var(--space-3) 0 var(--space-2); font-weight: 700; }
.entry-content h4 { font-size: 17px; margin: var(--space-2) 0 var(--space-1); }
.entry-content p, .entry-content .article-container p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol { margin: 0 0 18px 24px; }
.entry-content li { margin-bottom: 6px; }
.entry-content a { color: var(--accent); }
.entry-content a:hover { color: var(--accent-hover); }
.entry-content .subtitle, .entry-content .article-subtitle { font-size: 18px; color: var(--muted); margin-bottom: 20px; font-style: italic; }

/* Byline (inline, inside content) */
.byline { font-size: 14px; color: var(--muted); margin-bottom: var(--space-3); border-bottom: 1px solid var(--line); padding-bottom: 16px; }

/* In-content TOC */
.in-this-article, .toc {
  background: var(--box-bg); border-left: 4px solid var(--gold-bright);
  padding: 20px; margin: 30px 0; font-size: 15px; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.in-this-article strong, .in-this-article h3, .toc h3 { display: block; font-size: 13px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .1em; border: none; padding: 0; font-family: var(--font-sans); }
.in-this-article ol, .in-this-article ul, .toc ul { margin: 0 0 0 4px; list-style-position: inside; }
.in-this-article li { margin-bottom: 8px; color: var(--muted); }
.in-this-article a, .toc a { color: var(--gold-bright); text-decoration: none; border-bottom: 1px dotted var(--gold-bright); }
.in-this-article a:hover, .toc a:hover { color: var(--ink); }
/* When the sticky rail TOC is present (desktop), the inline TOC is redundant */
@media (min-width: 901px) { .has-rail-toc .entry-content .in-this-article { display: none; } }

/* Callouts */
.callout, .callout-box { background: var(--callout-bg); border-left: 4px solid var(--gold-bright); padding: 20px; margin: 25px 0; font-style: italic; line-height: 1.7; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.stat-callout { background: var(--stat-bg); border-left: 4px solid var(--stat-border); padding: 20px; margin: 25px 0; font-weight: 500; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.verdict { background: var(--box-bg); padding: 18px; margin: 25px 0; border-left: 4px solid var(--muted); font-size: 15px; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

/* Tables */
.entry-content table { width: 100%; border-collapse: collapse; margin: 30px 0; font-size: 15px; }
.entry-content th { background: var(--tint); padding: 12px; text-align: left; font-weight: 600; border: 1px solid var(--line); font-family: var(--font-sans); }
.entry-content td { padding: 12px; border: 1px solid var(--line); }
.entry-content tr.red-row { background: var(--red-row); }
.entry-content tr.orange-row { background: var(--orange-row); }
.entry-content tr.green-row { background: var(--green-row); }

/* Product cards */
.product-pick, .product-rec {
  background: var(--card-bg); border: 1px solid var(--line); padding: 20px; margin: 24px 0;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.product-pick h4, .product-rec h4 { font-family: var(--font-serif); margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.product-pick > p:has(> img:only-child) { display: contents; }
.product-pick img, .product-pick p img {
  float: right !important; width: 100% !important; max-width: 220px !important; height: auto !important;
  aspect-ratio: 1 / 1; object-fit: contain; margin: 0 0 15px 20px !important;
  background: #ffffff; border-radius: var(--radius); padding: 8px; box-sizing: border-box; shape-outside: margin-box;
}
@media (max-width: 600px) {
  .product-pick img, .product-pick p img { float: none !important; display: block !important; margin: 10px auto 15px !important; max-width: 280px !important; }
}
.product-pick p { margin-bottom: 10px; font-size: 15px; }
.product-pick a, .product-rec a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); font-weight: 500; }
.product-pick a:hover, .product-rec a:hover { color: var(--accent-hover); }
.product-pros-cons { margin-top: 14px; font-size: 15px; }
.product-pros-cons strong { display: block; margin: 10px 0 4px; }
.product-name { font-weight: 700; font-size: 18px; }

/* Affiliate button (canonical .amazon-link + generic) */
.amazon-link, .product-pick a.amazon-link {
  display: inline-block; margin-top: 12px; padding: 10px 20px; background: var(--accent);
  color: var(--accent-ink); border-radius: var(--radius); font-family: var(--font-sans);
  font-size: 14px; font-weight: 600; border: none; border-bottom: none; text-decoration: none;
}
.amazon-link:hover, .product-pick a.amazon-link:hover { background: var(--accent-hover); color: var(--accent-ink); border-bottom: none; }

/* FAQ */
.faq, .faq-item { margin: 25px 0; padding: 20px; background: var(--card-bg); border-left: 4px solid var(--line-strong); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.faq h4, .faq-item h4 { font-size: 17px; margin: 0 0 10px; font-weight: 600; font-family: var(--font-sans); }
.faq p { margin-bottom: 0; font-size: 15.5px; }

/* Disclosure */
.affiliate-disclosure { background: var(--card-bg); border: 1px solid var(--line); padding: 18px; margin: 30px 0; font-size: 14px; color: var(--muted); border-radius: var(--radius-lg); }

/* Crosslinks */
.crosslink { background: var(--box-bg); padding: 18px; margin: 25px 0; border-left: 4px solid var(--gold-bright); font-size: 15px; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.crosslink a { color: var(--gold-bright); }
.crosslink-footer, .related-reading { background: var(--box-bg); padding: 30px; margin-top: 50px; border-top: 2px solid var(--line-strong); border-radius: var(--radius-lg); }
.crosslink-footer h3, .related-reading h3 { margin: 0 0 15px; border-bottom: 2px solid var(--line); padding-bottom: 15px; }
.crosslink-footer ul, .related-reading ul { list-style: none; margin: 0; padding: 0; }
.crosslink-footer li, .related-reading li { margin: 12px 0; }
.crosslink-footer a, .related-reading a { color: var(--gold-bright); text-decoration: none; border-bottom: 1px dotted var(--gold-bright); }
.crosslink-footer a:hover, .related-reading a:hover { color: var(--ink); }

/* What I Use */
.what-i-use { list-style: none; padding: 0; margin: 25px 0 !important; }
.what-i-use li { margin-bottom: 18px; padding: 15px; background: var(--card-bg); border-left: 4px solid var(--gold); border-radius: var(--radius); }

/* Misc legacy */
.fluoride-highlight { background: var(--orange-row); padding: 1px 4px; border-radius: 2px; }
.cta-section { background: var(--cta-bg); padding: 25px; margin: 40px 0; text-align: center; border-left: 4px solid var(--cta-border); border-radius: var(--radius-lg); }
.cta-section p { margin-bottom: 0; font-size: 15px; }
.step-box { background: var(--box-bg); border-radius: var(--radius-lg); padding: 20px 24px; margin: 20px 0; }
.step-box h3 { margin-top: 0; color: var(--stat-border); }
.counterpoint { background: var(--counter-bg); border-left: 4px solid var(--counter-border); padding: 20px 24px; margin: 25px 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.counterpoint strong { color: var(--counter-ink); }

/* Citations */
.entry-content sup { font-size: 0.9em; }
.entry-content sup a[href^="#ref-"] { font-weight: 700; color: var(--gold-bright); text-decoration: none; padding: 0 2px; border-bottom: none; }
.entry-content sup a[href^="#ref-"]:hover { text-decoration: underline; }

/* ============================================================
   TOC rail
   ============================================================ */
.rail { font-size: 14px; }
.rail-inner { position: sticky; top: 70px; display: flex; flex-direction: column; gap: var(--space-3); }
.rail-toc { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; background: var(--surface); box-shadow: var(--shadow); }
.rail-toc h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-family: var(--font-sans); font-weight: 700; }
.rail-toc ol { list-style: none; }
.rail-toc li { margin: 7px 0; }
.rail-toc a { text-decoration: none; color: var(--ink); }
.rail-toc a:hover { color: var(--accent); }
.rail-news { background: var(--tint); border-radius: var(--radius-lg); padding: 18px 20px; }
.rail-news strong { display: block; font-family: var(--font-serif); font-size: 17px; margin-bottom: 6px; }
.rail-news p { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.rail-news .btn { width: 100%; text-align: center; padding: 10px; font-size: 14px; }

/* ============================================================
   Pages / misc content
   ============================================================ */
.page-plain { max-width: 760px; margin: 0 auto; padding: var(--space-4) var(--space-3); }
.page-plain h1 { font-family: var(--font-serif); font-size: clamp(28px, 4vw, 40px); margin-bottom: var(--space-3); }
.error-404 { text-align: center; padding: var(--space-5) var(--space-3); }
.error-404 h1 { font-family: var(--font-serif); font-size: 42px; margin-bottom: var(--space-2); }
.error-404 p { color: var(--muted); margin-bottom: var(--space-3); }

/* ============================================================
   Forms (WPForms + generic) — theme-token colors in both modes
   ============================================================ */
.entry-content label,
.wpforms-container .wpforms-field-label,
.wpforms-container .wpforms-field-sublabel,
.wpforms-container .wpforms-field-description,
.wpforms-container .wpforms-field-label-inline {
  color: var(--ink) !important;
}
.entry-content input[type="text"],
.entry-content input[type="email"],
.entry-content input[type="tel"],
.entry-content input[type="url"],
.entry-content input[type="number"],
.entry-content textarea,
.entry-content select,
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container input[type="number"],
.wpforms-container textarea,
.wpforms-container select {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius) !important;
}
.wpforms-container ::placeholder { color: var(--muted) !important; opacity: 1; }
.wpforms-container button[type="submit"],
.entry-content input[type="submit"] {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  border: none !important;
  border-radius: var(--radius) !important;
  padding: 12px 22px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
.wpforms-container button[type="submit"]:hover,
.entry-content input[type="submit"]:hover { background: var(--accent-hover) !important; }

/* Dark mode: soften white product photos so they don't glare */
:root[data-theme="dark"] .product-pick img,
:root[data-theme="dark"] .product-pick p img { filter: brightness(.85); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .product-pick img,
  :root:not([data-theme="light"]) .product-pick p img { filter: brightness(.85); }
}

/* Transparent cutout product images (.webp with alpha, class added by
   content rewrite): no white letterbox, no dark dimming; a soft drop
   shadow in dark mode replaces the studio shadow lost in the cutout. */
.product-pick img.ble-cutout { background: transparent; }
:root[data-theme="dark"] .product-pick img.ble-cutout,
:root[data-theme="dark"] .product-pick p img.ble-cutout { filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .product-pick img.ble-cutout,
  :root:not([data-theme="light"]) .product-pick p img.ble-cutout { filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
}

/* Legacy inline styles baked into 3 older posts (water filters,
   healthiest vegetable oil, seed oils to avoid): remap their hardcoded
   light backgrounds and gray text to theme tokens in dark mode. */
:root[data-theme="dark"] .entry-content [style*="#f9f9f7"] { background-color: var(--card-bg) !important; }
:root[data-theme="dark"] .entry-content [style*="#f4f9f5"] { background-color: var(--green-row) !important; }
:root[data-theme="dark"] .entry-content [style*="#f0f9ff"] { background-color: var(--cta-bg) !important; }
:root[data-theme="dark"] .entry-content [style*="#888"],
:root[data-theme="dark"] .entry-content [style*="#777"],
:root[data-theme="dark"] .entry-content [style*="#666"] { color: var(--muted) !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .entry-content [style*="#f9f9f7"] { background-color: var(--card-bg) !important; }
  :root:not([data-theme="light"]) .entry-content [style*="#f4f9f5"] { background-color: var(--green-row) !important; }
  :root:not([data-theme="light"]) .entry-content [style*="#f0f9ff"] { background-color: var(--cta-bg) !important; }
  :root:not([data-theme="light"]) .entry-content [style*="#888"],
  :root:not([data-theme="light"]) .entry-content [style*="#777"],
  :root:not([data-theme="light"]) .entry-content [style*="#666"] { color: var(--muted) !important; }
}

/* Comments (minimal) */
.comments-area { max-width: 70ch; margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }

/* ============================================================
   Newsletter band
   ============================================================ */
.newsletter { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: var(--space-4) 0; }
.newsletter .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); align-items: center; }
.newsletter h2 { font-family: var(--font-serif); font-size: 24px; margin-bottom: 6px; }
.newsletter p { color: var(--muted); font-size: 15px; }
.newsletter form { display: flex; gap: 10px; }
.newsletter input[type="email"], .rail-news input[type="email"] { flex: 1; width: 100%; padding: 12px 16px; font-size: 15px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.rail-news input[type="email"] { padding: 9px 12px; font-size: 14px; margin-bottom: 8px; }
.newsletter .fineprint { font-size: 12px; color: var(--muted); margin-top: 8px; }
/* WPForms harmonization inside the band */
.newsletter .wpforms-container { margin: 0 !important; }
.newsletter .wpforms-field { padding: 0 !important; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { padding: var(--space-4) 0 var(--space-3); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.foot-grid h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot-grid ul { list-style: none; }
.foot-grid li { margin-bottom: 6px; }
.foot-grid a { font-size: 14px; text-decoration: none; color: var(--ink); }
.foot-grid a:hover { color: var(--accent); }
.foot-about p { font-size: 14px; color: var(--muted); max-width: 36ch; margin-top: 10px; }
.site-disclosure { font-size: 13px; color: var(--muted); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.site-copyright { font-size: 13px; color: var(--muted); padding-top: var(--space-2); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .lead-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter .wrap { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; gap: var(--space-3); }
  .rail { display: none; }
}
@media (max-width: 600px) {
  .post-row { grid-template-columns: 1fr; }
  .post-row .thumb { order: -1; }
  .topic-grid { grid-template-columns: 1fr; }
  .mainnav ul { justify-content: flex-start; }
  .logo-word { font-size: 24px; }
}

/* Print: hide chrome */
@media print {
  .topbar, .mainnav, .rail, .newsletter, .site-footer { display: none; }
}
