/* Guides: long-form reading pages. Uses the landing tokens (site.css) and DESIGN.md: one family, surfaces
   separated by tone steps (no rules, no shadows), 14px radius, accent used once per screen. Measure ~66ch. */
body { min-height: 100svh; display: flex; flex-direction: column; }
.g-top, .g-main, .foot { width: 100%; }
.g-cta { min-height: 44px; padding: 0 1.2rem; font-size: var(--step-small); }
.g-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 22px; padding-bottom: 22px; font-weight: 600; font-size: var(--step-small); }
.g-top a { text-decoration: none; }
.g-nav { display: flex; gap: 22px; align-items: center; }
.g-nav a { display: inline-flex; min-height: 44px; align-items: center; }
@media (max-width: 40em) { .g-nav a.link { display: none; } .g-nav { gap: 18px; } }

.g-main { flex: 1; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(4rem, 9vw, 8rem); }
.g-col { max-width: 46rem; margin-inline: auto; }
.g-wide { max-width: 64rem; margin-inline: auto; }

.g-crumbs { font-size: var(--step-small); color: var(--muted); margin-bottom: 2rem; }
.g-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.6rem; margin: 0; padding: 0; list-style: none; }
.g-crumbs li { display: flex; align-items: center; min-height: 44px; }
.g-crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.6rem; }

.g-crumbs [aria-current] { color: var(--ink); }

.g-col h1, .g-wide h1 { font-size: clamp(32px, 5vw, 72px); line-height: 0.96; letter-spacing: -0.05em; margin-bottom: 1.5rem; max-width: 22em; }
.g-wide > .g-body, .g-wide > .g-toc, .g-wide > .g-legal, .g-wide > .g-list, .g-wide > .g-dek, .g-wide > .g-meta, .g-wide > .g-crumbs { max-width: 46rem; margin-inline: 0; }
.g-wide > .g-dek { max-width: 34ch; }
.g-wide > .g-list { margin-inline: 0; }
.g-dek { font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; margin-bottom: 1.25rem; }
.g-meta { color: var(--muted); font-size: var(--step-small); margin-bottom: 2.5rem; }

