/* The Life Manual — complete-course components.
 * Screen adaptations of Version 3's text cards, ledgers and worksheets.
 * The established four-day reader supplies the type, palette and page rhythm.
 * Figure SVG geometry and paint are deliberately left to the source artwork. */

@font-face { font-family: 'TLM Devanagari'; src: url('/assets/fonts/NotoSerifDevanagari.woff2') format('woff2'), url('/assets/fonts/NotoSerifDevanagari.ttf') format('truetype'); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'TLM Gurmukhi'; src: url('/assets/fonts/NotoSansGurmukhi.ttf') format('truetype'); font-style: normal; font-weight: 100 900; font-display: swap; }

/* Shared reading components and supplied optional media. */
.module :is(.video, .expert) {
  position: relative; margin: 2.5rem 0; padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid var(--line); border-top-color: var(--gold);
  border-radius: var(--radius); background: var(--bg);
}
.module :is(.video, .expert) .label,
.module :is(.video, .expert) :is(.who, .meta, .note, .link),
.module :is(.source-line, .tlm-link > .label, .d14-over, .d14-tcap) {
  display: block; font: 400 .875rem/1.55 var(--ui); color: var(--fg2);
}
.module :is(.video, .expert) .label { color: var(--label); font-weight: 600; margin-bottom: .7rem; }
.module :is(.video, .expert) :is(.vt, .et) { margin: 0 0 .75rem; font-size: 1.65rem; }
.module :is(.video, .expert) .link { overflow-wrap: anywhere; }
.module :is(.video, .expert) .who { color: var(--heading); font-weight: 500; }
.module :is(.video, .expert) .watch { font-style: italic; color: var(--fg2); }
.module :is(.video, .expert) .rq { clear: both; margin-top: 1.6rem; }
.module :is(.video, .expert) p:last-child { margin-bottom: 0; }
.module .video .meta.stack span { display: block; }
.module .qr { float: right; width: 4.5rem; height: 4.5rem; margin: 0 0 1rem 1.25rem; }
.module .qr :is(img, svg) { display: block; width: 100%; height: auto; }
.module .science-note { margin: 1.75rem 0; padding: 1rem 1.2rem; border-left: 2px solid var(--gold); background: var(--bg2); font: 400 .9rem/1.6 var(--ui); color: var(--fg2); }
.module .science-note p:last-child { margin-bottom: 0; }
.module :is(.quote, .stanza, .d14-stanza, .d21-stanza, p.beliefs) { margin: 1.8rem 0; padding-left: 1.5rem; font-style: italic; color: var(--heading); }
.module :is(.d14-statement, .d21-statement, .d14-three) { margin: 2rem 0; padding: .25rem 0 .25rem 1.5rem; border-left: 1px solid var(--gold); color: var(--heading); }
.module .d21-statement p:last-child { margin-bottom: 0; }
.module :is(.d21-stanza.bold, .d21-statement strong) { font-style: normal; font-weight: 600; }
.module .inline-arrow svg { display: inline-block; width: 1.4rem; height: .65rem; vertical-align: middle; }
.module :is(.practice-terms, .d21-litany) { columns: 2; column-gap: 2rem; }
.module :is(.practice-terms, .d21-litany) li { break-inside: avoid; }
.module .processes { list-style: none; padding: 0; }
.module .processes li { position: relative; margin: 1rem 0; padding-left: 2.7rem; }
.module .processes .n { position: absolute; left: 0; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; font: 500 .85rem/1 var(--ui); }
/* Day 8's "Three upstream processes" numbers its headings (h3 in the source, h4 on the site); the badge sits
   before the words, as in print, not on them (Anand, 23 October 2026). */
