/* LoopToSong guides: long-form articles on top of /assets/site.css (tokens, nav, footer, buttons).
   Calm: one small label style (12px / 600 / uppercase / 0.06em / muted), no mono labels, no scanlines,
   orange only for the one main button. */

:root {
  --g-body: var(--text);
  --g-measure: 44em;
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; z-index: 40; top: -80px; left: 16px; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; background: var(--t500); color: var(--on-teal); border-radius: 4px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

.footer a:not(.brand) { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- article ---------- */
.g-article { max-width: var(--g-measure); padding: 20px 0 32px; }
.g-crumbs { margin: 0 0 22px; font-size: 14px; color: var(--muted); }
.g-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.g-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border); }
.g-crumbs a { color: var(--t300); text-decoration: none; }
.g-crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; opacity: 1; }
.g-article .g-crumbs ol { margin: 0; padding: 0; }
.g-article .g-crumbs li { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.g-article .eyebrow { margin-bottom: 16px; }
.g-article h1 { font-size: clamp(32px, 5.4vw, 52px); line-height: 1.08; overflow-wrap: break-word; }
.g-article .lead { margin-top: 20px; max-width: none; color: var(--text); }
.g-article .g-meta { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.g-article h2 { margin: 48px 0 14px; font-size: clamp(24px, 3.4vw, 30px); line-height: 1.2; scroll-margin-top: 16px; }
.g-article h3 { margin: 30px 0 8px; font-size: 19px; line-height: 1.3; font-stretch: 100%; scroll-margin-top: 16px; }
.g-article p, .g-article li { color: var(--g-body); font-size: 17px; 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: 0 0 8px; }
.g-article li::marker { color: var(--accent); }
.g-article strong { color: var(--text); }
.g-article a { color: var(--accent); text-underline-offset: 3px; }
.g-article code, .g-article kbd { font-family: "JetBrains Mono", monospace; font-size: 0.86em; color: var(--t300); background: rgba(244, 243, 236, 0.08); border: 1px solid rgba(244, 243, 236, 0.18); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }

/* contents */
.g-toc { margin: 28px 0 8px; padding: 16px 18px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line); }
.g-toc strong, .g-note b.g-tag, .g-cta .mono { display: block; font-family: Archivo, sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.3; color: var(--muted); }
.g-toc ol { margin: 8px 0 0; padding-left: 22px; }
.g-toc li { margin: 0; font-size: 15px; line-height: 1.9; }
.g-toc a { text-decoration: none; }

/* key idea / note boxes */
.g-note { margin: 22px 0; padding: 14px 16px; border-left: 2px solid var(--t500); border-radius: 0 6px 6px 0; background: rgba(244, 243, 236, 0.07); }
.g-note p { margin: 0; font-size: 16px; color: var(--text); }
.g-note p + p { margin-top: 8px; }
.g-note b.g-tag { margin-bottom: 6px; }

/* tables */
.g-table-wrap { margin: 18px 0 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.g-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.g-table caption { padding: 12px 14px 4px; text-align: left; font-size: 14px; color: var(--muted); }
.g-table th, .g-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--g-body); line-height: 1.45; }
.g-table thead th { background: var(--panel); color: var(--text); font-size: 13px; font-weight: 700; }
.g-table tbody th { color: var(--text); font-weight: 600; }
.g-table tr:last-child td, .g-table tr:last-child th { border-bottom: 0; }
.g-table td.num, .g-table th.num { text-align: right; font-family: "JetBrains Mono", monospace; font-size: 14px; white-space: nowrap; }
.g-table tfoot td, .g-table tfoot th { background: rgba(244, 243, 236, 0.05); color: var(--text); font-weight: 600; border-top: 1px solid var(--line); }
.g-on { color: var(--t400); font-weight: 700; }
.g-off { color: var(--border); }

