/* pp-article.css - Lab article component sheet.
   2026-09-22, scoped pass (PRE-BUILD-CHECKLIST B1-B4). Staged on an UNPUBLISHED theme copy.

   SCOPE. Every selector below is prefixed with `.pp-article`, the wrapper class added to the
   article body div in blocks/_blog-post-content.liquid (it sits on the same element as
   `.blog-post-content.rte`). Nothing in this file can reach the header, the footer, the
   "More from the lab" module, /pages/tools or any other surface that already uses a pp- class.
   Proof: `python scope_check.py` - 0 selectors outside the wrapper, 0 live collisions.

   The root block uses `.pp-article.pp-article` (0,2,0) on purpose, so the article measure and
   type scale beat the theme's own `.blog-post-content` (0,1,0) without depending on which
   stylesheet the browser happens to see last. Same trick the theme already uses in
   snippets/pp-article-footer-rhythm.liquid.

   FONTS (decision 3). Headings move off Trirong onto the BODY font the theme already loads,
   via `var(--font-body--family)` = Red Hat Display (config/settings_data.json:17). Using the
   theme's own variable means no new webfont request and - answering AUDIT-CODEX section 2 -
   NO body font change at all: the body keeps exactly the family it renders today.

   Brand: #F7F6F3 ground, #101418 ink, #1E4FD8 accent. Ryze proportions: tracked micro labels,
   hairline cards, a visual block about every 200 words. */

.pp-article.pp-article{
  --pp-ink:#101418; --pp-text:#2c333d; --pp-muted:#5b6470; --pp-faint:#646d7a;
  --pp-line:#e3e7ec; --pp-line-2:#cfd4de; --pp-card:#ffffff; --pp-ground:#f7f6f3;
  --pp-accent:#1e4fd8; --pp-accent-soft:#eef2fd; --pp-warn:#8a5300; --pp-warn-soft:#fdf5e6;
  --pp-r:12px;
  --pp-font:var(--font-body--family,"Red Hat Display",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif);
  counter-reset: ppfig;
  max-width: 42rem; margin-inline: auto;
  font-family: var(--pp-font);
  font-size: 1.0625rem; line-height: 1.65; color: var(--pp-text);
}
.pp-article p{margin:0 0 1em}
.pp-article strong{font-weight:650;color:var(--pp-ink)}
.pp-article a{color:var(--pp-accent);text-decoration:underline;text-decoration-color:rgba(30,79,216,.35);text-underline-offset:3px}
.pp-article a:hover{text-decoration-color:currentColor}
.pp-article h2{font-family:var(--pp-font);font-weight:700;font-size:1.6rem;line-height:1.2;letter-spacing:-.02em;color:var(--pp-ink);margin:2.4em 0 .7em;scroll-margin-top:90px}
.pp-article h2::before{content:"";display:block;width:32px;height:3px;border-radius:2px;background:var(--pp-accent);margin-bottom:.75em}
.pp-article h3{font-family:var(--pp-font);font-weight:700;font-size:1.2rem;line-height:1.3;letter-spacing:-.01em;color:var(--pp-ink);margin:1.9em 0 .5em}
.pp-article ul,.pp-article ol{margin:0 0 1.2em;padding-left:1.3em;color:var(--pp-ink);font-size:1.075rem}
.pp-article li{margin:.45em 0}
.pp-article li::marker{color:var(--pp-accent)}
.pp-article img{max-width:100%;height:auto}

/* B2. Only the generator's own per-h2 separator is hidden - the one emitted immediately
   before a heading, which the h2's accent rule now replaces. A deliberate thematic <hr>
   anywhere else keeps its hairline. `hr.pp-rule` is the explicit opt-out for when
   curate_lab.style_body() starts labelling the ones it owns. */
.pp-article hr{border:0;border-top:1px solid var(--pp-line);margin:2rem 0}
.pp-article hr:has(+ h2),.pp-article hr:has(+ hr),.pp-article hr.pp-rule{display:none}

