/* Guide pages + index (content engine). Layered on shared.css.
   Fully token-driven (audit wave): every color references the CSS vars so the
   per-tenant dark palette flips this file with zero extra rules. */
.guide-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.guide-header .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.guide-header__brand { font-weight: 700; color: var(--brand-color); text-decoration: none; }
.guide-header__guides { color: var(--ink); text-decoration: none; font-size: .92rem; }
.breadcrumb { background: var(--wash); font-size: .82rem; }
.breadcrumb .container { padding: 8px 20px; color: var(--text-muted); }
.breadcrumb a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb span[aria-current] { color: var(--ink); }

.guide-hero { position: relative; background: #111; color: #fff; }
.guide-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.guide-hero__inner { position: relative; padding: 48px 20px; max-width: 840px; }
.guide-hero__cluster { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--brand-accent); margin: 0 0 8px; }
.guide-hero__cluster a { color: inherit; text-decoration: none; }
.guide-hero__cluster a:hover { text-decoration: underline; }
.guide-hero h1 { margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; }
.guide-hero__intro { margin: 0; color: #e5e7eb; max-width: 60ch; }
.guide-hero__meta { margin: 14px 0 0; color: #cbd5e1; font-size: .82rem; letter-spacing: .02em; }
.guide-hero__meta time { color: #e2e8f0; }

.ad-slot[data-status="reserved"] { min-height: 90px; }

.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding: 32px 20px; align-items: start; }
.guide-toc { position: sticky; top: 16px; font-size: .88rem; }
.guide-toc__title { text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; color: var(--text-muted); margin: 0 0 8px; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.guide-toc li { margin: 0; }
.guide-toc a { display: block; padding: 5px 12px; color: var(--ink); text-decoration: none; border-left: 2px solid transparent; margin-left: -2px; }
.guide-toc a:hover { color: var(--brand-color); border-left-color: var(--brand-color); }
.guide-toc a.is-current { color: var(--brand-color); border-left-color: var(--brand-color); font-weight: 650; }

.guide-body { max-width: 72ch; min-width: 0; font-size: 1.04rem; line-height: 1.7; color: var(--ink); }
.guide-body h2 { margin: 2em 0 .6em; font-size: 1.5rem; scroll-margin-top: 16px; }
.guide-body h3 { margin: 1.4em 0 .4em; font-size: 1.2rem; }
.guide-body p { margin: 0 0 1.1em; }
.guide-body ul, .guide-body ol { margin: 0 0 1.1em 1.2em; }
.guide-body li { margin: .3em 0; }
.guide-body svg { display: block; max-width: 100%; height: auto; margin: 1.4em auto; }
/* Inline-SVG typography: consistent system-sans + crisp rendering for every illustration
   (the global half of the SVG Design Standard; per-figure geometry is fixed in the markup). */
.guide-body svg text { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-rendering: geometricPrecision; }
.guide-body details { margin: 1em 0; border: 1px solid var(--line); border-radius: 6px; padding: .4em .8em; }
.guide-body details > summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
.guide-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.guide-body th, .guide-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.guide-body th { background: var(--wash); }
/* Wide cost/data tables scroll inside this wrapper instead of blowing out the grid column at 390px
   (pairs with min-width:0 on .guide-body + minmax(0,1fr) tracks). The <table> keeps its semantics
   for screen readers - the wrapper scrolls, not the table (vs display:block which can drop the role). */
.guide-table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.guide-body a:not(.btn):not(.btn-primary):not(.btn-ghost) { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
/* .btn keeps its asserted-safe white-on-brand (design.js asserts white-on-brand >=4.5); the body
   link-color rule must NOT recolor buttons (was: accent-ink text on the brand-bg .btn = 1.25 contrast fail). */

.callout { border-radius: 8px; padding: 14px 18px; margin: 1.4em 0; border-left: 4px solid; }
.callout__label { text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; font-weight: 700; margin: 0 0 6px; }
.callout--tip { background: color-mix(in srgb, #16a34a 10%, var(--paper)); border-color: #16a34a; }
.callout--warning { background: color-mix(in srgb, #d97706 12%, var(--paper)); border-color: #d97706; }
.callout--key-takeaway { background: color-mix(in srgb, #2563eb 10%, var(--paper)); border-color: #2563eb; }
.callout--danger { background: color-mix(in srgb, #dc2626 10%, var(--paper)); border-color: #dc2626; }
.callout--note { background: color-mix(in srgb, #64748b 10%, var(--paper)); border-color: #64748b; }
.callout--info { background: color-mix(in srgb, #0ea5e9 10%, var(--paper)); border-color: #0ea5e9; }
.callout p:last-child { margin-bottom: 0; }

.guide-faq { margin-top: 2.4em; }
.faq-item { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; margin-right: 10px; color: var(--brand-color); font-weight: 700; }
.faq-item[open] summary::before { content: "\2212"; }
.faq-item__a { padding: 0 0 12px; color: var(--ink); }

.guide-signup { margin-top: 2.4em; background: var(--wash); border-radius: 10px; padding: 22px; }
.guide-signup form { display: flex; gap: 8px; flex-wrap: wrap; }
.guide-signup input { flex: 1 1 220px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }

.guide-related { background: var(--wash); padding: 32px 0; margin-top: 32px; }
.related-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0 0; padding: 0; }
.related-card a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 16px; text-decoration: none; color: var(--ink); font-weight: 600; }
.guide-pager { display: flex; justify-content: space-between; gap: 16px; padding: 24px 20px; }
.guide-pager a { color: var(--accent-ink); text-decoration: none; max-width: 45%; }
.guide-pager__next { margin-left: auto; text-align: right; }

/* index */
.guides-index__main { padding: 32px 20px; }
.guides-index__lede { color: var(--text-muted); max-width: 62ch; }
.guides-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }

@media (max-width: 760px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .guide-toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
  .guide-toc[data-collapsible] ol { display: none; }
  .guide-toc[data-collapsible].is-open ol { display: block; }
  .guide-toc__title { cursor: pointer; }
  .guide-toc__title::after { content: " +"; color: var(--brand-color); }
  .guide-toc.is-open .guide-toc__title::after { content: " \2212"; }
}
