/* register — the artist's SITE REGISTER, the middle layer of dress.
 *
 * ⚠⚠ PAGES.md, 2026-09-12. Three layers dress a site: loupe's own chrome
 * (boardwalk, ours), THIS — chosen once per catalogue, dressing every
 * library-mode page: bio, statements, process, events, press, contact, and
 * the CV and materials — and the gallery template, chosen per series. A
 * template chosen for a series is not a theme for the site.
 *
 * ⚠⚠ A REGISTER BLOCK CONTAINS CUSTOM PROPERTIES AND NOTHING ELSE — the rule
 * documents.css made structural, inherited whole. A register decides how a
 * page looks, never what it says or shows.
 *
 * ⚠ THE FOUR ARE THE FOUR DOCUMENT THEMES, GROWN. Same papers, same inks; the
 * faces are the engine's pairings with ONE exception, chosen on drawn pages
 * 2026-09-12: the two serif registers wear LITERATA, not Garamond — library
 * mode's own restrained serif (see museum). What a register adds over a
 * document theme is the READING scale: a document is printed small; a page is
 * read on a screen at arm's length, so the body is 16–18px on a measure near
 * 60ch, and --r-body-weight lets a variable face sit a little above 400.
 *
 * ⚠ IT OVERRIDES THE GROUND. A library page loads the treatment layer like a
 * gallery does (bio.html), so the preset's --ground, --ink and the thumb
 * tokens arrive first; `html[data-register]` outranks any `.g-*` or `.p-*`
 * class by one attribute and re-sets them. Every paper is near-white — the
 * printing decision from documents.css, kept: a page whose character lived in
 * a dark ground would print as a different page.
 *
 * ⚠ A GALLERY NEVER WEARS A REGISTER. Owner, 2026-09-12, dropping a drawn
 * "type crossing": "why would the galleries have to change." The register is
 * the building; the presets are the shows; a preset stays whole.
 *
 * ⚠ BOARDWALK IS NOT HERE, and must not be added. DESIGN.md: the registers are
 * the artist's; the dark ground and the amber are loupe's.
 *
 * ⚠ The default register is DERIVED from the preset's type dial — register.js
 * — and shown as its own setting from the first gallery on (PAGES.md, *default
 * derivation*). `?register=` on a page is that setting, for now.
 */

/* ─── the parts every register sets. Consumed by the page; listed here so a
   register cannot forget one. ⚠ Only a LIBRARY page ever carries
   `data-register` — a gallery keeps its preset whole (register.js). ───── */
html[data-register] {
  /* the ground tokens the treatment layer set, re-set to the paper */
  --ground: var(--r-paper);
  --lit-ground: var(--r-paper);
  --ink: var(--r-ink);
  --ink-dim: var(--r-ink);
  --ink-faint: var(--r-soft);
  --accent: var(--r-ink);
  /* ⚠ No lobe under the mark: a lobe lifts a word off a photograph, and
     there is no photograph under a library page. Found on the first draw —
     the gallery's dark lobe sat behind the word on white paper. */
  --scrim-mark: 0;
  --scrim-rgb: 0 0 0;
  --chrome-shadow: none;
  --thumb-bg: var(--r-paper);
  --thumb-border: var(--r-frame);
  --thumb-radius: 0;
  --thumb-shadow: none;
  --thumb-filter: none;
  /* the reading tokens, one set for every library page */
  --r-body-weight: 400;
  --r-measure: 62ch;
  --r-align: left;
  --r-link-rule: var(--r-rule);
}

/* ⚠ loupe.css turns the lobe ON with `.fam-sequence.f-bleed` — two classes,
   which outrank one attribute. A library page still carries the preset's
   classes (they are what the register derives from), so the register has to
   say it again at the same weight plus one. Tokens only, still. */
html[data-register].f-bleed { --scrim-mark: 0; }