/* micro label (Ryze: tracked, uppercase). --pp-faint darkened to #646d7a for AA:
   5.24:1 on white, 4.85:1 on the #f7f6f3 ground (was #7d8693 = 3.68 / 3.41, a fail at 11.5px) */
.pp-article .pp-label{font-size:.72rem;line-height:1.4;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--pp-faint);margin:0 0 .6em}

/* definitional opener (ours, AEO) */
.pp-article .pp-lede p:not(.pp-label){font-size:1.18rem;line-height:1.55;color:var(--pp-ink)}
/* one-line notice at the top; the full disclaimer sits once at the bottom */
.pp-article .pp-notice{font-size:.8rem;line-height:1.5;color:var(--pp-muted);border-block:1px solid var(--pp-line);padding:.7em 0;margin:0 0 1.6em}
.pp-article .pp-notice a{color:inherit}

/* TL;DR card (ours: Quick answer + takeaways, Ryze box) */
.pp-article .pp-tldr{background:var(--pp-card);border:1px solid var(--pp-line);border-left:3px solid rgba(16,20,24,.28);border-radius:var(--pp-r);padding:20px 24px 12px;margin:0 0 1.6em}
.pp-article .pp-tldr .pp-label{color:var(--pp-accent)}
.pp-article .pp-tldr-lead{font-weight:500;color:var(--pp-ink);font-size:1.05rem;line-height:1.55}
.pp-article .pp-label-sub{margin-top:1.1em}
.pp-article .pp-tldr ul{font-size:1rem;margin-bottom:.6em}

/* stat cards (Ryze) */
.pp-article .pp-stats{margin:0 0 1.8em}
.pp-article .pp-stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.pp-article .pp-stat{background:var(--pp-card);border:1px solid var(--pp-line);border-radius:var(--pp-r);padding:16px 16px 14px}
.pp-article .pp-stat b{display:block;font-weight:700;font-size:1.85rem;line-height:1.1;letter-spacing:-.025em;color:var(--pp-ink);margin-bottom:6px;white-space:nowrap}
.pp-article .pp-stat span{display:block;font-size:.84rem;line-height:1.4;color:var(--pp-muted)}
.pp-article .pp-stat-dim b{color:var(--pp-faint)}
.pp-article .pp-stats-2 .pp-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