.module .processes :is(h3, h4) .n { position: static; display: inline-grid; margin-right: .65rem; vertical-align: middle; }
.module .wheel-names { display: flex; flex-wrap: wrap; gap: .85rem 1.6rem; margin: 1.5rem 0 2rem; padding: 1.2rem 0; border-block: 1px solid var(--line); color: var(--heading); }
.module .wheel-names span { display: inline-flex; gap: .5rem; align-items: center; }
.module .wheel-names span::before { content: ''; width: .6rem; height: .6rem; border: 1px solid var(--gold); border-radius: 50%; }
.module .wheel-names .today::before { background: var(--gold); }
.module .experiment { display: flex; align-items: center; gap: 1.5rem; }
.module .experiment img { width: min(30%, 9rem); height: auto; }
.module .experiment p { margin: 0; }
.module :is(.good-things .entry, .workbook .q) + :is(.entry, .q) { margin-top: 2rem; }
.module .dodont .do :is(h3, h4, h5) { color: var(--gold2); }
.module .dodont .do p { color: var(--on-navy); }
.module .origins-table .category th { background: transparent; color: var(--heading); padding-top: 1.8rem; border-bottom: 1px solid var(--gold); }

/* Text figures keep their authored script, transliteration and translation. */
figure.text-card .callout { margin: 0; }
:is(.module, .lightbox-plate, .library) :is(.text-card, .gita) .dev,
:is(.module, .lightbox-plate, .library) :is(.d14-dev, .d21-dev, .verse .dev) {
  font-family: 'TLM Devanagari', 'Kohinoor Devanagari', 'Devanagari Sangam MN', serif;
  font-size: 1.35rem; line-height: 1.8; letter-spacing: .01em;
}
:is(.module, .lightbox-plate, .library) .d14-gur { font-family: 'TLM Gurmukhi', 'Gurmukhi MN', 'Mukta Mahee', serif; font-size: 1.35rem; line-height: 1.8; }
:is(.module, .lightbox-plate, .library) :is(.text-card .rom, .text-card .tr, .d14-row > span, .d21-row > span, .d21-vl > span, .d14-card > .d14-iast, .d14-card > .d14-dev, .d14-card > .d14-en) { display: block; }
:is(.module, .lightbox-plate, .library) :is(.text-card .rom, .text-card .tr) { margin-top: .65rem; }
:is(.module, .lightbox-plate, .library) :is(.d14-iast, .d21-iast, .d14-pali) { font-style: italic; line-height: 1.7; }
:is(.module, .lightbox-plate, .library) :is(.d14-card, .d21-card) { position: relative; }
:is(.module, .lightbox-plate, .library) :is(.d14-row, .d21-row) { display: grid; grid-template-columns: auto 1fr; gap: .55rem .9rem; align-items: center; }
:is(.module, .lightbox-plate, .library) :is(.d14-row, .d21-row) > span { grid-column: 1 / -1; }
:is(.module, .lightbox-plate, .library) :is(.d14-row, .d21-row) + :is(.d14-row, .d21-row) { padding-top: 1.25rem; margin-top: 1.25rem; border-top: 1px solid #46607f; }
:is(.module, .lightbox-plate, .library) :is(.d14-pill, .d21-pill) { grid-column: 1 !important; display: inline-flex; justify-self: start; border: 1px solid var(--gold); border-radius: 2rem; padding: .3rem .7rem; font: 500 .78rem/1.4 var(--ui); color: var(--gold2); }
:is(.module, .lightbox-plate, .library) :is(.d14-src, .d21-src) { grid-column: 2 !important; font: 400 .8rem/1.5 var(--ui); color: var(--gold2); }
:is(.module, .lightbox-plate, .library) :is(.d14-set, .d14-sub) { display: block; font: 500 .8rem/1.5 var(--ui); color: var(--gold2); margin-bottom: 1rem; }
:is(.module, .lightbox-plate, .library) .d14-dots { display: inline-flex; gap: .3rem; margin-right: .5rem; }
:is(.module, .lightbox-plate, .library) .d14-dots i { width: .35rem; height: .35rem; border-radius: 50%; background: var(--navy3); }
:is(.module, .lightbox-plate, .library) .d14-dots .on { background: var(--gold); }
:is(.module, .lightbox-plate, .library) .d14-pair { display: grid; grid-template-columns: 1fr 2rem 1fr; gap: .6rem; align-items: stretch; }
:is(.module, .lightbox-plate, .library) .d14-pair .callout { padding: 1.3rem; margin: 0; }
:is(.module, .lightbox-plate, .library) .d14-pair .q { padding-right: 0; font-size: 1.12rem; }
:is(.module, .lightbox-plate, .library) .d14-pair .ring { display: none; }
:is(.module, .lightbox-plate, .library) .d14-link { display: grid; place-items: center; }
:is(.module, .lightbox-plate, .library) .d14-link svg { width: 1.75rem; height: auto; }
.module .verse { position: relative; margin: 2rem 0; padding: 1.8rem 1rem; border-block: 1px solid var(--gold); text-align: center; }
.module .verse > span { display: block; }
.module .verse .src { font: 500 .8rem/1.5 var(--ui); color: var(--label); margin-bottom: 1rem; }
.module .verse .iast { font-style: italic; color: var(--fg2); }
.module .verse .en { font: italic 400 1.5rem/1.5 var(--display); color: var(--heading); margin-top: 1rem; }
.module .voices { padding-left: 1.5rem; list-style: none; font-style: italic; color: var(--heading); }

/* Integration ledgers: week/day and stage labels remain in their reading order. */
.module :is(.d14-days, .d14-stages) { padding: 0; list-style: none; margin: 1.5rem 0 2.5rem; }
.module .d14-days li, .module .d21-weeks .wk { position: relative; padding: .1rem 0 1.75rem 5rem; }
.module .d14-days li::before, .module .d21-weeks .wk::before { content: attr(data-day); position: absolute; left: 0; top: .25rem; width: 3.9rem; padding: .25rem .3rem; text-align: center; border: 1px solid var(--gold); border-radius: 2rem; font: 500 .78rem/1.4 var(--ui); color: var(--heading); }
.module .d21-weeks .wk::before { content: attr(data-week); }
.module .d14-days li.today::before, .module .d21-weeks .wk.last::before { background: var(--gold); color: var(--navy); }
.module .d14-days .v, .module .d21-weeks .nm { display: block; color: var(--heading); font-weight: 600; }
.module .d21-weeks .between { padding-left: 5rem; margin-bottom: 1.5rem; font-style: italic; }
.module .d14-stages { border-top: 1px solid var(--gold); }
.module .d14-stages li { position: relative; padding: 1.2rem 0 1.2rem 3.3rem; border-bottom: 1px solid var(--line); }
.module .d14-stages li::before { content: attr(data-n); position: absolute; left: 0; top: 1.1rem; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); font: 400 1rem/1 var(--display); color: var(--heading); }
.module .d14-stages li.done::before { background: var(--gold); color: var(--navy); }
.module .d14-stages .hd { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; }
.module .d14-stages .nm { font-weight: 600; color: var(--heading); }
.module .d14-stages .st { display: inline-flex; gap: .4rem; align-items: center; border: 1px solid var(--gold); border-radius: 1.5rem; padding: .25rem .6rem; font: 500 .75rem/1.3 var(--ui); color: var(--label); }
.module .d14-stages p { margin: .5rem 0 0; }
.module :is(.d14-tick, .d14-stages .st svg) { width: 1rem; height: 1rem; }
.module .d14-over { margin-top: 2rem; }
.module .d14-over + h3 { margin-top: .5rem; }
.module .d14-tcap { margin-top: -.5rem; }

