/* The guide pages (/guides, /guides/<slug>, /glossary), written by scripts/build-seo-pages.mjs.
   They reuse tokens.css and academy.css (header, footer, lesson links, covers); this file only sets the reading column. */

body.pg-guide { min-height: 100svh; display: flex; flex-direction: column; }
.pg-guide main { flex: 1; }

.gd { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px var(--gut) 96px; color: var(--ink); }
.gd--hub, .gd--glossary { max-width: 980px; }

.gd-crumbs ol { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.gd-crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.gd-crumbs li + li::before { content: "/"; color: var(--ink-2); }
.gd-crumbs a { color: var(--ink-2); text-decoration: none; }
.gd-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.gd-crumbs [aria-current] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

.gd h1 { font-size: 48px; line-height: 52px; letter-spacing: -.028em; font-weight: 700; text-wrap: balance; }
.gd-summary { margin-top: 20px; font-size: 21px; line-height: 33px; color: var(--ink); text-wrap: pretty; }
.gd-by { margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--ink-2); }

.gd h2 { font-size: 30px; line-height: 38px; letter-spacing: -.018em; font-weight: 700; text-wrap: balance; scroll-margin-top: calc(var(--hd-h, 64px) + 16px); }
.gd-sec { margin-top: 56px; }
.gd-sec p, .gd-faq p, .gd-terms p { margin-top: 14px; font-size: 18px; line-height: 30px; color: var(--ink-2); text-wrap: pretty; }
.gd-sec h2 + p { color: var(--ink); }
.gd a:not([class]) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--link-underline); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.gd a:not([class]):hover { text-decoration-color: var(--ink); }

.gd-steps, .gd-bullets { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.gd-steps { counter-reset: st; }
.gd-steps li, .gd-bullets li { position: relative; padding-left: 40px; font-size: 18px; line-height: 30px; color: var(--ink-2); text-wrap: pretty; }
.gd-steps li { counter-increment: st; }
.gd-steps li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; line-height: 1; font-weight: 700; color: var(--ink); background: var(--inner); box-shadow: inset 0 0 0 1px var(--ll-line); }
.gd-bullets li::before { content: ""; position: absolute; left: 10px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--c-aqua-d); }

.gd-key { margin-top: 40px; padding: 24px 28px 26px; border-radius: 12px; background: var(--inner); box-shadow: inset 0 0 0 1px var(--ll-line); }
.gd-key h2 { font-size: 20px; line-height: 28px; letter-spacing: -.01em; }
.gd-key ul { margin: 12px 0 0; padding: 0 0 0 20px; display: grid; gap: 8px; }
.gd-key li { font-size: 17px; line-height: 27px; color: var(--ink); }

.gd-lesson { margin-top: 28px; display: flex; align-items: center; gap: 18px; padding: 10px 18px 10px 10px; border-radius: 12px; color: var(--ink); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--ll-line), var(--sh-1); transition: box-shadow .2s var(--ease, ease); }
.gd-lesson:hover { box-shadow: inset 0 0 0 1px var(--ll-line), var(--sh-hover); }
.gd-lesson-img { flex: none; width: 132px; border-radius: 8px; overflow: hidden; }
.gd-lesson-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gd-lesson-t b { font-size: 17px; line-height: 24px; font-weight: 700; }
.gd-lesson-t span { font-size: 15px; line-height: 22px; color: var(--ink-2); }
.gd-lesson .arr, .gd-rel .arr { flex: none; color: var(--ink-2); transition: transform .25s var(--ease, ease); }
.gd-lesson:hover .arr, .gd-rel:hover .arr { transform: translateX(3px); color: var(--ink); }

.gd-toc { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--ll-line-2); }
.gd-toc h2 { font-size: 15px; line-height: 22px; letter-spacing: 0; color: var(--ink-2); font-weight: 500; }
.gd-toc ol { margin: 10px 0 0; padding: 0 0 0 22px; display: grid; gap: 6px; }
.gd-toc li { font-size: 16px; line-height: 24px; color: var(--ink-2); }
.gd-toc a { color: var(--ink); text-decoration: none; }
.gd-toc a:hover { text-decoration: underline; }

