/* WindshieldHUB Blog Article — template styles. Requires design-tokens.css + blog.css.
   Container-query responsive via .whb-page. Class prefix: wha-. */

.wha-breadcrumb { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 12.5px; color: var(--whub-text-muted); padding-bottom: 16px; max-width: 900px; margin: 0 auto; width: 100%; }
.wha-breadcrumb a { color: var(--whub-accent); text-decoration: none; padding: 8px 2px; min-height: 36px; display: inline-flex; align-items: center; }
.wha-breadcrumb a:hover { color: var(--whub-link-hover); }
.wha-breadcrumb [aria-hidden] { color: var(--whub-text-faint); }

.wha-head { display: flex; flex-direction: column; gap: 12px; max-width: 900px; width: 100%; margin: 0 auto; }
.wha-head .whb-h1 { font-size: 44px; line-height: 1.12; }
.wha-standfirst { margin: 0; font-size: 18.5px; line-height: 1.6; color: var(--whub-text-body); max-width: 760px; }
.wha-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--whub-text-muted); }
.wha-meta strong { color: var(--whub-text-strong); font-weight: var(--whub-weight-bold); }
.wha-hero { margin: 24px auto 0; max-width: 1000px; width: 100%; }

/* Editorial layout: the ARTICLE is the dominant, visually centered element; the sticky
   ToC is a slim left rail. Below 1100px: one centered column with the collapsible
   "On this page" module above the article. */
.wha-layout {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 740px) minmax(180px, 1fr);
  column-gap: 36px;
  align-items: start;
  margin-top: 32px;
}
.wha-toc { grid-column: 1; width: 100%; max-width: 220px; justify-self: end; }
.wha-body { grid-column: 2; width: 100%; min-width: 0; }
.wha-body { font-size: 17.5px; line-height: 1.75; color: var(--whub-text); }
.wha-body > * + * { margin-top: 1.1em; }
.wha-body h2 { font-size: 24px; line-height: 1.3; font-weight: var(--whub-weight-extrabold); color: var(--whub-navy); margin-top: 1.8em; scroll-margin-top: 110px; }
.wha-body h3 { font-size: 18.5px; font-weight: var(--whub-weight-extrabold); color: var(--whub-heading); margin-top: 1.5em; scroll-margin-top: 110px; }
.wha-body ul, .wha-body ol { padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.wha-body a { color: var(--whub-accent); }
.wha-body a:hover { color: var(--whub-link-hover); }
.wha-body figure { margin: 1.6em 0; }
.wha-body figcaption { font-size: 12.5px; color: var(--whub-text-muted); padding-top: 8px; }

/* Callouts */
.wha-callout { border: 1px solid var(--whub-border); border-left: 4px solid var(--whub-blue); border-radius: var(--whub-radius-md); background: var(--whub-bg-tint); padding: 16px 20px; font-size: 15px; }
.wha-callout strong { color: var(--whub-navy); }
.wha-callout.safety { border-left-color: var(--whub-navy); }
.wha-callout.cost { border-left-color: var(--whub-accent); }
.wha-quote { border-left: 4px solid var(--whub-blue); margin: 1.6em 0; padding: 4px 0 4px 20px; font-size: 19px; font-weight: var(--whub-weight-bold); color: var(--whub-navy); line-height: 1.5; }

/* Comparison table */
.wha-tablewrap { overflow-x: auto; }
.wha-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.wha-table th { text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--whub-blue); color: var(--whub-navy); font-size: 12.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.wha-table td { padding: 11px 14px; border-bottom: 1px solid var(--whub-border); color: var(--whub-text-body); }

/* FAQ */
.wha-faq details { border-bottom: 1px solid var(--whub-border); }
.wha-faq summary { cursor: pointer; font-weight: var(--whub-weight-bold); color: var(--whub-heading); padding: 14px 2px; min-height: 48px; display: flex; align-items: center; }
.wha-faq summary:hover { color: var(--whub-accent); }
.wha-faq div { padding: 0 2px 16px; font-size: 15px; }

/* Table of Contents */
.wha-toc { position: sticky; top: 112px; border: 1px solid var(--whub-border); border-radius: var(--whub-radius-lg); background: var(--whub-bg-tint); padding: 16px 16px; }
.wha-toc-title { margin: 0 0 8px; font-size: 12px; font-weight: var(--whub-weight-extrabold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--whub-accent); }
.wha-toc nav { display: flex; flex-direction: column; }
.wha-toc a { font-size: 13.5px; color: var(--whub-text-muted); text-decoration: none; padding: 8px 0; min-height: 36px; display: flex; align-items: center; border-left: 2px solid transparent; padding-left: 10px; margin-left: -12px; }
.wha-toc a:hover { color: var(--whub-accent); }
.wha-toc a.active { color: var(--whub-navy); font-weight: var(--whub-weight-bold); border-left-color: var(--whub-blue); }
.wha-toc-btn { display: none; }

/* Inline CTA (compact, contextual) */
.wha-inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; border: 1px solid var(--whub-border); border-radius: var(--whub-radius-lg); background: var(--whub-bg-ice); padding: 16px 22px; }
.wha-inline-cta p { margin: 0; font-size: 14.5px; font-weight: var(--whub-weight-bold); color: var(--whub-navy); }
.wha-inline-cta a { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; background: var(--whub-action); color: #ffffff; font-size: 14px; font-weight: var(--whub-weight-bold); border-radius: var(--whub-radius-pill); text-decoration: none; }
.wha-inline-cta a:hover { background: var(--whub-action-hover); }

/* Author / trust module */
.wha-author { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--whub-border); border-bottom: 1px solid var(--whub-border); padding: 18px 0; margin-top: 2em; }
.wha-author-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--whub-bg-ice); color: var(--whub-accent); display: flex; align-items: center; justify-content: center; font-weight: var(--whub-weight-extrabold); flex: 0 0 auto; }
.wha-author-text { font-size: 13.5px; color: var(--whub-text-muted); line-height: 1.55; }
.wha-author-text strong { display: block; font-size: 14.5px; color: var(--whub-heading); }

