/* ORBINTU shared layout layer (every page; loaded after base.css + typography.css, before page CSS).
   One header offset, one vertical spacing system, one reading measure. Page CSS uses these tokens instead of its own numbers. */
:root {
  /* the fixed header: 12px top inset + 54px bar (66–67px measured at every breakpoint) */
  --header-h: 68px;
  --anchor-offset: calc(var(--header-h) + 20px);         /* where an anchor target lands: clear of the header, with breath */

  /* vertical rhythm — four steps, all content-driven (no viewport-height sections except true heroes) */
  --space-tight:  clamp(28px, 3.5vw, 48px);              /* inside a section: statement → system visual */
  --space-normal: clamp(48px, 6.5vw, 96px);              /* between ordinary sections (was --section-gap, 48–104px) */
  --space-major:  clamp(64px, 8.5vw, 128px);             /* a chapter change */
  --space-hero:   calc(var(--header-h) + clamp(40px, 6vw, 96px));   /* header → first line of a page */
  --section-gap:  var(--space-normal);                   /* legacy token, now one of the four steps */

  /* display measure: a major statement wraps at ~2–3 balanced lines, never one edge-to-edge line */
  --measure-display: 880px;

  /* reading measure */
  --measure-copy:  64ch;                                  /* explanatory paragraphs */
  --measure-note:  72ch;                                  /* notes / banners */
  --measure-legal: 72ch;                                  /* legal article text */
}

/* anchors, hash URLs, scrollIntoView and in-page navigation all land below the header (one rule, every page) */
:where([id]) { scroll-margin-top: var(--anchor-offset); }

/* long notes and definitions never run wider than a comfortable line */
.ob-roles__def, .ob-lnote > span:not(.ob-stat) { max-width: var(--measure-note); }   /* the note strip stays full width; its text wraps at a reading measure */

html { text-rendering: optimizeLegibility; }

/* a page opened at a #fragment lands there at once (the head script sets .ob-jump until load) */
html.ob-jump { scroll-behavior: auto !important; }
