/* Guides (/guides/): the home, shelf pages and articles (scripts/build.mjs, src/guides.mjs).
   Reading pages: a calm text column, the short answer first, sources and the Rijo OS box last. */
.g-hero { padding-bottom: 8px; }
.g-hero h1 { max-width: 22ch; }
.g-hero .lede { max-width: 64ch; }
.g-kicker { font-family: "Geist Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 16px; }
.g-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; color: var(--dim); font-size: .95rem; }
.g-meta span:not(:last-child)::after { content: "·"; margin-left: 18px; color: var(--dim); }
.g-sec { padding-top: 28px; padding-bottom: clamp(48px, 7vw, 88px); }

/* the guides home hero: a full-bleed photo, darkened on the left so the text reads, with shelf links
   and three plain facts under the lede */
.g-hero-home { min-height: clamp(560px, 78vh, 760px); display: flex; align-items: center; padding-bottom: clamp(56px, 7vw, 96px); }
.g-hero-home .wrap { display: block; width: 100%; }
.g-hero-home h1 { max-width: 15ch; }
.g-hero-home .lede { max-width: 58ch; color: #c4c4cc; }
.g-hero-bg { position: absolute; inset: 0; z-index: -2; margin: 0; }
.g-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; opacity: .85; }
.g-hero-bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--bg) 0%, rgb(10 10 12 / .94) 30%, rgb(10 10 12 / .6) 58%, rgb(10 10 12 / .2) 100%),
  linear-gradient(0deg, var(--bg) 0%, transparent 28%),
  linear-gradient(180deg, rgb(10 10 12 / .7) 0%, transparent 22%); }
.g-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.g-jump a { display: inline-flex; align-items: center; gap: 9px; padding: 10px 12px 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgb(21 21 26 / .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--text); text-decoration: none; font-size: 15px; transition: border-color .25s, background .25s; }
.g-jump a:hover { border-color: rgb(255 106 43 / .55); background: rgb(255 106 43 / .12); }
.g-jump .ph { color: var(--accent); font-size: 18px; }
.g-jump span { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; text-align: center; }
.g-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 26px 0 0; padding: 0; color: var(--muted); font-size: .95rem; }
.g-stats b { color: var(--text); font-weight: 600; }
@media (max-width: 640px) {
  .g-hero-home { min-height: 0; }
  .g-hero-bg img { object-position: 64% 50%; opacity: .7; }
  .g-hero-bg::after { background: linear-gradient(180deg, rgb(10 10 12 / .62) 0%, rgb(10 10 12 / .78) 55%, var(--bg) 100%); }
}

/* a shelf page hero: the text with the shelf's photo beside it */
.g-hero-shelf h1 { max-width: 16ch; }
.g-hero-shelf .hero-media img { aspect-ratio: 5 / 4; max-height: 480px; object-fit: cover; object-position: 50% 30%; }
.g-h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); max-width: none; margin-bottom: 24px; }

/* cards: shelves on the home (side by side, each with its photo), guides on a shelf and under
   "Related guides" */