/* ─── museum — Literata, flush left, no rules; the register most artists
   have already read a wall label in. Air is its ornament.
   ⚠ LITERATA, NOT GARAMOND — the owner's choice 2026-09-12 from three drawn
   ("a restrained serif font for library mode, in keeping with that ethos"):
   a book face made for reading on screens, at 440 on the weight axis because
   a variable serif reads thin at 400 on paper. It is library mode's own
   face; the document themes (documents.css) and the gallery serif dial keep
   Garamond until the owner says otherwise. ─────────────────────────────── */
html[data-register="museum"] {
  --r-paper: #fbfaf7; --r-ink: #16150f; --r-soft: #6a655a; --r-rule: #ddd8cc;
  --r-display: 'Literata', Georgia, serif;
  --r-body:    'Literata', Georgia, serif;
  --r-meta:    'Literata', Georgia, serif;
  --r-body-weight: 440;
  --r-size: 17px; --r-lead: 1.62; --r-measure: 62ch; --r-align: left;
  --r-h1-size: clamp(27px, 3.6vw, 36px); --r-h1-weight: 400; --r-h1-track: 0; --r-h1-case: none; --r-h1-lead: 1.15;
  --r-dek-size: 14.5px; --r-dek-track: 0.01em; --r-dek-case: none; --r-dek-style: italic;
  --r-meta-size: 11.5px; --r-meta-weight: 500; --r-meta-track: 0.12em; --r-meta-case: uppercase;
  --r-sec-gap: 48px; --r-sec-pad: 12px; --r-sec-rule-w: 0px; --r-sec-rule-pad: 0px;
  --r-head-rule-w: 0px; --r-head-pad: 0px;
  --r-frame: none; --r-frame-pad: 0px;
  --r-para: 1em; --r-row-gap: 9px; --r-col-gap: 22px;
}

/* ─── press — Archivo, tight, hairlines; the sheet from a contemporary
   gallery's office. Rules under the heads, headings tracked in caps. ──── */
html[data-register="press"] {
  --r-paper: #ffffff; --r-ink: #101114; --r-soft: #6d7076; --r-rule: #d7d9de;
  --r-display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --r-body:    'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --r-meta:    'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --r-size: 16px; --r-lead: 1.55; --r-measure: 60ch; --r-align: left;
  --r-h1-size: clamp(24px, 3.2vw, 32px); --r-h1-weight: 600; --r-h1-track: -0.015em; --r-h1-case: none; --r-h1-lead: 1.15;
  --r-dek-size: 13px; --r-dek-track: 0.01em; --r-dek-case: none; --r-dek-style: normal;
  --r-meta-size: 10.5px; --r-meta-weight: 600; --r-meta-track: 0.17em; --r-meta-case: uppercase;
  --r-sec-gap: 44px; --r-sec-pad: 12px; --r-sec-rule-w: 1px; --r-sec-rule-pad: 8px;
  --r-head-rule-w: 1px; --r-head-pad: 18px;
  --r-frame: 1px solid #d7d9de; --r-frame-pad: 0px;
  --r-para: 0.9em; --r-row-gap: 7px; --r-col-gap: 20px;
}

/* ─── studio — Plex Mono throughout, small, everything on one measure;
   loupe's own register on paper, and the honest one. ─────────────────── */
html[data-register="studio"] {
  --r-paper: #fcfbf9; --r-ink: #1a1a1c; --r-soft: #6f6d68; --r-rule: #dedcd7;
  --r-display: 'IBM Plex Mono', ui-monospace, monospace;
  --r-body:    'IBM Plex Mono', ui-monospace, monospace;
  --r-meta:    'IBM Plex Mono', ui-monospace, monospace;
  --r-size: 14.5px; --r-lead: 1.72; --r-measure: 58ch; --r-align: left;
  --r-h1-size: clamp(17px, 2.2vw, 21px); --r-h1-weight: 500; --r-h1-track: 0.16em; --r-h1-case: lowercase; --r-h1-lead: 1.3;
  --r-dek-size: 12px; --r-dek-track: 0.2em; --r-dek-case: lowercase; --r-dek-style: normal;
  --r-meta-size: 10.5px; --r-meta-weight: 400; --r-meta-track: 0.2em; --r-meta-case: lowercase;
  --r-sec-gap: 44px; --r-sec-pad: 12px; --r-sec-rule-w: 0px; --r-sec-rule-pad: 0px;
  --r-head-rule-w: 1px; --r-head-pad: 16px;
  --r-frame: none; --r-frame-pad: 0px;
  --r-para: 1em; --r-row-gap: 8px; --r-col-gap: 20px;
}