/* running text */
.g-body { font-size: var(--step-body); line-height: 1.62; }
.g-body p, .g-body li { max-width: 66ch; line-height: 1.62; }
.g-body p + p { margin-top: 1em; }
.g-body h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.05; letter-spacing: -0.035em; margin-top: clamp(3.5rem, 7vw, 5.5rem); margin-bottom: 1rem; text-wrap: balance; }
.g-body h3 { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2.25rem; margin-bottom: 0.6rem; }
.g-body ul, .g-body ol { margin: 0.9rem 0 0; padding-left: 1.3rem; }
.g-body li + li { margin-top: 0.5em; }
.g-body ul + p, .g-body ol + p, .g-body .g-tablewrap + p, .g-body .g-callout + p { margin-top: 1em; }
.g-body li::marker { color: var(--muted); }
.g-body a { text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
.g-body strong { font-weight: 600; }
.g-body code { font-family: inherit; font-weight: 600; background: var(--surface); border-radius: 6px; padding: 0.08em 0.4em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.g-body q, .g-body blockquote { quotes: "\201C" "\201D"; }
.g-body blockquote { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; margin: 1.25rem 0 0; max-width: 66ch; }
.g-body blockquote p { margin: 0; }
.g-body blockquote cite { display: block; margin-top: 0.6rem; color: var(--muted); font-size: var(--step-small); font-style: normal; }

/* contents */
.g-toc { background: var(--surface); border-radius: var(--radius); padding: 22px; margin-bottom: 3rem; }
.g-toc-title { font-weight: 600; font-size: var(--step-lead); letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.g-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.15rem; }
.g-toc a { display: block; padding-block: 0.3rem; text-decoration-color: transparent; text-underline-offset: 0.2em; }
@media (hover: hover) and (pointer: fine) { .g-toc a:hover { text-decoration-color: currentColor; } }

/* callouts: tone step, no border */
.g-callout { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; margin: 1.5rem 0 0; max-width: 66ch; }
.g-callout p { max-width: none; }
.g-callout-title { font-weight: 600; margin-bottom: 0.35rem; }
.g-legal { background: var(--field-1); color: var(--field-1-ink); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 2.5rem; max-width: 66ch; font-size: var(--step-small); line-height: 1.5; font-weight: 600; }
.g-legal p { max-width: none; }
.g-legal a { text-decoration-thickness: 0.07em; }

/* tables: rows are tone steps, labels muted, no lines */
.g-tablewrap { margin-top: 1.25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.g-table { width: 100%; min-width: 34rem; border-collapse: separate; border-spacing: 0 6px; font-size: var(--step-body); line-height: 1.45; }
.g-table th, .g-table td { text-align: left; vertical-align: top; padding: 14px 18px; background: var(--surface); }
.g-table thead th { background: transparent; color: var(--muted); font-weight: 600; font-size: var(--step-small); padding-block: 4px 6px; }
.g-table tbody th { font-weight: 600; border-radius: var(--radius) 0 0 var(--radius); white-space: nowrap; }
.g-table tbody td:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.g-table code { background: var(--surface-2); }
.g-table .num { font-variant-numeric: tabular-nums; }

/* formula cards (hook guide) */
.g-formula { background: var(--surface); border-radius: var(--radius); padding: 22px; margin-top: 1.25rem; max-width: 66ch; }
.g-formula .shape { font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 0.9rem; max-width: none; }
.g-formula dl { margin: 0; display: grid; gap: 0.7rem; }
.g-formula dt { color: var(--muted); font-size: var(--step-small); font-weight: 600; }
.g-formula dd { margin: 0; max-width: none; }
.g-formula dd ul { margin: 0.2rem 0 0; }
.g-formula dd + dt { margin-top: 0.3rem; }
.g-body h3 + .g-formula { margin-top: 0.75rem; }

/* sources */
.g-sources { font-size: var(--step-small); line-height: 1.5; }
.g-sources li { max-width: none; }

/* closing block */
.g-close { background: var(--surface); border-radius: var(--radius); padding: 22px; margin-top: 1.25rem; max-width: 66ch; }
.g-close p { max-width: none; }
.g-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.g-actions a { display: inline-flex; align-items: center; min-height: 3.25rem; padding: 0 1.6rem; border-radius: var(--pill); font-weight: 600; text-decoration: none; background: var(--surface-2); color: var(--ink); }
.g-actions a.primary { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .g-actions a:hover { background: var(--surface-2); filter: brightness(1.15); } .g-actions a.primary:hover { background: var(--accent-strong); filter: none; } }

/* hub */
.g-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 14px; }
.g-list a { display: block; background: var(--surface); border-radius: var(--radius); padding: 22px; text-decoration: none; transition: background var(--t-hover) ease; }
.g-list .t { display: block; font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.g-list .d { display: block; margin-top: 0.6rem; color: var(--muted); max-width: 60ch; line-height: 1.5; }
@media (hover: hover) and (pointer: fine) { .g-list a:hover { background: var(--surface-2); } }


@media (max-width: 40em) {
  .g-wide h1 { line-height: 1.02; }
  .g-body { font-size: 17px; }
  .g-toc, .g-formula, .g-close, .g-list a { padding: 18px; }
}
@media print { .g-top, .foot { display: none; } }
.g-table.ids td:nth-child(2) { white-space: nowrap; }
@media (max-width: 40em) {
  .g-wide h1 { font-size: 28px; }
  .g-body h2 { font-size: 24px; }
  .g-tablewrap { overflow: visible; }
  .g-table { min-width: 0; display: block; }
  .g-table thead { display: none; }
  .g-table tbody, .g-table tr { display: block; }
  .g-table tr { background: var(--surface); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 8px; }
  .g-table th, .g-table td { display: block; padding: 0; background: transparent; border-radius: 0; white-space: normal; }
  .g-table tbody th { font-size: var(--step-lead); margin-bottom: 0.4rem; border-radius: 0; }
  .g-table td { margin-top: 0.5rem; }
  .g-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: var(--step-small); font-weight: 600; }
  .g-table tbody td:last-child { border-radius: 0; }
  .g-table.ids td:nth-child(2) { white-space: normal; }
}

