/* Ohmaj on SID. Every page links SID's live sheet first (https://www.intelligencematters.se/sid/styles.css: tokens,
   fonts, type voices, the hairline container) and this file only composes on it. Nothing here mints a colour, a
   size, a leading or a spacing of its own: every value is a SID token, and the only box is SID's .container-tile.
   Jacob, 14 Nov 2026: "the site is not clean enough, make it more clean like sid ... this is our baseline".
   The rules SID's showcase sets for itself (manual.css) are followed here: paper and ink, no ruled lines ("a hairline
   box or nothing"), links without underline, pictures trimmed with a hairline drawn inside the picture, the
   1280 canvas cut 400 + 40 + 840. Colour stays in the art: the class figures keep their indigo, and the block being
   read lights up in hum.
   The sheet imports SID itself, so it never stands without the system; each page also links SID directly, which the
   browser fetches once. */
@import url("https://www.intelligencematters.se/sid/styles.css");

body.oh { padding-bottom: 0; }
.oh a { text-decoration: none; }
.oh a:hover, .oh-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: var(--s-1); }

/* ---- canvas, masthead, foot ---- */
.oh-canvas { width: min(100% - 2 * var(--s-3), var(--content)); margin-inline: auto; }
.oh-mast { min-height: 0; }
.oh-mast-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding-block: var(--s-3); }
.oh-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 var(--gutter); }
.oh-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); padding-block: var(--s-6) var(--s-4); }
.oh-list { list-style: none; padding: 0; margin: 0; }
#main > section { padding-top: var(--s-6); }   /* SID's section + section rhythm, also after a passage */
#main > section:first-child, #main > .oh-head + section { padding-top: 0; }
.oh-list > li::before { content: none; }
.oh-measure { max-width: var(--measure-reading); }
.oh-after { margin-top: var(--s-3); }

/* ---- page head: a mono line, the display title, a caps tagline ---- */
.oh-head { display: grid; gap: var(--s-2); padding-block: var(--s-5); }
.oh-head > * { margin: 0; }
.oh-head .sec-tagline { margin: 0; }

/* ---- home ---- */
.oh-field { align-items: center; justify-content: center; text-align: center; gap: var(--s-2); min-height: var(--stage-half); padding: var(--s-5) var(--s-4); margin-top: var(--s-4); }
.oh-field > * { margin: 0; width: 100%; }
.oh-wordmark { text-transform: uppercase; letter-spacing: var(--track-caps); }
.oh-thirds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.oh-card { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.oh-card > * { margin: 0; }
.oh-card > .container-tile { margin-bottom: var(--s-2); }
.oh-card .oh-count { margin-top: var(--s-1); }

/* ---- pictures: art in a hairline tile; her sketches trimmed like SID's drawings ---- */
.oh-art { position: relative; aspect-ratio: 1; overflow: hidden; }
.oh-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.oh-lettering { position: relative; aspect-ratio: 2; }
.oh-lettering img, .oh-pic img { position: absolute; inset: var(--s-2); width: calc(100% - 2 * var(--s-2)); height: calc(100% - 2 * var(--s-2)); object-fit: contain; }
.oh-six { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-4) var(--gutter); }
.oh-tile { min-width: 0; }
.oh-tile a { display: flex; flex-direction: column; gap: var(--s-1); }
.oh-pic { position: relative; display: block; aspect-ratio: 1; background: var(--paper); }
.oh-pic::after { content: ""; position: absolute; inset: 0; outline: var(--hairline) solid var(--line-structural); outline-offset: calc(-1 * var(--hairline)); pointer-events: none; }   /* the trim sits above the picture */
.oh-pic.oh-tall { aspect-ratio: 6 / 7; }
.oh-pic.oh-tall img { inset: 0; width: 100%; height: 100%; }
.oh-figure img { display: block; width: 100%; height: auto; outline: var(--hairline) solid var(--line-structural); outline-offset: calc(-1 * var(--hairline)); }
.oh-figure figcaption { margin-top: var(--s-1); }

