/* Guide library styles. Loaded after style.css on guide, hub and guides-index pages,
   and on the homepage for the #guides section only. */

/* ---- header on generated pages ---- */
.guide-header nav { gap: 18px; }
@media (max-width: 1180px) {
  .guide-header { grid-template-columns: 1fr auto; }
  .guide-header nav { display: none; }
}

/* ---- shared page frame ---- */
.guide, .hub, .related {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}
.guide-head { padding: 44px 0 36px; border-bottom: 2px solid var(--ink); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 26px; padding: 0; list-style: none; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.crumbs li + li::before { content: "/"; margin: 0 9px; color: var(--orange-dark); }
.crumbs a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.crumbs [aria-current] { color: var(--muted); }
.guide-head h1 { max-width: 900px; margin: 0 0 22px; font: 950 clamp(2.3rem, 5.2vw, 4.2rem)/.95 Arial, Helvetica, sans-serif; letter-spacing: -.055em; }
.guide-intro { max-width: 760px; margin-bottom: 0; font: 400 1.16rem/1.6 Georgia, serif; }
.hub-text { max-width: 760px; margin: 16px 0 0; color: var(--muted); font: 400 1.04rem/1.65 Georgia, serif; }
.guide-meta { margin: 18px 0 0; color: var(--muted); font-size: .8rem; }

.glance { display: grid; grid-template-columns: repeat(3, 1fr); margin: 30px 0 0; border: 2px solid var(--ink); background: var(--paper-bright); }
.glance div { padding: 14px 16px 16px; }
.glance div + div { border-left: 1px solid var(--line); }
.glance dt { margin-bottom: 6px; color: var(--orange-dark); font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.glance dd { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.35; }

/* ---- guide body ---- */
.guide-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 60px; align-items: start; padding: 44px 0 70px; }
.toc { position: sticky; top: 96px; padding-top: 12px; border-top: 2px solid var(--ink); font-size: .84rem; }
.toc p { margin-bottom: 10px; font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { padding: 7px 0; border-top: 1px solid var(--line); line-height: 1.3; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

.guide-body { min-width: 0; max-width: 740px; }
.guide-body section { scroll-margin-top: 92px; }
.guide-body section + section { margin-top: 46px; }
.guide-body h2, .related h2, .hub h2 { margin: 0 0 16px; font: 700 clamp(1.5rem, 2.6vw, 1.95rem)/1.15 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.guide-body h3 { margin: 26px 0 8px; font-size: 1.05rem; }
.guide-body p, .guide-body li { font: 400 1.06rem/1.7 Georgia, serif; }
.guide-body p { margin-bottom: 16px; }
.guide-body ul, .guide-body ol { margin: 0 0 18px; padding-left: 22px; }
.guide-body li { margin-bottom: 8px; padding-left: 4px; }
.guide-body li::marker { color: var(--orange-dark); font-weight: 900; font-family: Arial, Helvetica, sans-serif; }
.guide-body a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.table-wrap { max-width: 100%; margin: 22px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 2px solid var(--ink); background: var(--paper-bright); }
.table-wrap table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: .9rem; line-height: 1.4; }
.table-wrap th, .table-wrap td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap td + td, .table-wrap th + td, .table-wrap th + th { border-left: 1px solid var(--line); }
.table-wrap thead th { color: var(--white); background: var(--ink); border-color: #555; font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; }
.table-wrap tbody tr:last-child th, .table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody th { font-weight: 800; }

.pro-note { padding: 24px 26px 10px; border: 2px solid var(--ink); background: var(--paper-bright); box-shadow: 8px 8px 0 var(--green); }

.guide-faq details p { margin: -4px 42px 22px 0; font-size: 1rem; }
.guide-faq summary { font-size: 1rem; }
.guide-faq details:first-of-type { border-top: 2px solid var(--ink); }

.planner-cta { display: grid; grid-template-columns: 1fr auto; gap: 20px 30px; align-items: center; margin-top: 48px; padding: 24px 26px; color: var(--white); background: var(--ink); }
.planner-cta .eyebrow { margin-bottom: 8px; color: var(--orange); }
.planner-cta p:not(.eyebrow) { margin: 0; font: 400 1rem/1.5 Georgia, serif; }
.hub > .planner-cta { margin-bottom: 10px; }

/* ---- card lists (related guides, hubs, guides index, homepage) ---- */
.related { padding: 46px 0 80px; border-top: 2px solid var(--ink); }
.related-more { margin: 22px 0 0; color: var(--muted); font-size: .9rem; }
.card-list, .topic-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.card-list li, .topic-list li { border-bottom: 1px solid var(--line); }
.card-list li:nth-child(odd), .topic-list li:nth-child(odd) { border-right: 1px solid var(--line); }
.card-list a, .topic-list a { display: block; height: 100%; padding: 20px 22px 22px 0; text-decoration: none; }
.card-list li:nth-child(even) a, .topic-list li:nth-child(even) a { padding-left: 22px; }
.card-list strong, .topic-list strong { display: block; margin-bottom: 8px; font: 700 1.16rem/1.25 Georgia, serif; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card-list a:hover strong, .topic-list a:hover strong { color: var(--orange-dark); }
.card-list span, .topic-list span { display: block; color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* ---- hub and index pages ---- */
.hub { padding-bottom: 80px; }
.hub-points, .hub-guides, .hub-other { padding-top: 44px; }
.hub-guides h2 a { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.hub-guides .hub-text { margin: -4px 0 20px; }
.hub-points ul { max-width: 760px; margin: 0; padding-left: 22px; }
.hub-points li { margin-bottom: 8px; font: 400 1.04rem/1.65 Georgia, serif; }
.hub-points li::marker { color: var(--orange-dark); }

.footer-topics { grid-column: 1/-1; flex-wrap: wrap; row-gap: 8px; }
.guide-page footer nav { flex-wrap: wrap; row-gap: 8px; }

/* ---- homepage guides section ---- */
.home-guides { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 92px 0; border-top: 2px solid var(--ink); }
.home-guides .topic-list { grid-template-columns: repeat(3, 1fr); margin-top: 42px; }
.home-guides .topic-list li:nth-child(n) { border-right: 0; }
.home-guides .topic-list li:nth-child(n) a { padding: 20px 22px 22px 0; }
.home-guides .topic-list li:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line); }
.home-guides .topic-list li:not(:nth-child(3n + 1)) a { padding-left: 22px; }
.home-guides-more { display: grid; grid-template-columns: .5fr 1.5fr; gap: 40px; margin-top: 44px; }
.home-guides-more h3 { margin-bottom: 0; font-size: 1.2rem; }
.home-guides-more ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 40px; border-top: 2px solid var(--ink); }
.home-guides-more li { break-inside: avoid; padding: 12px 0; border-bottom: 1px solid var(--line); font: 400 1rem/1.4 Georgia, serif; }
.home-guides-more li a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.home-guides-all { margin: 30px 0 0; }

@media (max-width: 980px) {
  .guide-layout { grid-template-columns: 1fr; gap: 30px; padding-top: 30px; }
  .toc { position: static; padding: 14px 16px 8px; border: 2px solid var(--ink); background: var(--paper-bright); }
  .home-guides .topic-list { grid-template-columns: repeat(2, 1fr); }
  .home-guides .topic-list li:nth-child(n) { border-left: 0; }
  .home-guides .topic-list li:nth-child(n) a { padding-left: 0; }
  .home-guides .topic-list li:nth-child(even) { border-left: 1px solid var(--line); }
  .home-guides .topic-list li:nth-child(even) a { padding-left: 22px; }
  .home-guides-more { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 720px) {
  .guide, .hub, .related, .home-guides { width: min(100% - 28px, 1080px); }
  .home-guides { padding-block: 70px; }
  .guide-head { padding: 30px 0 28px; }
  .glance { grid-template-columns: 1fr; }
  .glance div + div { border-left: 0; border-top: 1px solid var(--line); }
  .guide-body p, .guide-body li { font-size: 1.02rem; }
  .pro-note { padding: 20px 18px 6px; box-shadow: 6px 6px 0 var(--green); }
  .planner-cta { grid-template-columns: 1fr; padding: 22px 18px; }
  .card-list, .topic-list, .home-guides .topic-list { grid-template-columns: 1fr; }
  .card-list li:nth-child(n), .topic-list li:nth-child(n), .home-guides .topic-list li:nth-child(n) { border-right: 0; border-left: 0; }
  .card-list li:nth-child(n) a, .topic-list li:nth-child(n) a, .home-guides .topic-list li:nth-child(n) a { padding: 18px 0 20px; }
  .home-guides-more ul { columns: 1; }
  .guide-faq details p { margin-right: 0; }
}

@media print {
  .guide-header, .toc, .planner-cta, .related, .guide-page footer nav { display: none; }
  .guide-layout { display: block; }
}
