/* ==================================================
   POST V7 · ONE READING COLUMN (2026-11-18)
   --------------------------------------------------
   Shared by EBL, ValBoosting and OWBoost: each site's functions.php enqueues this
   file from the EBL theme after its own blog-page.css, on single posts only. It
   is scoped to .wb-post, the class all three single.php templates put on the
   page, and reads only the F3 tokens every site defines (--royal, --ink, --line,
   --font-body ...), so each site keeps its own accent colour.

   Why: V5/V6 laid the sections out as two side-by-side stacks above 1300px. On a
   desktop that meant ~14px-looking text in two narrow measures, the eye jumping
   between columns, and old posts (one long H2 each) leaving half the screen
   empty. Phones got caps-only display headings that ran four lines, tables cut
   off at the right edge and a duplicate H1 inside the body.

   This pass follows the EnGenious design sheet the F3 polish already uses
   ("Typography", "Shape and depth", "Layout and spacing"):
   - one centred column, prose capped at a ~68-character measure, body 19px/1.65
     (17.5px on phones), paragraphs never full width;
   - headings in sentence case in the body face at weight 800 with tight tracking,
     the same voice as the post title, with a small numbered label above each
     section instead of a caps-only display face;
   - every boxed block (tables, summary, verdict, FAQ, calculator) is a card: a
     cool hairline plus one soft navy shadow, corners growing with the object
     (controls 12, cards 18, panels 24), never grey shadows;
   - tables scroll sideways inside their card on phones (single.php wraps them in
     .wb-table) instead of being clipped.
   blog-post.js no longer builds the left/right stacks; it still numbers the
   sections, so the anchors and the contents list are unchanged.
   ================================================== */

.wb-post {
  --wr-measure: 760px;
  --wr-text: 19px;
  --wr-lh: 1.65;
  --wr-body: #1d2b3b;
  --wr-line: #e1e9f2;
  --wr-hair: inset 0 0 0 1px var(--wr-line);
  --wr-lift: 0 30px 60px -30px rgba(10, 40, 110, 0.38);
  --wr-lift-soft: 0 16px 36px -24px rgba(10, 40, 110, 0.30);
  --wr-card: 0 1px 2px rgba(10, 40, 110, 0.04), var(--wr-lift-soft);
  --wr-r-ctl: 12px;
  --wr-r-card: 18px;
  --wr-r-panel: 24px;
}
@media (max-width: 600px) {
  .wb-post { --wr-text: 17.5px; --wr-lh: 1.62; }
}

/* ---- one column for head, hero and body ---------------------------------- */
.wb-post .wb-article { max-width: calc(var(--wr-measure) + 2 * var(--wb-gutter)); }
.wb-post .wb-content,
.wb-post .wb-content:not(.is-split),
.wb-post .wb-intro,
.wb-post .wb-cols:not(.is-stacked) { max-width: none; }
.wb-post .wb-cols,
.wb-post .wb-cols.is-stacked { display: block; columns: auto; }
.wb-post .wb-col { display: contents; }
.wb-post .wb-content.is-split .wb-intro:has(> .wb-tldr) { display: block; margin-bottom: 0; }
.wb-post .wb-content.is-split .wb-intro:has(> .wb-tldr) > * { margin-top: 0; }
.wb-post .wb-content.is-split .wb-intro:has(> .wb-tldr) > * + * { margin-top: 1.15em; }
.wb-post .wb-content { padding: 36px 0 56px; }