/* Comparisons, including the source's deliberately contrasting paired cards. */
.module :is(.d14-contrast, .d21-contrast, .qpair, .rr) { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 2rem 0; }
.module :is(.d14-contrast, .d21-contrast) .c, .module .qpair .qc { padding: 1.4rem; border-radius: var(--radius); background: var(--bg2); }
.module :is(.d14-contrast, .d21-contrast) .says { background: var(--navy); color: var(--on-navy); }
/* Day 16 as in print: pale "not" card, a small italic "but:" between, the "ask" card in navy (Anand, 24 October 2026). */
.module .qpair { grid-template-columns: 1fr auto 1.35fr; }
.module .qpair .qc { display: flex; align-items: center; font-style: italic; }
.module .qpair .ask { background: var(--panel); color: var(--panel-fg); }
.module .qpair .ask strong { color: inherit; }
.module .qpair .but { align-self: center; text-align: center; font-style: italic; color: var(--label); }
.module :is(.d14-contrast, .d21-contrast) .h, .module .qpair .label { display: block; font: 500 .85rem/1.45 var(--ui); color: var(--label); margin-bottom: .65rem; }
.module :is(.d14-contrast, .d21-contrast) .says .h { color: var(--gold2); }
.module :is(.d14-contrast, .d21-contrast) .q { display: block; font: italic 400 1.4rem/1.5 var(--display); }
.module :is(.d14-contrast, .d21-contrast) .lines { display: block; margin-top: .65rem; }
.module .d21-contrast .says strong { color: inherit; }
.module .rr h5 { margin-top: 0; }
.module .rr ul { margin: .7rem 0; padding-left: 1.2rem; }
.module .rr .release { color: var(--fg2); }
.module ul.shift { list-style: none; padding: 0; }
.module ul.shift li { display: grid; grid-template-columns: 1fr 2rem 1fr; gap: .6rem; align-items: center; padding: .75rem 0; border-block-end: 1px solid var(--line); }
.module ul.shift svg { width: 1.6rem; height: .8rem; }
.module ul.shift .from { color: var(--fg2); }
.module ul.shift .to { color: var(--heading); }

