/* Scoped additions for the six long-form guides. */
.guide-page .guide-hero { min-height: 330px; padding-top: 52px; margin-top: 0; }
.guide-page .guide-hero__title { max-width: 900px; font-size: clamp(2rem, 4vw, 3.4rem); }
.guide-page .guide-title-detail { display: block; margin-top: .5em; font-size: .57em; line-height: 1.4; font-weight: 500; letter-spacing: 0; }
.guide-page .guide-hero__lede { max-width: 790px; }
.guide-back { display: inline-block; color: var(--brand-blue-light); margin-bottom: 22px; font-size: .88rem; }
.guide-page .guide-layout { max-width: 1180px; }
.guide-page .guide-body { width: 100%; min-width: 0; }
.guide-page .prose { max-width: 76ch; font-size: 1.035rem; line-height: 1.85; }
.guide-page .prose h3 { margin-top: 1.7rem; color: var(--fg-1); line-height: 1.4; }
.guide-page .prose p { margin-bottom: 1.15rem; }
.guide-page [id] { scroll-margin-top: 100px; }
.guide-page .guide-section + .guide-section { margin-top: 64px; padding-top: 38px; border-top: 1px solid var(--overlay-border-medium); }
.guide-figure { margin: 30px 0; }
.guide-figure img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; border-radius: 8px; background: var(--surface-elevated); }
.guide-figure--diagram img { width: auto; max-width: 100%; margin-inline: auto; background: #fff; border: 1px solid var(--overlay-border-medium); }
.guide-figure figcaption { margin-top: 12px; color: var(--fg-3); font-size: .84rem; line-height: 1.65; }
.guide-figure figcaption a { color: var(--brand-blue-light); text-decoration: underline; text-underline-offset: 3px; }
.guide-page .prose { display: flow-root; }
.guide-figure--photo { float: right; width: 46%; margin: 8px 0 20px 26px; }
.guide-figure--photo.guide-figure--left { float: left; margin: 8px 26px 20px 0; }
.guide-figure--photo img { max-height: 300px; object-fit: cover; background: transparent; }
.guide-table, .guide-figure--diagram, .guide-page .prose h3 { clear: both; }
.guide-table caption { padding: 15px 16px; color: var(--fg-1); text-align: left; font-weight: 600; background: var(--surface-elevated); }
.guide-page .guide-table-note { color: var(--fg-3); font-size: .88rem; line-height: 1.7; }
.guide-page .guide-equation { padding: 20px; border-left: 3px solid var(--brand-blue-light); background: var(--surface-elevated); color: var(--fg-1); }
.guide-citation { font-size: .73em; line-height: 0; white-space: nowrap; }
.guide-citation a { color: var(--brand-blue-light); padding: 3px 2px; text-decoration: none; }
.guide-references { clear: both; margin-top: 55px; padding-top: 32px; border-top: 1px solid var(--overlay-border-medium); }
.guide-references h2 { color: var(--fg-1); }
.guide-references p, .guide-references li { font-size: .9rem; color: var(--fg-3); line-height: 1.7; }
.guide-references ol { padding-left: 24px; }
.guide-references li { margin-bottom: 14px; padding-left: 4px; overflow-wrap: anywhere; }
.guide-references a { color: var(--brand-blue-light); text-decoration: underline; text-underline-offset: 3px; }
.guide-reference-back { display: inline-block; padding: 2px 7px; }
.guide-citation a:target, .guide-references li:target { background: var(--surface-elevated); outline: 1px solid var(--brand-blue-rule); }
.guide-table { overflow-x: auto; margin: 28px 0; border: 1px solid var(--overlay-border-medium); border-radius: 8px; }
.guide-table table { width: 100%; border-collapse: collapse; color: var(--fg-2); font-size: .9rem; line-height: 1.6; }
.guide-table th, .guide-table td { padding: 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--overlay-border-medium); min-width: 155px; }
.guide-table thead { background: var(--surface-elevated); color: var(--fg-1); }
.guide-table tbody tr:last-child > * { border-bottom: 0; }
/* Override the shared prose table's mobile nowrap rule; only the wrapper scrolls. */
.guide-page .guide-table table { display: table; white-space: normal; table-layout: fixed; }
.guide-section-contact { margin: 24px 0 0; font-size: .88rem; }
.guide-section-contact a, .guide-page .guide-toc-mobile a { color: var(--brand-blue-light); text-decoration: underline; text-underline-offset: 4px; }
.guide-end { padding: 30px; margin-top: 55px; border: 1px solid var(--brand-blue-rule); border-radius: 10px; background: var(--surface-elevated); }
.guide-end h2 { color: var(--fg-1); margin: 0 0 14px; }
.guide-end p { color: var(--fg-3); line-height: 1.75; margin: 0 0 20px; }
.guide-alias { display: block; height: 0; }
.guide-page .float-cta { display: none; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 10000; background: var(--surface-elevated); color: var(--fg-1); padding: 12px 20px; }
.skip-link:focus { top: 12px; }
.guide-page a:focus-visible, .guide-page summary:focus-visible, .guide-table:focus-visible { outline: 2px solid var(--brand-blue-light); outline-offset: 4px; }
@media (max-width: 1080px) {
  .guide-page .guide-layout { max-width: 880px; grid-template-columns: minmax(0, 1fr); }
  .guide-page .guide-toc-mobile { margin-bottom: 35px; }
  .guide-page .guide-toc-mobile a { display: inline-block; padding: 8px 0; }
}
@media (max-width: 600px) {
  .guide-page .guide-hero { min-height: 0; padding: 32px 22px 28px; }
  .guide-page .guide-hero__title { font-size: 2rem; }
  .guide-page .guide-hero__lede { font-size: 1rem; line-height: 1.7; }
  .guide-page .guide-layout { padding: 0 22px; margin-top: 30px; }
  .guide-page .guide-section > h2 { font-size: 1.5rem; }
  .guide-page .prose { font-size: 1rem; line-height: 1.8; }
  .guide-page .guide-section + .guide-section { margin-top: 42px; padding-top: 30px; }
  .guide-end { padding: 23px; }
  .guide-anchor { opacity: 1; }
  .guide-figure--photo, .guide-figure--photo.guide-figure--left { float: none; width: 100%; margin: 22px 0; }
  .guide-figure--photo img { max-height: 240px; }
  .guide-page .guide-table table { min-width: 560px; }
  .guide-page .guide-table table[data-columns="2"] { min-width: 420px; }
  .guide-table::before { content: "Swipe or scroll to compare columns →"; display: block; position: sticky; left: 0; padding: 10px 16px; color: var(--fg-3); font-size: .8rem; }
  .guide-table caption > span { display: block; max-width: calc(100vw - 80px); }
}
@media print {
  .guide-page .site-nav, .guide-page .site-footer, .guide-page .guide-rail, .guide-page .guide-toc-mobile, .guide-page .guide-anchor, .guide-back, .guide-section-contact, .guide-end { display: none !important; }
  .guide-page, .guide-page .prose, .guide-page h1, .guide-page h2, .guide-page h3, .guide-page p, .guide-page a, .guide-page figcaption { background: white !important; color: black !important; }
  .guide-page .guide-hero { background: none !important; margin: 0; min-height: 0; padding: 0 0 20px; }
  .guide-page .guide-hero::after { display: none; }
  .guide-page .guide-layout { display: block; max-width: none; padding: 0; }
  .guide-figure, .guide-table { break-inside: avoid; }
}
