/* WeatherWindow.AI — articles.css: the 12b article and hub layout.

   Load order: tokens.css → chrome.css → editorial.css → articles.css → consent.css.
   Shared rules (base, .btn, display headings, .hl, .plate/.scrim, figcaption, the FAQ
   cards) live in editorial.css; never copy one here (tests_live/test_editorial_css.py).
   Spec: docs/superpowers/specs/2026-11-19-article-refresh-design.md §6.1–§6.2.
   Token-only. */

:root { --guide-measure: 72rem; }   /* the article text column, just narrower than the FAQ boxes (Jon 2026-11-20) */
:root { scroll-padding-top: var(--nav-h); }   /* anchors clear the fixed nav */

/* ---------- Page ---------- */
.guide-main { display: block; padding-bottom: var(--s-section); }

/* ---------- Hero plate: the photo behind the title ---------- */
.guide-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(24rem, 62svh, 40rem);
  display: grid; align-items: end;
  padding-top: var(--nav-h);
}
.guide-hero .plate { z-index: -1; }
/* Subject sits mid-frame in the photo: widen the plate and anchor it left so the subject moves
   right, clear of the title, on wide screens. Phones keep the centred crop. */
.guide-hero .plate-media--subject-right { width: 140%; max-width: none; object-position: 0% 50%; }
@media (max-width: 48rem) { .guide-hero .plate-media--subject-right { width: 100%; object-position: center; } }
/* Subject in the right quarter of the photo: phones crop toward it so it stays in frame. */
@media (max-width: 48rem) { .guide-hero .plate-media--subject-far-right { object-position: 80% 50%; } }
.guide-hero .plate-media--subject-top { object-position: 50% 0%; }
.guide-hero .plate-media--subject-top-right { object-position: 80% 0%; }   /* subject high and right (Jon 2026-11-20, VHF hero on a phone) */   /* keep a subject at the top of the photo in frame (masthead) */
.guide-hero-copy {
  position: relative;   /* paint above the absolutely positioned scrim */
  width: 100%; max-width: calc(var(--guide-measure) + 2 * var(--s-gutter)); margin: 0 auto;   /* aligns with the prose column */
  padding: var(--s-12) var(--s-gutter) var(--s-10);
}
/* Hero layout modifiers (draft setting "Hero layout", Jon 2026-11-20). title-left: the title
   starts at the page gutter instead of the prose column, clear of a subject in the middle of
   the photo. title-high: the title sits at the top of the plate, clear of a subject low in the
   frame. dim: a busy or bright photo takes an even wash so the title reads. */
.guide-hero--title-left .guide-hero-copy { max-width: var(--page-max); }
.guide-hero--title-high { align-items: start; }
.guide-hero--dim .plate::after { content: ""; position: absolute; inset: 0; background: var(--scrim-mid); }

.guide-hero h1 {
  margin: 0; max-width: 22ch;
  font-family: var(--font-display); font-weight: 400; font-size: var(--fs-hero);
  line-height: var(--lh-tight); letter-spacing: var(--tracking-title); color: var(--text);
}
.guide-hero .guide-meta { margin: var(--s-4) 0 0; color: var(--text-on-photo); }

.guide-meta {
  font-size: var(--fs-sm); color: var(--text-dim);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}

/* ---------- Prose column ---------- */
.guide-prose { padding: var(--s-12) var(--s-gutter) 0; }
.guide-prose > * { max-width: var(--guide-measure); margin-left: auto; margin-right: auto; }
.guide-prose p, .guide-prose li { font-size: var(--fs-md); }
.guide-prose p { margin-top: 0; margin-bottom: var(--s-5); }
.guide-lead { font-size: var(--fs-lede); color: var(--text); }
.guide-lead-2 { color: var(--text-dim); }

.guide-section { margin-top: var(--s-12); }
.guide-prose h2 {
  margin: 0 0 var(--s-6);
  font-family: var(--font-display); font-weight: 400; font-size: var(--fs-xl);
  line-height: var(--lh-head); letter-spacing: var(--tracking-title); color: var(--text);
}
.guide-prose h3 {
  margin: var(--s-8) 0 var(--s-3);
  font-family: var(--font-display); font-weight: 400; font-size: var(--fs-lg);
  line-height: var(--lh-head); color: var(--text);
}
.guide-section-intro { color: var(--text-dim); }
.guide-section-body > :last-child { margin-bottom: 0; }

/* ---------- Factor and step lists ---------- */
.guide-points, .guide-steps { margin: var(--s-6) 0; padding: 0; }   /* block, not grid: the items wrap under a side figure (Jon 2026-11-20) */
.guide-points > li + li, .guide-steps > li + li { margin-top: var(--s-4); }
.guide-points { list-style: none; }
.guide-points li {
  position: relative; padding-left: var(--s-6); color: var(--text-dim);
}
.guide-points li::before {
  content: ""; position: absolute; left: 0; top: 0.8em;
  width: var(--s-3); height: 1px; background: var(--accent);
}
.guide-steps { padding-left: var(--s-6); }
.guide-steps li { color: var(--text-dim); padding-left: var(--s-2); }
.guide-steps li::marker { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--accent); }
.guide-point-label { color: var(--text); font-weight: 600; }

