/* 925hi guides, glossary, FAQ library, line sheets. Same tokens as site.css (v3 "Precision
   Manufacturing"): dense reference pages, HTML tables, no decoration. */

.g-page { padding-bottom: 56px; }
.g-page .crumbs { padding-bottom: 6px; }
/* shared Crumbs renders nav.crumbs > ol; site.css flexes .crumbs only (reported to lead) */
.g-page .crumbs ol { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
@media (max-width: 899px) { .g-page .crumbs ol { flex-wrap: nowrap; } }
.g-page > .g-more { margin-top: 56px; margin-bottom: -56px; }
.nowrap { white-space: nowrap; }

/* ---------- placeholder highlight (dev + owner review only) ---------- */
.ph-val { background: var(--warning-soft); color: #7A4A07; border-bottom: 1px dashed #C9922E; border-radius: 2px; padding: 0 2px; }

/* ---------- guide layout ---------- */
.g-layout { display: grid; gap: 32px; padding-top: 8px; }
@media (min-width: 1100px) { .g-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; } }
.g-article { min-width: 0; max-width: 880px; }

.g-kicker { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.g-kicker a { color: var(--text-tertiary); text-decoration: none; font-weight: 500; }
.g-kicker a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.g-kicker span { color: var(--border-hover); font-weight: 400; }
.g-head .h1 { max-width: 30ch; }

.g-answer { margin-top: 20px; padding: 16px 20px 18px; background: var(--surface-alt); border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0; }
.g-answer-k { font: 600 11.5px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; }
.g-answer p:last-child { font-size: 16.5px; line-height: 1.6; color: var(--text); max-width: 70ch; }

.g-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; color: var(--text-tertiary); }
.g-meta span { display: inline-flex; align-items: center; gap: 6px; }
.g-meta svg.i { width: 16px; height: 16px; color: var(--success); }

/* mobile "on this page" */
.g-toc-m { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--r-md); }
.g-toc-m summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; color: var(--text); }
.g-toc-m summary::-webkit-details-marker { display: none; }
.g-toc-m summary .muted { font-weight: 400; font-size: 13px; margin-left: auto; }
.g-toc-m summary::after { content: ""; width: 8px; height: 8px; flex: none; border-right: 1.6px solid var(--text-secondary); border-bottom: 1.6px solid var(--text-secondary); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease); }
.g-toc-m[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.g-toc-m ol { padding: 0 16px 12px; }
@media (min-width: 1100px) { .g-toc-m { display: none; } }

/* ---------- body typography ---------- */
.g-body { margin-top: 28px; font-size: 15.5px; line-height: 1.68; }
.g-body > * + * { margin-top: 14px; }
.g-body > p, .g-body > ul, .g-body > ol, .g-body > blockquote { max-width: 72ch; }
.g-body h2 { font: 700 clamp(20px, 1.6vw, 23px)/1.25 var(--font-display); letter-spacing: -.01em; color: var(--text); margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border-soft); scroll-margin-top: calc(var(--header-h) + 16px); }
.g-body h3 { font: 600 17px/1.3 var(--font-display); color: var(--text); margin-top: 24px; }
.g-body strong { color: var(--text); font-weight: 600; }
.g-body a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.g-body a:hover { text-decoration-color: currentColor; }
.g-body ul { list-style: disc; padding-left: 20px; }
.g-body ol { list-style: decimal; padding-left: 22px; }
.g-body li + li { margin-top: 6px; }
.g-body li::marker { color: var(--text-tertiary); }
.g-body blockquote { padding: 14px 18px; border: 1px dashed var(--border-hover); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: 14.5px; }

.g-body h2#sources ~ ul, .g-body h2#sources ~ p { font-size: 13.5px; color: var(--text-tertiary); }

