/* The guides (/guides): static pages that reuse the site's header, footer, buttons and tokens
   from styles.css. Only what is specific to reading a long article lives here. */

.guide { padding-bottom: var(--section); }
.guide-head { display: grid; gap: 18px; justify-items: start; padding-block: clamp(36px, 5vw, 76px) clamp(28px, 3.4vw, 44px); border-bottom: var(--frame); animation: guide-rise var(--slow) var(--ease-out) both; }
.guide-crumb a { display: inline-block; padding: 3px 10px; background: var(--yellow); font-family: var(--face-display); font-size: var(--font-micro); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
.guide-crumb a:hover { background: var(--yellow-deep); }
.guide-head h1 { font-size: clamp(34px, 4.6vw, 64px); max-width: 22ch; }
.guide-lede { font-size: var(--font-lede); line-height: 1.45; color: var(--ink-2); max-width: 62ch; }
.guide-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: var(--font-small); color: var(--ink-3); }
.guide-meta span + span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 20px; background: var(--ink-3); vertical-align: middle; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.guide-actions .text-link { font-size: 16px; }
.guide-actions .button.is-copied { background: var(--yellow); }

.guide-layout { display: grid; grid-template-columns: minmax(200px, .4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 88px); align-items: start; padding-top: clamp(28px, 3.4vw, 44px); }
.guide-toc { position: sticky; top: 104px; max-height: calc(100dvh - 128px); overflow: auto; }
.guide-toc p { margin-bottom: 8px; font-family: var(--face-display); font-size: var(--font-micro); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.guide-toc ol { margin: 0; padding: 0; list-style: none; display: grid; }
.guide-toc li { border-bottom: var(--hair); }
.guide-toc a { display: block; padding: 9px 0 9px 12px; border-left: 3px solid transparent; font-size: var(--font-caption); line-height: 1.3; color: var(--ink-2); text-decoration: none; transition: color var(--fast) ease, border-color var(--fast) ease; }
.guide-toc a:hover { color: var(--ink); }
.guide-toc a.is-current { border-left-color: var(--yellow); color: var(--ink); font-weight: 650; }

.guide-body { max-width: 760px; min-width: 0; font-size: 18px; line-height: 1.62; }
.guide-body > * + * { margin-top: 1.05em; }
.guide-body h2 { margin-top: 2em; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; scroll-margin-top: 104px; }
.guide-body h2:first-child { margin-top: 0; }
.guide-body h3 { margin-top: 1.7em; font-size: 22px; line-height: 1.2; scroll-margin-top: 104px; }
.guide-body p, .guide-body li { color: var(--ink-2); }
.guide-body strong { color: var(--ink); font-weight: 650; }
.guide-body a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--yellow-deep); text-underline-offset: 3px; transition: background-color var(--fast) ease; }
.guide-body a:hover { background: var(--yellow-wash); }
.guide-body ul, .guide-body ol { display: grid; gap: .5em; padding-left: 1.3em; }
.guide-body ul { list-style: square; }
.guide-body ol { list-style: decimal; }
.guide-body li::marker { color: var(--ink); font-weight: 650; }
.guide-body blockquote { margin-inline: 0; padding: 14px 18px; border-left: 4px solid var(--yellow); background: var(--paper-2); }
.guide-body blockquote p { color: var(--ink); }
.guide-code { position: relative; padding: 18px 20px; border-radius: var(--radius-3); background: var(--ink); color: var(--paper); font-family: var(--face-mono); font-size: 15px; line-height: 1.55; overflow-x: auto; tab-size: 2; }
.guide-code[data-lang]::before { content: attr(data-lang); position: absolute; top: 0; right: 0; padding: 2px 10px; border-bottom-left-radius: var(--radius-2); background: var(--ink-line); color: var(--on-ink-2); font-family: var(--face-display); font-size: var(--font-micro); font-weight: 700; text-transform: uppercase; }
.guide-code code { padding: 0; background: none; font: inherit; color: inherit; }
.guide-table { overflow-x: auto; border: var(--frame); border-radius: var(--radius-2); }
.guide-table table { width: 100%; border-collapse: collapse; font-size: var(--font-small); line-height: 1.4; }
.guide-table th, .guide-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: var(--hair); }
.guide-table th { background: var(--ink); color: var(--paper); font-family: var(--face-display); font-size: var(--font-small); white-space: nowrap; }
.guide-table tbody tr:last-child td { border-bottom: 0; }
.guide-table td:first-child { color: var(--ink); font-weight: 650; }
.guide-table td { color: var(--ink-2); }