.gd-faq { margin-top: 64px; }
.gd-faq details { border-bottom: 1px solid var(--ll-line-2); }
.gd-faq details:first-of-type { margin-top: 16px; border-top: 1px solid var(--ll-line-2); }
.gd-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::after { content: "+"; flex: none; font-size: 22px; line-height: 1; color: var(--ink-2); transition: transform .2s var(--ease, ease); }
.gd-faq details[open] summary::after { transform: rotate(45deg); }
.gd-faq h3 { font-size: 18px; line-height: 26px; font-weight: 500; letter-spacing: -.005em; }
.gd-faq details p { margin: 0 0 20px; }

.gd-src { margin-top: 56px; }
.gd-src h2, .gd-more h2 { font-size: 22px; line-height: 30px; }
.gd-src ul { margin: 12px 0 0; padding: 0 0 0 20px; display: grid; gap: 6px; }
.gd-src li { font-size: 15px; line-height: 23px; color: var(--ink-2); }
.gd-src a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.gd-src a:hover { color: var(--ink); }

.gd-more { margin-top: 56px; }
.gd-more ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; border-top: 1px solid var(--ll-line-2); }
.gd-rel { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--ll-line-2); color: var(--ink); text-decoration: none; font-size: 17px; line-height: 25px; font-weight: 500; }
.gd-rel:hover { background: var(--inner); }

/* the hub */
.gd-group { margin-top: 56px; }
.gd-cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gd-card { height: 100%; display: grid; align-content: start; gap: 8px; padding: 20px 22px 22px; border-radius: 12px; color: var(--ink); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--ll-line), var(--sh-1); transition: box-shadow .2s var(--ease, ease), transform .2s var(--ease, ease); }
.gd-card:hover { box-shadow: inset 0 0 0 1px var(--ll-line), var(--sh-hover); transform: translateY(-1px); }
.gd-card b { font-size: 19px; line-height: 26px; letter-spacing: -.01em; font-weight: 700; }
.gd-card span { font-size: 15px; line-height: 23px; color: var(--ink-2); }

/* the glossary */
.gd-az { position: sticky; top: var(--hd-h, 64px); z-index: 3; margin: 32px calc(var(--gut) * -1) 0; padding: 10px var(--gut); display: flex; flex-wrap: wrap; gap: 4px; background: rgb(255 255 255 / .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ll-line-2); }
.gd-az a { min-width: 32px; height: 32px; padding: 0 6px; display: grid; place-items: center; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.gd-az a:hover { background: var(--inner); }
.gd-terms, .gd-terms dl { margin: 0; }
.gd-letter { margin-top: 48px; scroll-margin-top: calc(var(--hd-h, 64px) + 64px); }
.gd-letter > h2 { font-size: 34px; line-height: 40px; padding-bottom: 10px; border-bottom: 1px solid var(--ll-line-2); }
.gd-term { padding: 20px 0; border-bottom: 1px solid var(--ll-line-2); scroll-margin-top: calc(var(--hd-h, 64px) + 64px); }
.gd-term dt { font-size: 21px; line-height: 28px; font-weight: 700; letter-spacing: -.01em; }
.gd-term dfn { font-style: normal; }
.gd-term dd { margin: 0; }
.gd-term dd p:first-child { margin-top: 8px; }
.gd-term-more { font-size: 15px !important; line-height: 22px !important; }
.gd-term:target { background: linear-gradient(90deg, rgb(156 231 221 / .28), transparent 70%); }

@media (max-width: 759px) {
  .gd { padding: 20px var(--gut) 72px; }
  .gd-crumbs ol { margin-bottom: 20px; }
  .gd h1 { font-size: 34px; line-height: 39px; }
  .gd-summary { font-size: 18px; line-height: 29px; }
  .gd h2 { font-size: 25px; line-height: 32px; }
  .gd-sec { margin-top: 44px; }
  .gd-sec p, .gd-faq p, .gd-terms p, .gd-steps li, .gd-bullets li { font-size: 17px; line-height: 28px; }
  .gd-key { padding: 20px 20px 22px; }
  .gd-lesson-img { width: 92px; }
  .gd-lesson-t b { font-size: 16px; line-height: 22px; }
  .gd-lesson-t span { font-size: 14px; line-height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .gd-lesson, .gd-card, .gd .arr, .gd-faq summary::after { transition: none; }
}

