/* © 2026 MEK.txt. All rights reserved. */
/* Synaxarion: this idea's differences from the design system. Always linked last.
   Deviations (the system has no reading measure or reading line yet; promote at a second project):
   --syn-measure 560px, the starter's own column, about 65-75 characters a line; --syn-line 24px, on the space scale. */
:root { --syn-measure: 560px; --syn-line: var(--space-6); }
/* One ground everywhere. The body's background normally moves to the window's canvas, which some screens colour-manage
   apart from the page's own layers: the month column (sticky, scrolling on its own) then sat a shade off the rest. With
   the root holding the ground too, the body paints its own like any element, and every layer matches */
html { background: var(--bg); }
body { min-height: 100dvh; }

/* The top bar wraps rather than squeeze: on a phone the language switch goes under the crumbs, whole */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); padding-block: var(--space-8); }
.top > .top-tools { flex: none; }
/* On a phone, two tidy rows: the crumbs with the theme at the far right, then the calendar (primary) with Today and
   the search beside it and the languages at the far right; while searching, a third, the field's. The tools' wrapper
   steps aside (display: contents) so each is placed */
@media (max-width: 900px) {
  .top { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "crumbs crumbs crumbs crumbs theme" "cal today search . lang";
    gap: var(--space-4) var(--space-2); padding-bottom: calc(var(--space-8) - var(--space-3)); }   /* the frame 12px nearer */
  .top > .crumbs { grid-area: crumbs; }
  .top > .top-tools { display: contents; }
  .top-tools > #cal-open { grid-area: cal; }
  .top-tools > .syn-day-nav-top > #day-nav { grid-area: today; }
  .top-tools > #find-open { grid-area: search; }
  .top-tools > .pick { grid-area: theme; justify-self: end; }   /* at the far right edge; its menu opens from there (.end) */
  .top-tools > #lang { grid-area: lang; }
}

/* The language switch's flags (flags.svg): 18x12 pixels at 1.5x, as an icon in a button is. Deviation: their colours
   are the flags' own, in every theme; only the outline is the theme's ink. */
.flag { display: block; width: 27px; height: 18px; }
/* No [1] [2] beside the flags, as the system does for an icon-only switch button: the number still works, but only
   while focus is in the switch, like its arrows; it's not a page shortcut */
#lang kbd.key { display: none; }
.syn { display: grid; gap: var(--rhythm); max-width: var(--syn-measure); }   /* head | readings | the day */
/* The whole day sits in the crenellated frame (the motif part), the great feasts' gold double line inside it. The measure stays the text's: the frame and its air
   are added round it. On a phone the frame is 1x (app.js sets data-scale), hairlines like the headpiece's rule */
.syn.motif-frame { --syn-air: var(--space-3);
  max-width: calc(var(--syn-measure) + var(--frame-l) + var(--frame-r) + 2 * var(--syn-air));
  padding: calc(var(--frame-t) + var(--syn-air)) calc(var(--frame-r) + var(--syn-air))
    calc(var(--frame-b) + var(--syn-air)) calc(var(--frame-l) + var(--syn-air));
  margin-block-end: var(--space-12); }
/* A phone's card (its frame at 1x: app.js sets data-scale from the window) is tighter, inside and in the feasts' boxes.
   Keyed to the card, not the window, so the download, laid out at the desktop's size on any screen, keeps the desktop's */
.syn.motif-frame[data-scale="1"] { --syn-air: var(--space-2); }
.syn.motif-frame[data-scale="1"] .syn-entry[data-frame] { padding: calc(var(--frame-t) + var(--space-4)) calc(var(--frame-r) + var(--space-4))
  calc(var(--frame-b) + var(--space-4)) calc(var(--frame-l) + var(--space-4)); }

/* The month's sidebar is always shown: no toggle, so its head keeps no room for one */
.syn-cal-side .sidebar-head { padding-right: 0; }

