/* Guides (index and articles). Loads after styles.css, home.css and story.css
   (hero, scroll reveals, pop-ups). */

.guide-hero .wrap { max-width: 46rem; }
.guide-hero .crumbs { font-size: var(--t-sm); color: var(--on-dark-muted); margin-bottom: 1.25rem; }
.guide-hero .crumbs a { color: var(--on-dark-muted); }
.guide-hero h1 { max-width: 22ch; font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
.guide-hero .byline { margin-top: 1.25rem; font-size: var(--t-sm); color: var(--on-dark-muted); }

/* Article body: one comfortable reading column */
.guide-body .wrap { max-width: 46rem; }
.guide-body h2 { font-size: var(--t-xl); margin: 2.25rem 0 .75rem; }
.guide-body p, .guide-body li { font-size: var(--t-lg); line-height: 1.65; color: #2a3a52; }
.guide-body p + p { margin-top: 1rem; }
.guide-body ul, .guide-body ol { padding-left: 1.4rem; margin: .75rem 0 1rem; }
.guide-body li { margin: .45rem 0; }

/* The short answer, first: what search engines and AI tools quote */
.guide-answer { background: var(--mist); border-left: 4px solid var(--ocean); border-radius: var(--radius-sm); padding: 1.25rem 1.5rem; }
.guide-answer-label { font: 700 .75rem/1 var(--font-body) !important; letter-spacing: .1em; text-transform: uppercase; color: var(--ocean) !important; margin-bottom: .6rem; }
.guide-answer p:last-child { color: var(--ink); font-weight: 500; }

/* One next step at the end */
.guide-cta { margin-top: 3rem; padding: clamp(1.5rem, 4vw, 2rem); border-radius: var(--radius-lg); background: var(--navy); color: #fff; }
.guide-cta h2 { color: #fff; margin: 0 0 .6rem; }
.guide-cta p { color: var(--on-dark-muted); font-size: var(--t-base); margin-bottom: 1.25rem; }
.guide-cta .guide-cta-alt { margin: 1rem 0 0; font-size: var(--t-sm); }
.guide-cta .guide-cta-alt a { color: #fff; }
.guide-more { margin-top: 2rem; font-size: var(--t-sm) !important; }

/* Guides index */
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.guide-list a {
  display: grid; gap: .5rem; height: 100%;
  padding: 1.5rem; border-radius: var(--radius-lg);
  background: var(--mist); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  transition: border-color .2s ease, transform .2s var(--ease-out);
}
.guide-list a:hover { border-color: var(--ocean); transform: translateY(-2px); }
.guide-list h2 { font-size: var(--t-lg); }
.guide-list p { font-size: var(--t-sm); color: var(--slate); }
.guide-list .read { align-self: end; font-weight: 600; color: var(--ocean); font-size: var(--t-sm); }

.guide-hero .byline a { color: inherit; }
.guide-note { background: var(--mist); border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-top: 1.5rem; font-size: var(--t-base) !important; }

/* Comparison table */
.guide-table { margin: 1rem 0 1.5rem; overflow-x: auto; }
.guide-table table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.guide-table th, .guide-table td { padding: .7rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.guide-table thead th { font: 600 var(--t-base)/1.3 var(--font-display); color: var(--ink); }
.guide-table tbody th { font-weight: 600; color: var(--ink); }
.guide-table td { color: #2a3a52; }

/* Sources (state pages) */
.guide-sources { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.guide-sources h2 { font-size: var(--t-base) !important; margin: 0 0 .5rem; }
.guide-sources ul { margin: 0 0 .5rem; }
.guide-sources li, .guide-sources p { font-size: var(--t-sm) !important; color: var(--slate); line-height: 1.5; }
.guide-sources a { color: var(--ocean); overflow-wrap: anywhere; }

/* About the author */
.guide-bio { display: flex; gap: 1rem; align-items: flex-start; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.guide-bio img { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: block; }
.guide-bio picture { flex: none; }
.guide-bio p { font-size: var(--t-sm) !important; line-height: 1.55; margin: 0; }

/* Guides hub */
.guide-hub .wrap { max-width: 68rem; }
.guide-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.guide-filter[hidden] { display: none; }
.guide-filter button {
  padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font: 600 var(--t-sm)/1.2 var(--font-body); color: var(--ink); cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.guide-filter button:hover { border-color: var(--ocean); }
.guide-filter button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.guide-card[hidden] { display: none; }
.guide-list .guide-card > a { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; background: #fff; }
.guide-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.35rem 1.4rem; flex: 1; }
.guide-card-body .read { margin-top: auto; padding-top: .35rem; }

/* Topic artwork: drawn in CSS, so it weighs nothing and new guides get it automatically */
.guide-art {
  position: relative; display: grid; place-items: center; height: 9rem; flex: none; overflow: hidden; color: #fff;
  background: radial-gradient(90% 120% at 85% 15%, var(--art, #1d4fd8) 0%, transparent 65%), var(--navy);
}
.guide-art::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-radial-gradient(circle at 85% 50%, transparent 0 34px, rgba(56, 189, 248, .16) 34px 35px);
}
.guide-art svg { position: relative; width: 2.5rem; height: 2.5rem; }
.guide-art--follow-up { --art: #0e7490; }
.guide-art--choosing { --art: #4338ca; }

.guide-tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.guide-topic { font: 700 .72rem/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ocean); }
.guide-latest { font: 700 .68rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--navy); background: var(--lagoon); padding: .28rem .5rem; border-radius: 999px; }
.guide-list .guide-meta { font-size: .8125rem; color: var(--slate); }

/* The newest guide, full width */
.guide-card--featured { grid-column: 1 / -1; }
.guide-list .guide-card--featured > a { flex-direction: row; }
.guide-card--featured .guide-art { width: 38%; height: auto; min-height: 15rem; }
.guide-card--featured .guide-art svg { width: 3.5rem; height: 3.5rem; }
.guide-card--featured .guide-card-body { padding: 1.75rem 2rem; justify-content: center; }
.guide-list .guide-card--featured h2 { font-size: var(--t-xl); }
.guide-list .guide-card--featured .guide-desc { font-size: var(--t-base); }
.guide-card--featured .read { margin-top: .25rem; }
@media (max-width: 760px) {
  .guide-list .guide-card--featured > a { flex-direction: column; }
  .guide-card--featured .guide-art { width: 100%; min-height: 0; height: 9rem; }
  .guide-card--featured .guide-card-body { padding: 1.25rem 1.35rem 1.4rem; }
}

/* Keep reading */
.guide-related { margin-top: 2rem; }
.guide-body .guide-related h2 { font-size: var(--t-lg); margin: 0 0 .75rem; }
.guide-body .guide-related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.guide-body .guide-related li { margin: 0; font-size: var(--t-base); }
.guide-related a { display: grid; gap: .35rem; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); line-height: 1.35; transition: border-color .2s ease; }
.guide-related a:hover { border-color: var(--ocean); }
.guide-related strong { font: 600 var(--t-base)/1.35 var(--font-display); }
@media (max-width: 600px) { .guide-body .guide-related ul { grid-template-columns: 1fr; } }

/* Article covers: a static scene for each guide, drawn in SVG */
.guide-art { padding: .75rem; }
.guide-art svg.guide-scene, .guide-card--featured .guide-art svg.guide-scene { width: 100%; height: 100%; max-height: 100%; }
.guide-cover { height: 15rem; border-radius: var(--radius-lg); margin-bottom: 1.75rem; }
