/* ==========================================================================
   COURTS OF HEAVEN — "The Aisle" (2026-11-30)
   One bespoke stylesheet for the page and all its 34 languages. Idea, trace and every decision: docs/DESIGN.md.
   Logical properties everywhere (right-to-left languages mirror by themselves). No library, no template class.
   State classes on <html>: is-walking (JS on), is-playing (the full video plays). On tiles/cards: is-read, is-here, is-now.
   ========================================================================== */

:root {
    --night:     #070b16;
    --night-2:   #0e1527;
    --night-3:   #17223d;
    --starlight: #a9d6e8;
    --gold:      #d9b65f;
    --gold-hi:   #f3d683;
    --gold-lo:   #9b7a2a;
    --ivory:     #f5f0e4;
    --paper:     #ebe4d2;
    --paper-hi:  #fbf8ef;
    --ink:       #17202f;
    --ink-2:     #36415a;
    --brass:     #583f08;
    --steel:     #1b4658;
    --wine:      #7a2a35;
    --dawn:      #e99a80;

    --serif:   "Literata", Georgia, "Times New Roman", "Segoe UI", "Nirmala UI", "Leelawadee UI", "Khmer UI", "Iskoola Pota", "Noto Sans", system-ui, serif;
    --display: "Cinzel", "Trajan Pro", "Times New Roman", var(--serif);

    --fs:      1;            /* the reader's text size (A↕), set by court.js */
    --aisle:   0;            /* scroll position, 0 to 1, set by court.js */
    --bar-h:   3.5rem;
    --measure: 41rem;
    --wide:    62rem;
    --edge:    clamp(1rem, 4vw, 2rem);
    --radius:  12px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
    font-size: calc(100% * var(--fs));
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--bar-h) + 1rem);
    background: var(--night);
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font: 400 1.0625rem/1.72 var(--serif);
    overflow-x: clip;
    text-rendering: optimizeLegibility;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }
