/* Public content pages (/how-it-works, /guides/*), rendered by src/seo.ts. Tokens come from base.css.
   Reading first: one 68ch column, 17-18px body, headings in the house weight, the red pen only for
   the current breadcrumb and the note rule. No scripts on these pages. */

.sh { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--ground) 86%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.sh-in { display: flex; align-items: center; gap: var(--s-4); height: 64px; }
.sh-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--text); letter-spacing: -0.01em; }
.sh-brand img { width: 20px; height: 22px; }
.sh-nav { display: flex; gap: var(--s-1); margin-left: auto; }
.sh-nav a { padding: 8px 12px; border-radius: var(--r-control); font-size: 13.5px; font-weight: 500; color: var(--body); transition: color var(--t-1) var(--ease); }
.sh-nav a:hover, .sh-nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 560px) { .sh-nav a:first-child { display: none; } .sh-in { gap: var(--s-2); } }

.page { padding-top: var(--s-6); padding-bottom: var(--s-8); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s-6); padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--body); }

.art-head { max-width: 760px; margin-bottom: var(--s-7); }
.art-head h1 { margin: var(--s-3) 0 var(--s-4); font-size: clamp(36px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -0.025em; font-weight: 500; }
.lede { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--body); max-width: 62ch; }
.meta { margin-top: var(--s-4); font-size: 13.5px; color: var(--muted); }

.art { display: grid; grid-template-columns: minmax(0, 1fr); }
.toc { max-width: 68ch; margin-bottom: var(--s-7); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-card); }
.toc ol { margin: var(--s-3) 0 0; padding-left: 1.3em; columns: 2 260px; column-gap: var(--s-6); font-size: 15px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--body); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.toc a:hover { color: var(--text); text-decoration-color: currentColor; }

.prose { max-width: 68ch; font-size: 17.5px; line-height: 1.65; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { margin-top: var(--s-8); font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -0.015em; scroll-margin-top: 88px; }
.prose h3 { margin-top: var(--s-6); font-size: 20px; line-height: 1.3; font-weight: 600; scroll-margin-top: 88px; }
.prose h2 + *, .prose h3 + * { margin-top: var(--s-3); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--muted); transition: text-decoration-color var(--t-1) var(--ease); }
.prose a:hover { text-decoration-color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: var(--s-2); }
.prose li::marker { color: var(--muted); }
.prose code { padding: 1px 6px; border-radius: 6px; background: var(--raised); color: var(--text); font-size: 0.86em; }
.prose dl div { padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.prose dl div:last-child { border-bottom: 1px solid var(--line); }
.prose dt { color: var(--text); font-weight: 600; }
.prose dd { margin: 6px 0 0; }
.note { padding: var(--s-4) var(--s-5); border-left: 2px solid var(--pen); background: var(--surface); border-radius: 0 var(--r-menu) var(--r-menu) 0; font-size: 16px; }

.table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); }
.table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.table caption { padding: var(--s-3) var(--s-4); text-align: left; font-size: 13.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.table th, .table td { padding: var(--s-3) var(--s-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.table thead th { color: var(--muted); font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.table tbody th { color: var(--text); font-weight: 600; }

.next { max-width: 68ch; margin-top: var(--s-8); padding: var(--s-6); border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); }
.next h2 { font-size: 24px; letter-spacing: -0.01em; }
.next p { margin: var(--s-2) 0 var(--s-5); }

.related { margin-top: var(--s-8); }
.related h2 { font-size: 22px; margin-bottom: var(--s-4); }
.related ul, .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.related a, .cards a { display: flex; flex-direction: column; gap: var(--s-2); height: 100%; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); transition: border-color var(--t-1) var(--ease); }
.related a:hover, .cards a:hover { border-color: var(--line-2); }
.related b, .cards b { color: var(--text); font-weight: 500; font-size: 18px; line-height: 1.3; }
.related span, .cards a > span:last-child { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.cards + .next { margin-top: var(--s-7); }

.sf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-6); padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.sf nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.sf a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) { .sh-nav a, .prose a, .related a, .cards a { transition: none; } }
