/* ─────────────────────────────────────────────────────────────────────────────
   Notey — guides. Loaded after style.css and built only from its tokens, so a
   guide is recognisably the same site as the landing page.

   Pages are generated by scripts/build-guides.py. No script runs here: the
   table of contents is plain anchors, and the CSP (style-src 'self', no
   'unsafe-inline') is why nothing below is ever set through a style attribute.
   ───────────────────────────────────────────────────────────────────────────── */

.guide { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(3rem, 7vw, 5rem); }

/* Breadcrumb */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1.75rem; padding: 0; font-size: .85rem; color: var(--ink-faint); }
.crumbs li { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(28rem, 100%); }
.crumbs li:last-child { flex: 1 1 0; }
.crumbs [aria-current]::before { margin-right: .35rem; }

/* Header. The landing page's h1 is a hero size; a guide's is a title. */
.guide-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.guide-head .tag a { color: inherit; text-decoration: none; }
.guide-head .tag a:hover { text-decoration: underline; }
.guide-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 1rem; }
.guide-lede { font-size: clamp(1.05rem, 1.8vw, 1.2rem); line-height: 1.55; color: var(--ink-muted); margin: 0 0 1rem; text-wrap: pretty; }
.guide-meta { font-size: .88rem; color: var(--ink-faint); margin: 0; }

/* Layout: the contents list sits beside the text on a wide screen and above
   it on a narrow one. One element either way. */
.guide-layout { display: grid; grid-template-columns: minmax(0, 44rem); gap: 2rem; }
@media (min-width: 64rem) {
  .guide-layout.has-toc { grid-template-columns: 14rem minmax(0, 44rem); gap: 3.5rem; }
  .guide-layout.has-toc .toc { position: sticky; top: 5rem; align-self: start; max-height: calc(100vh - 6rem); overflow-y: auto; }
}
.toc { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-card); padding: 1rem 1.1rem; font-size: .88rem; }
@media (min-width: 64rem) { .toc { border: 0; background: none; padding: .25rem 0 0; } }
.toc-title { font-weight: 700; color: var(--ink); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.toc a { color: var(--ink-muted); text-decoration: none; line-height: 1.4; display: block; }
.toc a:hover { color: var(--accent); }

/* The text. style.css already sets `article { padding }` and small article
   headings for the policy page; the guide overrides both. */
article.prose { padding: 0; font-size: 1.05rem; line-height: 1.7; }
.prose > * + * { margin-top: 0; }
.prose p, .prose li { color: var(--ink-muted); text-wrap: pretty; }
.prose p { margin: 0 0 1.15rem; }
.prose strong { color: var(--ink); }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.7rem); line-height: 1.2; letter-spacing: -.02em; margin: 2.75rem 0 .9rem; scroll-margin-top: 5rem; }
.prose h3 { font-size: 1.15rem; line-height: 1.3; margin: 1.9rem 0 .5rem; scroll-margin-top: 5rem; }
.prose h2:first-child { margin-top: 0; }
.prose a { color: var(--accent); text-underline-offset: .15em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: .45rem; padding-left: .2rem; }
.prose li::marker { color: var(--accent); }
.prose ol li::marker { font-family: var(--mono); font-size: .85em; font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--panel); border: 1px solid var(--line); border-radius: .35rem; padding: .05rem .3rem; }
.prose pre { background: var(--dark); color: var(--dark-ink); border-radius: var(--r-card); padding: 1rem 1.15rem; overflow-x: auto; margin: 0 0 1.4rem; font-size: .88rem; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--card); border-radius: var(--r-control); padding: .95rem 1.15rem; margin: 0 0 1.4rem; box-shadow: var(--shadow-raised); }
.callout p { margin: 0 0 .6rem; font-size: .97rem; }
.callout p:last-child { margin: 0; }
/* Amber, not red: red is reserved for the recording indicator. */
.callout-caution { border-left-color: hsl(38 92% 42%); }
.callout-law { border-left-color: var(--ink); background: var(--panel); }

.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
.prose table { border-collapse: collapse; width: 100%; font-size: .93rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--panel); color: var(--ink); font-weight: 700; font-size: .85rem; }
.prose tbody th { color: var(--ink); font-weight: 600; }
.prose td { color: var(--ink-muted); }
.prose tbody tr:last-child > * { border-bottom: 0; }

.shot { margin: 0 0 1.6rem; }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--r-card); border: 1px solid var(--line); box-shadow: var(--shadow-lifted); background: var(--card); }
.shot figcaption { font-size: .86rem; color: var(--ink-faint); margin-top: .6rem; text-align: center; }

/* The call to action: one quiet card after the text, never inside it. */
.guide-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; max-width: 60rem; margin: clamp(2.5rem, 6vw, 4rem) 0 0; padding: 1.35rem 1.5rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel); }
.guide-cta > div { flex: 1 1 22rem; }
.guide-cta p { margin: 0; font-size: .95rem; }
.guide-cta p + p { margin-top: .35rem; }
.guide-cta .guide-cta-title { color: var(--ink); font-weight: 650; margin-bottom: .3rem; }
.guide-cta .guide-cta-fine { color: var(--ink-faint); font-size: .84rem; }