/* Definition and discipline cards used in the final week. */
.module .defcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 2rem 0; }
.module .defcards .dc { position: relative; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); }
.module .defcards .dc .glyph { float: right; width: 1.8rem; height: 1.8rem; margin-left: .5rem; }
.module .defcards .k { display: block; font: 500 .78rem/1.4 var(--ui); color: var(--label); }
.module .defcards :is(h3, h4) { margin: .5rem 0 .8rem; font-size: 1.25rem; }
.module .defcards p { margin: 0; font-size: .95rem; }
.module .defcards .on { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.module .defcards .on :is(h3, h4) { color: var(--on-navy-strong); }
.module .defcards .on .k { color: var(--gold2); }
.module :is(.sixcard, .mechcard) { margin: 2.5rem 0; padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--line); border-top-color: var(--gold); border-radius: var(--radius); }
.module :is(.sixcard, .mechcard) .hd { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.module :is(.sixcard, .mechcard) .hd :is(h3, h4) { margin: 0 0 .5rem; font-size: 1.6rem; }
.module :is(.sixcard, .mechcard) .src { display: block; font: 400 .8rem/1.5 var(--ui); color: var(--fg2); }
.module .sixcard ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 1rem; }
.module .sixcard li { position: relative; padding-left: 2rem; }
.module .sixcard .n { position: absolute; left: 0; top: -.05rem; font: 400 1.6rem/1 var(--display); color: var(--accent-text); }
.module .sixcard :is(.nm, .gl, .day) { display: block; }
.module .sixcard .nm { font-weight: 600; color: var(--heading); }
.module .sixcard .gl { font-size: .95rem; color: var(--fg2); }
.module .sixcard .day { margin-top: .5rem; font: 500 .78rem/1.4 var(--ui); color: var(--label); }
.module .mechcard { display: grid; grid-template-columns: 8rem 1fr; gap: 0 1.6rem; background: var(--navy); color: var(--on-navy); }
.module .mechcard :is(.hd, .ft) { grid-column: 1 / -1; border-color: var(--navy3); }
.module .mechcard .hd :is(h3, h4) { color: var(--on-navy-strong); }
.module .mechcard .src { color: var(--gold2); }
.module .mechcard .wheel { width: 8rem; height: auto; align-self: center; }
.module .mechcard ol { margin: 0; list-style: none; padding: 0; }
.module .mechcard li { position: relative; margin-bottom: .65rem; padding-left: 2rem; }
.module .mechcard li .n { position: absolute; left: 0; top: .1rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid var(--gold); border-radius: 50%; font: 500 .75rem/1 var(--ui); color: var(--gold2); }
.module :is(.sixcard, .mechcard) .ft { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font: 400 .85rem/1.6 var(--ui); }