/* ---------- Ruled table (12b engine-flow look: top rule, thin cell rules, no fills) ---------- */
.guide-compare-wrap {
  margin: var(--s-8) auto; overflow-x: auto; -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(90deg, var(--bg) 30%, var(--scrim-clear)) left center / var(--s-8) 100% no-repeat local,
    linear-gradient(270deg, var(--bg) 30%, var(--scrim-clear)) right center / var(--s-8) 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shadow), var(--scrim-clear)) left center / var(--s-3) 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shadow), var(--scrim-clear)) right center / var(--s-3) 100% no-repeat scroll;
}
.guide-compare {
  width: 100%; min-width: 40rem; border-collapse: collapse;
  border-top: 1px solid var(--border-mid);
  font-size: var(--fs-sm); color: var(--text-dim);
}
.guide-compare th, .guide-compare td {
  padding: var(--s-4) var(--s-4) var(--s-4) 0; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border-dim);
}
.guide-compare thead th {
  font-family: var(--font-display); font-weight: 400; font-size: var(--fs-base);
  text-transform: uppercase; letter-spacing: var(--tracking-title); color: var(--text);
}
.guide-compare tbody th { color: var(--text); font-weight: 600; }

/* ---------- Figures (optional app capture / scene) ---------- */
.guide-figure { margin: var(--s-10) auto; }
.guide-figure img { width: 100%; height: auto; border-radius: var(--radius); }
.guide-figure figcaption { margin-top: var(--s-3); }
.guide-figure--side { max-width: 18rem; }   /* {side} in a draft: a smaller figure beside the text (Jon 2026-11-20) */
.guide-figure--side figcaption { font-size: var(--fs-sm); }
/* The section does not contain the float: the next section's text flows beside the caption
   instead of starting below it (Jon 2026-11-20). */
.guide-figure--shot { max-width: 28rem; }   /* {shot}: an app screenshot, smaller, beside the text (Jon 2026-11-20) */
.guide-figure--side:first-child { margin-top: 0; }   /* opens its section: level with the heading (Jon 2026-11-20) */
@media (max-width: 47.99rem) {   /* on a phone the heading comes before a figure that opens its section */
  .guide-section:has(> .guide-figure--side:first-child) { display: flex; flex-direction: column; }
  .guide-section:has(> .guide-figure--side:first-child) > h2 { order: -1; }
  .guide-section:has(> .guide-figure--side:first-child) > .guide-figure { width: 100%; }   /* auto margins would shrink an unloaded image to 0 */
}
@media (min-width: 48rem) {
  .guide-figure--side { float: right; width: 18rem; margin: var(--s-2) 0 var(--s-5) var(--s-8); }
  .guide-figure--shot { width: 28rem; margin-bottom: var(--s-12); }   /* the FAQ clears it with no margin of its own */
}

/* ---------- Product fit + CTA ---------- */
.guide-cta-row { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-8); clear: both; }   /* below the text and the figure (Jon 2026-11-20) */
.guide-cta-row .guide-next { margin-left: auto; }   /* previous at the left, next at the right (Jon 2026-11-20) */
.guide-cta-row .guide-prev { margin-right: auto; }

/* ---------- FAQ: wide section, homepage FAQ cards from editorial.css ---------- */
.guide-prose > .guide-faq-section { max-width: var(--page-max); clear: both; }   /* never beside a side figure */
.guide-faq-section > h2 { max-width: var(--guide-measure); margin-left: auto; margin-right: auto; text-align: center; }
.guide-faq-section .faq-list { margin-top: var(--s-6); }

/* ---------- Linked article cards (hub grid + Related articles) ---------- */
.guide-prose > .guide-related { max-width: var(--page-max); clear: both; }
.guide-related > h2 { text-align: center; }
.guide-card-grid { display: grid; gap: var(--s-8) var(--s-6); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-card {
  position: relative; display: grid; gap: var(--s-3); align-content: start;
  padding-bottom: var(--s-4); border-bottom: 1px solid var(--border-dim);
  transition: border-color var(--t-fast) var(--ease);
}
.guide-card:hover, .guide-card:has(a:focus-visible) { border-bottom-color: var(--accent-border); }
.guide-card-media { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.guide-card h3 { margin: var(--s-2) 0 0; font-size: var(--fs-lg); }
.guide-card h3 a { color: var(--text); text-decoration: none; }
.guide-card h3 a::after { content: ""; position: absolute; inset: 0; }
.guide-card h3 a:focus-visible { outline: none; }
.guide-card:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: var(--s-2); border-radius: var(--radius-sm); }
.guide-card p { margin: 0; color: var(--text-dim); font-size: var(--fs-base); }
.guide-card .guide-meta { font-size: var(--fs-xs); }
.guide-card .guide-card-summary { margin-top: var(--s-2); font-size: var(--fs-sm); }
@media (max-width: 64rem) { .guide-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .guide-card-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- References + disclaimer ---------- */
.guide-refs { margin: 0; padding-left: var(--s-6); display: grid; gap: var(--s-2); }
.guide-refs li { font-size: var(--fs-sm); color: var(--text-dim); }
.guide-refs li::marker { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.guide-prose .guide-disclaimer {
  margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid var(--border-dim);
  font-size: var(--fs-sm); color: var(--text-dim);
}
