/* Sinaksarion TUI · project layer on the MEK design system */
/* A centred column of whole cells, scrolling down the page: 24px cells (14 × 30) on a tablet and up (18px on a 2x screen with a mouse), 16px on a
   phone (DESIGN.md "Scale" says 12 or 24, never between; MEK asked for 16 for reading on a phone). app.js sets how many cells wide each block is (--cols), up to 100, and from
   126 cells makes three columns (the life, the readings, the month), from 76 two (the life, the readings over the month), below it one. */
.page { --page-max: none; }   /* the column is as wide as the window allows (up to 150 cells), not the system's 1200px page */
:root { --screen-size: 16px; }
.screen { --cw: calc(var(--screen-size) * 7 / 12); --lh: calc(var(--screen-size) * 15 / 12);   /* a cell's width and height */
  position: relative; display: grid; justify-items: center; gap: var(--lh); width: fit-content; margin-inline: auto;
  padding: calc(2 * var(--lh)) calc(var(--pad, 3) * var(--cw)); }   /* the page frame stands one cell in from the edge: --pad cells of room round the content (app.js) */
#main { padding-block: var(--space-6, 24px); }
@media (min-width: 780px) { :root { --screen-size: 24px; } }
@media (min-width: 780px) and (min-resolution: 2dppx) and (hover: hover) and (pointer: fine) { :root { --screen-size: 18px; } }   /* a 2x screen with a mouse: an 18 cell is 21 × 45 device pixels, whole (as Village's text screens); a touch screen (a phone, a tablet) keeps 24 */
@media (max-width: 779px) { :is(.screen, .top) .tui { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: geometricPrecision; } }   /* 16px is off Dosage's grid: smoothed, not crisp (DESIGN.md "Scale") */
.screen .tui { --tui-size: var(--screen-size); margin: 0; width: calc(var(--cols, 47) * 1ch); max-width: 100%; }   /* .tui sets its own size: the blocks follow the screen's */
.screen .tui.nav { display: flex; justify-content: center; }
.cols { display: grid; gap: var(--lh); justify-items: center; align-items: start; font-family: var(--font-mono); font-size: var(--screen-size); }   /* in cells: its 2ch gap is two of them */   /* n1: stacked */
.cols.n2 { grid-template-columns: auto auto; column-gap: 2ch; }   /* the life, and the readings over the month */
.cols.n2 > [data-part=body] { grid-row: 1 / span 2; }
.cols.n3 { grid-template-columns: auto auto auto; column-gap: 2ch; }   /* the life, the readings, the month */
.cols > .tui { justify-self: start; }
.screen .tui[hidden] { display: none; }
.tui .g { background: var(--gilt-ground); }   /* a drop initial's field, as the part lays it */
.tui a { color: inherit; text-decoration: none; cursor: pointer; }
.tui a:is(:hover, :focus-visible) { color: var(--bg); background: var(--text-strong); outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tui .inv { color: var(--bg); background: var(--text-strong); }
.tui .land { color: color-mix(in srgb, var(--gilt) 28%, var(--bg)); }   /* the land, engraved back from the gilt ornament */
.tui .gilt { color: var(--gilt); }
.tui .rubric { color: var(--rubric); }
.top .tui { --tui-size: var(--screen-size); }   /* the theme pick, top right, in the screen's cells */
.top { display: flex; justify-content: space-between; align-items: center; padding-block: var(--space-4, 16px); }   /* the name left, the theme pick top right */
.tui .keycap { color: var(--bg); background: var(--text-muted); }   /* a command's key, as the keybar draws it */
.top .pick-btn .tui-caret { color: var(--text-muted); }   /* the theme pick: its label and arrow quiet, its value strong */
.top .pick-btn:is(:hover, :focus-visible, [aria-expanded="true"]) .tui-caret { color: inherit; }
.screen > .frame { position: absolute; left: 0; right: 0; top: 0; margin: auto; width: calc(var(--cols) * 1ch); pointer-events: none; }   /* the frame, over the card's own edge (app.js sets its --cols) */
