/* Guides written in the CMS (site/src/lib/rich.js): images, pull quotes, callouts, questions, citations and calls to
   action. Loaded after pages.css, only on guides that use one of these. Same tokens as app.css and pages.css. */

/* Images: the hero under the byline and figures in the text. width/height attributes keep the space; this keeps the
   ratio when the column is narrower. */
.pv-main .pv-figure { margin: 8px 0 28px; }
.pv-main .pv-figure img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--bg); }
.pv-main figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--text-3); }

/* Pull quote: large, quiet, with the attribution under it. */
.pv-main .pv-quote { margin: 32px 0; padding: 0; }
.pv-main .pv-quote blockquote { margin: 0; padding: 0; border: 0; }
.pv-main .pv-quote blockquote p { margin: 0 0 10px; color: var(--text); font-size: 22px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.pv-main .pv-quote blockquote p:first-child::before { content: "\201C"; }
.pv-main .pv-quote blockquote p:last-child::after { content: "\201D"; }
.pv-main .pv-quote figcaption { margin-top: 4px; font-size: 15px; color: var(--text-2); }
.pv-main .pv-quote figcaption::before { content: "\2014\00a0"; }

/* Callouts. */
.pv-main .pv-callout { margin: 24px 0; padding: 18px 20px 8px; border-radius: 16px; background: var(--bg); }
.pv-main .pv-callout-tip { background: rgba(21, 186, 0, 0.08); }
.pv-main .pv-callout-warning { background: rgba(255, 149, 0, 0.12); }
.pv-main .pv-callout p { color: var(--text); }
.pv-main .pv-callout .pv-callout-title { margin-bottom: 6px; font-weight: 600; }

/* Questions and answers. */
.pv-main .pv-faq { margin: 40px 0 8px; }
.pv-main .pv-faq-item { padding: 16px 0 4px; border-top: 1px solid var(--hair); }
.pv-main .pv-faq-item h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); }

/* Citations: small superscript numbers in the text, a numbered list under Sources. */
.pv-main sup.pv-cite { line-height: 0; font-size: 0.72em; font-weight: 600; }
.pv-main sup.pv-cite a { padding: 0 1px; }
.pv-main .pv-cites { margin: 0 0 12px; padding-left: 22px; }
.pv-main .pv-cites li { scroll-margin-top: 24px; }
.pv-main .pv-cite-back { margin-left: 2px; color: var(--text-3); }
.pv-main :target { background: var(--accent-tint); border-radius: 6px; }