/* ---- class chapter: reading sheet 840 + the figure 400 ---- */
.oh-chapter, .oh-detail { display: grid; grid-template-columns: minmax(0, 840fr) minmax(0, 400fr); gap: var(--gutter); align-items: start; }
.oh-aside { position: sticky; top: var(--s-6); }
.oh-aside .oh-cap { margin-top: var(--s-2); }
.oh-now { position: absolute; inset: 0; width: 100%; height: 100%; }
.oh-now .blk { opacity: 0; }
.oh-now .blk.on { opacity: 1; }
.oh-now path { stroke: var(--hum); }
.oh-now circle { fill: var(--hum); stroke: var(--paper); }
.oh-reg { grid-template-columns: calc(var(--s-6) + var(--s-5)) minmax(0, 1fr); gap: var(--s-2) var(--s-3); align-items: baseline; margin: 0; }
.oh-reg dd { max-width: var(--measure-reading); }
.oh-text > section, .oh-text > section + section { padding-top: var(--s-6); }
.oh-text > section[data-density="tight"] { padding-top: var(--s-5); }
.oh-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.oh-box { gap: var(--s-1); padding: var(--s-3); margin: 0; }
.oh-box > * { margin: 0; }
.oh-box .serif-heading-3 { margin-block: var(--s-1); }
.oh-pair + .oh-reg { margin-top: var(--s-4); }
.oh-order a { display: grid; grid-template-columns: calc(var(--s-6) + var(--s-5)) minmax(0, 1fr) auto; gap: var(--s-3); align-items: baseline; padding-block: var(--s-1); }
.oh-row { display: flex; justify-content: space-between; gap: var(--s-3); }
.oh-blocknote { max-width: var(--measure-reading); margin: 0; }
.section-mark .oh-blocknote { margin-top: var(--s-2); }
.oh-poses { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.oh-pose, .oh-trans { display: grid; grid-template-columns: calc(var(--s-6) + var(--s-5)) minmax(0, 1fr); gap: 0 var(--s-3); align-items: baseline; }
.oh-pose > p { margin: 0; }
.oh-trans p { margin: 0; max-width: var(--measure-reading); }
.oh-pose-text > * { margin: 0; }
.oh-pose-text .serif-heading-3 { margin-block: 0 var(--s-2); }
.oh-cues { counter-reset: cue; display: grid; gap: var(--s-1); max-width: var(--measure-reading); }
.oh-cues > li { display: grid; grid-template-columns: var(--s-4) minmax(0, 1fr); align-items: baseline; counter-increment: cue; }
.oh-cues > li::before { content: counter(cue, decimal-leading-zero); position: static; font-family: var(--font-mono); font-size: var(--fz-mono-6); letter-spacing: var(--track-code); }
.oh-pose-text .oh-hers { margin-top: var(--s-2); }
.oh-pager { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-6); }
.oh-pager a:only-child { margin-left: auto; }

/* ---- a single sketch ---- */
.oh-stage { position: relative; aspect-ratio: 4 / 3; }
/* a drawn-up tile shows at its printed height (560 css px = the 560 and 1120 files), so its dither stays whole pixels */
.oh-stage.oh-bodied { aspect-ratio: auto; height: calc(var(--stage) + var(--s-5) + 2 * var(--s-4)); }
.oh-stage.oh-bodied img { left: 50%; width: auto; height: calc(var(--stage) + var(--s-5)); transform: translateX(-50%); }
.oh-thumbs a { display: block; }
.oh-stage img { position: absolute; inset: var(--s-4); width: calc(100% - 2 * var(--s-4)); height: calc(100% - 2 * var(--s-4)); object-fit: contain; }
.oh-side { display: grid; gap: var(--s-4); }
.oh-side > * { margin: 0; }
.oh-side .oh-reg { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

/* ---- poses ---- */
.oh-poselist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--gutter); }
.oh-poselist .oh-pose-text .serif-heading-3 { margin-block: 0 var(--s-1); }
.oh-thumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.oh-thumbs img { height: var(--s-5); width: auto; max-width: none; outline: var(--hairline) solid var(--line-structural); outline-offset: calc(-1 * var(--hairline)); }

/* ---- about ---- */
.oh-quote { font-size: var(--fz-heading-3); line-height: 1.4; letter-spacing: var(--track-heading-3); }
.oh-box cite { margin-top: auto; padding-top: var(--s-3); }

@media (max-width: 900px) {
  .oh-chapter, .oh-detail { grid-template-columns: minmax(0, 1fr); }
  .oh-aside { position: static; order: -1; width: min(100%, var(--col)); }
  .oh-six { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
  .oh-poselist { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .oh-canvas { width: calc(100% - 2 * var(--s-2)); }
  .oh-mast-row { flex-direction: column; gap: var(--s-1); padding-block: var(--s-2); }
  .oh-nav { justify-content: flex-start; gap: 0 var(--s-3); }
  .oh-head { padding-block: var(--s-4); }
  .oh-field { min-height: var(--stage-half); padding: var(--s-4) var(--s-2); }
  .oh-thirds, .oh-pair { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .oh-six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-2); }
  .oh-reg, .oh-side .oh-reg { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .oh-reg dd { margin-bottom: var(--s-2); }
  .oh-order a { grid-template-columns: var(--s-6) minmax(0, 1fr) auto; gap: var(--s-2); }
  .oh-pose, .oh-trans { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
  .oh-stage img { inset: var(--s-2); width: calc(100% - 2 * var(--s-2)); height: calc(100% - 2 * var(--s-2)); }
  .oh-stage.oh-bodied { height: auto; aspect-ratio: 6 / 7; }
  .oh-stage.oh-bodied img { left: 0; inset: 0; width: 100%; height: 100%; transform: none; }
  .oh-pager { flex-direction: column; }
}