img, video { max-width: 100%; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: var(--brass); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.sheet :focus-visible { outline-color: var(--brass); }
[hidden] { display: none !important; }

/* right-to-left and non-Latin scripts: nothing that only exists in Latin */
html:not([data-script="latin"]) .hall__title,
html:not([data-script="latin"]) .tile__no,
html:not([data-script="latin"]) .hearing__no { letter-spacing: 0; text-transform: none; }
html:not([data-script="latin"]) em, html:not([data-script="latin"]) i, html:not([data-script="latin"]) .word blockquote,
html:not([data-script="latin"]) .record blockquote { font-style: normal; }
html[data-script="other"] body { line-height: 1.85; }
[dir="rtl"] .bible-ref, [dir="rtl"] cite { unicode-bidi: isolate; }

/* ================= the sealed tile: the one motif (docket, rail, section seal, running head) ================= */
.seal {
    display: inline-grid; place-items: center; flex: none;
    inline-size: 2.5rem; block-size: 2.5rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #1d2a4a, var(--night));
    border: 2px solid var(--gold);
    box-shadow: inset 0 0 0 3px var(--night), inset 0 0 0 4px rgba(217, 182, 95, .45);
    font: 1.15rem/1 "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    transition: background-color .5s, border-color .5s, box-shadow .5s;
}

/* ================= the bar ================= */
.bar {
    position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 60;
    block-size: var(--bar-h);
    display: flex; align-items: center; gap: .6rem;
    padding-inline: .6rem;
    background: var(--night);
    border-block-end: 1px solid rgba(217, 182, 95, .4);
    color: var(--ivory);
}
.bar::before { /* the night warms toward dusk as you walk */
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, #3a2748, #7a4a5a);
    opacity: calc(var(--aisle) * .8);
}
.bar__mark { display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; text-decoration: none; }
.bar__mark .seal { inline-size: 2.25rem; block-size: 2.25rem; font-size: 1.05rem; }
.bar__head {
    flex: 1; min-inline-size: 0; margin: 0;
    display: flex; align-items: baseline; gap: .6rem;
    font: 600 .8rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase;
    color: var(--ivory);
}
html:not([data-script="latin"]) .bar__head { font-family: var(--serif); text-transform: none; letter-spacing: 0; font-size: .95rem; }
.bar__no { color: var(--gold); flex: none; font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .06em; }
.bar__no:empty { display: none; }
.bar__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__tools { display: flex; align-items: center; gap: .4rem; flex: none; }
.btn-bar, .bar .share-btn {
    min-inline-size: 2.75rem; min-block-size: 2.75rem;
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: 0 .6rem;
    background: var(--night-2); color: var(--gold-hi);
    border: 1px solid rgba(217, 182, 95, .6); border-radius: 10px;
    font: 600 1rem/1 var(--serif); cursor: pointer;
}
.btn-bar:hover, .bar .share-btn:hover { background: var(--gold); color: var(--night); border-color: var(--gold); }
.bar .share { --share-btn-bg: var(--night-2); --share-btn-fg: var(--gold-hi); --share-accent: var(--gold); --share-on-accent: var(--night);
              --share-panel-bg: var(--night-2); --share-panel-fg: var(--ivory); --share-field-bg: var(--night); --share-radius: 10px; --share-radius-sm: 8px; }
.bar .share-btn { font-size: .95rem; }

/* ================= the hall ================= */
.hall { background: var(--night); color: var(--ivory); text-align: center; }
.hall__stage {
    position: relative; isolation: isolate; overflow: hidden;
    padding: calc(var(--bar-h) + clamp(1rem, 3vw, 2rem)) var(--edge) clamp(1.2rem, 3vw, 2rem);
}
.hall__foot { padding: .2rem var(--edge) clamp(2rem, 5vw, 3.5rem); background: var(--night); }
.hall__art { position: absolute; inset: 0; z-index: -3; }
.hall__art img {
    inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 32%;
    transform-origin: 50% 40%; animation: hall-arrive 2.6s cubic-bezier(.2, .7, .2, 1) both;
}
.hall__stage::before { /* the scrim: the courtroom shows at the top and sinks into solid night at the foot, where the video sits */
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(70% 38% at 50% 15%, rgba(7, 11, 22, .8), rgba(7, 11, 22, 0) 100%),
        linear-gradient(180deg, rgba(7, 11, 22, .6) 0, rgba(7, 11, 22, .5) 30%, rgba(7, 11, 22, .86) 72%, #070b16 100%);
}
.hall__rays { /* the Judge's light breathes; it brightens while the video plays */
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(48% 62% at 50% 0%, rgba(169, 214, 232, .34), rgba(169, 214, 232, .08) 55%, transparent 75%);
    opacity: .85; transition: opacity 1.2s ease;
    animation: hall-breathe 9s ease-in-out infinite;
}
.is-playing .hall__rays { opacity: 1; animation: none; }
@keyframes hall-arrive { from { transform: scale(1.05); } to { transform: scale(1); } }
@keyframes hall-breathe { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }

.hall__inner { max-inline-size: 66rem; margin-inline: auto; }
.hall__title {
    margin: 0 auto .5rem; max-inline-size: 62rem;
    font: 600 clamp(1.35rem, 2.4vw + .65rem, 2.55rem)/1.16 var(--serif);
    color: var(--gold-hi);
    text-shadow: 0 2px 22px rgba(0, 0, 0, .75), 0 0 2px rgba(0, 0, 0, .6);
}
html[data-script="latin"] .hall__title { font-family: var(--display); letter-spacing: .03em; text-transform: uppercase; }
.hall__lede {
    margin: 0 auto; max-inline-size: 54rem;
    font: italic 400 clamp(.98rem, 1.2vw + .5rem, 1.12rem)/1.5 var(--serif); color: var(--ivory);
    text-shadow: 0 1px 12px rgba(0, 0, 0, .8);
}
html:not([data-script="latin"]) .hall__lede { font-style: normal; }
/* the long lines under the title and the video are body text: justified [OWNER 2026-11-19]; the last line stays centred so the block keeps the hall's axis */
.hall__lede, .watch__caption, .watch__intro { text-align: justify; text-align-last: center; hyphens: auto; hyphenate-limit-chars: 8 4 4; }

/* ---- watch (English): the full video, centered, on a brass plate ---- */
.watch__kicker {
    display: inline-block; margin: clamp(.8rem, 2vw, 1.3rem) 0 .7rem; padding: .3rem 1rem; border-radius: 999px;
    background: rgba(7, 11, 22, .82); border: 1px solid rgba(217, 182, 95, .4);
    font: 600 .8rem/1.3 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi);
}
html:not([data-script="latin"]) .watch__kicker { font-family: var(--serif); letter-spacing: .04em; text-transform: none; font-size: .95rem; }
.frame {
    margin: 0 auto;
    inline-size: min(100%, 44rem, calc((100svh - 21.5rem) * 1.7778));
    min-inline-size: min(100%, 20rem);
}
.plate {
    display: block; inline-size: fit-content; max-inline-size: 100%; margin: 0 auto -1px;
    padding: .4rem 1.1rem;
    background: var(--night-2); color: var(--gold-hi);
    border: 1px solid var(--gold); border-block-end: 0; border-radius: 10px 10px 0 0;
    font: 600 .86rem/1.3 var(--serif); text-align: center;
    transition: background-color 1.2s, box-shadow 1.2s;
}
.is-playing .plate { background: #23304f; box-shadow: 0 -6px 26px rgba(217, 182, 95, .35); }
.frame__screen {
    aspect-ratio: 16 / 9; background: #000;
    border: 1px solid var(--gold); border-radius: 2px 2px 8px 8px;
    box-shadow: 0 0 0 1px rgba(217, 182, 95, .25), 0 26px 64px rgba(0, 0, 0, .65);
    transition: box-shadow 1.2s;
}
.is-playing .frame__screen { box-shadow: 0 0 0 1px rgba(217, 182, 95, .5), 0 0 42px rgba(217, 182, 95, .3), 0 26px 64px rgba(0, 0, 0, .65); }
.frame__screen video, .story2__screen video { display: block; inline-size: 100%; block-size: 100%; background: #000; object-fit: contain; }
.watch__caption, .watch__hint, .watch__intro { margin: .7rem auto 0; max-inline-size: 40rem; font-size: .95rem; line-height: 1.55; color: var(--ivory); }
.watch__hint { color: #cdd6e4; font-size: .88rem; margin-block-start: .3rem; }
.watch__intro { margin-block-start: 1.6rem; font-size: 1rem; }
.watch a, .hall a { color: var(--gold-hi); }

.chips { margin-block-start: 1rem; }
.chips__label { margin: 0 0 .5rem; font: 600 .85rem/1.3 var(--serif); color: var(--gold); }
.chips__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }

.story2 { margin: 2rem auto 0; max-inline-size: 30rem; }
.story2__title { margin: 0 0 .6rem; font: 600 1rem/1.3 var(--serif); color: var(--gold-hi); }
.story2__screen { aspect-ratio: 16 / 9; background: #000; border: 1px solid rgba(217, 182, 95, .55); border-radius: 8px; overflow: hidden; }
.story2__caption { margin: .6rem 0 0; font-size: .9rem; line-height: 1.5; color: #cdd6e4; }

/* the stamp: a time on the record (and the page's buttons) */
.stamp {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    min-block-size: 2.75rem; padding: .35rem .95rem;
    border: 1px solid var(--gold); border-radius: 999px;
    background: rgba(14, 21, 39, .85); color: var(--gold-hi);
    font: 600 .9rem/1.2 var(--serif); text-decoration: none; cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.stamp:hover { background: var(--gold); color: var(--night); }
.stamp__play { font-size: .8em; }
[dir="rtl"] .stamp__play { display: inline-block; transform: scaleX(-1); }
.stamp--chip { min-block-size: 2.75rem; }
.stamp.is-now { background: var(--gold); color: var(--night); box-shadow: 0 0 0 3px rgba(243, 214, 131, .35); }
.stamp--play { background: var(--gold); color: var(--night); }
.stamp--play:hover { background: var(--gold-hi); }
.stamp--ghost { background: transparent; }
.sheet .stamp, .record .stamp { }

/* ================= the docket: the aisle floor ================= */
.docket-wrap { background: linear-gradient(180deg, var(--night), var(--night-2)); padding: clamp(1.5rem, 4vw, 2.5rem) var(--edge) clamp(2rem, 5vw, 3.5rem); border-block-end: 1px solid rgba(217, 182, 95, .5); }
.docket { max-inline-size: 66rem; margin-inline: auto; }
.docket__title { margin: 0 0 1rem; text-align: center; font: 600 .8rem/1.3 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
html:not([data-script="latin"]) .docket__title { font-family: var(--serif); letter-spacing: .04em; text-transform: none; font-size: 1rem; }
.docket__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .55rem; }
.tile {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "seal no" "seal label"; column-gap: .6rem; align-items: center;
    min-block-size: 3.5rem; padding: .5rem .7rem;
    color: var(--ivory); text-decoration: none; text-align: start;
    background: linear-gradient(150deg, #131d38, #0a1020);
    border: 1px solid rgba(217, 182, 95, .38); border-radius: 10px;
}
.tile .seal { grid-area: seal; inline-size: 2.2rem; block-size: 2.2rem; font-size: 1rem; }
.tile__no { grid-area: no; font: 600 .74rem/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .12em; color: var(--gold); }
.tile__label { grid-area: label; font: 500 .9rem/1.25 var(--serif); overflow-wrap: anywhere; }
.tile:hover { border-color: var(--gold); background: linear-gradient(150deg, #1b2a4f, #0e1630); }
.tile:hover .tile__label { color: var(--gold-hi); }
.tile.is-read .seal, .rail__tile.is-read .seal { background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold-lo)); border-color: var(--gold-hi); box-shadow: inset 0 0 0 3px #3a2c0a, inset 0 0 0 4px rgba(243, 214, 131, .6); }
.tile.is-here { border-color: var(--gold-hi); box-shadow: 0 0 0 2px rgba(243, 214, 131, .35); }
.docket--hall { margin-block-start: clamp(1.2rem, 3vw, 2rem); text-align: start; }
.docket--hall .docket__list { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); }
.docket--hall .tile { background: rgba(10, 16, 32, .82); }

/* ================= the rail: the aisle as a column of tiles (wide screens; JS builds it) ================= */
.rail {
    position: fixed; z-index: 40; inset-inline-start: .7rem; inset-block-start: calc(var(--bar-h) + 1rem);
    display: none; flex-direction: column; align-items: center; gap: 3px;
    --t: clamp(1.1rem, calc((100svh - var(--bar-h) - 2rem - 66px) / 23), 1.9rem);
    opacity: 0; pointer-events: none; transition: opacity .4s;
}
.rail::before { /* the line between the tiles fills with gold as you walk */
    content: ""; position: absolute; inset-block: 0; inset-inline-start: calc(var(--t) / 2 - 1px); inline-size: 2px; z-index: -1;
    background: linear-gradient(180deg, var(--gold) calc(var(--aisle) * 100%), rgba(23, 32, 47, .28) calc(var(--aisle) * 100%));
}
.is-walking .rail { opacity: 1; pointer-events: auto; }
.rail__tile { position: relative; display: block; inline-size: var(--t); block-size: var(--t); text-decoration: none; }
.rail__tile .seal { inline-size: var(--t); block-size: var(--t); font-size: calc(var(--t) * .5); border-width: 1px; box-shadow: none; background: var(--night); }
.rail__tile.is-here .seal { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.rail__tile::after { /* the name of the tile, on hover */
    content: attr(data-label); position: absolute; inset-inline-start: calc(100% + .6rem); inset-block-start: 50%; transform: translateY(-50%);
    white-space: nowrap; padding: .3rem .7rem; border-radius: 8px; background: var(--night-2); color: var(--ivory); border: 1px solid var(--gold);
    font: 500 .85rem/1.2 var(--serif); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5;
}
.rail__tile:hover::after { opacity: 1; }
@media (min-width: 1180px) and (min-height: 600px) { .rail { display: flex; } }

/* ================= the sheet: daylight reading ================= */
/* overflow-wrap: anywhere: a language file may hold a string with no space in it (the Odia file, line 715, has 1,203 joined characters of machine-translation damage: 12,000 px wide
   before this rule). Such a string wraps inside its box instead of widening the page; ordinary words are never broken, because a word that fits is left alone. */
.sheet { background: var(--ivory); color: var(--ink); padding-block: clamp(1rem, 3vw, 2rem); overflow-wrap: anywhere; }
.hearing { padding: clamp(2.6rem, 6vw, 4.4rem) var(--edge) clamp(1.4rem, 3vw, 2.2rem); }
.hearing + .hearing { border-block-start: 1px solid rgba(23, 32, 47, .14); }
.hearing__head, .hearing__body { max-inline-size: var(--measure); margin-inline: auto; }
.hearing__head {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "seal no" "seal title"; column-gap: 1rem; align-items: center;
    margin-block-end: 1.7rem; padding-block-end: 1rem; border-block-end: 2px solid var(--ink);
}
.hearing__head .seal { grid-area: seal; inline-size: 3.4rem; block-size: 3.4rem; font-size: 1.5rem; align-self: center; }
.hearing__no { grid-area: no; font: 600 .85rem/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .2em; color: var(--brass); }
.hearing__title { grid-area: title; margin: .15rem 0 0; font: 600 clamp(1.5rem, 3.6vw, 2.15rem)/1.2 var(--serif); color: var(--ink); }
.hearing.is-read .hearing__head .seal { background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold-lo)); border-color: var(--gold-hi); box-shadow: inset 0 0 0 3px #3a2c0a, inset 0 0 0 4px rgba(243, 214, 131, .6); }

.hearing__body h3 { margin: 2.2rem 0 .7rem; font: 600 clamp(1.2rem, 2.6vw, 1.45rem)/1.3 var(--serif); color: var(--ink); }
.hearing__body h4 { margin: 1.6rem 0 .5rem; font: 600 1.08rem/1.35 var(--serif); }
.hearing__body p { margin: 0 0 1.1em; }
.hearing__body p:last-child { margin-block-end: 0; }
.hearing__body strong { font-weight: 600; }
.lead { font-size: 1.12em; }
/* full justification of body and teaching paragraphs [OWNER 2026-11-19]; short quotations, captions and centered pieces stay as set */
.hearing__body > p, .paper__body, .dossier__text p, .lexicon dd,
.drawers details > p, .hearing-card__main > p, .step p, .note, .pair__side p:not(.pair__head), .hearing__body .small {
    text-align: justify; text-align-last: start; hyphens: auto; hyphenate-limit-chars: 8 4 4;
}
.hearing__body .muted { text-align: start; }
.hearing__body h3, .hearing__body h4, .step h3, .step h4, .hearing-card__title, .paper__head, .drawers summary { text-align: start; hyphens: manual; }
.muted { color: var(--ink-2); }
.small { font-size: .88em; }
.hearing__body .bible-ref { text-decoration-style: dotted; text-decoration-thickness: 2px; font-weight: 600; }
html[data-script="latin"] .hearing__body > p:first-child::first-letter,
html[data-script="latin"] .hearing__body > p.lead:first-child::first-letter {
    float: inline-start; font: 600 3.3em/.82 var(--display); padding: .06em .12em 0 0; color: var(--brass);
}

/* ---- the Word: Scripture, read into the record ---- */
.word {
    margin: 1.7rem 0; padding: 1.15rem 1.35rem 1rem;
    background: linear-gradient(165deg, var(--night-2), var(--night)); color: var(--ivory);
    border: 1px solid rgba(217, 182, 95, .5); border-inline-start: 5px solid var(--gold); border-radius: var(--radius);
}
.word blockquote { margin: 0; font: italic 400 1.04em/1.65 var(--serif); }
.word figcaption { margin-block-start: .8rem; font: 600 .88em/1.3 var(--serif); font-style: normal; color: var(--gold-hi); }
.word a, .word figcaption a { color: var(--gold-hi); }
.word strong { font-weight: 600; }

/* ---- the record: what Henderson says, with the stamp of its moment ---- */
.record {
    margin: 2.2rem auto; max-inline-size: var(--wide); padding: clamp(1.4rem, 4vw, 2.3rem) clamp(1.2rem, 5vw, 3rem);
    background: radial-gradient(120% 140% at 50% 0%, var(--night-3), var(--night)); color: var(--ivory);
    border-block: 2px solid var(--gold); text-align: center; position: relative;
}
.record blockquote { margin: 0; font: italic 400 clamp(1.25rem, 3vw, 1.7rem)/1.45 var(--serif); color: var(--gold-hi); text-wrap: balance; }
.record figcaption { margin-block-start: 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; font: 600 .9rem/1.3 var(--serif); color: var(--ivory); }
.hearing__body .record, .hearing__body .band, .hearing__body .papers, .hearing__body .pair, .hearing__body .numbers, .hearing__body .hearings {
    /* wide pieces step out of the reading column (never past the page) */
    inline-size: min(var(--wide), calc(100vw - 2 * var(--edge))); margin-inline: calc((var(--measure) - min(var(--wide), calc(100vw - 2 * var(--edge)))) / 2);
}
@media (max-width: 1000px) { .hearing__body .record, .hearing__body .band, .hearing__body .papers, .hearing__body .pair, .hearing__body .numbers, .hearing__body .hearings { inline-size: auto; margin-inline: 0; } }

/* ---- the petition: a prayer in the court's own light ---- */
.petition {
    margin: 1.8rem 0; padding: 1.5rem 1.4rem; text-align: center;
    background: linear-gradient(180deg, var(--night-2), var(--night)); color: var(--ivory);
    border-block: 2px solid var(--gold); border-radius: 4px; font: italic 400 1.06em/1.75 var(--serif);
    box-shadow: inset 0 0 60px rgba(217, 182, 95, .08);
}
.petition a { color: var(--gold-hi); }

/* ---- annotations: the page's own notes and cautions (never the teacher's voice) ---- */
.note {
    margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--paper); color: var(--ink);
    border-inline-start: 5px solid var(--gold-lo); border-start-end-radius: 10px; border-end-end-radius: 10px;
}
.note--important { border-inline-start-width: 9px; border-color: var(--brass); background: #efe6cc; }
.note--warning   { border-color: var(--wine); background: #f1e2dc; }
.note--tip, .note--info, .note--idea { border-color: var(--steel); background: #e3e8e6; }
.note--idea { font-size: 1.05em; border-inline-start-width: 9px; }
.note__label { display: block; margin-block-end: .2rem; font: 600 .78rem/1.2 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--steel); }
html:not([data-script="latin"]) .note__label { font-family: var(--serif); letter-spacing: 0; text-transform: none; font-size: .95rem; }
.note p:last-child { margin-block-end: 0; }
.note > strong:first-child { font-weight: 600; }

/* ---- pictures ---- */
.band { margin: 2.2rem 0; }
.band img { display: block; inline-size: 100%; block-size: auto; border-radius: 14px; border: 1px solid rgba(23, 32, 47, .3); box-shadow: 0 18px 40px -22px rgba(7, 11, 22, .8); background: var(--night); }
.band figcaption { margin-block-start: .6rem; font: italic 400 .92rem/1.5 var(--serif); color: var(--ink-2); text-align: center; }
html:not([data-script="latin"]) .band figcaption { font-style: normal; }

/* ---- case papers ---- */
.papers { display: grid; gap: .9rem; margin: 1.3rem 0; }
.papers--two { grid-template-columns: 1fr; }
@media (min-width: 760px) { .papers--two { grid-template-columns: 1fr 1fr; } }
.paper { background: var(--paper-hi); border: 1px solid rgba(23, 32, 47, .2); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(23, 32, 47, .1), 0 14px 26px -20px rgba(23, 32, 47, .7); overflow: hidden; }
.paper__head { margin: 0 !important; padding: .75rem 1rem; background: var(--paper); border-block-end: 1px solid rgba(23, 32, 47, .16); font: 600 1.02rem/1.35 var(--serif) !important; color: var(--ink); }
.paper__sub { font-weight: 400; color: var(--ink-2); }
.paper__body { margin: 0 !important; padding: .9rem 1rem 1rem; font-size: .98em; }
.paper__list { margin: 0; padding: .9rem 1rem 1rem 2.2rem; }
[dir="rtl"] .paper__list { padding: .9rem 2.2rem 1rem 1rem; }

/* ---- steps: the stepped aisle (a line with a tile at every step) ---- */
.steps { list-style: none; counter-reset: step; margin: 1.4rem 0; padding: 0; position: relative; }
.step { counter-increment: step; position: relative; padding-inline-start: 3.6rem; padding-block-end: 1.5rem; }
.step::before {
    content: counter(step); position: absolute; inset-inline-start: 0; inset-block-start: 0;
    display: grid; place-items: center; inline-size: 2.4rem; block-size: 2.4rem; border-radius: 10px;
    background: var(--night); color: var(--gold-hi); border: 1px solid var(--gold); font: 600 1rem/1 var(--serif); font-variant-numeric: lining-nums;
}
.step::after { content: ""; position: absolute; inset-inline-start: calc(1.2rem - 1px); inset-block: 2.7rem 0; inline-size: 2px; background: linear-gradient(180deg, var(--gold-lo), rgba(155, 122, 42, .15)); }
.step:last-child::after { display: none; }
.step h3, .step h4 { margin: .2rem 0 .4rem !important; }
.step p { margin-block-end: 0; }

/* ---- drawers ---- */
.drawers { margin: 1.2rem 0; }
.drawers details { margin: .6rem 0; background: var(--paper-hi); border: 1px solid rgba(23, 32, 47, .22); border-radius: var(--radius); }
.drawers summary {
    position: relative; display: flex; align-items: center; gap: .8rem; min-block-size: 3rem; padding: .6rem 1rem; cursor: pointer; list-style: none;
    font: 600 1.02rem/1.35 var(--serif); color: var(--ink);
}
.drawers summary::-webkit-details-marker { display: none; }
.drawers summary::before { /* the ring of a seal... */
    content: ""; flex: none; inline-size: 1.5rem; block-size: 1.5rem; border-radius: 50%;
    border: 2px solid var(--gold-lo); background: var(--night);
}
.drawers summary::after { /* ...and the chevron turned by opening the drawer */
    content: ""; position: absolute; inset-inline-start: calc(1rem + .58rem); inset-block-start: 50%;
    margin-block-start: -.3rem; border-inline-start: .46rem solid var(--gold-hi); border-block: .3rem solid transparent;
    transition: transform .2s;
}
.drawers details[open] > summary { border-block-end: 1px solid rgba(23, 32, 47, .16); background: var(--paper); border-radius: var(--radius) var(--radius) 0 0; }
.drawers details[open] > summary::after { transform: rotate(90deg); }
[dir="rtl"] .drawers details[open] > summary::after { transform: rotate(90deg); }
.drawers details > p, .drawers details > .word { margin: 0; padding: 1rem 1.1rem 1.1rem; }
.drawers details > .word { margin: 1rem; }
.drawers details > p:last-child { margin-block-end: 0; }

/* ---- the compare pairs, the numbers, the lexicon ---- */
.pair__label { margin: 1.6rem 0 .5rem !important; }
.pair { display: grid; grid-template-columns: 1fr; gap: .7rem; margin-block: .4rem 0; }
@media (min-width: 700px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair__side { padding: .9rem 1.1rem; border-radius: var(--radius); }
.pair__side p { margin: 0 0 .3rem !important; }
.pair__side--field { background: #e7e2d5; border: 1px solid rgba(23, 32, 47, .2); color: var(--ink-2); }
.pair__side--court { background: var(--paper-hi); border: 2px solid var(--gold-lo); color: var(--ink); }
.pair__head { font: 600 .82rem/1.3 var(--display) !important; letter-spacing: .06em; text-transform: uppercase; color: var(--brass); }
.pair__side--field .pair__head { color: var(--ink-2); }
html:not([data-script="latin"]) .pair__head { font-family: var(--serif) !important; letter-spacing: 0; text-transform: none; font-size: .95rem !important; }

.numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-block: 2rem 0; background: rgba(23, 32, 47, .25); border: 1px solid rgba(23, 32, 47, .25); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 700px) { .numbers { grid-template-columns: repeat(4, 1fr); } }
.number { margin: 0 !important; padding: 1.1rem .6rem; text-align: center; background: var(--paper-hi); }
.number__n { display: block; font: 600 clamp(1.8rem, 5vw, 2.5rem)/1.1 var(--serif); font-variant-numeric: lining-nums; color: var(--brass); }
.number__l { display: block; margin-block-start: .3rem; font-size: .88rem; line-height: 1.3; color: var(--ink-2); }

.lexicon { margin: 1.2rem 0 0; }
.lexicon__row { display: grid; grid-template-columns: 1fr; gap: .15rem; padding: .85rem 0; border-block-end: 1px solid rgba(23, 32, 47, .16); }
@media (min-width: 760px) { .lexicon__row { grid-template-columns: minmax(8rem, 12rem) 1fr; gap: 1.2rem; } }
.lexicon dt { font-weight: 600; color: var(--brass); }
.lexicon dd { margin: 0; }

/* ---- the teacher, the facts, signs, links, shelf ---- */
.dossier { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 640px) { .dossier { grid-template-columns: 9.5rem 1fr; gap: 1.6rem; } }
.dossier__photo { inline-size: 9.5rem; block-size: 9.5rem; object-fit: cover; border-radius: var(--radius); border: 2px solid var(--gold-lo); box-shadow: 6px 6px 0 var(--paper); }
.dossier__text p:last-child { margin-block-end: 0; }
.facts { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.facts li { padding: .35rem .8rem; border-radius: 999px; background: var(--paper); border: 1px solid rgba(23, 32, 47, .2); font-size: .92rem; line-height: 1.4; }
.signs, .links, .shelf { margin: 1rem 0; padding-inline-start: 1.4rem; }
.signs li, .links li { margin-block: .55rem; padding-inline-start: .3rem; }
.signs { list-style: none; padding-inline-start: 0; }
.signs li { position: relative; padding-inline-start: 2rem; }
.signs li::before { content: ""; position: absolute; inset-inline-start: .2rem; inset-block-start: .55em; inline-size: .8rem; block-size: .8rem; border-radius: 50%; background: radial-gradient(circle, var(--night) 40%, transparent 42%), var(--gold); }
.shelf li { margin-block: .3rem; }

/* ---- the pleading sheet ("whereas ... therefore ...") ---- */
.pleading {
    margin: 1.3rem 0; padding: 1.1rem 1.3rem 1.1rem 4rem; position: relative;
    background: repeating-linear-gradient(180deg, transparent 0, transparent 1.74rem, rgba(36, 86, 106, .25) 1.74rem, rgba(36, 86, 106, .25) 1.8rem), #fffdf6;
    background-position: 0 1.1rem, 0 0; background-repeat: repeat, no-repeat;
    border: 1px solid rgba(23, 32, 47, .25); border-radius: 4px; line-height: 1.8rem;
    box-shadow: 0 14px 26px -20px rgba(23, 32, 47, .7);
}
.pleading::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 2.8rem; inline-size: 3px; border-inline: 1px solid var(--wine); opacity: .7; }
[dir="rtl"] .pleading { padding: 1.1rem 4rem 1.1rem 1.3rem; }

/* ---- the seven hearings (session guide) ---- */
.hearings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1.5rem 0; }
/* a run of combining marks is ONE unbreakable cluster (the damaged Odia string is 1,200 virama signs after one letter), so wrapping cannot help: clip it inside the card */
.hearing-card__main { min-width: 0; overflow: clip; overflow-clip-margin: .5rem; }
.hearing-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; padding: 1.1rem 1.2rem 1.2rem; background: var(--paper-hi); border: 1px solid rgba(23, 32, 47, .22); border-radius: var(--radius); box-shadow: 0 14px 26px -20px rgba(23, 32, 47, .7); }
@media (min-width: 640px) { .hearing-card { grid-template-columns: 5rem minmax(0, 1fr); gap: 1.2rem; } }
.hearing-card__no { display: grid; place-items: center; align-self: start; inline-size: 4.2rem; block-size: 4.2rem; border-radius: 12px; background: var(--night); color: var(--gold-hi); border: 1px solid var(--gold); font: 600 1.35rem/1 var(--display); box-shadow: inset 0 0 0 3px var(--night), inset 0 0 0 4px rgba(217, 182, 95, .45); }
.hearing-card__title { margin: 0 0 .15rem !important; font: 600 1.15rem/1.3 var(--serif) !important; }
.hearing-card__meta { margin: 0 0 .6rem !important; font: 600 .85rem/1.3 var(--serif); color: var(--brass); font-variant-numeric: tabular-nums; }
.hearing-card.is-now { border: 2px solid var(--gold-lo); box-shadow: 0 0 0 4px rgba(217, 182, 95, .3), 0 14px 26px -20px rgba(23, 32, 47, .7); }
.hearing-card.is-now .hearing-card__no { background: var(--gold); color: var(--night); }
.points { margin: .6rem 0 .8rem; padding-inline-start: 1.2rem; }
.points li { margin-block: .3rem; }
.hearing-card__verses { font-size: .92rem; color: var(--ink-2); }
.sheet .stamp { background: var(--night); }
.sheet .stamp--play { background: var(--night); color: var(--gold-hi); }
.sheet .stamp:hover, .sheet .stamp--play:hover { background: var(--gold); color: var(--night); }

/* ================= the last chamber: the daylight where you were never alone ================= */
.dawn { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--ivory); min-block-size: min(86svh, 46rem); display: grid; align-items: end; }
.dawn__art { position: absolute; inset: 0; z-index: -2; }
.dawn__art img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 40%; display: block; }
.dawn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 11, 22, .25) 0, rgba(7, 11, 22, .15) 28%, rgba(7, 11, 22, .8) 66%, rgba(7, 11, 22, .96) 100%); }
.dawn__inner { max-inline-size: 48rem; margin-inline: auto; padding: 4rem var(--edge) 2.6rem; text-align: center; }
.dawn__saying { margin: 0 0 1.3rem; font: italic 400 clamp(1.5rem, 4.4vw, 2.5rem)/1.3 var(--serif); color: var(--gold-hi); text-shadow: 0 2px 20px rgba(0, 0, 0, .8); }
html:not([data-script="latin"]) .dawn__saying { font-style: normal; }
.dawn__title { margin: 0 0 .6rem; font: 600 clamp(1.3rem, 3vw, 1.7rem)/1.25 var(--serif); }
.dawn__text { margin: 0 auto 1.4rem; max-inline-size: 38rem; }
.dawn__buttons { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.dawn a { color: var(--gold-hi); }
.dawn .stamp--play { color: var(--night); }

/* ================= the foot ================= */
.foot { background: var(--night); color: #cdd6e4; text-align: center; padding: 1.6rem var(--edge) 6rem; border-block-start: 1px solid rgba(217, 182, 95, .4); font-size: .9rem; line-height: 1.55; }
.foot a { color: var(--gold-hi); }
.foot__note { margin: 0 auto 1rem; max-inline-size: 40rem; }
.foot__brand { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 1.6rem; font: 600 .85rem/1 var(--display); letter-spacing: .2em; }
.foot__brand a { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: .5rem; }

/* ================= the reading tools ================= */
.tools { position: fixed; z-index: 50; inset-inline-end: .8rem; inset-block-end: .9rem; display: flex; flex-direction: column; gap: .5rem; }
@media (max-width: 900px) {
    .tools { opacity: 0; pointer-events: none; transition: opacity .3s; gap: .4rem; inset-inline-end: .6rem; inset-block-end: .7rem; }
    .is-away:not(.is-scrolling) .tools { opacity: .94; pointer-events: auto; }
    .btn-round { inline-size: 2.6rem; block-size: 2.6rem; }
}
.btn-round {
    inline-size: 2.9rem; block-size: 2.9rem; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
    background: var(--night-2); color: var(--gold-hi); border: 1px solid var(--gold); font: 600 .95rem/1 var(--serif);
    box-shadow: 0 6px 20px rgba(7, 11, 22, .5);
}
.btn-round:hover, .btn-round[aria-pressed="true"] { background: var(--gold); color: var(--night); }
.is-spoken { background-color: rgba(217, 182, 95, .26); border-radius: 6px; box-shadow: 0 0 0 .3rem rgba(217, 182, 95, .26); transition: background-color .4s, box-shadow .4s; }
#btn-top { opacity: 0; pointer-events: none; transition: opacity .3s; }
.is-away #btn-top { opacity: 1; pointer-events: auto; }
.toast { position: fixed; z-index: 70; inset-inline: 0; inset-block-end: 4.6rem; margin-inline: auto; inline-size: fit-content; max-inline-size: 90vw; padding: .5rem 1rem; border-radius: 999px; background: var(--night); color: var(--gold-hi); border: 1px solid var(--gold); font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s; }
.toast.is-shown { opacity: 1; }

/* ================= the Global Menu: the International menu's own panels, re-drawn as night-and-gold drawers ================= */
.intl-backdrop { display: none; position: fixed; inset: 0; z-index: 8999; background: rgba(7, 11, 22, .72); cursor: pointer; }
.intl-backdrop--visible { display: block; }
.intl-sidenav {
    position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 9000;
    inline-size: min(26rem, 92vw); display: flex; flex-direction: column;
    background: var(--night-2); color: var(--ivory);
    border-inline-start: 2px solid var(--gold); box-shadow: -10px 0 40px rgba(0, 0, 0, .6);
    transform: translateX(110%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s;
}
[dir="rtl"] .intl-sidenav { transform: translateX(-110%); }
.intl-sidenav.intl-sidenav--open { transform: none; visibility: visible; transition: transform .3s ease; }
#lang-switcher { direction: ltr; }
.intl-panel-header { flex: none; display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-block-end: 2px solid var(--gold); background: var(--night); }
.intl-menu-heading { flex: 1; min-inline-size: 0; margin: 0; font: 600 1.02rem/1.3 var(--serif); color: var(--gold-hi); }
.intl-close-btn { flex: none; min-inline-size: 2.75rem; min-block-size: 2.75rem; display: grid; place-items: center; background: transparent; color: var(--gold-hi); border: 1px solid rgba(217, 182, 95, .6); border-radius: 10px; font: 400 1.6rem/1 var(--serif); cursor: pointer; }
.intl-close-btn:hover, .intl-close-btn:focus-visible { background: var(--gold); color: var(--night); }
.intl-resource-list, .lang-list { flex: 1; min-block-size: 0; margin: 0; padding: .3rem 0; list-style: none; overflow-y: auto; scrollbar-color: var(--gold-lo) var(--night); }
.intl-sep { list-style: none; margin: 0; padding: 0; }
.intl-sep hr { border: 0; border-block-start: 1px solid rgba(217, 182, 95, .22); margin: .25rem .8rem; }
.intl-resource-item { list-style: none; }
.intl-resource-item a { display: flex; flex-direction: column; gap: .4rem; min-block-size: 3rem; padding: .7rem .9rem; color: var(--ivory); text-decoration: none; }
.intl-resource-item a:hover, .intl-resource-item a:focus-visible { background: var(--night-3); outline: none; }
.intl-resource-item a:hover .intl-resource-title { color: var(--gold-hi); }
.intl-thumb { display: block; inline-size: auto; max-inline-size: 100%; max-block-size: 140px; margin-inline: auto; border-radius: 8px; border: 1px solid rgba(217, 182, 95, .4); background: var(--night); }
.intl-resource-text { display: flex; flex-direction: column; text-align: center; }
.intl-resource-title { font-weight: 600; font-size: .98rem; line-height: 1.35; overflow-wrap: anywhere; }
.intl-resource-desc { font-size: .88rem; line-height: 1.4; color: #cdd6e4; overflow-wrap: anywhere; }
.intl-panel-footer { flex: none; padding: .5rem .9rem; text-align: center; border-block-start: 1px solid rgba(217, 182, 95, .3); }
.intl-scroll-top { display: inline-block; padding: .35rem .9rem; color: var(--gold-hi); border-radius: 999px; font-size: .85rem; text-decoration: none; }
.intl-scroll-top:hover { background: var(--gold); color: var(--night); }
.intl-no-resources { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: 2rem 1.2rem; text-align: center; }
.intl-no-resources p { margin: 0; }
.intl-no-resources a { color: var(--gold-hi); }
.lang-search-wrap { flex: none; padding: .6rem .8rem; border-block-end: 1px solid rgba(217, 182, 95, .3); }
.lang-search { inline-size: 100%; min-block-size: 2.75rem; padding: .45rem .7rem; background: var(--night); color: var(--ivory); border: 1px solid rgba(217, 182, 95, .6); border-radius: 10px; font: 400 1rem/1.3 var(--serif); }
.lang-search:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.lang-list-item { border-block-end: 1px solid rgba(217, 182, 95, .14); }
.lang-list-item a { display: flex; align-items: center; gap: .6rem; min-block-size: 3rem; padding: .45rem .9rem; color: var(--ivory); text-decoration: none; }
.lang-list-item a:hover, .lang-list-item a:focus-visible { background: var(--night-3); outline: none; }
.lang-list-item--current a { background: var(--gold); color: var(--night); }
.lang-text-block { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; }
.lang-native { font-weight: 600; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.lang-english { font-size: .78rem; line-height: 1.2; opacity: .8; }
.lang-current-mark { flex: none; }
.lang-no-results { margin: 0; padding: 1.5rem 1rem; text-align: center; font-size: .9rem; }

/* ================= phones ================= */
@media (max-width: 640px) {
    .bar { padding-inline: .4rem; gap: .35rem; }
    .bar__head { font-size: .72rem; }
    .btn-bar, .bar .share-btn { padding: 0 .45rem; }
    .hall { text-align: start; }
    .hall__title, .watch__hint, .watch__kicker, .chips__label { text-align: center; }
    .tile { min-block-size: 3.4rem; }
    .record blockquote { font-size: 1.2rem; }
}

/* ================= motion preferences ================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hall__art img, .hall__rays { animation: none; }
    .seal, .plate, .frame__screen, .hall__rays, .intl-sidenav, .toast, .drawers summary::after, .rail { transition: none; }
}

/* ================= a reader whose device is set to dark: the sheet takes the night too (same tokens) ================= */
@media (prefers-color-scheme: dark) {
    body, .sheet { background: #0b1120; color: #e9e4d4; }
    .hearing + .hearing { border-block-start-color: rgba(233, 228, 212, .16); }
    .hearing__head { border-block-end-color: var(--gold-lo); }
    .hearing__title, .hearing__body h3, .hearing__body h4, .paper__head, .drawers summary { color: #f1ead6; }
    .hearing__no, .lexicon dt, .number__n, .pair__head, .hearing__body > p:first-child::first-letter { color: var(--gold); }
    .muted, .number__l, .paper__sub, .hearing-card__verses, .band figcaption, .pair__side--field { color: #b9c3d3; }
    a { color: var(--gold-hi); }
    .note { background: #141c31; color: #e9e4d4; }
    .note--important { background: #1b1a26; border-color: var(--gold); }
    .note--warning { background: #251a22; border-color: #c4707c; }
    .note--tip, .note--info, .note--idea { background: #122030; border-color: var(--starlight); }
    .note__label { color: var(--starlight); }
    .paper, .drawers details, .hearing-card, .number, .pair__side--court, .facts li { background: #121a2e; border-color: rgba(233, 228, 212, .2); color: #e9e4d4; }
    .paper__head, .drawers details[open] > summary { background: #182240; }
    .pair__side--field { background: #0f1626; }
    .pleading { background: repeating-linear-gradient(180deg, transparent 0, transparent 1.74rem, rgba(169, 214, 232, .18) 1.74rem, rgba(169, 214, 232, .18) 1.8rem), #101830; color: #e9e4d4; }
    .numbers { background: rgba(233, 228, 212, .2); border-color: rgba(233, 228, 212, .2); }
    .band img { border-color: rgba(233, 228, 212, .3); }
    .lexicon__row { border-block-end-color: rgba(233, 228, 212, .16); }
    .sheet :focus-visible { outline-color: var(--gold); }
    .dossier__photo { box-shadow: 6px 6px 0 #182240; }
}