/* Head */
.wb-post .wb-title,
.wb-post.wb-post--single .wb-title {
  font-size: clamp(32px, 3.4vw, 46px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800;
}
.wb-post .wb-deck { font-size: clamp(19px, 1.5vw, 21px); line-height: 1.55; max-width: none; }
.wb-post .wb-hero { margin-top: 28px; }
.wb-post .wb-hero img {
  border: 0; border-radius: var(--wr-r-panel);
  box-shadow: var(--wr-hair), var(--wr-card);
  aspect-ratio: auto; max-height: 520px; object-fit: cover;
}
.wb-post .wb-hero figcaption::before { content: none; }
.wb-post .wb-hero figcaption { letter-spacing: 0; font-family: var(--font-body); font-size: 14px; }
@media (max-width: 600px) {
  .wb-post .wb-title, .wb-post.wb-post--single .wb-title { font-size: clamp(27px, 7.6vw, 34px); }
  .wb-post .wb-hero { margin-top: 20px; }
  .wb-post .wb-hero img { border-radius: var(--wr-r-card); }
  .wb-post .wb-content { padding: 26px 0 44px; }
}

/* The sticky rail sits in the margin of the now narrower column. */
@media (min-width: 1201px) {
  .wb-post { --wb-rail: 76px; --wb-rail-gap: 44px; }
}

/* ---- prose ---------------------------------------------------------------- */
.wb-post .prose > * + *,
.wb-post .wb-sec > * + *,
.wb-post .wb-intro > * + * { margin-top: 1.15em; }
.wb-post .prose p,
.wb-post .prose ul li,
.wb-post .prose ol li { font-size: var(--wr-text); line-height: var(--wr-lh); color: var(--wr-body); }
.wb-post .prose ul, .wb-post .prose ol { gap: 0.55em; }
.wb-post .prose ul li::before { top: calc(var(--wr-text) * var(--wr-lh) / 2 - 4.4px); }
.wb-post .prose ol li::before { top: calc((var(--wr-text) * var(--wr-lh) - 24.2px) / 2); border-radius: 999px; }
.wb-post .prose a { text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.wb-post .prose strong, .wb-post .prose b { color: var(--ink); }
/* Classic-editor posts left empty paragraphs and &nbsp; spacers that opened blank gaps. */
.wb-post .wb-content p:empty { display: none; }
/* Paragraphs holding only <br>/&nbsp; are removed server-side (boosting/inc/post-body.php):
   a :has(> br:only-child) rule here also hid real "line<br>line" paragraphs. */

/* Sentence-case headings in the body face (the design sheet's "one family, set big
   and tight"). The League display face is caps-only, so long H2s ran four lines. */
.wb-post .prose h2,
.wb-post .prose .wb-sec > h2,
.wb-post .prose .wb-sec > h3.wb-sec-head {
  font-family: var(--font-body); font-weight: 800; text-transform: none;
  font-size: clamp(25px, 2.3vw, 32px); line-height: 1.18; letter-spacing: -0.022em;
  color: var(--ink); text-wrap: balance; margin-top: 10px;
}
.wb-post .prose h3 {
  font-family: var(--font-body); font-weight: 800; text-transform: none;
  font-size: clamp(20px, 1.6vw, 23px); line-height: 1.25; letter-spacing: -0.015em; margin-top: 1.7em;
}
.wb-post .prose h4 { font-family: var(--font-body); font-weight: 700; font-size: 19px; text-transform: none; letter-spacing: -0.01em; }
.wb-post .prose h2 + *, .wb-post .prose h3 + *, .wb-post .prose h4 + * { margin-top: 0.6em; }

/* Section rhythm: number label above each heading, generous space between sections. */
.wb-post .wb-sec { scroll-margin-top: 100px; }
.wb-post .wb-sec + .wb-sec,
.wb-post .wb-col > .wb-sec + .wb-sec { margin-top: 56px; }
.wb-post .wb-content.is-split .wb-intro + .wb-cols { margin-top: 48px; }
.wb-post .wb-sec-num { font-size: 12.5px; letter-spacing: 0.08em; }
.wb-post .wb-sec-num::after { background: var(--wr-line); }
.wb-post .wb-sec.is-first > p:first-of-type::first-letter { float: none; font: inherit; color: inherit; margin: 0; }
@media (max-width: 600px) {
  .wb-post .wb-sec + .wb-sec, .wb-post .wb-col > .wb-sec + .wb-sec { margin-top: 44px; }
}

/* Images and figures */
.wb-post .wb-content img { border-radius: var(--wr-r-card); box-shadow: var(--wr-hair); }
.wb-post .prose figure { margin: 1.8em 0; }
.wb-post .prose figure img { box-shadow: var(--wr-hair), var(--wr-card); }
.wb-post .prose figcaption,
.wb-post .wb-content .wp-caption-text {
  font-family: var(--font-body); font-size: 14.5px; letter-spacing: 0; text-transform: none; color: var(--ink-soft);
}

/* Quotes */
.wb-post .prose blockquote {
  margin: 1.8em 0; padding: 18px 22px; border-left: 0; border-radius: var(--wr-r-card);
  background: var(--royal-tint); box-shadow: inset 4px 0 0 var(--royal);
  font-family: var(--font-body); font-weight: 600; font-size: calc(var(--wr-text) + 2px); line-height: 1.5; letter-spacing: -0.01em;
}
.wb-post .prose blockquote p { font-size: inherit; line-height: inherit; color: var(--ink); }

/* ---- tables: a card that scrolls sideways on phones ----------------------- */
.wb-post .wb-table,
.wb-post .wb-content div:has(> table) {
  overflow-x: auto !important; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  border-radius: var(--wr-r-card); box-shadow: var(--wr-hair), var(--wr-card); background: #fff;
}
.wb-post .wb-table > div:has(> table) { box-shadow: none; border-radius: 0; overflow: visible !important; }
.wb-post .prose table {
  width: 100%; min-width: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none;
  border-collapse: separate; border-spacing: 0; font-size: 16px; line-height: 1.5;
}
.wb-post .prose th, .wb-post .prose td { padding: 13px 16px; border: 0; border-bottom: 1px solid var(--wr-line); text-align: left; vertical-align: top; }
.wb-post .prose thead th,
.wb-post .prose tr:first-child > th {
  background: var(--ink); color: #fff; font-family: var(--font-body); font-size: 14px; font-weight: 700;
  letter-spacing: 0; text-transform: none; white-space: normal;
}
.wb-post .prose tbody tr:last-child > * { border-bottom: 0; }
.wb-post .prose td:first-child { font-weight: 700; color: var(--ink); }
.wb-post .prose td { color: var(--wr-body); }
@media (max-width: 700px) {
  .wb-post .prose table { min-width: 540px; font-size: 15px; }
  .wb-post .prose th, .wb-post .prose td { padding: 11px 13px; }
}
/* Two-column tables fit a phone without scrolling. */
@media (max-width: 700px) {
  .wb-post .prose table:not(:has(tr > :nth-child(3))) { min-width: 0; }
}

/* ---- boxed blocks: one card language -------------------------------------- */
.wb-post .wb-tldr {
  max-width: none; border: 0; border-radius: var(--wr-r-panel); padding: 24px 28px;
  background: linear-gradient(135deg, var(--royal-tint), #fff 72%);
  box-shadow: var(--wr-hair), var(--wr-card);
}
.wb-post .prose .wb-tldr li { font-size: calc(var(--wr-text) - 0.5px); line-height: 1.55; }
.wb-post .wb-verdict { border: 0; border-radius: var(--wr-r-panel); box-shadow: var(--wr-hair), var(--wr-lift); }
.wb-post .wb-content > .wb-verdict { margin: 36px 0 44px; }
.wb-post .wb-verdict { grid-template-columns: 1fr; }
.wb-post .prose .wb-verdict-myth p { font-size: 21px; }
.wb-post .wb-stat, .wb-post .wb-bars, .wb-post .wb-quiz { border: 0; border-radius: var(--wr-r-card); box-shadow: var(--wr-hair), var(--wr-card); }
.wb-post .wb-quiz { background: #fff; }
.wb-post .wb-calc { border-radius: var(--wr-r-panel); }
.wb-post .wb-calc input[type=range] { height: 28px; }
.wb-post .wb-myth { border: 0; border-radius: var(--wr-r-card); box-shadow: var(--wr-hair); }
.wb-post .wb-myth[open] { box-shadow: var(--wr-hair), var(--wr-card); }
.wb-post .prose .wb-callout { border: 0; border-radius: var(--wr-r-card); box-shadow: var(--wr-hair); padding: 18px 22px; }
.wb-post .wb-sources { border-radius: var(--wr-r-card); padding: 20px 24px; }
.wb-post .prose .wb-sources ol li { font-size: 15.5px; }
.wb-post .wb-takeaways { border: 0; border-radius: var(--wr-r-card); box-shadow: var(--wr-hair); }

/* FAQ: same round toggle as the site-wide FAQ (f3-polish). */
.wb-post .wb-faq { border-top: 0; border-radius: var(--wr-r-card); box-shadow: var(--wr-hair), var(--wr-card); background: #fff; padding: 4px 22px; }
.wb-post .wb-faq details { border-bottom: 1px solid var(--wr-line); }
.wb-post .wb-faq details:last-child { border-bottom: 0; }
.wb-post .wb-faq summary { font-size: 18.5px; padding: 18px 0; min-height: 44px; }
.wb-post .wb-faq summary::after {
  width: 28px; height: 28px; border: 0; border-radius: 999px; transform: none;
  background: var(--royal-tint) no-repeat center / 12px 12px;
  background-image: linear-gradient(var(--royal), var(--royal)), linear-gradient(var(--royal), var(--royal));
  background-size: 12px 2px, 2px 12px;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.32s;
}
.wb-post .wb-faq details[open] summary::after { transform: rotate(45deg); }
.wb-post .prose .wb-faq details > p { font-size: calc(var(--wr-text) - 1px); }

/* ---- contents list (under the article) ------------------------------------ */
.wb-post .wb-toc { border: 0; border-radius: var(--wr-r-card); box-shadow: var(--wr-hair); background: #f6f9fd; margin-bottom: 56px; }
.wb-post .wb-toc-list { grid-template-columns: 1fr; gap: 4px; }
.wb-post .wb-toc-list a { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); align-items: baseline; gap: 6px; padding: 7px 0; min-height: 44px; font-size: 17px; box-sizing: border-box; }
.wb-post .wb-toc-list b { white-space: nowrap; font-size: 12.5px; }
@media (min-width: 761px) {
  .wb-post .wb-toc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
}

/* ---- after the article ----------------------------------------------------- */
.wb-post .p3-cta-card { border-radius: var(--wr-r-panel); }
.wb-post .wb-rel-card { border-radius: var(--wr-r-card); box-shadow: var(--wr-hair), var(--wr-card); border: 0; }
.wb-post .wb-rel-card:hover { transform: translateY(-2px); }
.wb-post .p3-author-card { border-radius: var(--wr-r-panel); }

/* Phones: comfortable tap targets and no sideways scroll from wide embeds. */
@media (max-width: 600px) {
  .wb-post .wb-content iframe, .wb-post .wb-content video, .wb-post .wb-content embed { max-width: 100%; }
  .wb-post .wb-content pre { overflow-x: auto; }
  .wb-post .wb-content * { overflow-wrap: break-word; }
  .wb-post .wb-content table * { overflow-wrap: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .wb-post .wb-faq summary::after, .wb-post .wb-rel-card { transition: none; }
}