/* ─── letterpress — Literata again, centred, rules above and below; the
   formal one. The same face as museum set differently, which is the whole
   argument that a register is more than a font choice. ───────────────── */
html[data-register="letterpress"] {
  --r-paper: #fdfbf4; --r-ink: #241d14; --r-soft: #75695a; --r-rule: #cfc4ae;
  --r-display: 'Literata', Georgia, serif;
  --r-body:    'Literata', Georgia, serif;
  --r-meta:    'Literata', Georgia, serif;
  --r-body-weight: 440;
  --r-size: 16.5px; --r-lead: 1.66; --r-measure: 56ch; --r-align: center;
  --r-h1-size: clamp(17px, 2.4vw, 22px); --r-h1-weight: 400; --r-h1-track: 0.28em; --r-h1-case: uppercase; --r-h1-lead: 1.3;
  --r-dek-size: 11.5px; --r-dek-track: 0.28em; --r-dek-case: uppercase; --r-dek-style: normal;
  --r-meta-size: 10.5px; --r-meta-weight: 500; --r-meta-track: 0.28em; --r-meta-case: uppercase;
  --r-sec-gap: 48px; --r-sec-pad: 14px; --r-sec-rule-w: 1px; --r-sec-rule-pad: 10px;
  --r-head-rule-w: 1px; --r-head-pad: 20px;
  --r-frame: 1px solid #cfc4ae; --r-frame-pad: 6px;
  --r-para: 1em; --r-row-gap: 9px; --r-col-gap: 24px;
}

/* ─── editorial — Bodoni Moda over Jost; the photography magazine. Added
   2026-09-13 with atelier, the owner: "build and ship it" — the fifth and
   sixth, which PAGES.md's "four to six, never fifteen" allows and no more.
   ⚠ A HIGH-CONTRAST DIDONE FOR THE NAME AND THE HEADINGS ONLY; the reading is
   Jost, a clean geometric sans, so a page of words stays a page of words —
   the drama is at display size, where Home needs it. The faces are the grounds
   study's PAPER pairing (presets.js → LOUPE_FONTS.paper), already licensed and
   loaded for the galleries; no new face. ─────────────────────────────── */
html[data-register="editorial"] {
  --r-paper: #fcfcfa; --r-ink: #0e0e0d; --r-soft: #6b6b67; --r-rule: #e0e0db;
  --r-display: 'Bodoni Moda', 'Bodoni 72', Didot, Georgia, serif;
  --r-body:    'Jost', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --r-meta:    'Jost', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --r-body-weight: 400;
  --r-size: 17px; --r-lead: 1.62; --r-measure: 60ch; --r-align: left;
  --r-h1-size: clamp(30px, 4.4vw, 46px); --r-h1-weight: 400; --r-h1-track: -0.01em; --r-h1-case: none; --r-h1-lead: 1.06;
  --r-dek-size: 15px; --r-dek-track: 0; --r-dek-case: none; --r-dek-style: italic;
  --r-meta-size: 10.5px; --r-meta-weight: 500; --r-meta-track: 0.22em; --r-meta-case: uppercase;
  --r-sec-gap: 54px; --r-sec-pad: 12px; --r-sec-rule-w: 1px; --r-sec-rule-pad: 8px;
  --r-head-rule-w: 0px; --r-head-pad: 0px;
  --r-frame: none; --r-frame-pad: 0px;
  --r-para: 1em; --r-row-gap: 8px; --r-col-gap: 22px;
}

/* ─── atelier — Fraunces over Karla; the studio where work is made by hand.
   ⚠ WARM, NOT TWEE: Fraunces at its default soft optical sizes and a plain
   400–500 weight — none of its "wonky" axis — over Karla, a friendly sans;
   labels in sentence case with a little tracking rather than shouted caps.
   For ceramics, textiles, sculpture and objects, which no register sounded
   like. The faces are the grounds study's CLOTH pairing (LOUPE_FONTS.cloth),
   which the textile galleries already wear. ─────────────────────────────── */