.g-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.g-shelves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.g-shelf, .g-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .25s, transform .4s var(--ease-out); }
.g-shelf:hover, .g-card:hover { border-color: rgb(255 106 43 / .45); transform: translateY(-2px); }
.g-shelf { padding: 0; gap: 0; overflow: hidden; scroll-margin-top: calc(var(--nav-h) + 16px); }
.g-shelf-img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.g-shelf-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.g-shelf-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface) 0%, rgb(21 21 26 / 0) 45%); }
.g-shelf:hover .g-shelf-img img { transform: scale(1.04); }
.g-shelf-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 4px 28px 28px; }
/* card titles are h3s (under the section's h2) for the page outline */
.g-shelf-title, .g-card-title { margin: 0; max-width: none; color: var(--text); font-weight: 600; }
.g-shelf-title { font-size: clamp(1.35rem, 2vw, 1.6rem); letter-spacing: -0.025em; line-height: 1.2; }
.g-card-title { font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.25; }
.g-shelf-meta { color: var(--dim); font-size: .92rem; }
.g-shelf ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 6px; font-size: 1rem; }
.g-shelf ul li::marker { color: var(--accent); }
.g-shelf-go { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 500; }
.g-shelf-go .ph { transition: transform .3s var(--ease-out); }
.g-shelf:hover .g-shelf-go .ph { transform: translateX(4px); }
.g-card-topic { display: inline-flex; align-items: center; gap: 8px; font-family: "Geist Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.g-card-topic .ph { font-size: 16px; }
.g-card-desc { color: var(--muted); font-size: .98rem; line-height: 1.5; }
.g-card-meta { margin-top: auto; padding-top: 6px; color: var(--dim); font-size: .88rem; }
.g-related { margin-top: 0; }
.g-how { margin-top: 0; }
.g-feed { margin-top: 28px; }
.g-feed .ph { color: var(--accent); }
.g-proof h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); max-width: none; margin-bottom: 10px; }
.g-proof p { font-size: 1.05rem; max-width: 60ch; }
.g-proof-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* the article: text column with "On this page" beside it on wide screens */
.g-body { padding-top: 12px; }
.g-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 280px); gap: clamp(32px, 5vw, 80px); justify-content: start; align-items: start; }
.g-article { min-width: 0; }
.g-side { position: sticky; top: calc(var(--nav-h) + 24px); }
.g-toc p { font-family: "Geist Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin: 0 0 12px; }
.g-toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line-2); display: grid; gap: 10px; }
.g-toc a { color: var(--muted); text-decoration: none; font-size: .95rem; line-height: 1.35; display: block; }
.g-toc a:hover { color: var(--text); }
@media (max-width: 1080px) {
  .g-layout { grid-template-columns: minmax(0, 1fr); }
  .g-side { display: none; }
}

