/* Guides and article pages in the site's look (2026-11-26): one sans-serif, bold titles, no spaced capitals, rounded blocks, solid blue.
   These pages keep their own layout and style blocks; this sheet comes after them (includes/guide-style.php) and restyles by their shared
   variable names. <html class="g-dark"> is a screen page; a long read keeps its own paper (<html class="g-paper">). Tokens only (npm run lint:ui). */

/* the shared dark header, on both kinds */
html:root { --nm-font: var(--ui-font-sans); --nm-bg: var(--ui-night); --nm-surface: var(--ui-surface-1); --nm-border: var(--ui-line); --nm-text: var(--ui-text); --nm-muted: var(--ui-muted); --nm-accent: var(--ui-accent); --nm-accent-soft: var(--ui-accent-wash); --sans: var(--ui-font-sans); --serif: var(--ui-font-sans); }
html body .nm-header { background: var(--ui-night); border-bottom: 1px solid var(--ui-line); }   /* solid: frosted glass turns muddy over paper */
html body .nm-header .nm-brand__text { display: none; }   /* the logo already says the name */
html body .nm-header .nm-brand img { height: 22px; }
html body .nm-header .nm-nav { gap: var(--ui-space-1); }
html body .nm-header .nm-nav a { padding: var(--ui-space-2) var(--ui-space-3); border: 0; border-radius: var(--ui-radius-pill); background: transparent; color: var(--ui-text); font-size: 14px; font-weight: 600; text-decoration: none; }
html body .nm-header .nm-nav a:hover { background: var(--ui-surface-3); }
html body .nm-header .nm-nav a.nm-nav__pill { background: var(--ui-action); color: var(--ui-on-action) !important; }
html body .nm-header .nm-close-link { border-color: var(--ui-line-strong); background: transparent; }

/* phones: logo, links and close stay on one line */
@media (max-width: 599px) {
  html body .nm-header__inner { flex-wrap: nowrap; gap: var(--ui-space-2); padding: var(--ui-space-2) var(--ui-space-3); }
  html body .nm-header .nm-brand img { height: 14px; }
  html body .nm-header .nm-header__actions { gap: var(--ui-space-1); }
  html body .nm-header .nm-nav { flex-wrap: nowrap; gap: 0; }
  html body .nm-header .nm-nav a { padding: var(--ui-space-2); font-size: 13px; white-space: nowrap; }
  html body .nm-header .nm-nav a:first-child { display: none; }
  html body h1 { font-size: clamp(28px, 9vw, 40px) !important; overflow-wrap: break-word; }
}

/* one typeface (code keeps its own), no spaced capitals */
html body, html body *:not(code):not(pre):not(kbd):not(samp):not(code *):not(pre *) { font-family: var(--ui-font-sans) !important; }
html body * { text-transform: none !important; }
html body :is(p, span, div, a, li, small, strong, b, th, td, label, button, figcaption, h2, h3, h4) { letter-spacing: normal !important; }
html body :is(h1, h2, h3) { font-weight: 700 !important; letter-spacing: -0.015em !important; }
html body :is(h4, h5) { font-weight: 700 !important; }

/* blocks are rounded; a note is a whole tinted block, not a bar down one side */
html body :is(button, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea, .btn, .button, .cta, [class*="-btn"], [class*="button"]) { border-radius: var(--ui-radius-control) !important; }
html body :is(.card, .panel, .callout, .note, .tile, figure img, figure video, .shot, [class*="-card"]) { border-radius: var(--ui-radius-card) !important; }
html body :is(.callout, .note, blockquote) { border-left-width: 0 !important; }

/* screen pages: the dark surfaces */
html.g-dark:root { color-scheme: dark; --bg: var(--ui-night); --text: var(--ui-text); --muted: var(--ui-muted); --panel: var(--ui-surface-1); --card: var(--ui-surface-1); --surface: var(--ui-surface-1); --border: var(--ui-line); --accent: var(--ui-accent); }
html.g-dark body { background: var(--ui-night) !important; color: var(--ui-text); }
