/* ============================================================
   guides.css — engineering guide pages (/guides/*)
   Builds on sae.css tokens; loaded only by guide pages.
   ============================================================ */

/* page head */
.g-crumb{ font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.g-crumb a{ color: var(--ink-3); }
.g-crumb a:hover{ color: var(--accent); }
.g-crumb span[aria-hidden]{ margin: 0 8px; }
.g-head h1{ margin-top: 18px; max-width: 22ch; font-size: clamp(34px, 5vw, 62px); }
.g-head .lead{ margin-top: 22px; }
.g-meta{ display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* layout: sticky contents + article */
.g-layout{ display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 960px){ .g-layout{ grid-template-columns: minmax(0, 1fr); } }
.g-toc{ position: sticky; top: 96px; font-size: 14px; }
.g-toc .mono{ display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 12px; }
.g-toc ol{ list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.g-toc li a{ display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); line-height: 1.35; }
.g-toc li a:hover, .g-toc li a.is-active{ color: var(--ink); border-left-color: var(--accent); }
@media (max-width: 960px){ .g-toc{ position: static; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; } }

/* article typography */
.g-article{ max-width: 76ch; }
.g-article > section{ scroll-margin-top: 96px; padding-top: 8px; margin-top: 56px; }
.g-article > section:first-child{ margin-top: 0; }
.g-article h2{ font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 18px; }
.g-article h3{ font-size: 19px; font-weight: 500; letter-spacing: -0.01em; margin: 32px 0 10px; }
.g-article p, .g-article li{ color: var(--ink-2); line-height: 1.7; }
.g-article p{ margin: 0 0 16px; }
.g-article ul, .g-article ol{ margin: 0 0 18px; padding-left: 22px; }
.g-article li{ margin-bottom: 7px; }
.g-article strong{ color: var(--ink); font-weight: 500; }
/* links inside running text only — buttons and cards keep their own styles */
.g-article :is(p, li, td, caption) a{ color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.g-article code{ font-family: var(--mono); font-size: .88em; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }

/* key takeaways */
.g-tldr{ border: 1px solid var(--line); background: var(--bg-2); border-radius: 12px; padding: 22px 26px; }
.g-tldr .mono{ display: block; font-size: 11px; color: var(--accent); margin-bottom: 10px; }
.g-tldr ul{ margin: 0; }
.g-tldr li:last-child{ margin-bottom: 0; }

/* comparison tables (real <table> markup for snippets / AI retrieval) */
.g-table{ overflow-x: auto; margin: 8px 0 22px; border: 1px solid var(--line); border-radius: 10px; }
.g-table table{ width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 620px; }
.g-table caption{ caption-side: bottom; text-align: left; padding: 10px 14px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); }
.g-table th, .g-table td{ text-align: left; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--line); line-height: 1.45; }
.g-table thead th{ border-top: 0; background: var(--bg-2); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.g-table tbody th{ color: var(--ink); font-weight: 500; }
.g-table td{ color: var(--ink-2); }

/* "From the San Jose line" callout */
.g-note{ border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 12px; padding: 20px 24px; margin: 24px 0; }
.g-note .mono{ display: block; font-size: 11px; color: var(--accent-deep); margin-bottom: 8px; }
.g-note p{ color: var(--ink); margin: 0 0 10px; }
.g-note p:last-child, .g-note ul:last-child{ margin-bottom: 0; }

/* checklist */
.g-check{ list-style: none; padding: 0 !important; }
.g-check li{ position: relative; padding-left: 32px; }
.g-check li::before{ content: ""; position: absolute; left: 0; top: .42em; width: 15px; height: 15px; border: 1.5px solid var(--accent); border-radius: 3px; }

/* inline CTA */
.g-cta{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin: 28px 0; }
.g-cta p{ margin: 0; color: var(--ink); font-weight: 500; max-width: 46ch; }

/* sources */
.g-sources ol{ font-size: 14px; }
.g-sources li{ color: var(--ink-3); }
.g-sources a{ word-break: break-word; }

/* related guides */
.g-related{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.g-related a{ display: block; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; color: var(--ink); text-decoration: none; transition: border-color .2s ease; }
.g-related a:hover{ border-color: var(--accent); }
.g-related .mono{ display: block; font-size: 11px; color: var(--accent); margin-bottom: 8px; }
.g-related strong{ font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }

/* guides index cards */
.g-index{ display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.g-card{ display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 28px; color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.g-card:hover{ border-color: var(--accent); transform: translateY(-2px); }
.g-card .mono{ font-size: 11px; color: var(--accent); }
.g-card h2{ font-size: 23px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; margin: 0; }
.g-card p{ margin: 0; color: var(--ink-2); line-height: 1.6; font-size: 15.5px; }
.g-card .arr{ margin-top: auto; color: var(--accent); font-size: 14px; }
@media (prefers-reduced-motion: reduce){ .g-card:hover{ transform: none; } }