/* The head: the day (the page's heading), then the Church date and the tone, read at a glance */
.syn-head { display: grid; gap: var(--space-1); }   /* the date, the Church lines hung close under it */
/* The date and Download on one row: the date wraps, the button stays its size at the far right, on the date's first line */
.syn-date-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.syn-download { flex: none; margin-top: var(--space-1); }
/* Close under the head: the next group (the tone and readings) a short step below its last line */
.syn-head { margin-bottom: calc(var(--space-2) + var(--space-3) - var(--rhythm)); }   /* 20px to the tone and readings */
.syn-civil { font: var(--text-xl)/var(--leading-blackletter) var(--font-blackletter); color: var(--text-strong); text-wrap: balance; }   /* MEKZANTINE 36, on its 18 grid */
.syn-church { color: var(--text-muted); min-height: 1lh; }   /* a day with no tone keeps the line, so nothing jumps */
.syn-church strong { color: var(--text-strong); }
#fast:empty { display: none; }   /* a day with no fast takes no line: the readings follow the tone closely */
/* The headpiece under the date: a double rule (two hairlines, a hairline apart) in the gold frame's resting tone, so it
   matches the great feasts' frame in every theme, and one 8x8 woodblock ornament at 2x in its gap. The ornament's
   16px is set here, so it holds its room before js/motifs.js draws it */
.syn-rule { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-2); margin-block: var(--space-3); }
.syn-rule::before, .syn-rule::after { content: ""; box-sizing: border-box; block-size: calc(3 * var(--stroke)); border-block: var(--stroke) solid var(--motif-2); }
.syn-rule .motif { inline-size: var(--space-4); block-size: var(--space-4); --motif-1: var(--accent); }

/* The day: every commemoration in the system's box (px-box), a great feast's in the gold frame; boxes a step apart */
.syn-list { display: grid; gap: var(--space-4); }
.syn-entry { display: grid; gap: var(--space-3); }
/* A great feast's box wears the gold double-line frame (the motif part): its padding grows by the frame's own width,
   as css/parts/motif.css asks, so the words keep their room inside it */
.syn-entry[data-frame] { padding: calc(var(--frame-t, 1px) + var(--space-6)) calc(var(--frame-r, 1px) + var(--space-6))
  calc(var(--frame-b, 1px) + var(--space-6)) calc(var(--frame-l, 1px) + var(--space-6)); }
.syn-name { font: var(--text-lg)/var(--leading-display) var(--font-heading); color: var(--text-strong); }
.syn-life { line-height: var(--syn-line); }

/* A saint's head: tag, name and when-and-where, and the map beside them, top-aligned. In a column narrower than 480px
   (a phone; the sidebar changes the column, so it's the column's width, not the screen's) the map goes under them.
   Deviation: the place map (.syn-map, map.svg), 192×108: a 96×54 land bitmap at 2×; sea --surface, land --line, the
   calendar part's cross in --text-strong with a --bg knock-out. The system has no map or locator part yet; promote at
   a second project. */
.syn { container-type: inline-size; }
.syn-entry-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4); align-items: start; }
/* The map is as tall as the tag, name and when-and-where beside it (at least its own 108px), 192px wide; locator.js
   fills it at a whole zoom round the place. On a phone, under the words, it's its own 192×108 again */