/* ---------- tables (Markdown tables are wrapped by the renderer) ---------- */
.g-tbl { position: relative; margin-top: 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.g-body > .g-tbl:first-child { margin-top: 0; }
.g-tbl-in, .g-tbl[role="region"] { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.g-tbl-in:focus-visible, .g-tbl[role="region"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.g-tbl table { font-size: 14px; line-height: 1.45; min-width: 100%; }
.g-tbl th, .g-tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.g-tbl thead th { font-size: 12.5px; font-weight: 600; color: var(--text-tertiary); background: var(--surface-alt); border-bottom-color: var(--border); white-space: nowrap; }
.g-tbl tbody tr:last-child > * { border-bottom: 0; }
.g-tbl tbody tr:hover > * { background: #FAFBFB; }
.g-tbl tbody td { font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.g-tbl tbody td:first-child, .g-tbl tbody th { color: var(--text); font-weight: 600; }
.g-tbl a { color: var(--accent); text-decoration: none; }
.g-tbl a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* sticky first column + scroll affordance when the table is wider than the screen */
.g-tbl[data-overflow] tbody td:first-child, .g-tbl[data-overflow] tbody th:first-child, .g-tbl[data-overflow] thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border-soft); }
.g-tbl[data-overflow] thead th:first-child { background: var(--surface-alt); }
.g-tbl[data-overflow]::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; pointer-events: none; background: linear-gradient(to left, rgba(var(--ink-rgb), .10), rgba(var(--ink-rgb), 0)); transition: opacity .2s; }
.g-tbl[data-overflow][data-end]::after { opacity: 0; }
.g-tbl-hint { display: flex; align-items: center; gap: 6px; margin-top: 6px !important; font-size: 12.5px; color: var(--text-tertiary); }
.g-tbl-hint svg.i { width: 14px; height: 14px; }
@media (max-width: 639px) {
  .g-tbl th, .g-tbl td { padding: 9px 10px; }
  .g-tbl thead th { white-space: normal; vertical-align: bottom; line-height: 1.3; }
  .g-tbl table { font-size: 13.5px; }
  .g-tbl tbody td, .g-tbl tbody th { white-space: nowrap; }
  .g-tbl tbody td:last-child:not(:nth-child(-n+3)) { white-space: normal; min-width: 210px; }
}

/* ---------- guide FAQ ---------- */
.g-faq { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.g-faq .h2 { margin-bottom: 12px; }
.g-faq-more { margin-top: 14px; }
.g-acc details { scroll-margin-top: calc(var(--header-h) + 16px); }
.g-acc details:target summary, .g-acc details.is-target summary { color: var(--accent); }
.fa-link { margin-top: 10px; font-size: 12.5px; }
.acc .a .fa-link a { color: var(--text-tertiary); text-decoration: none; }
.acc .a .fa-link a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- side column ---------- */
.g-side { display: grid; gap: 20px; align-content: start; }
@media (min-width: 1100px) { .g-side { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: none; } }
.g-side-k { display: flex; align-items: center; gap: 8px; font: 600 11.5px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 10px; }
.g-toc { display: none; }
@media (min-width: 1100px) { .g-toc { display: block; } }
.g-toc ol, .g-toc-m ol { counter-reset: toc; }
.g-toc li, .g-toc-m li { counter-increment: toc; }
.g-toc a, .g-toc-m a { display: flex; gap: 10px; padding: 6px 0 6px 12px; border-left: 2px solid var(--border-soft); font-size: 13.5px; line-height: 1.4; color: var(--text-secondary); text-decoration: none; }
.g-toc-m a { min-height: 40px; align-items: center; }
.g-toc a::before, .g-toc-m a::before { content: counter(toc, decimal-leading-zero); font: 500 11.5px/1.7 var(--font-mono); color: var(--text-tertiary); }
.g-toc a:hover, .g-toc-m a:hover { color: var(--text); border-left-color: var(--border-hover); }
.g-toc a.is-active { color: var(--accent); border-left-color: var(--accent); }

.g-buy { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; background: var(--surface); }
.g-buy-links { margin-bottom: 14px; border-top: 1px solid var(--border-soft); }
.g-buy-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--border-soft); font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none; }
.g-buy-links a:hover { color: var(--accent); }
.g-buy-links svg.i { width: 16px; height: 16px; color: var(--text-tertiary); }

.g-more .guides { margin-top: 4px; }
.g-more .guide b { font-size: 15px; }

/* ---------- index / FAQ / glossary heads ---------- */
.g-ihead { padding: 8px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.g-ihead .lead { margin-top: 12px; max-width: 78ch; }
.g-icount { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; font-size: 13.5px; color: var(--text-tertiary); }
.g-icount b { color: var(--text); font-variant-numeric: tabular-nums; }
.g-icount a { color: var(--text-secondary); text-decoration: underline; text-decoration-color: var(--border-hover); text-underline-offset: 3px; }
.g-icount a:hover { color: var(--accent); }
.g-icount > span[aria-hidden] { color: var(--border-hover); }

/* index */
.g-feat { margin-bottom: 48px; }
.g-topics > .h2 { margin-bottom: 8px; }
.g-topic { display: grid; gap: 4px 32px; padding: 22px 0; border-bottom: 1px solid var(--border-soft); }
.g-topic:last-child { border-bottom: 0; }
@media (min-width: 900px) { .g-topic { grid-template-columns: 260px minmax(0, 1fr); } }
.g-topic .h3 { padding-top: 10px; }
.g-topic ul { display: grid; gap: 0; }
@media (min-width: 1100px) { .g-topic ul { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.g-topic a { display: grid; gap: 3px; padding: 10px 0; text-decoration: none; color: var(--text-secondary); }
.g-topic a b { font-size: 15.5px; line-height: 1.35; color: var(--text); }
.g-topic a:hover b { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gi-sum { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-topic .g-m { font-size: 12.5px; color: var(--text-tertiary); }
.g-refs { margin-top: 44px; }
.g-refs .h2 { margin-bottom: 14px; }
.g-refs ul { display: grid; gap: 12px; }
@media (min-width: 900px) { .g-refs ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.g-refs a { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 18px; border: 1px solid var(--border); border-radius: var(--r-lg); text-decoration: none; color: var(--text-secondary); font-size: 14px; line-height: 1.45; transition: border-color .15s; }
.g-refs a:hover { border-color: var(--text); }
.g-refs a > svg.i { width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.g-refs b { display: block; color: var(--text); font-size: 15.5px; margin-bottom: 3px; }

/* jump chips (FAQ topics, glossary sections) */
.g-jump { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -8px calc(var(--gutter) * -1) 24px; padding: 0 var(--gutter) 2px; }
.g-jump::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .g-jump { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; } }

/* FAQ library */
.g-faqpage .g-jump { }
@media (min-width: 1100px) { .g-faqpage .g-jump { display: none; } }
.g-faq-layout { display: grid; gap: 24px; }
@media (min-width: 1100px) { .g-faq-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; } }
.g-faq-nav { display: none; }
@media (min-width: 1100px) { .g-faq-nav { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } }
.g-faq-nav a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0 8px 12px; border-left: 2px solid var(--border-soft); font-size: 14px; color: var(--text-secondary); text-decoration: none; }
.g-faq-nav a span { color: var(--text-tertiary); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.g-faq-nav a:hover { color: var(--text); border-left-color: var(--border-hover); }
.g-faq-nav a.is-active { color: var(--accent); border-left-color: var(--accent); }
.g-faq-main { min-width: 0; max-width: 900px; }
.g-faq-group { scroll-margin-top: calc(var(--header-h) + 16px); }
.g-faq-group + .g-faq-group { margin-top: 44px; }
.g-faq-gh { margin-bottom: 10px; }
.g-faq-gh p { margin-top: 4px; font-size: 14px; color: var(--text-tertiary); }

/* glossary */
.g-tgroup { scroll-margin-top: calc(var(--header-h) + 16px); max-width: 1080px; }
.g-tgroup + .g-tgroup { margin-top: 40px; }
.g-tgroup .h2 { margin-bottom: 8px; }
.g-terms { border-top: 1px solid var(--border); }
.g-term { display: grid; gap: 4px 32px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); scroll-margin-top: calc(var(--header-h) + 16px); }
@media (min-width: 900px) { .g-term { grid-template-columns: 280px minmax(0, 1fr); padding: 16px 0; } }
.g-term dt a { font: 600 15.5px/1.4 var(--font-body); color: var(--text); text-decoration: none; }
.g-term dt a:hover { color: var(--accent); }
.g-term dt a::after { content: "#"; margin-left: 6px; color: var(--text-tertiary); opacity: 0; transition: opacity .15s; font-weight: 500; }
.g-term:hover dt a::after { opacity: 1; }
.g-term dd { margin: 0; font-size: 15px; line-height: 1.6; max-width: 76ch; }
.g-term dd a { color: var(--accent); text-underline-offset: 3px; }
.g-term:target { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }

/* line sheets */
.ls-files .h2, .ls-what .h2 { margin-bottom: 14px; }
.ls-list { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; max-width: 1080px; }
.ls-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 16px; }
.ls-item + .ls-item { border-top: 1px solid var(--border-soft); }
@media (min-width: 640px) { .ls-item { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 18px 20px; } }
.ls-kind { display: grid; place-items: center; width: 52px; height: 60px; border: 1px solid var(--border); border-radius: 4px 14px 4px 4px; font: 600 12px/1 var(--font-mono); color: var(--text); background: var(--surface-alt); grid-row: span 2; }
@media (min-width: 640px) { .ls-kind { grid-row: auto; width: 56px; } }
.ls-txt .h4 { font-size: 16px; }
.ls-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; color: var(--text-tertiary); }
.ls-lock { color: var(--warning) !important; font-weight: 500; }
.ls-lock svg.i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.ls-act { grid-column: 2; }
@media (min-width: 640px) { .ls-act { grid-column: auto; } }
.ls-act .btn svg.i { width: 16px; height: 16px; }
.ls-note { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ls-what { margin-top: 48px; max-width: 1080px; }
.ls-p { max-width: 76ch; margin-bottom: 4px; }
.ls-p + .g-tbl { margin-top: 14px; }
.ls-what .g-tbl + .ls-p { margin-top: 12px; }
.ls-what .g-tbl tbody td:nth-child(3), .ls-what .g-tbl tbody td:nth-child(4) { white-space: nowrap; }
.g-tbl tbody td.wrap { white-space: normal; min-width: 200px; }
.ls-faq { max-width: 1080px; }

/* /faq: computed tables inside answers and the "more by topic" links (copy review 2026-10-18) */
.g-acc .a .table-wrap { margin: 12px 0; }
.faq-t td, .faq-t td:last-child { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
  .faq-t td { display: flex; justify-content: space-between; gap: 12px; }
  .faq-t td::before { content: attr(data-label); color: var(--text-tertiary); font-size: 13px; }
}
.g-faq-more-list { display: grid; border-top: 1px solid var(--border); }
.g-faq-more-list li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.g-faq-more-list a { font-weight: 600; color: var(--text); text-decoration: none; }
.g-faq-more-list a:hover { color: var(--accent); }
.g-faq-more-list span { font-size: 13.5px; color: var(--text-tertiary); }
@media (min-width: 640px) { .g-faq-more-list li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: baseline; } }

/* ---------- guide tables on phones (lead 2026-10-28) ----------
   The renderer classes each Markdown table. .g-stack (cells hold phrases) becomes one card
   per row below 600 px, each value labelled with its column header (data-label), like the
   category tables. .g-chart (short values) keeps the sideways scroll; its bracketed unit
   conversion (.g-alt) drops to a second, muted line so the first columns stay readable. */
@media (max-width: 599px) {
  .g-tbl table.g-stack, .g-tbl .g-stack tbody { display: block; min-width: 0; }
  .g-tbl .g-stack thead { display: none; }
  .g-tbl .g-stack tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
  .g-tbl .g-stack tbody tr:last-child { border-bottom: 0; }
  .g-tbl .g-stack tbody td, .g-tbl .g-stack tbody td:last-child:not(:nth-child(-n+3)) { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; }
  .g-tbl .g-stack tbody td + td { margin-top: 4px; }
  .g-tbl .g-stack tbody td:first-child { margin-bottom: 2px; }
  .g-tbl .g-stack tbody td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--text-tertiary); }
  .g-tbl .g-stack tbody tr:hover > * { background: none; }
  .g-tbl .g-chart tbody td:last-child:not(:nth-child(-n+3)) { white-space: nowrap; min-width: 0; }
  .g-tbl .g-chart .g-alt { display: block; font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
}
