/* ============================================================
   THUNDER BAY DEVELOPERS · guides
   Loaded after styles.css and pages.css by /guides/ and by each guide
   under it. The header, footer, breadcrumb, spec rows, hairline lists,
   related links, FAQ and closing section come from those two files
   unchanged; this file adds the article shell, namespaced gd- so it
   cannot collide with the home or service pages. Nothing here waits
   on JavaScript: every word renders with the HTML and CSS.
   ============================================================ */

/* ---------- Hero: breadcrumb, headline, meta line, standfirst and spec ---------- */
/* A long final crumb wraps inside its own item on a narrow phone, so the separating
   slash stays on the first line instead of leading the second */
.pg-crumbs li:last-child{flex:1 1 0;min-width:0}
/* Guide headlines run longer than a service page's, so on a guide the headline steps
   down one size and takes a wider measure: two lines on a desktop, three or four on a
   phone. The guides index keeps the landing-page size, as a hub beside those pages. */
.gd-hero .gd-title{font-size:clamp(2.2rem,1.45rem + 2.9vw,4.5rem);line-height:.98;max-width:15em}
/* Reading time and dates, in the label idiom, directly under the headline */
.gd-meta{display:flex;flex-wrap:wrap;gap:.45rem 1.75rem;margin:clamp(1.1rem,2.2vw,1.75rem) 0 0}
.gd-meta>*{white-space:nowrap}
.gd-intro{margin-top:clamp(1.75rem,3.5vw,3rem)}
/* The standfirst answers the question in one short paragraph: the landing-page lead
   scale, set in ink rather than the secondary ink so it still reads as the answer */
.gd-standfirst{margin:0;font-size:clamp(1.0625rem,1.3vw,1.25rem);line-height:1.55;color:var(--ink);max-width:36rem;text-wrap:pretty}

/* ---------- Contents: a hairline list beside the article, sticky on wide screens ---------- */
.gd-toc ol{list-style:none;margin:0;padding:0;border-top:1px solid var(--ink)}
.gd-toc li{border-bottom:1px solid var(--rule);transition:border-color .5s}
/* Block, not flex: a flex anchor would drop the spaces around the no-wrap spans in a heading */
.gd-toc a{display:block;min-height:44px;padding:.75rem 0;font-size:.9375rem;font-weight:500;line-height:1.35;color:var(--ink);text-wrap:pretty}

/* ---------- Article: one reading column of sections divided by hairlines ---------- */
.gd-article{gap:0}
.gd-sec{padding:clamp(2.25rem,4.5vw,4rem) 0;border-top:1px solid var(--rule);scroll-margin-top:1.5rem}
.gd-sec:first-child{padding-top:0;border-top:0}
.gd-sec:last-child{padding-bottom:0}
/* A section that ends with a hairline list already closes on that list's last rule;
   the section after it does not draw a second rule under the same column */
.gd-sec:has(> ul:last-child,> ol:last-child)+.gd-sec{border-top:0}
.gd-h2{font-family:var(--display-xs);font-size:clamp(1.75rem,1.15rem + 2vw,2.75rem);line-height:1.02;letter-spacing:-.03em;max-width:16em;margin:0 0 clamp(1rem,2vw,1.5rem);text-wrap:balance;overflow-wrap:break-word}
/* The FAQ heading of a guide sits on the article's heading scale, not the landing pages' */
.gd .faq-title{font-family:var(--display-xs);font-size:clamp(1.75rem,1.15rem + 2vw,2.75rem);line-height:1.02;letter-spacing:-.03em}
/* Guide headings stay in the 44 to 65px range, so they keep the small or L fallback face
   (pages.css moves the landing-page sizes to the M face) */
@media (min-width:961px){
  .gd .faq-title,.gd-h2{font-family:var(--display)}
  .gd-hero .gd-title{font-family:var(--display-l)}
}
.gd-sec>*+*{margin-top:1.1rem}
.gd-sec>ul,.gd-sec>ol,.gd-sec>ul+*,.gd-sec>ol+*{margin-top:clamp(1.4rem,2.5vw,1.9rem)}
.gd-sec .copy{max-width:36rem;line-height:1.6}
/* Each section opens on a short paragraph in ink, a size up: the focal point of the
   section, in the idiom of the landing pages' prose sections */
.gd-sec>.copy:first-of-type{font-size:clamp(1.0625rem,1.25vw,1.2rem);line-height:1.55;color:var(--ink);max-width:34rem}
/* Notes such as the legal and accounting reminders: smaller and quieter, same measure,
   and set off from the copy above them by the gap a list takes */
.gd-note{margin:0;font-size:.9375rem;line-height:1.5;color:var(--ink-3);max-width:36rem;text-wrap:pretty}
.gd-sec>*+.gd-note{margin-top:clamp(1.4rem,2.5vw,1.9rem)}

/* ---------- Index: the guides as whole-row links between hairlines ---------- */
.gd-index{list-style:none;margin:0;padding:0;border-top:1px solid var(--ink)}
.gd-index li{border-bottom:1px solid var(--rule);transition:border-color .5s}
.gd-index a{
  display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;
  gap:.5rem clamp(1.25rem,3vw,2.5rem);align-items:center;min-height:44px;
  padding:clamp(1.4rem,2.6vw,2.1rem) 0;
}
.gd-index-name{
  grid-column:1;grid-row:1;font-family:var(--display);font-weight:700;
  font-size:clamp(1.3rem,1.05rem + 1.1vw,1.9rem);letter-spacing:-.025em;line-height:1.12;
  color:var(--ink);max-width:22em;text-wrap:balance;overflow-wrap:break-word;
}
.gd-index-desc{grid-column:1;grid-row:2;font-size:clamp(.98rem,1.05vw,1.0625rem);line-height:1.5;color:var(--ink-2);max-width:36rem;text-wrap:pretty}
/* The reading time follows the summary, as a quiet line of metadata */
.gd-index-time{grid-column:1;grid-row:3;margin-top:.35rem}
.gd-index .arrow{grid-column:2;grid-row:1 / span 3;margin:0;font-size:1.15rem;color:var(--ink)}

/* ---------- Hover, for pointers that can hover ---------- */
@media (hover:hover) and (pointer:fine){
  .gd-toc li:hover,.gd-index li:hover{border-bottom-color:var(--ink)}
  .gd-index a:hover .arrow{transform:translateX(4px)}
}

/* ---------- Responsive ---------- */
@media (max-width:960px){
  /* The contents list sits above the article and loses its sticky position (pages.css);
     the gap under it matches the gap between sections, so the first section does not
     read as a continuation of the list */
  .gd-toc{margin-bottom:clamp(2.5rem,5vw,3.5rem)}
  /* The FAQ restacks to one column on phones and tablets. styles.css carries the same
     rule, but a stray brace in its hover block (line 313) stops browsers from reading its
     960px block, so the guides state it here until that file is repaired. */
  .faq-grid{grid-template-columns:1fr}
  .faq-intro{position:static}
}
/* Tablets: the contents list runs in two hairline columns, as the tag lists do, instead
   of one tall column of short links */
@media (min-width:600px) and (max-width:960px){
  .gd-toc ol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:clamp(1.5rem,3vw,3rem)}
}
@media (max-width:760px){
  .gd-index a{gap:.4rem 1rem}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .gd-toc li,.gd-index li{transition:none}
}