/* Cards: related guides and the index. */
.related { margin-top: clamp(2.5rem, 6vw, 4rem); }
.related h2, .guide-cluster h2 { font-size: clamp(1.35rem, 2.4vw, 1.6rem); letter-spacing: -.02em; margin: 0 0 .5rem; }
.related h2 { margin-bottom: 1.1rem; }
.guide-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.guide-card a { display: flex; flex-direction: column; gap: .4rem; height: 100%; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-raised); text-decoration: none; transition: box-shadow var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out); }
.guide-card a:hover { border-color: hsl(205 90% 36% / .45); box-shadow: var(--shadow-lifted); transform: translateY(-1px); }
.guide-card b { color: var(--ink); font-size: 1.02rem; line-height: 1.35; letter-spacing: -.01em; }
.guide-card-cluster { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.guide-card-desc { color: var(--ink-muted); font-size: .9rem; line-height: 1.5; }
.guide-card-meta { color: var(--ink-faint); font-size: .8rem; margin-top: auto; padding-top: .3rem; }
.guide-index .guide-card-cluster { display: none; }

.cluster-nav ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.cluster-nav a { display: inline-block; font-size: .86rem; font-weight: 600; padding: .38rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-muted); text-decoration: none; }
.cluster-nav a:hover { color: var(--accent); border-color: hsl(205 90% 36% / .45); }
.guide-cluster { padding-top: clamp(2rem, 5vw, 3rem); scroll-margin-top: 4rem; }
.guide-cluster .sub { margin-bottom: 1.25rem; max-width: 42rem; }

/* The short answer: the opening sentences of a guide, boxed, so the answer
   to the question in the title is the first thing read. */
.guide-answer { border: 1px solid hsl(205 90% 36% / .25); background: var(--accent-wash); border-radius: var(--r-card); padding: 1rem 1.2rem; margin: 0 0 1.5rem; }
.guide-answer p { margin: 0; color: var(--ink); font-size: 1.07rem; line-height: 1.6; }
.prose .guide-answer p { color: var(--ink); }
.prose .guide-answer .guide-answer-label, .guide-answer-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 .35rem; }
.guide-meta a { color: inherit; }
.guide-meta a:hover { color: var(--accent); }
.table-wrap:focus-visible { outline-offset: 2px; }

/* Previous and next within the topic. */
.guide-pager { display: grid; grid-template-columns: 1fr; gap: .75rem; max-width: 60rem; margin: clamp(2rem, 5vw, 3rem) 0 0; }
@media (min-width: 40rem) { .guide-pager { grid-template-columns: 1fr 1fr; } }
.guide-pager-title { grid-column: 1 / -1; margin: 0; font-size: .9rem; color: var(--ink-faint); }
.guide-pager-title a { color: var(--ink); font-weight: 650; text-decoration: none; }
.guide-pager-title a:hover { color: var(--accent); }
.guide-pager > a { display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; line-height: 1.35; }
.guide-pager > a:hover { border-color: hsl(205 90% 36% / .45); color: var(--accent); }
.guide-pager > a span { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.guide-pager .pager-next { text-align: right; }
@media (min-width: 40rem) { .guide-pager .pager-next:only-of-type { grid-column: 2; } }

/* Index and hubs. */
.guide-cluster h2 a { color: inherit; text-decoration: none; }
.guide-cluster h2 a:hover { color: var(--accent); }
.guide-cluster-more { margin: 1rem 0 0; font-size: .92rem; }
.guide-cluster-more a { color: var(--accent); font-weight: 600; text-decoration: none; }
.guide-cluster-more a:hover { text-decoration: underline; }
.guide-cluster-more a::after { content: " →"; }
.hub-start { padding-top: .5rem; }
.hub-start h2 { font-size: clamp(1.35rem, 2.4vw, 1.6rem); letter-spacing: -.02em; margin: 0 0 1rem; }
.hub-start .guide-grid { grid-template-columns: minmax(0, 36rem); }
.hub-topics { margin-top: clamp(2.5rem, 6vw, 4rem); }
.cluster-nav a[aria-current] { color: var(--accent); border-color: hsl(205 90% 36% / .45); }

/* Every guide on one page. */
.sitemap-groups { columns: 20rem auto; column-gap: 3rem; }
.sitemap-group { break-inside: avoid; margin: 0 0 2rem; }
.sitemap-group h2 { font-size: 1.1rem; letter-spacing: -.01em; margin: 0 0 .6rem; }
.sitemap-group h2 a { color: var(--ink); text-decoration: none; }
.sitemap-group h2 a:hover { color: var(--accent); }
.sitemap-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.sitemap-group li a { color: var(--ink-muted); text-decoration: none; font-size: .93rem; line-height: 1.4; }
.sitemap-group li a:hover { color: var(--accent); }

/* Every topic, on every guide page, above the site footer. */
.guides-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 2rem 0 1.75rem; }
.guides-foot-title { font-weight: 700; color: var(--ink); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 .8rem; }
.guides-foot ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .45rem 1.5rem; }
.guides-foot a { color: var(--ink-muted); text-decoration: none; font-size: .9rem; }
.guides-foot a:hover { color: var(--accent); }
.guides-foot-more { margin: 0; font-size: .86rem; color: var(--ink-faint); }

@media (prefers-reduced-motion: reduce) {
  .guide-card a { transition: none; }
  .guide-card a:hover { transform: none; }
}