/* Calls to action inside the text (::cta). The closing box keeps pages.css's style. */
.pv-cta.pv-cta-inline { margin: 32px 0; }
.pv-main .pv-cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pv-main .pv-cta-btn.pv-cta-alt { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pv-main .pv-cta-btn.pv-cta-alt:hover { background: var(--accent-tint); }

@media (max-width: 600px) {
  .pv-main .pv-quote blockquote p { font-size: 20px; }
  .pv-main .pv-cta-inline .pv-cta-btn { min-width: 0; width: 100%; }
}

/* ---------- The guide hero card (src/lib/hero.js) ----------
   Wider than the text column on large screens, the column's width on a phone. The gradient is the inline SVG
   (.pv-flare); ::before is a scrim that keeps white text at AA where the light glows reach; ::after is film grain, a
   180px fractal-noise tile (data: SVG, no download) blended at low strength. Nothing animates and nothing uses
   backdrop-filter or CSS blur, so scrolling only composites a static layer. */
.pv-main .pv-guide-hero {
  position: relative; isolation: isolate; overflow: hidden; contain: paint;
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 36px;
  margin: 2px calc(50% - min(520px, 50vw - 20px)) 48px; padding: 56px 56px 60px;
  border-radius: 32px; background: #0047e8; color: #fff;
}
.pv-main .pv-guide-hero.has-art { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.pv-main .pv-guide-hero:not(.has-art) .pv-guide-hero-text { max-width: 640px; }
.pv-guide-hero .pv-flare { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; }
.pv-guide-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 26, 120, 0.34) 0%, rgba(0, 26, 120, 0.18) 45%, rgba(0, 26, 120, 0) 70%);
}
.pv-guide-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.3; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.pv-main .pv-guide-hero .pv-topic {
  display: inline-flex; align-items: center; margin: 0 0 22px; padding: 7px 14px; border-radius: 999px;
  background: #fff; color: #0a2a8f; font-size: 14px; line-height: 1.2; font-weight: 600; letter-spacing: -0.005em;
}
.pv-main .pv-guide-hero h1 {
  margin: 0 0 22px; color: #fff; font-size: 54px; line-height: 1.04; font-weight: 700; letter-spacing: -0.035em; text-wrap: balance;
}
.pv-main .pv-guide-hero .pv-byline {
  display: flex; align-items: center; gap: 8px; margin: 0 0 30px; color: #fff; font-size: 15px; line-height: 1.4; font-weight: 500;
}
.pv-guide-hero .pv-mark { flex: none; width: 18px; height: 18px; color: #fff; }
.pv-main .pv-guide-hero .pv-hero-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px; border-radius: 999px;
  background: #fff; color: var(--accent); font-size: 17px; font-weight: 600; text-decoration: none;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease;
}
.pv-main .pv-guide-hero .pv-hero-btn:active { transform: scale(0.97); background: #e5e9f5; }
@media (hover: hover) and (pointer: fine) { .pv-main .pv-guide-hero .pv-hero-btn:hover { background: #eef2fb; text-decoration: none; } }
.pv-guide-hero :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pv-guide-hero-art { min-width: 0; }
.pv-main .pv-guide-hero-art img { display: block; width: 100%; height: auto; border-radius: 18px; }

@media (max-width: 900px) {
  .pv-main .pv-guide-hero h1 { font-size: 44px; }
  .pv-main .pv-guide-hero { padding: 44px 40px 48px; }
}
@media (max-width: 760px) {
  .pv-main .pv-guide-hero, .pv-main .pv-guide-hero.has-art { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 30px 22px 26px; border-radius: 26px; margin-bottom: 40px; }
  .pv-guide-hero::before { background: linear-gradient(180deg, rgba(0, 26, 120, 0.36) 0%, rgba(0, 26, 120, 0.26) 60%, rgba(0, 26, 120, 0) 88%); }
  .pv-main .pv-guide-hero h1 { font-size: 34px; line-height: 1.06; margin-bottom: 18px; }
  .pv-main .pv-guide-hero .pv-topic { margin-bottom: 18px; }
  .pv-main .pv-guide-hero .pv-byline { margin-bottom: 24px; font-size: 14px; }
  .pv-main .pv-guide-hero .pv-hero-btn { width: 100%; }
}
/* More contrast, less transparency, forced colors: a plain deep-blue card (or system colors), no glows or grain. */
@media (prefers-contrast: more) {
  .pv-guide-hero .pv-flare, .pv-guide-hero::before, .pv-guide-hero::after { display: none; }
  .pv-main .pv-guide-hero { background: #0036b8; }
}
@media (prefers-reduced-transparency: reduce) { .pv-guide-hero::after { display: none; } }
@media (forced-colors: active) {
  .pv-guide-hero .pv-flare, .pv-guide-hero::before, .pv-guide-hero::after { display: none; }
  .pv-main .pv-guide-hero { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  .pv-main .pv-guide-hero h1, .pv-main .pv-guide-hero .pv-byline, .pv-guide-hero .pv-mark { color: CanvasText; }
}

/* ---------- /guides list: a small square of each guide's gradient ---------- */
.pv-main .pv-guides .pv-guide-row a { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: start; }
.pv-guide-thumb { position: relative; isolation: isolate; display: block; width: 76px; height: 76px; margin-top: 2px; overflow: hidden; border-radius: 18px; background: #0047e8; }
.pv-guide-thumb .pv-flare { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pv-guide-thumb::after {
  content: ""; position: absolute; inset: 0; opacity: 0.22; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}
@media (max-width: 600px) {
  .pv-main .pv-guides .pv-guide-row a { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .pv-guide-thumb { width: 56px; height: 56px; border-radius: 14px; }
}
@media (prefers-contrast: more), (forced-colors: active) { .pv-guide-thumb::after { display: none; } }
/* The way back to /guides lines up with the card's edge. */
.pv-main .pv-back { margin-left: calc(50% - min(520px, 50vw - 20px)); }