.syn-map-box { position: relative; align-self: stretch; width: 192px; min-height: 108px; overflow: hidden; }
.syn-map-box > .syn-map { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The countries' names on it (locator.js places them): Dosage Mono at 12, its own grid, so crisp, the smallest crisp
   size of the system's faces (deviation: the text tokens stop at 14), in the muted ink with a 1px knock-out in the
   ground on four sides, as the marker has, so a name reads on land and sea */
.syn-map-name { position: absolute; font: 12px/1 var(--font-mono); white-space: nowrap; color: var(--text-muted);
  text-shadow: 1px 0 var(--bg), -1px 0 var(--bg), 0 1px var(--bg), 0 -1px var(--bg); pointer-events: none; }
.syn-map-name[hidden] { display: none; }
.syn-entry-head.no-map { grid-template-columns: minmax(0, 1fr); }
.syn-entry-words { display: grid; gap: var(--space-1); }   /* tag, name, about: one unit */
.syn-entry-words > :first-child { margin-bottom: var(--space-1); }   /* the tag a step clear of the name */
/* The tag opens how to keep the day (the system's disclosure): what to do, what to avoid, in the reading face */
/* The tag's row is a bar between two hairlines, with a hint after the tag ("Klik untuk rincian", "…menutup" open) */
.syn-guide { border-block: var(--stroke) solid var(--line); }
.syn-guide > summary { align-items: center; gap: var(--space-2); width: 100%; padding-block: var(--space-2); }
.syn-guide > summary > .tag { flex: none; white-space: nowrap; }   /* the tag never breaks; the hint may wrap */
.syn-guide-hint { color: var(--text-muted); min-width: 0; }
.syn-guide:not([open]) .when-open, .syn-guide[open] .when-shut { display: none; }
/* The fast's line opens the same way, but quietly: no hairlines, no hint, a closed row exactly as tall as a fast-free one */
.syn-fast > summary { --ink: var(--text-muted); }   /* muted like the lines above it; the system's hover and open inks still lift it */
.syn-guide-body { display: grid; gap: var(--space-1); padding-block: var(--space-2); }
.syn-guide-kind { font: inherit; color: var(--text-muted); margin-top: var(--space-2); }
.syn-guide-body ul { margin: 0; padding-left: var(--space-4); line-height: var(--syn-line); }
/* A narrow column (a phone): the map goes under the words and runs the column's full width at the map's own 16:9
   (locator.js keeps it at a whole zoom), and a saint's name steps down to 19px (deviation: no token between 16 and 24),
   smoothed, since 19 is off Dosage's grid; the date steps down to 29, smoothed; Download is its icon. Keyed to the column, so the download, laid out wide, keeps the wide look */
@container (max-width: 479px) {
  .syn-entry-head { grid-template-columns: minmax(0, 1fr); }
  .syn-map-box { width: 100%; min-height: 0; aspect-ratio: 96 / 54; align-self: start; }
  .syn-name { font-size: calc(var(--text-md) + 3px); -webkit-font-smoothing: antialiased; }   /* 19: off the grid, so smoothed */
  .syn-civil { font-size: calc(var(--text-xl) * 3 / 4 + 2px); -webkit-font-smoothing: antialiased; }   /* the date at 29, between MEKZANTINE's 18 and 36: off its grid, so smoothed */
  /* Download, the icon only: the word stays for screen readers (the system's visually-hidden), and the button takes the
     system's icon-only square and icon place (button.css; its own rule wants the icon alone, so it's mirrored here) */
  .syn-download > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .syn-download { width: var(--btn-icon-box); height: var(--btn-icon-box); padding: var(--btn-icon-pad); gap: 0; justify-content: flex-start; align-items: flex-start; }
  .syn-download:is(:active:not(:disabled), .pushed) { padding: var(--btn-icon-pad-pushed); }
  .syn-download > .icon { margin: 0; }   /* not pulled to the edge, as an icon beside words is */
}
.syn-map { display: block; }
.syn-map-sea { fill: var(--surface); }
.syn-map-land { fill: var(--line); }
.syn-map-edge { fill: var(--bg); }
.syn-map-mark { fill: var(--text-strong); }
.syn-also { line-height: var(--syn-line); color: var(--text-muted); }   /* the others remembered: names only */
.syn-also .t-label { color: var(--text-soft); }

/* The readings, by kind: "Epistle", then "Injil", each a small heading over one line per set, the reference in the
   strong ink and where it comes from after it in the muted one. In the reading face, not the list's mono: concise
   lines that wrap like text. */
/* The Liturgy, one group with no lines: the tone, then the readings, a step apart; the day 32px below, not the card's 48 */
.syn-liturgy { display: grid; gap: var(--space-3); margin-bottom: calc(-1 * var(--space-4)); }
.syn-readings { display: grid; gap: var(--space-3); }
.syn-readings[hidden] { display: none; }   /* a day with no readings: the grid mustn't bring it back */
/* Each kind in one shared column at the left, its references beside it */
.syn-readings-list { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-4); row-gap: var(--space-2); }
.syn-reading { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: var(--space-1); }
.syn-reading-kind { grid-column: 1; grid-row: 1; }   /* its lines fill the rows beside it */
.syn-reading-line { grid-column: 2; }
.syn-reading-kind { font: inherit; color: var(--text-muted); }
.syn-reading-line { line-height: var(--syn-line); }
.syn-about { color: var(--text-muted); line-height: var(--syn-line); }   /* when and where: a phrase, in the reading face */
.syn-reading-ref { color: var(--text-strong); }
.syn-reading-from { color: var(--text-muted); }

/* The month beside the reading: the design system's calendar part, in its sidebar at the page's far right (.end). The
   sidebar is as wide as the month (7 days and their gaps, and its scrollbar's room); its toggle sits on the date's
   centre line. 900px and under it stacks over the reading, opened by the calendar button, which a wider screen
   doesn't need. */
.syn-layout { --sidebar-w: 336px; --sidebar-pad: 0px; --sidebar-row: 48px; }   /* the date's line: 36 × 1.34 */
.syn-cal-side { --sidebar-display: grid; gap: var(--space-4); align-content: start; padding-bottom: var(--space-8); }
/* On a phone (Today is in the top bar, not here) the Church's span hangs under the month's name, 16px nearer it, and
   the month's grid 16px further below */