/* product card (ours, restyled) */
.pp-article .pp-product-card{display:flex;gap:16px;align-items:center;background:var(--pp-card);border:1px solid var(--pp-line);border-radius:16px;padding:14px;margin:1.6em 0}
.pp-article .pp-product-img{flex:0 0 96px;height:96px;border-radius:10px;background:#f1f3f6;position:relative;overflow:hidden}
.pp-article .pp-product-img img{width:100%;height:100%;object-fit:contain;margin:0}
.pp-article .pp-product-body{flex:1;min-width:0}
.pp-article .pp-product-title{font-weight:700;color:var(--pp-ink);margin:0 0 2px}
.pp-article .pp-product-spec{font-size:.84rem;color:var(--pp-muted);line-height:1.45;margin:0 0 10px}
.pp-article .pp-btn{display:inline-block;background:var(--pp-accent);color:#fff;text-decoration:none;font-weight:600;font-size:.9rem;padding:9px 18px;border-radius:999px}

/* collapsed table of contents (ours, moved below the fold of the intro) */
.pp-article .pp-toc{border:1px solid var(--pp-line);border-radius:var(--pp-r);background:var(--pp-card);margin:1.6em 0;font-size:.95rem}
.pp-article .pp-toc summary{cursor:pointer;list-style:none;padding:12px 16px;font-weight:700;color:var(--pp-ink);display:flex;justify-content:space-between;gap:12px}
.pp-article .pp-toc summary::-webkit-details-marker{display:none}
.pp-article .pp-toc summary span{font-weight:500;color:var(--pp-faint);font-size:.85rem}
.pp-article .pp-toc ol{margin:0;padding:0 16px 14px 2.2em;columns:2 16rem;column-gap:2rem;font-size:.93rem}

/* bold lead-in points (Ryze criteria list) */
.pp-article .pp-points{list-style:none;padding-left:0}
.pp-article .pp-points li{position:relative;padding-left:1.25em}
.pp-article .pp-points li::before{content:"";position:absolute;left:0;top:.68em;width:7px;height:7px;border-radius:2px;background:var(--pp-accent)}

/* captioned figure frames + image slots */
.pp-article .pp-figure{margin:2em 0}
/* Bound the height as well as the width. The image backend does not reliably honour the
   requested size - a 16:9 request came back 1024x1536 - and width:100%/height:auto rendered
   that portrait drawing about 1050px tall, swamping the article. Capping height and centring
   keeps any aspect readable: landscape still fills the column, portrait shrinks to fit. */
.pp-article .pp-figure img{display:block;max-width:100%;width:auto;height:auto;max-height:620px;border-radius:10px;margin:0 auto}
.pp-article .pp-figure figcaption{font-size:.85rem;line-height:1.5;color:var(--pp-muted);padding-top:10px}
.pp-article .pp-figure figcaption::before{counter-increment:ppfig;content:"Fig. " counter(ppfig);font-weight:700;color:var(--pp-ink);margin-right:.6em}

/* spec sheet */
.pp-article .pp-specs{margin:0 0 1.4em;border-top:1.5px solid var(--pp-ink)}
.pp-article .pp-specs>div{display:grid;grid-template-columns:9rem 1fr;gap:12px;padding:10px 0;border-bottom:1px solid var(--pp-line)}
.pp-article .pp-specs dt{font-size:.75rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--pp-faint);padding-top:.2em}
.pp-article .pp-specs dd{margin:0;color:var(--pp-ink)}

/* tip / note callouts */
.pp-article .pp-tip{background:var(--pp-accent-soft);border-radius:var(--pp-r);padding:16px 20px 6px;margin:1.6em 0}
.pp-article .pp-tip .pp-label{color:var(--pp-accent)}
.pp-article .pp-tip-warn{background:var(--pp-warn-soft)}
.pp-article .pp-tip-warn .pp-label{color:var(--pp-warn)}

/* legacy callout the generator still emits on published articles - ported from the theme's
   own section stylesheet so the `:not(.pp-article)` guard there does not blank it */
.pp-article .pp-callout{background:var(--pp-accent-soft);border-radius:8px;padding:14px 18px;margin:1.7em 0;font-size:1rem;line-height:1.6;color:var(--pp-ink)}

/* numbered steps / criteria */
.pp-article .pp-steps{list-style:none;padding-left:0;counter-reset:ppstep}
.pp-article .pp-steps li{counter-increment:ppstep;position:relative;padding:12px 0 12px 44px;margin:0;border-bottom:1px solid var(--pp-line)}
.pp-article .pp-steps li:last-child{border-bottom:0}
.pp-article .pp-steps li::before{content:counter(ppstep);position:absolute;left:0;top:11px;width:28px;height:28px;border-radius:50%;border:1.5px solid var(--pp-accent);color:var(--pp-accent);font-weight:700;font-size:.85rem;display:grid;place-items:center}
.pp-article .pp-step-h{display:flex;align-items:center;gap:12px}
.pp-article .pp-step-h span{flex:0 0 30px;height:30px;border-radius:50%;background:var(--pp-accent);color:#fff;font-size:.9rem;display:grid;place-items:center}

/* comparison tables (Ryze: no header fill, row hairlines).
   .pp-scroll is the only thing allowed to scroll sideways; the page never does.
   main-blog-post.liquid gives it tabindex/role/aria-label when it actually overflows,
   so the table is reachable from the keyboard (WCAG 2.1.1). */
.pp-article .pp-compare{margin:1.8em 0}
.pp-article .pp-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
.pp-article .pp-compare table{width:100%;min-width:34rem;border-collapse:collapse;font-size:.92rem;line-height:1.45}
.pp-article .pp-compare th{font-size:.7rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--pp-faint);text-align:left;padding:0 14px 10px 0;border-bottom:1.5px solid var(--pp-ink);white-space:nowrap}
.pp-article .pp-compare td{padding:12px 14px 12px 0;border-bottom:1px solid var(--pp-line);vertical-align:top;color:var(--pp-text)}
.pp-article .pp-compare td:first-child{font-weight:650;color:var(--pp-ink);white-space:nowrap}
.pp-article .pp-table-note{font-size:.9rem;color:var(--pp-muted);margin-top:.9em}

/* bench kit cards */
.pp-article .pp-kit{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:1.2em 0 1.4em}
.pp-article .pp-kit-item{background:var(--pp-card);border:1px solid var(--pp-line);border-radius:var(--pp-r);padding:14px 16px;font-size:.93rem;line-height:1.5}
.pp-article .pp-kit-n{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--pp-accent-soft);color:var(--pp-accent);font-weight:700;font-size:.8rem;margin-bottom:8px}
.pp-article .pp-kit-t{font-weight:700;color:var(--pp-ink);margin:0 0 4px}
.pp-article .pp-kit-item p{margin:0 0 .5em}
.pp-article .pp-kit-photo{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;margin-top:8px}