.guide-cta { margin-top: clamp(48px, 6vw, 88px); padding: clamp(24px, 3.4vw, 44px); background: var(--yellow); border-radius: var(--radius-3); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; }
.guide-cta h2 { font-size: clamp(26px, 2.8vw, 38px); }
.guide-cta p { margin-top: 8px; color: var(--on-yellow-2); max-width: 56ch; }
.guide-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.guide-cta .button-quiet { background: transparent; }
.guide-cta .button-quiet:hover { background: var(--yellow-deep); }
.guide-cta :focus-visible { box-shadow: 0 0 0 6px var(--paper); }

.guide-more { margin-top: clamp(48px, 6vw, 88px); }
.guide-more > h2 { font-size: clamp(26px, 2.8vw, 38px); margin-bottom: 20px; }
.guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--frame); }
.guide-cards-index { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
.guide-card { display: grid; gap: 12px; align-content: start; grid-template-rows: auto 1fr auto; padding: 24px clamp(16px, 2.4vw, 32px) 24px 0; border-bottom: var(--hair); }
.guide-card + .guide-card { padding-left: clamp(16px, 2.4vw, 32px); border-left: var(--hair); }
.guide-cards-index .guide-card { padding: clamp(22px, 3vw, 36px); border: 0; border-bottom: var(--frame); transition: background-color var(--base) ease; }
.guide-cards-index .guide-card:nth-child(odd) { padding-left: 0; }
.guide-cards-index .guide-card:nth-child(even) { border-left: var(--hair); }
.guide-cards-index .guide-card:hover { background: var(--paper-2); }
.guide-cards-index .guide-card:nth-child(odd):hover { box-shadow: -24px 0 0 var(--paper-2); }
.guide-card h2 { font-size: 24px; line-height: 1.15; }
.guide-cards-index .guide-card h2 { font-size: clamp(24px, 2.4vw, 32px); }
.guide-card h2 a { text-decoration: none; }
.guide-card h2 a:hover { text-decoration: underline; text-decoration-color: var(--yellow-deep); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.guide-card > p { color: var(--ink-2); font-size: var(--font-small); }
.guide-card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: var(--font-micro); color: var(--ink-3); }
.guide-card-meta .text-link { font-size: 16px; color: var(--ink); }
.guide-index-head { border-bottom: var(--frame); }

@keyframes guide-rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 760px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-toc { position: static; max-height: none; padding-bottom: 8px; }
  .guide-body { font-size: 17px; }
  .guide-cta { grid-template-columns: minmax(0, 1fr); }
  .guide-cards, .guide-cards-index { grid-template-columns: minmax(0, 1fr); }
  .guide-card, .guide-card + .guide-card, .guide-cards-index .guide-card, .guide-cards-index .guide-card:nth-child(even) { padding: 22px 0; border-left: 0; }
  .guide-cards-index .guide-card:nth-child(odd):hover { box-shadow: none; }
  .guide-meta span + span::before { margin-right: 12px; }
  .guide-meta { gap: 6px 12px; }
}

@media print {
  .guide-toc, .guide-actions, .guide-cta, .guide-more { display: none !important; }
  .guide-layout { display: block; }
  .guide-body { max-width: none; font-size: 10.5pt; }
  .guide-code { background: #f4f4f5; color: #0c0c0d; white-space: pre-wrap; }
}