html[data-register="atelier"] {
  --r-paper: #fbf8f2; --r-ink: #2a2520; --r-soft: #74695d; --r-rule: #e4dbcc;
  --r-display: 'Fraunces', Georgia, serif;
  --r-body:    'Karla', 'Helvetica Neue', Arial, sans-serif;
  --r-meta:    'Karla', 'Helvetica Neue', Arial, sans-serif;
  --r-body-weight: 400;
  --r-size: 17px; --r-lead: 1.66; --r-measure: 60ch; --r-align: left;
  --r-h1-size: clamp(28px, 4vw, 42px); --r-h1-weight: 400; --r-h1-track: -0.005em; --r-h1-case: none; --r-h1-lead: 1.12;
  --r-dek-size: 15px; --r-dek-track: 0; --r-dek-case: none; --r-dek-style: italic;
  --r-meta-size: 12.5px; --r-meta-weight: 500; --r-meta-track: 0.04em; --r-meta-case: none;
  --r-sec-gap: 48px; --r-sec-pad: 12px; --r-sec-rule-w: 0px; --r-sec-rule-pad: 0px;
  --r-head-rule-w: 0px; --r-head-pad: 0px;
  --r-frame: none; --r-frame-pad: 0px;
  --r-para: 1em; --r-row-gap: 9px; --r-col-gap: 22px;
}

/* ═══ THREE MORE — THE SEVENTH TO NINTH (2026-09-13, 0031) ═══════════════════════════════════════
   The owner: "If we were to add three more registers, how could we do that in a way that would expand our appeal to
   artists as widely as possible" → "work up the comps for your approach". The six are quiet, literate and light; these
   three fill what none of them sounds like — LOUD, SPARE and RAW. Drawn at /comps/registers and chosen there ("looks
   great"); PAGES.md's old ceiling of six was the owner's to move, and he moved it. */

/* ─── poster — Anton over Archivo; the gig poster. Heavy condensed capitals for the name and the headings, a plain
   sans to read. For performance, music, illustration, street art, tattoo and design — the register that is bold rather
   than tasteful. ─────────────────────────────────────────────────────────────────────────────────────────────── */
html[data-register="poster"] {
  --r-paper: #f7f5f0; --r-ink: #0f0f0f; --r-soft: #5f5d58; --r-rule: #0f0f0f;
  --r-display: 'Anton', 'Impact', 'Haettenschweiler', 'Arial Narrow', sans-serif;
  --r-body:    'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --r-meta:    'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --r-body-weight: 400;
  --r-size: 17px; --r-lead: 1.55; --r-measure: 62ch; --r-align: left;
  --r-h1-size: clamp(44px, 7vw, 76px); --r-h1-weight: 400; --r-h1-track: 0.005em; --r-h1-case: uppercase; --r-h1-lead: 0.95;
  --r-dek-size: 14px; --r-dek-track: 0.08em; --r-dek-case: uppercase; --r-dek-style: normal;
  --r-meta-size: 12px; --r-meta-weight: 700; --r-meta-track: 0.12em; --r-meta-case: uppercase;
  --r-sec-gap: 52px; --r-sec-pad: 12px; --r-sec-rule-w: 3px; --r-sec-rule-pad: 8px;
  --r-head-rule-w: 6px; --r-head-pad: 18px;
  --r-frame: none; --r-frame-pad: 0px;
  --r-para: 1em; --r-row-gap: 8px; --r-col-gap: 20px;
}

/* ─── quiet — Cormorant Garamond Light over Jost Light; the white room. Very light, small, widely spaced, nothing
   ruled — the work does all the talking. For ceramics, jewellery, textiles, architecture, the minimal and the
   conceptual. Where press is clean, quiet is nearly silent. ────────────────────────────────────────────────── */