/* tools callout (ours: calculators, pulled into the body) */
.pp-article .pp-tools{border:1px solid var(--pp-line);border-radius:var(--pp-r);background:var(--pp-card);padding:16px 20px 6px;margin:1.4em 0}
.pp-article .pp-tools .pp-label{color:var(--pp-accent)}

/* answer line (ours). pp-a11y.css pins the colour to #1f2937 !important as a WCAG fix;
   that override is deliberate and still wins - 13.9:1, darker than this rule asks for.
   Hairline, not a thick accent bar: the type size and the label already say "this is the
   answer", and a 3px coloured edge on one side reads as template furniture. Same rule as
   .pp-quote, so the two quiet in-body devices match. */
.pp-article .pp-answer{font-size:1.08rem;line-height:1.55;font-weight:500;color:var(--pp-ink);border-left:1px solid var(--pp-line);padding-left:16px;margin:0 0 1.5em}
.pp-article .pp-answer .pp-label{color:var(--pp-accent)}

/* pull quote (Ryze) */
.pp-article .pp-quote{margin:1.8em 0;padding:4px 0 4px 20px;border-left:1px solid var(--pp-line)}
.pp-article .pp-quote::before{content:"\201C";display:block;font:700 2rem/0.6 var(--pp-font);color:var(--pp-accent);margin-bottom:.4em}
.pp-article .pp-quote p{font-weight:600;font-size:1.32rem;line-height:1.4;letter-spacing:-.01em;color:var(--pp-ink);margin:0}

/* checklist */
.pp-article .pp-checklist{background:var(--pp-card);border:1px solid var(--pp-line);border-radius:14px;padding:20px 22px;margin:1.8em 0}
.pp-article .pp-checklist ol{list-style:none;padding-left:0}
.pp-article .pp-checklist li{position:relative;padding-left:32px;margin:.7em 0}
.pp-article .pp-checklist li::before{content:"";position:absolute;left:0;top:.3em;width:16px;height:16px;border:2px solid var(--pp-accent);border-radius:5px}
.pp-article .pp-checklist-foot{color:var(--pp-muted);font-size:.95rem}