/* figures */
.g-fig { margin: 24px 0 26px; padding: 16px 14px 12px; border-radius: 8px; background: #1E1F1E; border: 1px solid var(--line); }
.g-fig svg { display: block; width: 100%; height: auto; }
.g-fig figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--t300); }
.g-fig .ax { stroke: rgba(236, 237, 232, 0.35); stroke-width: 1; }
.g-fig .grid { stroke: rgba(236, 237, 232, 0.12); stroke-width: 1; stroke-dasharray: 3 4; }
.g-fig .blk { fill: rgba(244, 243, 236, 0.28); stroke: var(--t500); stroke-width: 1.2; }
.g-fig .blk.pk { fill: rgba(244, 243, 236, 0.62); }
.g-fig .blk.cut { fill: #CF7A72; stroke: #CF7A72; }
.g-fig .crv { fill: none; stroke: var(--t300); stroke-width: 2; stroke-linejoin: round; }
.g-fig text { font-family: "JetBrains Mono", ui-monospace, monospace; fill: var(--t300); }
.g-fig .lbl { font-size: 14px; }
.g-fig .sm { font-size: 12px; fill: rgba(236, 237, 232, 0.75); }
.g-fig .hot { fill: #F2875C; }

/* calls to action */
.g-cta { margin: 32px 0; padding: 22px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.g-cta h2, .g-cta .g-cta-title { margin: 8px 0 6px; font-family: Archivo, sans-serif; font-stretch: 100%; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; color: var(--head); }
.g-cta p { margin: 0 0 16px; color: var(--muted); font-size: 16px; }
.g-cta .cta-row { gap: 10px; }
.g-cta .btn { height: auto; min-height: 52px; padding: 10px 22px; text-align: center; text-decoration: none; }
.g-cta .btn-fill { font-size: 14px; }
.g-cta a.btn-fill { color: var(--on-teal); }
.g-cta a.btn-line { color: var(--text); }

/* related tools */
.g-tools { margin: 40px 0 0; }
.g-tools h2 { margin-top: 0; font-size: clamp(24px, 3.4vw, 30px); line-height: 1.2; }
.g-tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.g-tool-grid li { margin: 0; }
.g-tool-grid a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.g-tool-grid a:hover { border-color: var(--t700); opacity: 1; }
.g-tools .g-tools-note { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.g-tools-note a { color: var(--accent); }
.g-tool-grid b { font-family: Archivo, sans-serif; font-stretch: 100%; font-size: 16px; }
.g-tool-grid span { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* FAQ */
.g-faq h3 { margin-top: 22px; }

/* sources */
.g-sources { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.g-sources h2 { margin-top: 0; font-size: 20px; }
.g-sources p, .g-sources li { font-size: 14px; line-height: 1.55; color: var(--muted); }
.g-sources li { overflow-wrap: anywhere; }

/* next guides */
.g-next { margin: 36px 0 56px; max-width: var(--g-measure); }
.g-next h2 { font-size: 20px; margin: 0 0 12px; }

/* ---------- index ---------- */
.g-index-hero { max-width: 46em; padding: 36px 0 28px; }
.g-index-hero .eyebrow { margin-bottom: 18px; }
.g-index-hero h1 { font-size: clamp(36px, 6vw, 60px); }
.g-index-hero .lead { margin-top: 20px; color: var(--text); }
.g-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 980px; gap: 16px; margin: 8px 0 24px; padding: 0; list-style: none; }
.g-card { position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.g-card:hover { border-color: var(--t700); opacity: 1; }
.g-card h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; }
.g-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.g-card .g-more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 600; color: var(--accent); }
.g-index-body { max-width: var(--g-measure); margin-bottom: 56px; }
.g-index-body > p { color: var(--g-body); font-size: 17px; line-height: 1.7; }
.g-index-body > p a { color: var(--accent); }

@media (max-width: 700px) {
  .g-cards { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .g-article { padding-top: 8px; }
  .g-article p, .g-article li { font-size: 16px; }
  .g-table { font-size: 14px; }
  .g-table th, .g-table td { padding: 8px 9px; }
  .g-cta { padding: 18px; }
  .g-cta .cta-row .btn { flex: 1 1 100%; }
  .g-fig { padding: 12px 8px 10px; }
  .g-card { padding: 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  .g-card, .g-tool-grid a { transition: border-color 0.2s, transform 0.12s ease; }
  .g-card:active, .g-tool-grid a:active { transform: translateY(1px); }
}

/* ---------- Site system pass (2026-11-10, Codex review 41) ----------
   The reading part (crumbs, title, article, sources; on the index the hero and the four guide cards) sits on one
   full-width cream band. The demo card, the tools and "More guides" follow on charcoal, then the footer.
   Figures use the Song structure section colours. */
.g-read {
  --text: #1F201F; --head: #1F201F; --muted: #4A4A45; --g-body: #2A2B2A; --panel: #FAF7F0;
  --line: rgba(31, 32, 31, 0.16); --border: rgba(31, 32, 31, 0.3);
  --t300: #1F201F; --t400: #B5401A; --t500: #B5401A; --t600: #B5401A; --t700: rgba(31, 32, 31, 0.45); --accent: #B5401A;
  color: #1F201F; background: #F2EEE3; box-shadow: 0 0 0 100vmax #F2EEE3; clip-path: inset(0 -100vmax);
}
.g-read :where(h1, h2, h3, h4, strong, b) { color: #1F201F; }
main:has(> .g-read:first-child) { padding-top: 0; margin-top: 0; }
.g-article.g-read { max-width: none; padding: clamp(28px, 4vw, 48px) 0 clamp(48px, 6vw, 72px); }
.g-article.g-read > * { max-width: 44rem; }
.g-read .eyebrow { color: #B5401A; }
.g-read .g-crumbs a { color: #1F201F; text-decoration: underline; text-decoration-color: rgba(31, 32, 31, 0.35); text-underline-offset: 4px; }
.g-read .g-crumbs li + li::before { color: rgba(31, 32, 31, 0.4); }
.g-read .lead { color: #2A2B2A; }
.g-read .g-meta { color: #4A4A45; }
.g-read li::marker { color: #B5401A; }
.g-read code, .g-read kbd { color: #1F201F; background: rgba(31, 32, 31, 0.06); border-color: rgba(31, 32, 31, 0.2); }

/* contents: a quiet light panel with the kicker label */
.g-read .g-toc { background: transparent; border-color: rgba(31, 32, 31, 0.14); }
.g-toc strong, .g-cta .mono { display: flex; align-items: center; gap: 10px; font: 600 12px/1.3 "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.g-toc strong::before, .g-cta .mono::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; background: #F06A3B; }
.g-read .g-toc strong { color: #4A4A45; }
.g-read .g-toc a { color: #1F201F; }
.g-read .g-toc a:hover { color: #B5401A; opacity: 1; }
.g-read .g-toc li::marker { color: #4A4A45; }

/* note */
.g-read .g-note { background: transparent; border-left: 2px solid #1F201F; }
.g-read .g-note b.g-tag { color: #4A4A45; }

/* tables: light, thin frame, slightly different head; in/out stay neutral */
.g-read .g-table-wrap { background: transparent; border-color: rgba(31, 32, 31, 0.16); }
.g-read .g-table thead th { background: #EAE5D8; color: #1F201F; }
.g-read .g-table th, .g-read .g-table td { border-bottom-color: rgba(31, 32, 31, 0.1); color: #2A2B2A; }
.g-read .g-table tbody th { color: #1F201F; }
.g-read .g-table caption { color: #4A4A45; }
.g-read .g-table tfoot td, .g-read .g-table tfoot th { background: #F4F0E6; border-top-color: rgba(31, 32, 31, 0.16); }
.g-read .g-on { color: #1F201F; font-weight: 700; }
.g-read .g-off { color: #6B6B64; }

/* figures: a light card, ink axes and labels, section colours */
.g-read .g-fig { background: transparent; border-color: rgba(31, 32, 31, 0.14); }
.g-read .g-fig figcaption { color: #4A4A45; }
.g-read .g-fig .ax { stroke: rgba(31, 32, 31, 0.55); }
.g-read .g-fig .grid { stroke: rgba(31, 32, 31, 0.16); }
.g-read .g-fig text { fill: #1F201F; }
.g-read .g-fig .sm { fill: #4A4A45; }
.g-read .g-fig .hot { fill: #1F201F; font-weight: 700; }
.g-read .g-fig .crv { stroke: #1F201F; stroke-width: 1.6; }
.g-read .g-fig .blk { stroke: rgba(31, 32, 31, 0.35); stroke-width: 1; }
.g-fig .blk.s-intro, .g-fig .blk.s-outro { fill: #86A6C4; }
.g-fig .blk.s-breakdown { fill: #86BDB4; }
.g-fig .blk.s-build { fill: #D6AD62; }
.g-fig .blk.s-drop { fill: #F06A3B; }
.g-fig .blk.s-cut { fill: #CF7A72; stroke: #1F201F; stroke-width: 1; }
.g-fig-scroll { overflow-x: auto; }
@media (max-width: 560px) {
  .g-fig-scroll svg { min-width: 440px; }
}

/* sources close the reading band */
.g-read .g-sources { border-top-color: rgba(31, 32, 31, 0.16); }
.g-read .g-sources p, .g-read .g-sources li { color: #4A4A45; }
.g-read a { color: #B5401A; }
.g-read .g-crumbs a, .g-read .g-toc a { color: #1F201F; }

/* index: hero and guide cards on cream; identical light cards */
.g-index-top { padding: 0 0 clamp(36px, 5vw, 56px); }
.g-index-top .g-index-hero { padding-top: clamp(28px, 4vw, 48px); }
.g-read .g-cards { margin-bottom: 0; }
.g-read .g-card { background: transparent; border-color: rgba(31, 32, 31, 0.16); }
.g-read .g-card:hover { border-color: #1F201F; }
.g-read .g-card p { color: #4A4A45; }
.g-read .g-card .g-more { color: #B5401A; }

/* after the reading band: charcoal, the demo card, tools and more guides use the full width */
.g-after { max-width: none; margin: 0; padding: clamp(40px, 5vw, 64px) 0 clamp(48px, 6vw, 72px); }
.g-after .g-cta { max-width: 760px; margin: 0 0 clamp(40px, 5vw, 56px); background: #323432; border-color: rgba(244, 243, 236, 0.12); }
.g-after .g-cta .mono { color: #C9CCC5; }
.g-after .g-cta p { color: #C9CCC5; }
.g-after .g-tools { margin: 0; }
.g-after .g-next { max-width: none; margin: clamp(40px, 5vw, 56px) 0 0; }
.g-after .g-tool-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); max-width: 980px; }
.g-after .g-tool-grid a { background: #323432; border-color: rgba(244, 243, 236, 0.12); }
.g-after .g-tool-grid a:hover { border-color: rgba(244, 243, 236, 0.45); }
.g-after .g-tool-grid a:focus-visible { outline: 2px solid #F06A3B; outline-offset: 2px; }
.g-after .g-tool-grid b { color: #F4F3EC; }
.g-after .g-tool-grid span, .g-after .g-tools-note { color: #C9CCC5; }
.g-after .g-tools-note a { color: #F28A62; }
.g-index-body.g-after { max-width: none; }
.g-index-body.g-after > p { max-width: var(--g-measure); }
/* re-check 42: balanced tool grid (3 columns on desktop), bright demo title, phone swipe cue under figures */
@media (min-width: 900px) { .g-after .g-tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 980px; } }
.g-after .g-cta .g-cta-title { color: #F4F3EC; }
.g-fig-cue { display: none; }
@media (max-width: 560px) {
  .g-fig .g-fig-cue { display: block; margin: 8px 0 0; font: 600 12px/1.3 "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: #4A4A45; }
}
/* cards on the cream band take the band's colour (Roland 2026-11-11) */
.g-read { --panel: transparent; }