/* Related guides */
.wha-related { margin-top: 44px; }
.wha-related .whb-grid { margin-top: 16px; }

/* End-of-article CTA (pairs with compact-after-cta footer) */
.wha-end-cta { margin-top: 44px; border-radius: var(--whub-radius-2xl); border: 1px solid var(--whub-border); border-top: 4px solid var(--whub-blue); background: var(--whub-bg-tint); padding: 30px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.wha-end-cta .whb-tagline { margin: 0; font-size: 22px; font-weight: var(--whub-weight-extrabold); color: var(--whub-navy); }
.wha-end-cta .whb-tagline .b { color: var(--whub-blue); }
.wha-end-cta p { margin: 6px 0 0; font-size: 14px; color: var(--whub-text-muted); }

/* Desktop: the panel is always visible (sticky ToC); the [hidden] state only applies
   to the mobile/tablet collapsible presentation. */
@container (min-width: 1024px) {
  .wha-toc-panel[hidden] { display: block !important; }
}

/* ---- Responsive ---- */
@container (max-width: 1099px) {
  .wha-layout { grid-template-columns: 1fr; gap: 0; }
  .wha-toc { grid-column: auto; justify-self: stretch; max-width: 740px; margin: 0 auto 22px; width: 100%; position: static; padding: 0; border-radius: var(--whub-radius-lg); overflow: hidden; }
  .wha-body { grid-column: auto; max-width: 740px; margin: 0 auto; }
  .wha-toc-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; min-height: 48px; padding: 12px 20px;
    background: var(--whub-bg-tint); border: none; cursor: pointer;
    font-family: var(--whub-font); font-size: 13.5px; font-weight: var(--whub-weight-extrabold);
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--whub-navy); text-align: left;
  }
  .wha-toc-btn svg { transition: transform .15s; color: var(--whub-blue); }
  .wha-toc-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .wha-toc-title { display: none; }
  .wha-toc-panel { padding: 4px 20px 14px; }
  .wha-toc-panel[hidden] { display: none !important; }
  .wha-toc a { min-height: 44px; }
}
@container (max-width: 767px) {
  .wha-head .whb-h1 { font-size: 27px; }
  .wha-standfirst { font-size: 16.5px; }
  .wha-body { font-size: 16px; }
  .wha-body h2 { font-size: 21px; }
  .wha-end-cta { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .wha-inline-cta a { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .wha-toc-btn svg { transition: none; } }

/* Sources & References (hidden until populated with reviewed citations) */
.wha-sources { margin-top: 2em; border-top: 1px solid var(--whub-border); padding-top: 1.2em; }
.wha-sources h2 { font-size: 18px; margin-top: 0; }
.wha-sources-list { font-size: 13.5px; color: var(--whub-text-muted); padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Share this guide — compact article-sharing controls (distinct from footer profile links:
   outlined accent circles vs. the footer's navy-outlined icons) */
/* Share this guide — lives INSIDE .wha-head so it aligns exactly with the category/H1/
   standfirst/meta column at every width (no offsets, no negative margins). Distinct from
   footer profile links: outlined accent circles vs. the footer's navy-outlined icons. */
.wha-share { width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 10px 14px; flex-wrap: wrap; margin-top: 4px; }
.wha-share-label { font-size: 12px; font-weight: var(--whub-weight-extrabold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--whub-text-muted); }
.wha-share-btns { display: flex; align-items: center; gap: 10px; }
.wha-share-btns a, .wha-share-btns button {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--whub-accent); background: none; cursor: pointer;
  color: var(--whub-accent); display: flex; align-items: center; justify-content: center;
  padding: 0; text-decoration: none;
}
.wha-share-btns a::before, .wha-share-btns button::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; }
.wha-share-btns a:hover, .wha-share-btns button:hover { background: var(--whub-accent); color: #ffffff; }
.wha-share-live { font-size: 12.5px; font-weight: var(--whub-weight-bold); color: var(--whub-accent); min-height: 18px; }
.wha-share-native { display: none; }
@container (max-width: 767px) {
  /* Mobile: one compact Share button (Web Share API) + accessible fallback menu */
  .wha-share-btns { display: none; }
  .wha-share-btns.open { display: flex; }
  .wha-share-native {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 18px; border-radius: var(--whub-radius-pill);
    border: 1.5px solid var(--whub-accent); background: none; cursor: pointer;
    color: var(--whub-accent); font-family: var(--whub-font); font-size: 13.5px; font-weight: var(--whub-weight-bold);
  }
  .wha-share-native:hover { background: var(--whub-accent); color: #ffffff; }
}
/* Short-article rule: no ToC — centered single reading column */
.wha-layout.wha-solo { grid-template-columns: minmax(0, 740px); justify-content: center; }
.wha-layout.wha-solo .wha-toc { display: none; }
