/* Downloadable resource pages and their library previews. */
.guide-skip { position: fixed; top: .5rem; left: .5rem; z-index: 60; background: var(--background); padding: .75rem; transform: translateY(-200%); }
.guide-skip:focus { transform: none; }
.guide-hero { padding-top: 2.75rem; padding-bottom: 2.5rem; }
.guide-hero .backlink { display: inline-flex; gap: .5rem; align-items: center; margin-bottom: 2rem; font-size: .75rem; text-decoration: none; color: var(--muted-foreground); }
.guide-eyebrow { font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground); }
.guide-eyebrow span { margin: 0 .55rem; color: var(--chart-3); }
.guide-hero h1 { margin: 1rem 0 1.4rem; font-size: clamp(2.1rem, 4.8vw, 3.75rem); font-weight: 500; line-height: 1.18; letter-spacing: -.035em; }
.guide-hero h1 span { color: var(--chart-4); }
.dark .guide-hero h1 span { color: var(--chart-1); }
.guide-deck { max-width: 49rem; color: var(--muted-foreground); font-size: .9375rem; line-height: 1.8; }
.guide-mobile-cta { display: inline-flex; gap: .5rem; margin-top: 1.25rem; font-size: .8125rem; text-underline-offset: 4px; }
.guide-layout { display: grid; gap: 2rem; padding-bottom: 3.5rem; align-items: start; }
.guide-detail, .guide-download-column { min-width: 0; }
.guide-preview { border: 1px solid var(--border); }
.guide-preview-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 3rem; padding: .5rem 1rem; border-bottom: 1px solid var(--border); font-size: .75rem; color: var(--muted-foreground); gap: .5rem; }
.guide-enlarge { border: 0; background: transparent; font-size: .75rem; min-height: 2.75rem; text-decoration: underline; text-underline-offset: 3px; }
.guide-preview-stage { display: grid; place-items: center; padding: 1.75rem; background: var(--muted); }
.guide-preview-stage img { width: 100%; height: auto; max-width: 22.5rem; }
.guide-preview-stage img[hidden] { display: none; }
.guide-preview-caption { padding: .75rem 1rem; display: flex; flex-direction: column; gap: .6rem; font-size: .75rem; color: var(--muted-foreground); border-top: 1px solid var(--border); }
.guide-preview-switcher { display: flex; flex-wrap: wrap; gap: .5rem; }
.guide-preview-switcher[hidden], .guide-enlarge[hidden] { display: none; }
.guide-preview-switcher button { background: transparent; border: 1px solid var(--border); padding: .35rem .6rem; min-height: 2.75rem; font-size: .75rem; }
.guide-preview-switcher button[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.guide-inside { padding-top: 2.5rem; }
.guide-inside h2, .guide-next h2 { margin: .75rem 0 1rem; font-size: 1.6rem; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }
.guide-inside > p:not(.guide-eyebrow), .guide-next p:not(.guide-eyebrow) { font-size: .8125rem; line-height: 1.8; color: var(--muted-foreground); }
.guide-chapters { margin: 1.75rem 0 1.25rem; padding: 0; list-style: none; }
.guide-chapters li { display: flex; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--border); }
.guide-chapter-number { font-size: .75rem; color: var(--muted-foreground); padding-top: .2rem; }
.guide-chapters h3 { font-family: var(--font-mono); font-size: .8125rem; line-height: 1.6; font-weight: 600; }
.guide-chapters p { font-size: .75rem; color: var(--muted-foreground); margin-top: .15rem; }
.guide-extra { padding-top: 1rem; border-top: 1px solid var(--border); }
.guide-download-column .form-card { max-width: none; border: 1px solid var(--border); scroll-margin-top: 1rem; }
.guide-download-column .form-head { min-height: 3.5rem; color: var(--foreground); }
.guide-form-intro { font-size: .8125rem; color: var(--muted-foreground); line-height: 1.7; }
.guide-download-column .form-body { gap: 1.15rem; }
.guide-download-column .field input { min-height: 2.75rem; }
.guide-download-column .field textarea { min-height: 5.25rem; }
.guide-download-column .form-success h2 { line-height: 1.5; }
.guide-download-column .guide-file-meta { font-size: .75rem; }
.guide-audience { margin-top: 1.25rem; font-size: .75rem; line-height: 1.8; color: var(--muted-foreground); }
.guide-next { padding-top: 2.5rem; padding-bottom: 3.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.guide-next > div { max-width: 40rem; }
.guide-preview-dialog { margin: auto; padding: 0; width: min(58rem, calc(100% - 1.5rem)); max-height: 92dvh; overflow: auto; color: var(--foreground); background: var(--background); border: 1px solid var(--border); }
.guide-preview-dialog::backdrop { background: color-mix(in oklch, var(--foreground) 65%, transparent); }
.guide-dialog-header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; background: var(--background); border-bottom: 1px solid var(--border); }
.guide-dialog-header h2 { font-family: var(--font-mono); font-weight: 500; font-size: .8125rem; }
.guide-dialog-content { padding: 1rem; background: var(--muted); }
.guide-dialog-content img { width: 100%; height: auto; }
/* One DOM order: offer, download, sample, contents. */
.guide-page .header-cta { display: none; }
.guide-layout { padding-top: 2rem; }
.guide-hero { padding: 0; }
.guide-hero .backlink { margin-bottom: 1rem; min-height: 2.75rem; }
.guide-hero h1 { font-size: 2rem; }
.guide-benefits { padding-left: 1.25rem; margin-top: 1.5rem; font-size: .875rem; line-height: 1.8; }
.guide-benefits li + li { margin-top: .5rem; }
.guide-inside { padding-top: 0; }
.guide-audience { font-size: .8125rem; }
.guide-followup { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.guide-followup a { text-underline-offset: 3px; }
.guide-page [hidden] { display: none !important; }
.guide-page :is(a,button,input):focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
@media (hover: hover) {
  .guide-enlarge:hover, .guide-preview-switcher button:not([aria-pressed="true"]):hover { background: var(--accent); }
}
@media (min-width: 768px) {
  .guide-layout { padding-top: 3rem; gap: 2.5rem; }
  .guide-hero h1 { font-size: 3rem; }
}
@media (min-width: 1024px) {
  .guide-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "hero form" "preview inside"; gap: 3rem; }
  .guide-hero { grid-area: hero; }
  .guide-download-column { grid-area: form; padding-top: 4rem; }
  .guide-preview { grid-area: preview; }
  .guide-inside { grid-area: inside; }
  .guide-mobile-cta { display: none; }
  .guide-next { flex-direction: row; justify-content: space-between; align-items: center; }
}
/* Every library card has the same image, label, title, excerpt and footer tracks. */
#resGrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
#resGrid .rcard { display: grid; grid-template-rows: auto 1.5rem 2.925rem 6rem 3.25rem; gap: 1rem; min-width: 0; padding: 1.25rem; }
#resGrid .resource-media { aspect-ratio: 1200 / 630; background: var(--muted); display: grid; place-items: center; overflow: hidden; }
#resGrid .resource-image { display: block; width: 100%; height: 100%; object-fit: contain; min-height: 0; }
#resGrid .resource-media-pdf .resource-image { height: 100%; width: auto; max-width: 100%; padding: .75rem; }
#resGrid .cat { font-size: .75rem; line-height: 1.5rem; }
#resGrid h3 { font-size: 1.125rem; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#resGrid .excerpt { font-size: .8125rem; line-height: 1.5rem; -webkit-line-clamp: 4; margin: 0; }
#resGrid .meta { margin: 0; border-top: 1px solid var(--border); padding-top: .75rem; min-width: 0; }
#resGrid .meta .read { opacity: 1; transform: none; flex-shrink: 0; }
#resGrid .date { line-height: 1.4; }
@media (prefers-reduced-motion: reduce) {
  .guide-page { scroll-behavior: auto; }
  .guide-skip { transition: none; }
}

.guide-page :is(.form-consent,.field-error) { font-size: .75rem; }
.guide-page .field input { font-size: 1rem; }