html[data-register="quiet"] {
  --r-paper: #f8f7f4; --r-ink: #34332f; --r-soft: #8f8c85; --r-rule: #e6e3dc;
  --r-display: 'Cormorant Garamond', 'Garamond', Georgia, serif;
  --r-body:    'Jost', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --r-meta:    'Jost', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --r-body-weight: 300;
  --r-size: 15.5px; --r-lead: 1.95; --r-measure: 50ch; --r-align: left;
  --r-h1-size: clamp(30px, 4vw, 44px); --r-h1-weight: 300; --r-h1-track: 0.04em; --r-h1-case: none; --r-h1-lead: 1.15;
  --r-dek-size: 12px; --r-dek-track: 0.24em; --r-dek-case: lowercase; --r-dek-style: normal;
  --r-meta-size: 10.5px; --r-meta-weight: 300; --r-meta-track: 0.3em; --r-meta-case: lowercase;
  --r-sec-gap: 72px; --r-sec-pad: 16px; --r-sec-rule-w: 0px; --r-sec-rule-pad: 0px;
  --r-head-rule-w: 0px; --r-head-pad: 0px;
  --r-frame: none; --r-frame-pad: 0px;
  --r-para: 1.3em; --r-row-gap: 12px; --r-col-gap: 28px;
}

/* ─── zine — Space Grotesk over Space Mono labels, one hot accent; the photocopied page. Deliberately unpolished:
   a heavy rule in the accent under the head, tight headings, labels typed. For collage, printmaking, punk and DIY,
   new media, sound and experimental work. ───────────────────────────────────────────────────────────────────── */
html[data-register="zine"] {
  --r-paper: #f1efe8; --r-ink: #121212; --r-soft: #55534d; --r-rule: #ff4f1f;
  --r-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --r-body:    'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --r-meta:    'Space Mono', ui-monospace, monospace;
  --r-body-weight: 400;
  --r-size: 16.5px; --r-lead: 1.6; --r-measure: 60ch; --r-align: left;
  --r-h1-size: clamp(34px, 5.4vw, 58px); --r-h1-weight: 700; --r-h1-track: -0.035em; --r-h1-case: none; --r-h1-lead: 0.98;
  --r-dek-size: 12px; --r-dek-track: 0.04em; --r-dek-case: uppercase; --r-dek-style: normal;
  --r-meta-size: 11.5px; --r-meta-weight: 700; --r-meta-track: 0.02em; --r-meta-case: uppercase;
  --r-sec-gap: 46px; --r-sec-pad: 10px; --r-sec-rule-w: 2px; --r-sec-rule-pad: 6px;
  --r-head-rule-w: 8px; --r-head-pad: 16px;
  --r-frame: 2px solid #121212; --r-frame-pad: 0px;
  --r-para: 1em; --r-row-gap: 8px; --r-col-gap: 18px;
}

/* ═══ PAGE COLOURS (2026-09-13, 0031 — catalogue.ground) ════════════════════════════════════════════════════════════════
   The owner: "I like the idea of offering different page colors." A small set that works with EVERY register, so the
   choice stays few: each re-sets the paper and the three inks that must read on it; the register keeps its faces,
   sizes and spacing. Tokens only, like a register. Chosen in Settings; drawn at /comps/registers (?ground=). */
html[data-register][data-ground="bone"]  { --r-paper: #f3ede1; --r-ink: #2b2620; --r-soft: #7a6f60; --r-rule: #dcd2bf; }
html[data-register][data-ground="stone"] { --r-paper: #e4e3df; --r-ink: #1e1e1c; --r-soft: #63625d; --r-rule: #c9c7c1; }
html[data-register][data-ground="slate"] { --r-paper: #2b2d30; --r-ink: #ecebe7; --r-soft: #a5a49f; --r-rule: #4a4c50; }
html[data-register][data-ground="ink"]   { --r-paper: #111111; --r-ink: #f1efe9; --r-soft: #9b9891; --r-rule: #2e2e2e; }
/* zine keeps its one hot accent on every paper */
html[data-register="zine"][data-ground] { --r-rule: #ff4f1f; }