/* While the month unfolds or folds on a phone (unfold.js), it stays shown and clips to the height being eased */
@media (max-width: 900px) { .syn-layout.unfolding > .sidebar { display: var(--sidebar-display, block); overflow: hidden; } }
@media (max-width: 900px) { #cal-church { margin-block: calc(-1 * var(--space-4)) var(--space-4); } }
@media (min-width: 901px) { #cal-open { display: none; } }

/* Finding a saint's day by name (find.js), in the top bar: in its middle on a wide screen, truly centred (two equal
   sides); on a phone a row of its own under the bar, shown while the search button beside Today is on (.searching).
   What it finds drops down under the field, as wide as it and a fixed height, scrolling inside, so typing never
   resizes it (as the palette; its rows aren't one height here, a name taking two or three lines at this width) */
.syn-month { display: grid; gap: var(--space-4); align-content: start; }   /* the gap that was the aside's */
.syn-find { position: relative; display: flex; align-items: center; }
.syn-find .field { flex: 1; }
.syn-find .close[hidden] { display: none; }
.syn-find > .syn-found { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: var(--z-menu);
  --fill: var(--bg); --fill-to: var(--bg); --edge: var(--menu-edge); --edge-to: var(--menu-edge); padding: var(--space-2) var(--space-3);
  height: min(480px, 100dvh - 200px); }
@media (min-width: 901px) {
  .top { display: grid; grid-template-columns: 1fr minmax(0, var(--syn-find-w)) 1fr; --syn-find-w: 288px; }
  .top > .crumbs { justify-self: start; }
  .top > .top-tools { justify-self: end; }
  #find-open { display: none; }
}
@media (max-width: 900px) {
  .top.searching { grid-template-areas: "crumbs crumbs crumbs crumbs theme" "cal today search . lang" "find find find find find"; }
  .top > .syn-find { grid-area: find; }
  .top:not(.searching) > .syn-find { display: none; }   /* and no row of its own, so no gap under the bar */
}
/* Deviation: a list of found things as the palette's rows (its > sliding in, its 1px rule), not in a dialog but in a
   dropdown box under the field at a fixed height (not --palette-rows: a name wraps to two or three lines at the
   field's width), under the middle of the top bar on a wide screen and under the field's own row on a phone, and two
   lines a row (the name, then its day). If another project
   wants one, it's a part for the system. */
.syn-found { contain: size; overflow-y: auto; scrollbar-gutter: stable; --pick-mark: 9px; }
.syn-found [role="option"] { position: relative; display: grid; padding: var(--space-2) var(--pick-mark) var(--space-2) 0;
  border-bottom: var(--stroke) solid var(--line); color: var(--text-soft); text-decoration: none; cursor: pointer; }
.syn-found [role="option"]:last-of-type { border-bottom-color: transparent; }
.syn-found [role="option"]::before { content: ">"; position: absolute; left: 0; top: var(--space-2); width: var(--pick-mark);
  font-size: 13px; line-height: 18px; color: var(--accent); clip-path: inset(0 100% 0 0); --slide-px: 9;
  transition: clip-path calc(var(--slide-px) * var(--px-frame)) steps(9, end); }
.syn-found [role="option"] > * { --slide-px: 9; transition: translate calc(var(--slide-px) * var(--px-frame)) steps(9, end); }
.syn-found-name { font-size: var(--text-sm); line-height: 18px; }
.syn-found [aria-selected="true"] { color: var(--text-strong); }
.syn-found [aria-selected="true"] > * { translate: var(--pick-mark) 0; }
.syn-found [aria-selected="true"]::before { clip-path: inset(0); }
.syn-found [role="option"]:focus-visible { outline: none; }   /* focus stays in the field; the row is marked by > */
.syn-found-more { margin-top: var(--space-2); }
/* Today's two places (app.js moves it): neither takes room of its own, so the empty one leaves no gap */
.syn-day-nav-top, .syn-day-nav-side { display: contents; }

/* Deviation: Sunday and Saturday, the Church's two great days of the week, are filled in 200, the first and last
   columns (the week starts on Sunday). If another project wants it, it's an option for the calendar part. */
.calendar td:is(:first-child, :last-child) > .calendar-day { --fill: var(--200); }

/* The foot: who made this and that it's a draft, quiet, at the reading's measure, under the day and the month */
.syn-foot { max-width: var(--syn-measure); padding-block: var(--space-4) var(--space-12); }
.syn-foot .t-note { font-family: var(--font-ui); line-height: var(--syn-line); }   /* Dosage Humanist, the reading face, not the notes' Mono */