/* misconception cards (ours) */
.pp-article .pp-myths{display:grid;gap:10px;margin:1.2em 0 1.6em}
.pp-article .pp-myth{background:var(--pp-card);border:1px solid var(--pp-line);border-radius:var(--pp-r);padding:14px 18px 4px}
.pp-article .pp-myth-t{font-weight:700;color:var(--pp-ink);margin:0 0 .35em}
.pp-article .pp-myth p:not(.pp-myth-t){font-size:.97rem}
.pp-article .pp-bench{border:1px dashed var(--pp-line-2);border-radius:var(--pp-r);padding:16px 20px 6px;margin:1.6em 0}
.pp-article .pp-bench .pp-label{color:var(--pp-accent)}

/* FAQ accordion. The open/closed affordance is DRAWN (two bars), not the character "+",
   so a screen reader announces the question and nothing else. */
.pp-article .pp-faq{background:var(--pp-card);border:1px solid var(--pp-line);border-radius:14px;padding:4px 22px;margin:0 0 2em}
.pp-article .pp-faq details{border-bottom:1px solid var(--pp-line)}
.pp-article .pp-faq details:last-child{border-bottom:0}
.pp-article .pp-faq summary{cursor:pointer;list-style:none;position:relative;padding:16px 34px 16px 0;font-weight:650;color:var(--pp-ink);line-height:1.4}
.pp-article .pp-faq summary::-webkit-details-marker{display:none}
.pp-article .pp-faq summary::after{content:"";position:absolute;right:2px;top:1.35em;width:13px;height:13px;
  background:linear-gradient(var(--pp-accent),var(--pp-accent)) center/13px 2px no-repeat,
             linear-gradient(var(--pp-accent),var(--pp-accent)) center/2px 13px no-repeat;
  transition:transform .2s}
.pp-article .pp-faq details[open] summary::after{transform:rotate(45deg)}
.pp-article .pp-faq details p{color:var(--pp-muted);font-size:.98rem;margin:0 0 16px}

/* "Keep reading" cards. The doubled class beats snippets/pp-article-footer-rhythm.liquid,
   which styles the FOOTER module of the same name at (0,2,0). */
.pp-article .pp-related.pp-related{margin:2.2em 0;max-width:none;width:auto;padding:0;border-top:0}
/* defensive: the footer module's own title class, should the generator ever emit that markup
   in the body. (0,4,0) so it beats sections/pp-related.liquid's `.pp-related a:hover .pp-related-t`. */
.pp-article .pp-related.pp-related .pp-related-t{font-weight:700;line-height:1.35;color:var(--pp-ink)}
.pp-article .pp-related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pp-article .pp-related-card{display:block;background:var(--pp-card);border:1px solid var(--pp-line);border-radius:var(--pp-r);padding:14px 16px;text-decoration:none;color:var(--pp-ink);transition:border-color .15s}
.pp-article .pp-related-card:hover{border-color:var(--pp-accent)}
.pp-article .pp-related-card span{display:block;font-size:.68rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--pp-accent);margin-bottom:4px}
.pp-article .pp-related-card b{display:block;font-weight:700;line-height:1.35}
.pp-article .pp-related-card em{display:block;font-style:normal;font-size:.86rem;color:var(--pp-muted);margin-top:4px;line-height:1.45}

/* sources, reviewer, full notice (ours, kept, quieter) */
.pp-article .pp-sources{font-size:.86rem;color:var(--pp-muted);line-height:1.55}
.pp-article .pp-sources a{color:var(--pp-muted)}
.pp-article .pp-reviewer-card{border:1px solid var(--pp-line);border-radius:var(--pp-r);background:var(--pp-card);padding:14px 18px 4px;margin:1.6em 0;font-size:.88rem;color:var(--pp-muted)}
.pp-article .pp-reviewer-t{font-weight:700;color:var(--pp-ink);margin:0 0 .3em}
.pp-article .pp-disc-full{font-size:.8rem;line-height:1.6;color:var(--pp-muted);border-top:1px solid var(--pp-line);padding-top:14px;margin-top:1.6em}

