/* ===== Page designs (all sizes in em — the book sets 1em = pageWidth / 34) ===== */
.face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.paper {
  position: absolute; inset: 0; color: var(--ink);
  background-color: #f5eedf;
  background-image:
    radial-gradient(120% 90% at 50% 40%, rgba(255, 252, 244, .9), rgba(236, 225, 203, .0) 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .36  0 0 0 0 .24  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23p)' opacity='.22'/></svg>");
}
/* gutter shading toward the spine */
.paper::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.face.front .paper::after { background: linear-gradient(to var(--gutter-front), rgba(60, 40, 20, .28), rgba(60, 40, 20, .08) 4%, transparent 12%); }
.face.back .paper::after { background: linear-gradient(to var(--gutter-back), rgba(60, 40, 20, .28), rgba(60, 40, 20, .08) 4%, transparent 12%); }
.single .face.front .paper::after { background: linear-gradient(to var(--gutter-front), rgba(60, 40, 20, .18), transparent 6%); }

.pg { position: absolute; inset: 0; padding: 2.3em 2.6em 2em; display: flex; flex-direction: column; font-size: 1em; line-height: 1.62; }
.pg p { margin: 0; }
[lang="ar"] .pg { line-height: 1.85; }

/* running head + folio */
.rh { display: flex; align-items: center; justify-content: space-between; gap: .8em; font-family: var(--f-caps); font-size: .5em; letter-spacing: .28em; text-transform: uppercase; color: #9a7b45; padding-bottom: .9em; border-bottom: 1px solid rgba(154, 123, 69, .35); margin-bottom: 1.6em; }
[lang="ar"] .rh { font-family: var(--f-ui-ar); letter-spacing: .02em; font-size: .56em; }
.rh i { font-style: normal; font-size: 1.1em; }
.pf { margin-top: auto; padding-top: .9em; display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; font-size: .52em; color: #8d7a63; font-family: var(--f-body-en); }
.pf .ref { direction: ltr; letter-spacing: .04em; }
.pf .pn { font-family: var(--f-display-en); font-size: 1.7em; color: #7a6246; letter-spacing: .1em; }
.pf .pn::before, .pf .pn::after { content: "—"; margin: 0 .4em; color: #c2a670; }

.kicker { font-family: var(--f-caps); text-transform: uppercase; letter-spacing: .3em; font-size: .56em; color: var(--oxblood); margin-bottom: .6em; }
[lang="ar"] .kicker { font-family: var(--f-ui-ar); letter-spacing: .04em; font-size: .62em; }
.pg-title { font-family: var(--f-display); font-weight: 700; font-size: 1.9em; line-height: 1.2; margin: 0 0 .5em; color: #1d150e; }
[lang="en"] .pg-title { font-weight: 600; font-size: 2.1em; }
.pg-title.sm { font-size: 1.5em; }
.lead { font-size: 1.02em; color: #3d3024; margin-bottom: 1.2em !important; }
.lead.sm { font-size: .9em; }
.note { margin-top: 1.1em !important; font-size: .74em; color: #6c5a47; padding-inline-start: 1em; border-inline-start: 2px solid #c9a96b; }
.sub-h { font-family: var(--f-display); font-size: 1.05em; margin: .9em 0 .3em; color: var(--oxblood); }

.flourish { width: 9em; height: 1em; display: block; margin: .9em auto; fill: none; stroke: currentColor; stroke-width: 1.3; color: #b68f4e; }
.flourish .thin { stroke-width: .9; }
.flourish path:nth-child(2) { fill: currentColor; }

/* ---------- Covers ---------- */
.cover-art {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3em 2.6em;
  color: var(--gold-hi);
  background:
    radial-gradient(90% 60% at 30% 20%, rgba(255, 210, 160, .10), transparent 60%),
    radial-gradient(80% 80% at 80% 90%, rgba(0, 0, 0, .45), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='l'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .7 0'/></filter><rect width='100%' height='100%' filter='url(%23l)' opacity='.5'/></svg>"),
    linear-gradient(160deg, var(--cv1, #4a1813), var(--cv2, #1c0806));
  box-shadow: inset 0 0 6em rgba(0, 0, 0, .55);
}
.cover-art::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 1.6em; background: linear-gradient(to var(--gutter-front), rgba(0, 0, 0, .55), rgba(255, 255, 255, .06) 45%, rgba(0, 0, 0, .25)); }
.cv-frame { position: absolute; inset: 1.5em; border: 1px solid rgba(225, 190, 120, .55); outline: 1px solid rgba(225, 190, 120, .25); outline-offset: .35em; pointer-events: none; }
.cv-corner { position: absolute; width: 2.4em; height: 2.4em; border: 1.5px solid rgba(240, 210, 140, .8); }
.cv-corner.tl { top: -.6em; left: -.6em; border-right: 0; border-bottom: 0; }
.cv-corner.tr { top: -.6em; right: -.6em; border-left: 0; border-bottom: 0; }
.cv-corner.bl { bottom: -.6em; left: -.6em; border-right: 0; border-top: 0; }
.cv-corner.br { bottom: -.6em; right: -.6em; border-left: 0; border-top: 0; }
.cv-top { position: absolute; top: 3.4em; left: 0; right: 0; font-size: .56em; color: #d8b877; }
.cv-mark { font-family: var(--f-display-en); font-weight: 500; font-size: 8.4em; line-height: .9; letter-spacing: -.02em; filter: drop-shadow(0 .04em .02em rgba(0, 0, 0, .6)); }
.cv-title { font-family: var(--f-display); font-weight: 700; font-size: 2.05em; line-height: 1.25; margin: .25em 0 0; max-width: 11em; filter: drop-shadow(0 .03em .02em rgba(0, 0, 0, .6)); }
[lang="en"] .cv-title { font-weight: 600; font-size: 2.2em; }
.cover-art .flourish { color: #d6b36d; }
.cv-sub { font-family: var(--f-display); font-size: 1.05em; color: #e6cf9c; opacity: .9; }
.cv-foot { position: absolute; bottom: 3.2em; left: 0; right: 0; font-size: .62em; letter-spacing: .6em; color: #d8b877; }
.cv-blurb { font-family: var(--f-display); font-size: 1.12em; line-height: 1.75; color: #ecd9ae; max-width: 22em; }
.cover-art.back::before { inset-inline-start: auto; inset-inline-end: 0; background: linear-gradient(to var(--gutter-back), rgba(0, 0, 0, .55), rgba(255, 255, 255, .06) 45%, rgba(0, 0, 0, .25)); }

.endpaper {
  position: absolute; inset: 0;
  background-color: #2a0f0c;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(214, 174, 100, .55) 0 .12em, transparent .14em),
    radial-gradient(circle at 75% 75%, rgba(214, 174, 100, .55) 0 .12em, transparent .14em),
    repeating-linear-gradient(45deg, rgba(214, 174, 100, .12) 0 1px, transparent 1px 1.6em),
    repeating-linear-gradient(-45deg, rgba(214, 174, 100, .12) 0 1px, transparent 1px 1.6em),
    radial-gradient(120% 90% at 50% 30%, #4a1a14, #1a0705);
  background-size: 1.6em 1.6em, 1.6em 1.6em, auto, auto, auto;
}

/* ---------- Title page ---------- */
.title-pg { align-items: center; justify-content: center; text-align: center; padding: 3.5em 3em; }
.title-pg .caps { color: #9a7b45; font-size: .56em; }
.tp-mark { font-family: var(--f-display-en); font-size: 5.6em; line-height: 1; margin-top: .1em; }
.foil-ink { background: linear-gradient(120deg, #6f4f1d, #c49a4f 40%, #7a5822 60%, #b88d45); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tp-title { font-family: var(--f-display); font-size: 1.95em; line-height: 1.3; margin: .15em 0 .4em; color: #1d150e; max-width: 12em; }
.tp-sub { font-family: var(--f-display); font-size: 1.1em; color: #5b4632; }
.tp-tag { font-size: .72em; letter-spacing: .12em; color: #8a7253; margin-top: .4em !important; }
.tp-pub { margin-top: 1.4em; display: flex; flex-direction: column; align-items: center; gap: .2em; }
.tp-pub b { font-family: var(--f-caps); letter-spacing: .5em; font-size: .8em; color: #7d2a20; padding-inline-start: .5em; }
.tp-pub span { font-size: .6em; color: #8a7253; }

/* ---------- Prose ---------- */
.blocks { display: grid; gap: 1em; }
.blk { display: grid; grid-template-columns: 2.2em 1fr; gap: .6em; align-items: start; }
.blk-n { font-family: var(--f-display-en); font-style: italic; font-size: 1.5em; line-height: 1; color: #b68f4e; }
.blk h4 { margin: 0 0 .15em; font-family: var(--f-display); font-size: 1.05em; color: #2a1d12; }
.blk p { font-size: .86em; color: #44372a; }

/* ---------- TOC ---------- */
.toc-spacer { height: 2.4em; }
.toc { list-style: none; margin: .4em 0 0; padding: 0; display: grid; gap: .25em; }
.toc a { display: grid; grid-template-columns: 2.6em auto 1fr auto; align-items: end; gap: .7em; padding: .7em 0; border-bottom: 1px solid rgba(154, 123, 69, .2); cursor: pointer; transition: color .3s; }
.toc a:hover { color: var(--oxblood); }
.toc-n { font-family: var(--f-display-en); font-size: 2em; line-height: .9; color: #b68f4e; font-weight: 500; }
.toc-t b { display: block; font-family: var(--f-display); font-size: 1.12em; line-height: 1.3; }
.toc-t small { font-size: .62em; color: #8a7253; letter-spacing: .06em; }
.toc-dots { border-bottom: 1px dotted rgba(122, 98, 70, .55); margin-bottom: .55em; }
.toc-p { font-family: var(--f-display-en); font-size: 1em; color: #7a6246; }

/* ---------- Chapter opener ---------- */
.chapter-pg {
  align-items: center; justify-content: center; text-align: center; color: #efe0bd; padding: 3em;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='l'><feTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23l)' opacity='.45'/></svg>"),
    radial-gradient(90% 70% at 50% 40%, var(--chA, #1d3a33), var(--chB, #08130f));
}
.ch-1, .ch-6 { --chA: #3f1914; --chB: #140504; }
.ch-2, .ch-7 { --chA: #183630; --chB: #06110d; }
.ch-3, .ch-8 { --chA: #1d2640; --chB: #070b16; }
.ch-4, .ch-9 { --chA: #33281b; --chB: #100b06; }
.ch-5, .ch-10 { --chA: #2c1733; --chB: #0e0611; }
.ch-glow { position: absolute; width: 22em; height: 22em; border-radius: 50%; background: radial-gradient(circle, rgba(232, 196, 120, .16), transparent 65%); top: 18%; left: 50%; transform: translateX(-50%); pointer-events: none; }
.ch-kicker { position: absolute; top: 3.2em; left: 0; right: 0; font-size: .54em !important; color: #cfae6c; }
.ch-num { font-family: var(--f-display-en); font-size: 7em; line-height: .9; font-weight: 500; }
.emblem { width: 5.4em; height: 5.4em; margin: .9em 0 .4em; fill: none; stroke: #d7b46f; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 .4em rgba(230, 190, 110, .25)); }
.emblem .thin { stroke-width: 1.3; opacity: .7; }
.ch-title { font-family: var(--f-display); font-size: 2.3em; font-weight: 700; line-height: 1.25; margin: .2em 0 0; color: #f6e7c3; }
[lang="en"] .ch-title { font-weight: 600; }
.chapter-pg .flourish { color: #cfae6c; }
.ch-sub { font-family: var(--f-display); font-size: 1.12em; line-height: 1.6; max-width: 17em; color: #dccaa3; }
.ch-range { position: absolute; bottom: 3.2em; left: 0; right: 0; font-size: .54em !important; color: #cfae6c; }

/* ---------- Tip ---------- */
.tip-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1em; margin-bottom: 1em; }
.tip-num { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 4.6em; height: 4.6em; border: 1px solid #c4a066; border-radius: 50%; outline: 1px solid rgba(196, 160, 102, .4); outline-offset: .22em; color: var(--oxblood); }
.tip-num small { font-family: var(--f-caps); font-size: .46em; letter-spacing: .2em; text-transform: uppercase; color: #9a7b45; }
[lang="ar"] .tip-num small { font-family: var(--f-ui-ar); letter-spacing: 0; font-size: .52em; }
.tip-num b { font-family: var(--f-display-en); font-weight: 500; font-size: 1.75em; line-height: 1; }
.tip-title { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.62em; line-height: 1.28; color: #1d150e; }
[lang="en"] .tip-title { font-weight: 600; font-size: 1.75em; line-height: 1.12; }

.dia { margin: .2em 0 1.1em; display: flex; align-items: flex-start; justify-content: space-between; padding: 1em 1.2em .9em; border-radius: .5em; background: linear-gradient(180deg, rgba(196, 160, 102, .12), rgba(196, 160, 102, .04)); border: 1px solid rgba(196, 160, 102, .3); }
.dia-node { flex: 0 0 auto; width: 7.4em; display: flex; flex-direction: column; align-items: center; gap: .35em; text-align: center; }
.dia-node em { display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: 50%; border: 1px solid #b68f4e; font-style: normal; font-family: var(--f-display-en); font-size: .95em; color: #8a6a35; background: #f8f1e2; }
[lang="ar"] .dia-node em { font-family: var(--f-display-ar); }
.dia-node.on em { background: linear-gradient(135deg, #8f6a2c, #e3c47f 50%, #a37a36); color: #2b1d0c; border-color: transparent; box-shadow: 0 .2em .6em rgba(143, 106, 44, .35); }
.dia-node span { font-size: .7em; line-height: 1.35; color: #4b3c2d; font-weight: 600; }
.dia-link { flex: 1 1 auto; position: relative; height: 2.3em; }
.dia-link::before { content: ""; position: absolute; top: 50%; left: .2em; right: .2em; border-top: 1px dashed #b68f4e; }
.dia-link i { position: absolute; top: 50%; left: 50%; width: .5em; height: .5em; background: #b68f4e; transform: translate(-50%, -50%) rotate(45deg); }

.tip-body { font-size: .98em; color: #2c2219; margin-bottom: 1em !important; }
[lang="en"] .tip-body::first-letter { font-family: var(--f-display-en); float: left; font-size: 3.1em; line-height: .82; padding: .06em .1em 0 0; color: var(--oxblood); }
.ex { padding: .75em 1em; margin-bottom: 1em; background: rgba(125, 42, 32, .055); border-inline-start: 3px solid var(--oxblood); border-radius: 0 .4em .4em 0; }
[dir="rtl"] .ex { border-radius: .4em 0 0 .4em; }
.ex h4, .try h4 { margin: 0 0 .15em; font-family: var(--f-display); font-size: .86em; color: var(--oxblood); }
.ex p { font-size: .84em; color: #3b2e22; }

.prompt { position: relative; margin-bottom: 1em; border-radius: .55em; background: linear-gradient(160deg, #1f1912, #15110c); border: 1px solid rgba(201, 165, 100, .35); box-shadow: 0 .4em 1.2em rgba(40, 25, 10, .18); overflow: hidden; }
.prompt::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(#e3c47f, #8f6a2c); }
[dir="rtl"] .prompt::before { left: auto; right: 0; }
.prompt-h { display: flex; justify-content: space-between; align-items: center; padding: .55em 1em .35em; font-family: var(--f-caps); font-size: .52em; letter-spacing: .22em; text-transform: uppercase; color: #cfae6c; border-bottom: 1px solid rgba(201, 165, 100, .15); }
[lang="ar"] .prompt-h { font-family: var(--f-ui-ar); letter-spacing: .02em; font-size: .58em; }
.copy { display: inline-flex; align-items: center; gap: .4em; padding: .3em .8em; border-radius: 99px; border: 1px solid rgba(201, 165, 100, .4); color: #e8d2a0; font-family: var(--f-ui); font-size: 1.05em; letter-spacing: .05em; text-transform: none; cursor: pointer; transition: .25s; }
.copy:hover { background: rgba(201, 165, 100, .18); }
.copy.done { background: #c9a564; color: #1f1912; }
.ico { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.prompt code { display: block; padding: .7em 1em .85em; font-family: var(--f-mono); font-size: .66em; line-height: 1.7; color: #efe2c4; white-space: pre-wrap; unicode-bidi: plaintext; text-align: start; }
.prompt.slim code { padding: .65em 1em; }
.try { display: grid; grid-template-columns: auto 1fr; gap: .7em; align-items: start; }
.try > .ico { width: 1.7em; height: 1.7em; padding: .3em; border-radius: 50%; border: 1px solid #c4a066; color: var(--oxblood); }
.try p { font-size: .86em; color: #2f251b; font-weight: 600; }

/* ---------- Shots / review ---------- */
.shots { display: grid; gap: .8em; }
.shot { padding: .7em .9em; border: 1px solid rgba(154, 123, 69, .3); border-radius: .5em; background: rgba(255, 255, 255, .35); }
.shot-h { display: flex; align-items: baseline; gap: .7em; font-size: .8em; color: #7a6246; margin-bottom: .2em; }
.shot-h b { font-family: var(--f-display-en); font-size: 1.6em; color: var(--oxblood); font-weight: 500; }
.shot-h .dur { margin-inline-start: auto; font-family: var(--f-display-en); }
.shot p { font-size: .84em; margin-bottom: .35em !important; }
.shot code { display: block; font-family: var(--f-mono); font-size: .6em; color: #5b4a36; background: rgba(154, 123, 69, .1); padding: .5em .7em; border-radius: .3em; line-height: 1.6; text-align: left; }
.review-pg > p { font-size: .86em; margin-bottom: .6em !important; }
.review-pg .prompt { margin-bottom: .5em; }
.rv { width: 100%; border-collapse: collapse; font-size: .74em; }
.rv th { text-align: start; font-family: var(--f-display); color: var(--oxblood); padding: .3em .5em; border-bottom: 1px solid #c4a066; }
.rv td { padding: .45em .5em; border-bottom: 1px solid rgba(154, 123, 69, .2); vertical-align: top; }
.rv td:first-child { font-weight: 700; width: 38%; }

.scope-tag { display: inline-block; margin-top: .45em; padding: .15em .7em; border-radius: 99px; border: 1px solid rgba(125, 42, 32, .35); color: var(--oxblood); font-size: .54em; letter-spacing: .04em; font-family: var(--f-ui); }
.formula { margin: .2em 0 1.1em; padding: .6em 1em; text-align: center; font-family: var(--f-display-en); font-size: 1.7em; color: var(--oxblood); border-top: 1px solid #c9a96b; border-bottom: 1px solid #c9a96b; }
.script { margin: .3em 0 0; padding: .7em 1em; font-family: var(--f-display); font-size: .9em; line-height: 1.8; color: #3a2c1f; background: rgba(196, 160, 102, .1); border-inline-start: 3px solid #c4a066; }
.table-pg .rv td:first-child { width: 42%; }

/* ---------- Worksheet / checklist ---------- */
.fields { display: grid; gap: .9em; }
.field label { display: block; font-family: var(--f-display); font-size: .86em; color: #3a2c1f; margin-bottom: .1em; }
.field i { display: block; height: 1.25em; border-bottom: 1px solid rgba(122, 98, 70, .35); }
.ck { list-style: none; margin: .4em 0 0; padding: 0; display: grid; gap: .55em; }
.ck li { display: grid; grid-template-columns: auto auto 1fr; align-items: end; gap: .7em; font-size: .88em; }
.ck .box { width: 1em; height: 1em; border: 1.5px solid #9a7b45; border-radius: .15em; align-self: center; }
.ck .dots { border-bottom: 1px dotted rgba(122, 98, 70, .45); margin-bottom: .45em; }

/* ---------- Glossary / index / refs ---------- */
.gl { margin: .3em 0 0; display: grid; gap: 1.05em; }
.gl dt { font-family: var(--f-display); font-size: 1.1em; color: #1d150e; display: flex; align-items: baseline; gap: .6em; }
.gl dt small { font-family: var(--f-caps); font-size: .5em; letter-spacing: .2em; text-transform: uppercase; color: #9a7b45; }
.gl dd { margin: .1em 0 0; font-size: .86em; color: #44372a; padding-inline-start: 1em; border-inline-start: 1px solid #d3b98a; }
.ix { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ix a { display: grid; grid-template-columns: 2.4em auto 1fr auto; gap: .5em; align-items: end; font-size: .7em; padding: .2em 0; cursor: pointer; }
.ix a:hover span { color: var(--oxblood); }
.ix b { font-family: var(--f-display-en); color: #b68f4e; font-weight: 500; }
.ix i { border-bottom: 1px dotted rgba(122, 98, 70, .45); margin-bottom: .45em; }
.ix em { font-style: normal; font-family: var(--f-display-en); color: #7a6246; }
.refs { list-style: none; margin: 0; padding: 0; display: grid; gap: .7em; }
.refs li { display: grid; grid-template-columns: 2.6em 1fr; gap: .4em; }
.refs b { font-family: var(--f-display-en); color: var(--oxblood); font-size: .86em; font-weight: 500; }
.refs h5 { margin: 0; font-family: var(--f-body-en); font-size: .78em; color: #1d150e; text-align: start; }
[dir="rtl"] .refs h5 { text-align: right; }
.refs p { font-size: .7em; color: #4b3c2d; }
.refs a { font-size: .56em; color: #8a6a35; word-break: break-all; display: block; text-align: start; }

/* ---------- End ---------- */
.end-pg { align-items: center; justify-content: center; text-align: center; padding: 4em 3.4em; }
.end-pg h2 { font-family: var(--f-display); font-size: 1.9em; line-height: 1.35; margin: .2em 0 .6em; color: #1d150e; }
.end-pg p { font-size: 1em; color: #44372a; }

/* ---------- Locked (paywall) ---------- */
.lock-veil { position: relative; flex: 1; margin-top: .4em; }
.ghost-lines { display: grid; gap: .85em; padding-top: .5em; filter: blur(.12em); opacity: .55; }
.ghost-lines i { display: block; height: .55em; border-radius: 99px; background: linear-gradient(90deg, rgba(90, 70, 50, .28), rgba(90, 70, 50, .14)); }
.ghost-lines i:nth-child(3n) { width: 72%; }
.ghost-lines i:nth-child(4n) { width: 88%; }
.seal { position: absolute; inset: 8% 6% auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4em; padding: 1.6em 1.4em; border-radius: .8em; background: rgba(250, 244, 232, .92); border: 1px solid #c9a96b; box-shadow: 0 1em 3em rgba(60, 40, 20, .18); }
.seal svg { width: 2.8em; height: 2.8em; fill: none; stroke: var(--oxblood); stroke-width: 2; padding: .5em; border-radius: 50%; border: 1px solid #c9a96b; box-sizing: content-box; }
.seal h4 { margin: .2em 0 0; font-family: var(--f-display); font-size: 1.3em; color: #1d150e; }
.seal p { font-size: .8em; color: #4b3c2d; max-width: 20em; }
.seal-btn { margin-top: .5em; padding: .6em 1.6em; border-radius: 99px; background: linear-gradient(115deg, #8f6a2c, #f0d79a 45%, #b5893f); color: #26190a; font-family: var(--f-ui); font-size: .8em; font-weight: 700; cursor: pointer; }
.blank-pg { pointer-events: none; }

/* paid-page watermark + loading seal */
.wm { position: absolute; left: 0; right: 0; bottom: 3.2%; text-align: center; font-family: var(--f-mono); font-size: calc(var(--pw, 400px) / 60); letter-spacing: .08em; color: rgba(120, 90, 60, .32); pointer-events: none; user-select: none; direction: ltr; }
.page::before { content: ""; }
.seal.loading { inset: 30% 18% auto; }
.seal.loading svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .6; } }
.seal-btn { border-radius: .7em; box-shadow: 0 .25em 0 #7a4a22, 0 .6em 1em rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .6); transition: transform .15s; }
.seal-btn:active { transform: translateY(.2em); box-shadow: 0 .05em 0 #7a4a22; }

/* lessons, checkpoints, figures */
.lesson-pg .tip-body { font-size: .9em; margin-bottom: .55em !important; }
.lesson-pg .tip-body + .tip-body::first-letter { all: unset; }
.mfa { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; margin-top: .8em; }
.mfa div { padding: .5em .6em; border-radius: .4em; background: rgba(196, 160, 102, .1); border-top: 2px solid #c4a066; }
.mfa div:first-child { border-color: #b4553c; background: rgba(180, 85, 60, .07); }
.mfa div:last-child { border-color: #4f8a64; background: rgba(79, 138, 100, .07); }
.mfa b { display: block; font-family: var(--f-display); font-size: .66em; color: #5b4632; margin-bottom: .15em; }
.mfa span { display: block; font-size: .64em; line-height: 1.5; color: #3a2c1f; }
.checkpoint-pg .blk { margin-bottom: .7em; }
.checkpoint-pg .ck { margin: .2em 0 .8em; }
.ch-medal { width: 8.5em; height: 8.5em; margin: 1em 0 .4em; border-radius: 50%; padding: .35em; background: linear-gradient(135deg, #8f6a2c, #f3dca0 45%, #a37a36); box-shadow: 0 .6em 1.6em rgba(0, 0, 0, .55), 0 0 2em rgba(230, 190, 110, .2); }
.ch-medal img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.figs { display: grid; gap: .6em; margin: .2em 0 .9em; }
.figs.n2 { grid-template-columns: 1fr 1fr; }
.fig-img { margin: 0; }
.fig-img img { width: 100%; display: block; border-radius: .35em; box-shadow: 0 .4em 1em rgba(40, 25, 10, .25); pointer-events: none; }
.figs.n1 .fig-img img { max-height: 15em; object-fit: cover; }
.figs.n2 .fig-img img { aspect-ratio: 1 / 1.05; object-fit: cover; }
.fig-img figcaption { font-size: .6em; color: #6c5a47; margin-top: .3em; text-align: center; }
.fig-p { font-size: .82em; color: #3a2c1f; margin-bottom: .5em !important; }
.cover-art.has-img { justify-content: flex-end; padding-bottom: 4.6em; }
.cv-img { position: absolute; inset: 0; background-size: cover; background-position: center 35%; }
.cv-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 14, .35) 0%, rgba(8, 20, 14, .05) 30%, rgba(8, 18, 12, .75) 62%, rgba(6, 14, 10, .95)); }
.cover-art.has-img .cv-mark { display: none; }

.pg > * { flex-shrink: 0; }

.mfa.n2 { grid-template-columns: 1fr 1fr; }
.toc-pg li, .toc-pg a, .toc-pg .toc-t { color: #1c1a17; }