/* Day 20 source sequences, systems and tools. */
.module .hpb { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 1rem; margin: 2rem 0; padding: 1.25rem; background: var(--soft); color: var(--soft-fg); border-radius: var(--radius); font: 400 1.5rem/1.35 var(--display); }
.module .hpb .arr, .module div.shift > .arr { width: 2rem; height: .75rem; flex: none; }
.module .hpb .on { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .25em; }
.module .asks { border-top: 1px solid var(--line); margin: 2rem 0; }
.module .asks .row { display: grid; grid-template-columns: 8rem 1fr; gap: 1.3rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.module .asks .k { font: 500 .8rem/1.5 var(--ui); color: var(--label); }
.module .asks .q { font-style: italic; }
.module .asks .on { color: var(--heading); border-bottom-color: var(--gold); }
.module ul.chips { display: flex; flex-wrap: wrap; gap: .65rem; padding: 0; list-style: none; }
.module ul.chips li { padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 1.5rem; font: 400 .9rem/1.5 var(--ui); color: var(--heading); }
.module .definition .cap { display: block; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font: 400 .85rem/1.6 var(--ui); color: var(--fg2); }
.module .tools-list { margin: 2rem 0; border-top: 1px solid var(--line); }
.module .tool { display: grid; grid-template-columns: 2rem 1fr 8rem; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.module .tool .n { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--gold); border-radius: 50%; font: 500 .85rem/1 var(--ui); }
.module .tool :is(h4, h5) { margin: 0 0 .5rem; font: 600 1.1rem/1.4 var(--serif); color: var(--heading); }
.module .tool .sub { font-style: italic; font-weight: 400; }
.module .tool p { margin: 0; }
.module .tool .tgt { align-self: start; padding: .7rem; background: var(--soft); color: var(--soft-fg); font: 500 .85rem/1.5 var(--ui); border-radius: var(--radius-sm); }
.module .tool .tgt .k { display: block; font-size: .72rem; margin-bottom: .3rem; }
.module .tool.on .n { background: var(--gold); color: var(--navy); }
.module .tool.on .tgt { background: var(--navy); color: var(--on-navy); }
.module .system { margin: 2rem 0; border-top: 1px solid var(--line); }
.module .system .row { display: grid; grid-template-columns: 3.5rem 1fr; gap: .5rem 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.module .system .num { grid-row: span 2; font: 300 3rem/1 var(--display); color: var(--accent-text); }
.module .system .row p { margin: 0; }
.module .system .row ul { grid-column: 2; margin: 0; }
.module div.shift { display: grid; grid-template-columns: 1fr 2rem 1fr 2rem 1fr; gap: .5rem; align-items: center; margin: 2rem 0; }
.module div.shift .st { padding: 1rem .75rem; border-top: 1px solid var(--line); }
.module div.shift .w { display: block; font: 400 1.4rem/1.3 var(--display); color: var(--heading); margin-bottom: .65rem; }
.module div.shift p { margin: 0; font-size: .95rem; }
.module div.shift .on { background: var(--soft); color: var(--soft-fg); border-top-color: var(--gold); }
.module .without { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--gold); margin: 2rem 0; }
.module .without span { padding: 1rem; font-style: italic; border-bottom: 1px solid var(--line); }
.module .without span:nth-child(odd) { border-right: 1px solid var(--line); }
.module .turns .t { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.module .turns .not { color: var(--fg2); }
.module .turns .but { font-style: italic; color: var(--heading); }
.module ol.questions { margin: 2rem 0; padding: 1.5rem 1.5rem 1.5rem 3rem; background: var(--soft); color: var(--soft-fg); border-radius: var(--radius); }
.module ol.questions li { padding-left: .5rem; margin-bottom: 1rem; }
.module ol.questions li:last-child { margin-bottom: 0; }

/* The final integration day. */
/* min-content: a column widens rather than split "wholeheartedly" (Anand, 24 October 2026). */
.module .d21-four { display: grid; grid-template-columns: repeat(4, minmax(min-content, 1fr)); margin: 2rem 0; border-block: 1px solid var(--gold); }
.module .d21-four > div { padding: 1.25rem .6rem; text-align: center; }
.module .d21-four > div + div { border-left: 1px solid var(--line); }
.module .d21-four .y { display: block; margin-bottom: .5rem; font: 500 .8rem/1.4 var(--ui); color: var(--accent-text); }
.module .d21-four .v { font-weight: 600; color: var(--heading); overflow-wrap: normal; }
.module .d21-option { margin: 2rem 0; padding: .3rem 0 .3rem 1.5rem; border-left: 1px solid var(--gold); }
.module .d21-option .label { display: flex; align-items: center; gap: .7rem; font: 500 .8rem/1.5 var(--ui); color: var(--label); }
.module .d21-option .label b { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--gold); color: var(--navy); }
.module .d21-option .ot { margin-top: .75rem; }
.module .d21-option p:last-child { margin-bottom: 0; }
.module .d21-final { text-align: center; margin: 3rem 0; }
.module .d21-final :is(.a, .b) { display: block; font: 400 clamp(1.4rem, 3vw, 2rem)/1.4 var(--display); color: var(--heading); }
.module .d21-final .b { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.module .d21-final .rule { margin: 1.5rem auto; }
.course-completion { margin-top: 3rem; padding: 1.5rem 0; border-top: 1px solid var(--gold); color: var(--heading); }
.course-completion[hidden] { display: none; }
.course-completion p { font: 400 1.65rem/1.4 var(--display); }
.course-completion a { display: inline-block; margin: .4rem 1.5rem .4rem 0; font: 500 .9rem/1.5 var(--ui); }

/* Native worksheet controls share the notebook's existing local persistence. */
.module .workbook :is(select, input:not([type='checkbox']):not([type='radio'])) {
  width: 100%; min-width: 0; min-height: 2.75rem; padding: .65rem .75rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--fg);
  font: 400 1rem/1.45 var(--ui); background-image: none;
}
.module .workbook select { appearance: auto; }
.module .workbook :is(input[type='checkbox'], input[type='radio']) { width: 1.1rem; height: 1.1rem; min-height: 0; margin: .25rem .5rem .25rem 0; accent-color: var(--gold4); }
.module .workbook :is(input, select):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.module .workbook :is(td, th) { min-width: 5rem; }
.module .workbook .nb-status { display: block; min-height: 1.2rem; }
.module .audit .opts { display: flex; flex-wrap: wrap; gap: .65rem; margin: .8rem 0; }
.module .audit .opts > span { padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 2rem; font: 400 .9rem/1.45 var(--ui); }
.module .audit .opts b { margin-right: .35rem; }
.module .audit .note { font: 400 .85rem/1.6 var(--ui); color: var(--fg2); }

/* Exact source image plates and enlarged HTML figures. */
.figframe > img { object-fit: contain; }
.lightbox-plate > :is(svg, img) { display: block; width: 100%; height: auto; object-fit: contain; }
.lightbox-plate > img { max-height: calc(100dvh - 15rem); }
.lightbox-plate > .callout { margin: 0; }
.lightbox-plate { margin: 0; color: var(--ink); }   /* margin: it carries its figure's classes (.brain-figure has one) */
.lightbox-plate .d14-pair svg { width: 1.75rem; height: auto; max-height: none; }
@media (max-width: 639.98px) {
  .lightbox-plate > :is(svg, img) { width: 170%; max-width: none; max-height: none; }
  .lightbox-body.lb-fit .lightbox-plate > :is(svg, img) { width: 100%; }   /* "Fit to screen" */
  .lightbox-plate :is(.d14-row, .d21-row) { grid-template-columns: 1fr; }
  .lightbox-plate :is(.d14-src, .d21-src) { grid-column: 1 !important; }
}

/* Smaller screens turn authored multi-column blocks into a readable sequence. */
@media (max-width: 760px) {
  .module .defcards { grid-template-columns: 1fr; }
  .module .defcards .dc p { font-size: 1rem; }
  .module .sixcard ol { grid-template-columns: 1fr 1fr; }
  .module .tool { grid-template-columns: 2rem 1fr; }
  .module .tool .tgt { grid-column: 2; }
  .module div.shift { grid-template-columns: 1fr; }
  .module div.shift > .arr { margin: .2rem auto; transform: rotate(90deg); }
  .module .d21-four { grid-template-columns: repeat(2, minmax(min-content, 1fr)); }
  .module .d21-four > div:nth-child(3) { border-left: 0; }
  .module .d21-four > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 639.98px) {
  .module :is(.d14-contrast, .d21-contrast, .qpair, .rr), :is(.module, .lightbox-plate, .library) .d14-pair { grid-template-columns: 1fr; }
  :is(.module, .lightbox-plate, .library) .d14-link { padding: .5rem; }
  :is(.module, .lightbox-plate, .library) .d14-link svg { transform: rotate(90deg); }
  .module :is(.d14-row, .d21-row) { grid-template-columns: 1fr; }
  .module :is(.d14-src, .d21-src) { grid-column: 1 !important; }
  .module .mechcard { grid-template-columns: 1fr; }
  .module .mechcard .wheel { margin: 0 auto 1.5rem; }
  .module .asks .row { grid-template-columns: 1fr; gap: .5rem; }
  .module :is(.practice-terms, .d21-litany) { columns: 1; }
  .module .turns .t { grid-template-columns: 1fr; gap: .5rem; }
  .module .experiment { flex-direction: column; align-items: flex-start; }
  .module .experiment img { width: 7rem; }
  .module .d21-weeks .wk, .module .d14-days li { padding-left: 4.7rem; }
  .module .d21-weeks .between { padding-left: 4.7rem; }
}
@media (max-width: 419.98px) { .module .sixcard ol { grid-template-columns: 1fr; } }
@media (max-width: 1023.98px) {
  #mobile-nav { max-height: calc(100dvh - var(--topbar-h)); overflow-y: auto; overscroll-behavior: contain; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
}
@media print {
  .course-completion { display: none; }
  .module .workbook :is(input, select) { border-color: #aaa; color: #26313f; background: transparent; }
}

/* Browser worksheets added alongside the unchanged reference diagrams. */
.module .web-workbook { padding: 1.75rem clamp(1rem, 3vw, 1.6rem); background: var(--bg2); border-radius: var(--radius); }
.module .web-workbook > h3 { margin-top: 0; }
.module .worksheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.4rem; }
.module .worksheet-grid .notebook-field { margin: .75rem 0 0; }
.module .audit-period { padding: 1rem 0; border-top: 1px solid var(--line); }
.module .audit-period summary { cursor: pointer; min-height: 2.75rem; padding: .5rem 0; font: 500 1.12rem/1.5 var(--display); color: var(--heading); }
.module .audit-period summary::marker { color: var(--accent-text); }
.module .audit-period[open] > .notebook-field { margin-top: 1rem; }
.module .audit-options { display: flex; flex-wrap: wrap; gap: .65rem; border: 0; padding: 0; margin: 1rem 0 1.5rem; min-width: 0; }
.module .audit-options label { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .8rem; min-height: 2.75rem; border: 1px solid var(--line); border-radius: var(--radius); font: 400 .9rem/1.5 var(--ui); color: var(--heading); cursor: pointer; }
.module .audit-options label:has(:checked) { border-color: var(--gold); background: var(--soft); color: var(--soft-fg); }
.module .audit-options label b { margin-right: .3rem; }
.module .audit-options .nb-status { flex-basis: 100%; }
.module .wheel-history { font-variant-numeric: tabular-nums; }
.module .wheel-history :is(th, td) { text-align: center; }
.module .wheel-history th:first-child { width: 36%; text-align: left; }
.module .wheel-history tbody th { font: 500 .85rem/1.5 var(--ui); background: transparent; color: var(--heading); border-bottom: 1px solid var(--line); }
.module .wheel-history td { font: 400 1.4rem/1.5 var(--display); color: var(--heading); }
/* Day 1: the Wheel of Life worksheet is drawn for paper, so it sits on the same paper plate as the figures (21 Oct). */
.module .workbook.wheel-baseline > svg.wheel-baseline { display: block; box-sizing: border-box; width: 100%; max-width: 34rem; height: auto; margin: 1.25rem auto; padding: clamp(.85rem, 2.4vw, 1.6rem); background: var(--plate); border-radius: var(--radius-sm); }
.module :is(.sixcard, .mechcard) .hd :is(h3, h4) { font-family: var(--display); font-weight: 450; }
@media (max-width: 639.98px) {
  .module .worksheet-grid { grid-template-columns: 1fr; gap: 0; }
  .glossary .chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-block: .35rem .85rem; overscroll-behavior-x: contain; }
  .glossary .chips .chip { flex: none; white-space: nowrap; }
  .module .wheel-history { min-width: 30rem; }
}
.gentry[hidden] { display: none !important; }
.glossary-count { margin: 1.5rem 0 .5rem; font: 400 .85rem/1.5 var(--ui); color: var(--fg2); }
@media (hover: none), (pointer: coarse) {
  .fig .fig-enlarge { opacity: 1; transform: none; min-width: 2.75rem; min-height: 2.75rem; }
}
@media (max-width: 639.98px) {
  .fig .fig-enlarge { opacity: 1; transform: none; }
}
.course-end-actions { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.course-end-actions .btn { min-height: 3rem; }
@media print { .course-end-actions { display: none; } }
.module .audit-options .nb-status { position: static; width: 100%; min-height: 1.3rem; }
.module .workbook :is(input[type='checkbox'], input[type='radio']) { background-image: none; padding: 0; flex: none; }

/* Version 4 additions (18 October 2026). */
/* "A note on the science" (every Scientific Quadrant): its small icon had no size on screen and filled the box. */
.module .science-note .label { display: flex; align-items: center; gap: .5rem; margin: 0 0 .35rem; font: 500 .8rem/1.3 var(--ui); color: var(--label); }
.module .science-note .label svg { flex: none; display: block; width: 1.6rem; height: .8rem; overflow: visible; }
/* Day 8: an arrow kept as text for the PDF's text layer, invisible in print beside its drawn arrow. */
.module .arw-t { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Day 19: the mechanism wheel now sits in the card's heading row, and each mechanism has a name and an example line. */
.module .mechcard:has(> .hd .wheel) { grid-template-columns: minmax(0, 1fr); }
.module .mechcard > .hd:has(.wheel) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; }
.module .mechcard > .hd .wheel { flex: none; width: 7rem; margin: 0; }
.module .mechcard li .nm { display: block; color: var(--on-navy-strong); font-weight: 500; }
.module .mechcard li .ex { display: block; margin-top: .2rem; font-size: .92em; line-height: 1.55; color: var(--on-navy2); }
/* Days 15, 16: IAST transliteration inside display-set verse cards. Fraunces has no ā, ū, ś or combining marks,
   so the letters fell apart; Lora has them (the PDF uses its own transliteration face). */
:is(.module, .lightbox-plate, .library) :is([lang="sa-Latn"], .iast) { font-family: var(--serif); }
:is(.module, .lightbox-plate, .library) :is(.text-card .q > .iast, .text-card .q > .en) { display: block; }
:is(.module, .lightbox-plate, .library) :is(.text-card .q > .iast + .en) { margin-top: .65rem; }
/* Days 14, 17, 20, 21: short notes on a chart, table or model (print: small secondary text). */
.module :is(p.table-note, p.model-note) { font: 400 .875rem/1.6 var(--ui); color: var(--fg2); }
.module p.d14-chart-note { font-style: italic; font-size: .95rem; color: var(--fg2); }