/* keyboard: one visible focus ring for every interactive thing in the body, including the
   sideways-scrolling table wrapper once it is focusable. #1e4fd8 on white = 6.63:1. */
.pp-article a:focus-visible,
.pp-article summary:focus-visible,
.pp-article .pp-scroll:focus-visible,
.pp-article [tabindex]:focus-visible{outline:3px solid var(--pp-accent);outline-offset:2px;border-radius:4px}

@media (max-width:560px){
  .pp-article.pp-article{font-size:1rem}
  .pp-article h2{font-size:1.38rem}
  .pp-article .pp-kit,.pp-article .pp-related-grid{grid-template-columns:1fr}
  .pp-article .pp-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pp-article .pp-stat b{font-size:1.5rem}
  .pp-article .pp-specs>div{grid-template-columns:1fr;gap:2px}
  .pp-article .pp-product-card{align-items:flex-start}
  .pp-article .pp-product-img{flex-basis:72px;height:72px}
  .pp-article .pp-tldr{padding:16px 18px 8px}
  .pp-article .pp-faq{padding:2px 16px}
  .pp-article .pp-quote p{font-size:1.15rem}
}

/* 400px. Nothing here may create a horizontal PAGE scrollbar - only .pp-scroll scrolls. */
@media (max-width:430px){
  .pp-article h2{font-size:1.3rem}
  .pp-article .pp-stat b{font-size:1.35rem;white-space:normal}
  .pp-article .pp-toc ol{columns:1;padding-left:1.9em}
  .pp-article .pp-tldr{padding:14px 16px 6px}
  .pp-article .pp-checklist{padding:16px 16px}
  .pp-article .pp-bench,.pp-article .pp-tip,.pp-article .pp-tools{padding-inline:16px}
  .pp-article .pp-myth{padding-inline:14px}
  .pp-article .pp-faq summary{padding-right:28px}
  .pp-article .pp-steps li{padding-left:40px}
}

@media (prefers-reduced-motion:reduce){
  .pp-article *,.pp-article *::before,.pp-article *::after{
    transition-duration:.01ms!important;animation-duration:.01ms!important;
    animation-iteration-count:1!important;scroll-behavior:auto!important}
}

/* Lab "From the shop" cards (inc/area-blog.php pp_lab_readmore_cards; replaces the grey "Related from our lab" line) */
.pp-lab-shop{margin:28px 0 8px;padding:18px 18px 14px;border:1px solid #e4e2dd;border-radius:16px;background:#fff}
.pp-lab-shop-h{margin:0 0 12px !important;font-size:13px !important;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:rgb(20 20 20 / .6)}
.pp-lab-shop-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:0 !important;padding:0 !important;list-style:none}
.pp-lab-shop-list li{margin:0 !important;padding:0 !important}
.pp-lab-shop-list li::before,.pp-lab-shop-list li::marker{content:none}
.pp-lab-shop-card{display:grid;grid-template-columns:56px 1fr auto;grid-template-rows:auto auto;column-gap:12px;align-items:center;padding:10px;border:1px solid #ecebe7;border-radius:12px;color:#141414 !important;text-decoration:none !important;transition:border-color .15s, box-shadow .15s}
.pp-lab-shop-card:hover{border-color:#1e4fd8;box-shadow:0 0 0 3px #e8eefc}
.pp-lab-shop-card img{grid-row:1 / 3;width:56px;height:56px;object-fit:cover;border-radius:8px;background:#f4f3f0;margin:0 !important}
.pp-lab-shop-name{font-size:14px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pp-lab-shop-price{grid-column:2;font-size:13px;color:rgb(20 20 20 / .65)}
.pp-lab-shop-go{grid-column:3;grid-row:1 / 3;font-size:13px;font-weight:600;color:#1e4fd8}
.pp-lab-shop-more{margin:12px 0 0 !important;font-size:13px !important;color:rgb(20 20 20 / .6)}
.pp-lab-shop-more a{color:#1e4fd8 !important}