.g-answer { padding: clamp(22px, 3vw, 30px); border-radius: var(--r-card); background: linear-gradient(110deg, #261309 0%, var(--surface) 70%); border: 1px solid rgb(255 106 43 / .3); }
.g-answer-label { font-family: "Geist Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 10px; }
.g-answer p { font-size: clamp(1.06rem, 1.4vw, 1.18rem); line-height: 1.55; color: var(--text); margin: 0; }
.g-answer p + p { margin-top: 12px; }
.g-answer ul, .g-answer ol { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text); }
.g-answer a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.g-disclaimer { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; color: var(--dim); font-size: .92rem; line-height: 1.5; }
.g-disclaimer .ph { flex: none; font-size: 18px; margin-top: 2px; color: var(--muted); }

.g-prose { max-width: none; }
.g-prose h2 { scroll-margin-top: calc(var(--nav-h) + 16px); }
.g-prose h3 { scroll-margin-top: calc(var(--nav-h) + 16px); font-size: 1.2rem; }
.g-prose ol { padding-left: 22px; margin: 12px 0; display: grid; gap: 8px; }
.g-prose strong { color: var(--text); font-weight: 600; }
.g-prose code { font-family: "Geist Mono", monospace; font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.g-table { margin: 18px 0; overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.g-table table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.g-table th, .g-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); color: #c9c9cf; }
.g-table thead th { color: var(--text); background: var(--surface); font-weight: 600; }
.g-table tbody th { color: var(--text); font-weight: 500; }
.g-table tr:last-child th, .g-table tr:last-child td { border-bottom: 0; }
/* phones: each row becomes a small card, with the column heading beside each value */
@media (max-width: 640px) {
  .g-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .g-table table, .g-table tbody, .g-table tr, .g-table th, .g-table td { display: block; width: 100%; }
  .g-table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .g-table tr:last-child { border-bottom: 0; }
  .g-table tbody th, .g-table td { padding: 2px 0; border-bottom: 0; }
  .g-table tbody th { padding-bottom: 6px; }
  .g-table td[data-label]::before { content: attr(data-label) ": "; color: var(--dim); }
}
.g-example { margin: 22px 0; padding: 20px 22px; border-radius: 16px; background: var(--bg-2); border: 1px dashed var(--line-2); }
.g-example-label { font-family: "Geist Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 8px; }
.g-example p { color: #c9c9cf; }
.g-example .g-table { margin: 12px 0 4px; }

.g-rijo { margin-top: 56px; padding: clamp(24px, 3.5vw, 36px); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line-2); }
.g-rijo-label { display: inline-flex; align-items: center; gap: 8px; font-family: "Geist Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 10px; }
.g-rijo h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); max-width: none; margin-bottom: 12px; }
.g-rijo p { color: #c9c9cf; max-width: 64ch; }
.g-rijo p + p { margin-top: 12px; }
.g-mods { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.g-mods li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 14px; }
.g-mods .ph { color: var(--accent); }
.g-rijo .hero-ctas { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.g-sources { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.g-sources h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); max-width: none; margin-bottom: 14px; }
.g-sources ol { padding-left: 22px; margin: 0; display: grid; gap: 8px; color: var(--muted); }
.g-sources a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
.g-sources > p { margin-top: 18px; color: var(--dim); font-size: .92rem; }

/* a link from a guide to its tool */
.g-tool { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; padding: 16px 18px; border-radius: var(--r-card); border: 1px solid rgb(255 106 43 / .3); background: var(--accent-soft); color: var(--text); text-decoration: none; transition: border-color .2s; }
.g-tool:hover { border-color: var(--accent); }
.g-tool > .ph { font-size: 24px; color: var(--accent); flex: none; }
.g-tool span { display: grid; gap: 2px; flex: 1; }
.g-tool b { font-weight: 600; }
.g-tool small { color: var(--muted); font-size: 14px; }

/* ---------- visual guides (src/guide-visuals.mjs, public/js/guide.js) ---------- */

/* a thin bar under the nav that fills as the article is read */
.g-progress { position: fixed; top: var(--nav-h); left: 0; right: 0; height: 2px; z-index: 40; pointer-events: none; }
.g-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; box-shadow: 0 0 12px rgb(255 106 43 / .6); }

/* heading on the left, the guide's key figures on the right */
.g-hero-grid { display: grid; gap: clamp(28px, 4vw, 56px); }
.g-hero.has-facts .g-hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; }
.g-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line-2); background: var(--line-2); }
.g-facts li { display: grid; gap: 6px; align-content: start; padding: 18px 20px; background: linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 100%); }
.g-facts b { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1; letter-spacing: -0.04em; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-facts li:first-child b { background: none; color: var(--accent); }
.g-facts span { color: var(--muted); font-size: .92rem; line-height: 1.35; }
@media (max-width: 900px) {
  .g-hero.has-facts .g-hero-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .g-facts li { padding: 14px 14px; }
}

/* step cards: a numbered process the eye can follow */
.g-steps { list-style: none; counter-reset: gstep; margin: 22px 0; padding: 0; display: grid; gap: 10px; }
.g-steps li { counter-increment: gstep; position: relative; display: grid; gap: 4px; padding: 16px 18px 16px 64px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.g-steps li::before { content: counter(gstep); position: absolute; left: 18px; top: 15px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.g-steps li:not(:last-child)::after { content: ""; position: absolute; left: 32px; top: 49px; bottom: -11px; width: 2px; background: linear-gradient(var(--accent-soft), transparent); }
.g-steps b { color: var(--text); font-weight: 600; }
.g-steps span { color: #c9c9cf; }

/* diagrams: the drawing on wide screens, the same story as steps on phones */
.g-fig { margin: 30px 0; padding: clamp(18px, 3vw, 28px); border-radius: var(--r-card); border: 1px solid var(--line-2); background:
  radial-gradient(120% 90% at 100% 0%, rgb(255 106 43 / .08) 0%, transparent 55%), var(--bg-2); }
.g-fig-title { font-family: "Geist Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 14px; }
.g-fig-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-fig figcaption { margin-top: 14px; color: var(--dim); font-size: .9rem; line-height: 1.5; }
.g-fig .g-fig-steps { list-style: none; counter-reset: gfig; margin: 0; padding: 0; display: none; gap: 10px; }
.g-fig-steps li { counter-increment: gfig; display: grid; gap: 2px; padding-left: 40px; position: relative; }
.g-fig-steps li::before { content: counter(gfig); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.g-fig-steps b { color: var(--text); font-weight: 600; }
.g-fig-steps span { color: #c9c9cf; font-size: .97rem; }
@media (max-width: 700px) {
  .g-fig-art { display: none; }
  .g-fig .g-fig-steps { display: grid; }
}
/* the SVG's parts; colours from the site's tokens */
.g-d-node rect { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.5; }
.g-d-title { fill: var(--text); font: 600 19px/1 Geist, system-ui, sans-serif; letter-spacing: -0.01em; }
.g-d-sub { fill: var(--muted); font: 400 14px/1 Geist, system-ui, sans-serif; }
.g-d-label { fill: #c9c9cf; font: 400 14.5px/1 Geist, system-ui, sans-serif; }
.g-d-label.is-strong { fill: var(--text); font-weight: 600; }
.g-d-label.is-accent { fill: var(--accent); font-weight: 600; }
.g-d-label.is-dim { fill: var(--muted); }
.g-d-path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; marker-end: url(#g-arrow); }
.g-d-path.is-dashed { stroke: var(--muted); stroke-dasharray: 6 7; }
.g-d-head { fill: var(--accent); }
.g-d-dot { fill: #fff; opacity: 0; filter: drop-shadow(0 0 6px rgb(255 106 43 / .9)); }
.g-d-band { fill: var(--accent-soft); stroke: rgb(255 106 43 / .35); }
.g-d-pin circle { fill: var(--bg-2); stroke: var(--muted); stroke-width: 2.5; }
.g-d-pin.is-due circle { stroke: var(--accent); fill: var(--accent); }
#g-mo-line { marker-end: none; stroke: var(--line-2); stroke-width: 3; }
/* waiting below the fold to be drawn (guide.js); without the script nothing is hidden */
.g-fig.is-armed .g-d-path, .g-fig.is-armed .g-d-label, .g-fig.is-armed .g-d-node, .g-fig.is-armed .g-d-pin, .g-fig.is-armed .g-d-band { opacity: 0; }

/* a small working tool inside a guide */
.g-widget { margin: 30px 0; padding: clamp(20px, 3vw, 28px); border-radius: var(--r-card); border: 1px solid rgb(255 106 43 / .3); background: linear-gradient(150deg, #1d1009 0%, var(--surface) 60%); }
.g-widget-label { font-family: "Geist Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 6px; }
.g-prose .g-widget-title { margin: 0 0 16px; font-size: 1.3rem; }
.g-widget-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.g-widget-form .field { display: grid; gap: 6px; margin: 0; }
.g-widget-form label { font-size: .88rem; color: var(--muted); }
.g-widget-form input, .g-widget-form select { width: 100%; height: 46px; padding: 0 12px; border-radius: var(--r-input); background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: 16px; }
.g-widget-form .t-money input { padding-left: 30px; }
.g-widget-form input:focus, .g-widget-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 106 43 / .2); }
.g-widget-out { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.g-widget-out div { padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.g-widget-out dt { color: var(--muted); font-size: .88rem; }
.g-widget-out dd { margin: 4px 0 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.g-widget-out div:first-child dd { color: var(--accent); }
.g-widget-foot { margin: 14px 0 0; color: var(--dim); font-size: .9rem; }
@media (max-width: 640px) {
  .g-widget-form { grid-template-columns: minmax(0, 1fr); }
}

/* "On this page": the section being read */
.g-toc a[aria-current] { color: var(--text); }
.g-toc li { position: relative; }
.g-toc a[aria-current]::before { content: ""; position: absolute; left: -15.5px; top: 2px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .g-progress { display: none; } }

/* the "which kind of software" chooser */
.g-chooser-form { display: grid; gap: 16px; }
.g-pills { border: 0; margin: 0; padding: 0; min-width: 0; }
.g-pills legend { padding: 0; margin-bottom: 8px; color: var(--muted); font-size: .92rem; }
.g-pills > div { display: flex; flex-wrap: wrap; gap: 8px; }
.g-pills label { position: relative; cursor: pointer; }
.g-pills input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.g-pills span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: #d4d4d8; font-size: .95rem; line-height: 1.3; transition: border-color .2s, background .2s, color .2s; }
.g-pills label:hover span { border-color: rgb(255 106 43 / .5); }
.g-pills input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.g-pills input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-chooser-out { margin-top: 18px; padding: 18px 20px; border-radius: 16px; background: var(--bg-2); border: 1px solid rgb(255 106 43 / .35); }
.g-prose .g-chooser-kind { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.g-prose .g-chooser-why { margin: 6px 0 12px; color: #c9c9cf; }
.g-prose .g-chooser-go { display: inline-flex; margin-right: 14px; color: var(--accent); font-weight: 500; text-decoration: none; }
.g-prose .g-chooser-go:hover { text-decoration: underline; }

/* a guide's own photo behind its heading, darkened on the left so the text reads */
.g-hero.has-photo { padding-bottom: clamp(36px, 5vw, 64px); }
.g-hero.has-photo .g-hero-bg img { opacity: .8; }
.g-hero.has-photo .g-facts { background: rgb(255 255 255 / .1); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.g-hero.has-photo .g-facts li { background: linear-gradient(160deg, rgb(28 28 34 / .82) 0%, rgb(21 21 26 / .86) 100%); }
.g-hero.has-photo .g-meta { color: var(--muted); }
@media (max-width: 900px) {
  .g-hero.has-photo .g-hero-bg::after { background: linear-gradient(180deg, rgb(10 10 12 / .55) 0%, rgb(10 10 12 / .8) 45%, var(--bg) 100%); }
}

/* charts of sourced figures (src/guide-charts.mjs). Series colours validated for the dark card #15151a
   (dataviz method: lightness band, chroma, colour-blind separation and contrast all pass); text never
   wears a series colour. The narrow drawing replaces the wide one on phones so labels stay readable. */
.g-chart { --c-1: #3987e5; --c-2: #d95926; --c-3: #199e70; margin: 28px 0; padding: 20px 20px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.g-chart .g-fig-title { margin: 0 0 6px; }
.g-c-legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .9rem; }
.g-c-legend li { display: inline-flex; align-items: center; gap: 8px; }
.g-c-key { display: inline-block; width: 16px; height: 2px; border-radius: 2px; }
.g-c-art { position: relative; }
.g-c-svg { width: 100%; height: auto; overflow: visible; }
.g-c-svg.is-narrow { display: none; }
@media (max-width: 560px) { .g-c-svg.is-wide { display: none; } .g-c-svg.is-narrow { display: block; } }
.g-c-grid { stroke: rgb(255 255 255 / .08); stroke-width: 1; }
.g-c-tick { fill: var(--dim); font: 400 12px/1 Geist, system-ui, sans-serif; }
.g-c-svg.is-narrow .g-c-tick { font-size: 12.5px; }
.g-c-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.g-c-end { stroke: #15151a; stroke-width: 2; }
.g-c-endval, .g-c-val { fill: var(--text); font: 600 12.5px/1 Geist, system-ui, sans-serif; }
.g-c-cat { fill: #c9c9cf; font: 400 13px/1 Geist, system-ui, sans-serif; }
.g-c-cross { stroke: rgb(255 255 255 / .35); stroke-width: 1; opacity: 0; pointer-events: none; }
.g-c-cross.is-on { opacity: 1; }
.g-c-band, .g-c-hit { fill: transparent; cursor: crosshair; }
.g-c-mark { outline: none; }
.g-c-mark path { transition: filter .2s; }
.g-c-mark.is-hover path, .g-c-mark:focus-visible path { filter: brightness(1.25); }
.g-c-tip { position: absolute; top: 4px; transform: translateX(-50%); padding: 8px 12px; border-radius: 10px; background: #1c1c22; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgb(0 0 0 / .4); pointer-events: none; display: grid; gap: 2px; min-width: 120px; text-align: center; }
.g-c-tip b { color: var(--text); font-size: .92rem; font-weight: 600; }
.g-c-tip span { color: var(--muted); font-size: .8rem; }
.g-chart figcaption { margin-top: 10px; color: var(--dim); font-size: .88rem; line-height: 1.5; }
.g-chart figcaption a { color: var(--muted); text-underline-offset: 3px; }
.g-c-table { margin-top: 10px; }
.g-c-table summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.g-c-table .g-table { margin: 10px 0 0; }
.g-c-tip[hidden] { display: none; }
.g-prose .g-c-legend { display: flex; padding-left: 0; margin: 0 0 8px; }
.g-prose .g-c-legend li { color: var(--muted); }
