/* Enigma Academy, the public pages. Light by default, dark when the reader's system is dark. */
:root {
  --bg: #f6f3ea; --paper: #fff; --paper2: #fbf8f1; --ink: #1e1a13; --ink2: #4b4538; --ink3: #7b7362; --line: #e3dac6;
  --gold: #a97a1f; --gold2: #d9b252; --goldsoft: #f7edd2; --navy: #1a2245; --green: #2b7a4b; --greensoft: #e3f2e8;
  --blue: #2d5d9f; --bluesoft: #e4ecf7;
  --shadow: 0 1px 2px rgba(30,26,19,.06), 0 8px 24px rgba(30,26,19,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1020; --paper: #151a2e; --paper2: #1a2036; --ink: #f1ebdd; --ink2: #cfc6b3; --ink3: #9a917e; --line: #2c3350;
    --gold: #e2bd62; --gold2: #f0cf7a; --goldsoft: #2e2814; --navy: #c9d2f2; --green: #6cc596; --greensoft: #13301f;
    --blue: #8fb4ec; --bluesoft: #172742;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--blue); }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 860px; }

/* the top line */
header.top { background: #141b3a; color: #f4efe3; }
header.top .wrap { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 19px; color: #f0cf7a; text-decoration: none; margin-right: auto; }
header.top nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 14.5px; }
header.top nav a { color: #d9d2c1; text-decoration: none; }
header.top nav a:hover, header.top nav a[aria-current="page"] { color: #f0cf7a; }
header.top .sso { min-height: 30px; display: flex; align-items: center; }

/* the head of a page */
.hero { background: linear-gradient(160deg, #141b3a 0%, #1d2650 55%, #2a2512 100%); color: #f4efe3; }
.hero .wrap { padding-top: 40px; padding-bottom: 38px; }
.kicker { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: #e6c877; }
.kicker a { color: inherit; text-decoration: none; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(30px, 5vw, 46px); line-height: 1.12; margin: 12px 0 14px; max-width: 900px; }
h1 b { font-weight: 400; color: #f0cf7a; }
.lede { font-size: 18px; color: #d9d2c1; max-width: 800px; margin: 0; }
.figs { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 22px; }
.figs div { font-size: 13.5px; color: #b9b19f; }
.figs b { display: block; font-family: Georgia, serif; font-weight: 400; font-size: 30px; color: #f4efe3; line-height: 1.1; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-block; border-radius: 12px; padding: 11px 20px; font-weight: 650; font-size: 15px; text-decoration: none; }
.btn.main { background: linear-gradient(#e6c35c, #c99a25); color: #1d1a12; }
.btn.line { border: 1px solid rgba(255,255,255,.35); color: #f4efe3; }
.btn.quiet { border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
.btn.sm { padding: 7px 14px; font-size: 14px; border-radius: 10px; }

main { padding: 26px 0 110px; }
[hidden] { display: none !important; }

/* the review: a film, and its slides */
video.film { display: block; width: 100%; max-width: 1040px; height: auto; aspect-ratio: 16 / 9; border-radius: 18px; background: #10162f; box-shadow: var(--shadow); border: 1px solid var(--line); margin-top: 12px; }

/* a row that moves sideways, with arrows and dots */
.railhead { display: flex; align-items: flex-end; gap: 12px; margin: 40px 0 10px; }
.railhead h2 { margin: 0 0 4px; }
.railhead h3 { margin: 0; }
.railhead p { margin: 0; color: var(--ink2); }
.railhead .sp { flex: 1; }
.railnav { display: flex; gap: 8px; }
.railnav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 21px; line-height: 1; cursor: pointer; padding: 0 0 3px; }
.railnav button:disabled { opacity: .35; cursor: default; }
.rail { display: grid; grid-auto-flow: column; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 14px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail.slides { grid-auto-columns: calc((100% - 32px) / 3); }
.rail.people { grid-auto-columns: calc((100% - 16px) / 2); }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink3); opacity: .38; cursor: pointer; transition: .2s; }
.dots i.on { background: var(--gold); opacity: 1; width: 26px; border-radius: 5px; }
.slide { position: relative; display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; padding-bottom: 14px; }
.slide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.slide .no { position: absolute; left: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(#e6c35c, #c99a25); color: #1d1a12; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.slide b { display: block; font-size: 15.5px; padding: 12px 16px 0; }
.slide .tx { display: block; font-size: 13.5px; color: var(--ink2); padding: 4px 16px 0; }
.slide:hover { border-color: var(--gold); }
.person { display: flex; gap: 18px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.person img { flex: 0 0 auto; width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold2); }
.person h3 { margin: 0 0 2px; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 22px; }
.person .deg { font-size: 13.5px; font-weight: 650; color: var(--gold); }
.person .place { font-size: 14px; color: var(--ink2); margin-top: 2px; }
.person .field { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 10px; border-radius: 999px; background: var(--goldsoft); color: var(--gold); margin-top: 8px; }
.person p { margin: 8px 0 0; font-size: 14.5px; }
.person .go { display: inline-block; margin-top: 8px; font-weight: 650; text-decoration: none; font-size: 14.5px; }
@media (max-width: 900px) { .rail.slides { grid-auto-columns: calc((100% - 16px) / 2); } .rail.people { grid-auto-columns: 82%; } }
@media (max-width: 600px) { .rail.slides, .rail.people { grid-auto-columns: 88%; } .person { flex-direction: column; } .person img { width: 84px; height: 84px; } }
h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 28px; margin: 40px 0 8px; }
h3 { font-size: 17px; margin: 26px 0 8px; }
p { max-width: 860px; margin: 0 0 12px; }
ul, ol { max-width: 860px; padding-left: 22px; }
li { margin: 5px 0; }
.small { font-size: 13.5px; color: var(--ink3); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 14px 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; }
.card p { margin-bottom: 8px; }
.card .go { font-weight: 650; text-decoration: none; display: block; }
.card .go.second { font-weight: 400; margin-top: 4px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.tag.live { background: var(--goldsoft); color: var(--gold); }
.tag.soon { background: var(--paper2); color: var(--ink3); border: 1px solid var(--line); }
.note { border-left: 4px solid var(--gold2); background: var(--paper2); padding: 12px 16px; border-radius: 0 12px 12px 0; margin: 14px 0; max-width: 860px; }
.note.blue { border-left-color: var(--blue); }

/* the map */
.bar2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.chipb { font: inherit; font-size: 13.5px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink2); cursor: pointer; text-decoration: none; }
.chipb[aria-pressed="true"], .chipb.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; color: var(--ink2); margin: 0 0 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 24px; height: 15px; border-radius: 5px; border: 1.5px solid var(--line); background: var(--paper); display: inline-block; }
.lg.live { background: var(--goldsoft); border-color: var(--gold); }
.lg.anc { border-color: var(--green); background: var(--greensoft); }
.lg.desc { border-color: var(--blue); background: var(--bluesoft); }
.lx { width: 26px; border-top: 2px dashed var(--blue); display: inline-block; }
.ldm { width: 9px; height: 9px; background: var(--navy); transform: rotate(45deg); display: inline-block; margin: 0 3px; }
.ldn { width: 9px; height: 9px; background: var(--blue); border-radius: 50%; display: inline-block; margin: 0 3px; }
.lp { display: inline-flex; gap: 3px; }
.lp i { width: 10px; height: 4px; border-radius: 2px; border: 1px solid var(--line); display: inline-block; }
.lp i.has { background: var(--ink2); border-color: var(--ink2); }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 12px; overflow-x: auto; }
svg#map { display: block; width: 100%; height: auto; }
svg#map.wide { min-width: 1040px; }
.band { fill: var(--paper2); stroke: var(--line); }
.bandl { font: 600 12px "Segoe UI", sans-serif; letter-spacing: .1em; text-transform: uppercase; fill: var(--ink3); }
.head { font: 400 21px Georgia, "Times New Roman", serif; fill: var(--gold); }
.mid { stroke: var(--line); stroke-dasharray: 3 6; }
.start { fill: var(--paper); stroke: var(--line); }
.startt { font: 12.5px "Segoe UI", sans-serif; fill: var(--ink2); }
.ed { fill: none; stroke: var(--ink3); stroke-width: 1.1; opacity: .34; }
.ed.x { stroke: var(--blue); stroke-dasharray: 5 4; opacity: .6; }
.arr { fill: var(--ink3); }
.arrx { fill: var(--blue); }
.nd { cursor: pointer; outline: none; text-decoration: none; }
.nd .face { fill: var(--paper); stroke: var(--line); stroke-width: 1.3; }
.nd .pip { fill: none; stroke: var(--line); stroke-width: 1; }
.nd .pip.has { fill: var(--ink2); stroke: var(--ink2); }
.nd.live .face { fill: var(--goldsoft); stroke: var(--gold); stroke-width: 1.8; }
.nd text { font: 11.5px "Segoe UI", system-ui, sans-serif; fill: var(--ink); pointer-events: none; }
.nd .dot { fill: var(--gold); }
.nd .ex { fill: var(--navy); }
.nd .nt { fill: var(--blue); }
.nd:hover .face, .nd:focus-visible .face { stroke: var(--navy); stroke-width: 2.2; }
svg.picked .nd, svg.sift .nd { opacity: .24; }
svg.picked .nd.sel, svg.picked .nd.anc, svg.picked .nd.desc, svg.sift .nd.keep { opacity: 1; }
.nd.sel .face { stroke: var(--navy); stroke-width: 2.8; }
.nd.anc .face { stroke: var(--green); stroke-width: 2; fill: var(--greensoft); }
.nd.desc .face { stroke: var(--blue); stroke-width: 2; fill: var(--bluesoft); }
svg.picked .ed, svg.sift .ed { opacity: .05; }
svg.picked .ed.on { opacity: .95; stroke-width: 1.9; }
svg.picked .ed.on.up { stroke: var(--green); }
svg.picked .ed.on.down { stroke: var(--blue); }
#sheet { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(720px, calc(100vw - 20px)); background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.22); padding: 16px 18px 14px; z-index: 20; display: none; max-height: 62vh; overflow: auto; }
#sheet.open { display: block; }
#sheet .x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink3); cursor: pointer; padding: 4px 8px; }
#sheet .where { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
#sheet .ttl { font-family: Georgia, "Times New Roman", serif; font-size: 23px; line-height: 1.2; margin: 2px 30px 6px 0; }
#sheet .can { font-size: 15.5px; margin-bottom: 10px; }
#sheet .row { font-size: 13.5px; color: var(--ink2); margin-top: 6px; }
#sheet .row b { color: var(--ink); }
#sheet .row.notice { border-left: 3px solid var(--blue); padding-left: 10px; color: var(--ink); }
#sheet .row.go { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
#sheet .row.comment { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; color: var(--ink); font-size: 14px; }
#sheet .row.comment p { margin: 0 0 8px; }
.lk { display: inline-block; font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--paper2); color: var(--ink); border-radius: 999px; padding: 2px 10px; margin: 3px 4px 0 0; cursor: pointer; text-decoration: none; }
.lk.up { border-color: var(--green); }
.lk.down { border-color: var(--blue); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px 18px; }
.colh { font-family: Georgia, serif; font-size: 18px; color: var(--gold); margin-bottom: 6px; }
table.list { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14.5px; }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list a.t { font-weight: 650; color: var(--ink); text-decoration: none; }
table.list a.t:hover { color: var(--blue); }
.can { color: var(--ink2); margin-top: 2px; }
.first { color: var(--ink3); font-size: 13px; margin-top: 3px; }
.first.cm { color: var(--ink2); }
.other { color: var(--ink3); font-weight: 400; }

footer.foot { border-top: 1px solid var(--line); padding: 22px 0 60px; font-size: 13.5px; color: var(--ink3); }
footer.foot p { max-width: 900px; }
@media (max-width: 640px) { h2 { font-size: 24px; } .hero .wrap { padding-top: 28px; padding-bottom: 28px; } }

/* the page of a subject, and of a grade (28 Nov 2026) */
.hero.subj .wrap { padding-bottom: 30px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.crumbs a:hover { color: #fff3cf; }
.crumbs span { opacity: .6; }
.hero .lede b { color: #f0cf7a; font-weight: 600; }
.hchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hc { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); color: #e9e2d0; background: rgba(255,255,255,.04); }
.hc.gold { border-color: #e2bd62; color: #1d1a12; background: linear-gradient(#ecc964, #c99a25); font-weight: 700; }
.hc.lvls i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; border: 1px dashed rgba(255,255,255,.3); color: rgba(255,255,255,.35); margin-right: -3px; }
.hc.lvls i.on { border: 1px solid #e2bd62; background: rgba(226,189,98,.16); color: #f0cf7a; }
.hc.lvls span { margin-left: 6px; }
a.hc { text-decoration: none; }
h3 a.gh { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--gold2); }
h3 a.gh:hover { color: var(--gold); }
a.hc:hover { border-color: #e2bd62; color: #f0cf7a; }
.pagenav { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.pagenav .wrap { display: flex; gap: 6px 22px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
.pagenav a { color: var(--ink2); text-decoration: none; }
.pagenav a:hover { color: var(--gold); }
section[id] { scroll-margin-top: 56px; }
article[id] { scroll-margin-top: 60px; }

.road { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr); gap: 10px; align-items: center; margin: 16px 0 6px; }
.road .col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.road .arrow { color: var(--gold); font-size: 26px; text-align: center; }
.colhead { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.colhead.up { color: var(--green); }
.colhead.down { color: var(--blue); }
.nodecard { display: flex; flex-direction: column; gap: 3px; background: var(--paper); border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; padding: 11px 14px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
a.nodecard:hover { transform: translateY(-1px); border-color: var(--gold2); }
.nodecard.up { border-left-color: var(--green); }
.nodecard.down { border-left-color: var(--blue); }
.nodecard.live { box-shadow: 0 0 0 1px var(--gold2), var(--shadow); }
.nodecard.live em { font-style: normal; color: var(--gold); font-weight: 650; }
.nodecard.plain { border-left-color: var(--line); color: var(--ink2); font-size: 14px; box-shadow: none; }
.nodecard.here { border: 2px solid var(--gold); background: var(--goldsoft); padding: 16px 18px; }
.nodecard.here .nt { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 21px; }
.nodecard .nt { font-weight: 650; font-size: 15px; line-height: 1.3; }
.nodecard .nm { font-size: 12.5px; color: var(--ink3); }
.pips { display: inline-flex; gap: 3px; margin-top: 3px; }
.pips i { width: 14px; height: 5px; border-radius: 3px; border: 1px solid var(--line); }
.pips i.on { background: var(--ink2); border-color: var(--ink2); }
.nodecard.here .pips i.on { background: var(--gold); border-color: var(--gold); }
.road .col .btn { text-align: center; }
.whole { margin-top: 14px; display: grid; gap: 10px; }
.whole details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; }
.whole summary { cursor: pointer; font-size: 14.5px; color: var(--ink2); }
.whole summary b { color: var(--ink); }
.gradeline { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 8px 0 2px; }
.gradeline .gl { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); min-width: 92px; }
.lk.live { border-color: var(--gold); background: var(--goldsoft); color: var(--ink); font-weight: 600; }
.lk:hover { border-color: var(--gold2); }
@media (max-width: 860px) { .road { grid-template-columns: 1fr; } .road .arrow { transform: rotate(90deg); } }

.lvtab { display: grid; gap: 8px; margin: 14px 0 10px; max-width: 980px; }
.lvrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 210px; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); }
.lvrow.off { opacity: .55; box-shadow: none; background: transparent; border-style: dashed; }
.lvb { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 750; font-size: 16px; background: linear-gradient(#ecc964, #c99a25); color: #1d1a12; }
.lvrow.off .lvb { background: var(--paper2); color: var(--ink3); border: 1px dashed var(--line); }
.lvtx b { display: block; font-size: 15.5px; }
.lvtx span { font-size: 14px; color: var(--ink2); }
.lvwho { font-size: 13.5px; color: var(--ink2); text-align: right; }
@media (max-width: 640px) { .lvrow { grid-template-columns: 40px minmax(0, 1fr); } .lvwho { grid-column: 2; text-align: left; } }

.params { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 16px 0; max-width: 980px; }
.param { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.param b { display: block; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 26px; line-height: 1.15; color: var(--gold); }
.param span { display: block; font-size: 13.5px; color: var(--ink2); margin-top: 4px; }
.tocchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.tocchips a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 6px; font-size: 14px; }
.tocchips a:hover { border-color: var(--gold); }
.tocchips a span { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--goldsoft); color: var(--gold); }
.topic { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px 26px 18px; box-shadow: var(--shadow); margin: 18px 0; max-width: 980px; }
.topic header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.topic .num { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 750; background: linear-gradient(#ecc964, #c99a25); color: #1d1a12; }
.topic h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 24px; }
.prose { font-size: 16.5px; line-height: 1.7; }
.prose p, .prose ol { max-width: 820px; }
.prose ol { padding-left: 24px; }
.prose li { margin: 6px 0; padding-left: 4px; }
.prose li::marker { color: var(--gold); font-weight: 700; }
.prose .fx { font-family: Georgia, "Times New Roman", serif; font-size: 19px; background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 18px; display: inline-block; }
.prose code { font: 14px Consolas, "SFMono-Regular", monospace; background: var(--paper2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.example { margin-top: 14px; border: 1px solid var(--gold2); border-left: 5px solid var(--gold); background: var(--goldsoft); border-radius: 14px; padding: 12px 18px 4px; }
.example .lab { font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin: 22px 0 8px; padding: 20px 24px; border-radius: 20px; background: linear-gradient(140deg, #141b3a 0%, #1d2650 60%, #2a2512 100%); color: #f4efe3; max-width: 980px; }
.cta > div:first-child { flex: 1 1 380px; }
.cta b { display: block; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 21px; color: #f0cf7a; }
.cta span { display: block; font-size: 14.5px; color: #d9d2c1; margin-top: 4px; }
.cta .acts { margin: 0; }
.cta .btn.quiet { background: transparent; color: #f4efe3; border-color: rgba(255,255,255,.35); }
.soonbox { background: var(--paper); border: 1px dashed var(--line); border-radius: 16px; padding: 16px 20px 8px; max-width: 860px; }
.card.gold { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold2), var(--shadow); background: linear-gradient(180deg, var(--goldsoft), var(--paper) 70%); }
.card h3 a.t { color: var(--ink); text-decoration: none; }
.card h3 a.t:hover { color: var(--gold); }
a.onmap { text-decoration: none; color: var(--ink3); font-size: 13px; margin-left: 4px; }
a.onmap:hover { color: var(--gold); }
#sheet .ttl a { color: inherit; text-decoration: none; }
#sheet .ttl a:hover { color: var(--gold); }
/* the book: a subject a page, compact (28 Nov 2026) */
.hero.subj.compact .wrap { padding-top: 18px; padding-bottom: 18px; }
.hero.subj.compact h1 { font-size: clamp(26px, 4vw, 36px); margin: 6px 0 6px; }
.hero.subj.compact .lede { font-size: 15.5px; }
.hero.subj.compact .hchips { margin-top: 10px; gap: 6px; }
.hero.subj.compact .hc { font-size: 12px; padding: 3px 10px; }
.hero.subj.compact .hc.lvls i { width: 19px; height: 19px; font-size: 10px; }
.hero.subj.compact .acts { margin-top: 12px; gap: 8px; }
.btn.line.sm { padding: 6px 13px; }
button.btn { font: inherit; font-weight: 650; font-size: 14px; cursor: pointer; background: transparent; }
button.btn.line { color: #f4efe3; }
button.btn.line.on { border-color: #e2bd62; color: #f0cf7a; }
.btn .cnt { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 12px; }
.planbox { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-top: 12px; padding: 10px; border: 1px solid rgba(226,189,98,.45); border-radius: 14px; background: rgba(0,0,0,.18); }
.planbox .pl-now { align-self: center; font-size: 13px; color: #d9d2c1; margin-right: 6px; }
.planbox .pl-now b { color: #f0cf7a; }
.planbox .pl { display: flex; flex-direction: column; min-width: 130px; padding: 7px 12px; border-radius: 11px; text-decoration: none; color: #1d1a12; background: linear-gradient(#ecc964, #c99a25); line-height: 1.25; }
.planbox .pl:hover { filter: brightness(1.07); }
.planbox .pl b { font-size: 14px; }
.planbox .pl span { font-size: 12px; font-weight: 650; }
.planbox .pl em { font-style: normal; font-size: 11.5px; opacity: .8; }
.planbox .pl[hidden] { display: none; }

.bookbar { position: sticky; top: 0; z-index: 12; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.bookbar .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; padding-top: 7px; padding-bottom: 7px; }
.bk { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--ink); padding: 4px 6px; border-radius: 10px; }
a.bk:hover { background: var(--paper2); }
.bk.next { justify-content: flex-end; text-align: right; }
.bk i { font-style: normal; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; background: linear-gradient(#ecc964, #c99a25); color: #1d1a12; padding-bottom: 3px; }
.bk.off { opacity: .45; }
.bk.off i { background: var(--paper2); color: var(--ink3); border: 1px solid var(--line); }
.bk span { min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.bkpos { font-size: 13px; color: var(--ink3); text-align: center; min-width: 92px; }
.bkpos b { color: var(--gold); font-size: 16px; }
.bkbar { display: block; height: 3px; margin-top: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bkbar i { display: block; height: 100%; background: var(--gold); }
@media (max-width: 640px) { .bk span { display: none; } .bookbar .wrap { grid-template-columns: auto 1fr auto; } }

main .related { margin: 4px 0 18px; padding: 14px 16px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.related .road { margin: 4px 0; gap: 8px; }
.related .nodecard { padding: 8px 12px; }
.related .nodecard .nt { font-size: 14px; }
.related .nodecard.here { padding: 10px 14px; }
.related .nodecard.here .nt { font-size: 18px; }
.related .whole details { padding: 7px 14px; }
.related .whole { gap: 8px; }

/* the levels of a subject page: four small marks and a line, as under a subject on the map (28 Nov 2026) */
.lvmini { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 16px 0 14px; max-width: 980px; }
.lvmini-pips { display: inline-flex; gap: 5px; }
.lvp { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; cursor: default; }
.lvp i { width: 16px; height: 5px; border-radius: 3px; border: 1px solid var(--line); display: block; }
.lvp.has i { background: var(--ink2); border-color: var(--ink2); }
.lvp b { font-size: 10px; font-weight: 700; line-height: 1; color: var(--ink3); }
.lvp.has b { color: var(--ink2); }
.lvmini-text { font-size: 13px; color: var(--ink2); }
.lvrowc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 16px; max-width: 980px; }
.lvc { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.lvc .lvb { width: 30px; height: 30px; font-size: 13px; }
.lvc .lvt b { display: block; font-size: 14px; line-height: 1.2; }
.lvc .lvt small { font-size: 12px; color: var(--ink3); }
.lvc.off { opacity: .45; border-style: dashed; }
.lvc.off .lvb { background: var(--paper2); color: var(--ink3); border: 1px dashed var(--line); }
@media (max-width: 700px) { .lvrowc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.coursehead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.coursehead h2 { margin: 0; font-size: 24px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; margin: 10px 0 0; padding-bottom: 2px; }
.tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink2); background: var(--paper); border: 1px solid var(--line); border-radius: 12px 12px 0 0; border-bottom: 0; padding: 7px 14px 7px 8px; font-size: 14px; }
.tabs a span { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--goldsoft); color: var(--gold); }
.tabs a.on { color: var(--ink); font-weight: 650; border-color: var(--gold); box-shadow: inset 0 3px 0 var(--gold); }
.tabs a.on span { background: linear-gradient(#ecc964, #c99a25); color: #1d1a12; }
.course .topic { margin-top: 0; border-top-left-radius: 0; padding: 18px 22px 14px; }
.course.paged .topic { display: none; }
.course.paged .topic.on { display: block; }
.course:not(.paged) .topic + .topic { margin-top: 14px; border-top-left-radius: 20px; }
.topic header .tp { margin-left: auto; font-size: 12.5px; color: var(--ink3); }
.topic h3 { font-size: 22px; }
.prose { font-size: 16px; line-height: 1.65; }
.example { padding: 10px 16px 2px; }

.tasks { margin-top: 16px; }
.tasks > .lab, .example .lab { font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.tasklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; max-width: none; }
.task { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper2); }
.tlv { flex: 0 0 auto; font-size: 10.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink3); margin-top: 2px; }
.task.lv-basic .tlv, .task.lv-medium .tlv { color: var(--green); border-color: var(--green); }
.task.lv-hard .tlv, .task.lv-ultra .tlv { color: var(--gold); border-color: var(--gold); background: var(--goldsoft); }
.tbody { min-width: 0; flex: 1; }
.tq { font-size: 15.5px; font-weight: 550; }
.topts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 14.5px; }
.topts b { color: var(--gold); margin-right: 3px; }
.tacts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.tacts details { font-size: 14px; }
.tacts summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 13px; }
.tacts details[open] { flex-basis: 100%; }
.tacts details > div { margin-top: 4px; }
.tsol { margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--gold2); background: var(--paper); border-radius: 0 8px 8px 0; font-family: Georgia, "Times New Roman", serif; font-size: 15.5px; }
.tlock { margin-top: 4px; font-size: 13px; color: var(--ink3); }
.tnav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tnav .sp { flex: 1; }
.course .cta { margin-top: 16px; padding: 14px 18px; }
.course .cta b { font-size: 18px; }
p.exam { margin-top: 14px; }

.bookfoot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.bf { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.bf:hover { border-color: var(--gold); }
.bf.next { text-align: right; grid-column: 2; }
.bf small { font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.bf b { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 19px; }
.bf span { font-size: 12.5px; color: var(--ink3); }
@media (max-width: 600px) { .bookfoot { grid-template-columns: 1fr; } .bf.next { grid-column: 1; } }

/* problems with a parameter, and turning a page without reloading (28 Nov 2026) */
.plus { margin-top: 16px; border: 1px solid var(--gold2); border-radius: 14px; padding: 12px 16px; background: linear-gradient(180deg, var(--goldsoft), var(--paper) 80%); }
.plus > .lab { font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.plus .plus-body > p { font-size: 15px; margin-bottom: 8px; }
.plus .plus-lock { font-size: 13.5px; color: var(--ink2); }
.plus .plus-problems { margin-top: 12px; }
.plus .plus-problems > .lab { font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.plus.open { background: var(--paper); }
html.turning main, html.turning .hero, html.turning .bookbar { opacity: .55; transition: opacity .15s; }
html.turning { cursor: progress; }
.gradecols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px 20px; margin-top: 12px; }
.gradecols .colh { margin-bottom: 10px; }
.gradecols .stack { display: grid; gap: 10px; }
/* drawings under a lesson: resources/figures/<course>/<topic>.svg, coloured by the theme (28 Nov 2026) */
.fig { margin: 14px 0 4px; max-width: 820px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 10px; text-align: center; }
.fig svg { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; font: 13px "Segoe UI", system-ui, sans-serif; }
.fig figcaption { font-size: 13.5px; color: var(--ink2); margin-top: 8px; text-align: left; }
.fig text { fill: var(--ink); text-anchor: middle; }
.fig .fg-start { text-anchor: start; } .fig .fg-end { text-anchor: end; } .fig .fg-l { text-anchor: end; }
.fig .fg-grid path { stroke: var(--line); stroke-width: 1; fill: none; }
.fig .fg-axis path { stroke: var(--ink3); stroke-width: 1.4; fill: none; }
.fig .fg-head, .fig .fg-axis .fg-head { fill: var(--ink3); stroke: none; }
.fig .fg-tick text { fill: var(--ink3); font-size: 11.5px; }
.fig .fg-name { font-style: italic; font-weight: 650; fill: var(--ink2); }
.fig .fg-line1 { stroke: var(--gold); stroke-width: 2.6; fill: none; stroke-linecap: round; }
.fig .fg-line2 { stroke: var(--blue); stroke-width: 2.6; fill: none; stroke-linecap: round; }
.fig .fg-step { stroke: var(--green); stroke-width: 1.8; fill: none; stroke-dasharray: 4 3; }
.fig .fg-guide { stroke: var(--ink3); stroke-width: 1.2; fill: none; stroke-dasharray: 4 3; }
.fig .fg-arrow { stroke: var(--ink3); stroke-width: 1.6; fill: none; }
.fig .fg-pt { fill: var(--ink); }
.fig .fg-lab { font-size: 13px; font-weight: 650; }
.fig .fg-small { font-size: 12px; fill: var(--green); font-weight: 650; }
.fig .fg-c1 { fill: var(--gold); } .fig .fg-c2 { fill: var(--blue); }
.fig .fg-p1 { fill: var(--goldsoft); stroke: var(--gold); stroke-width: 1.6; }
.fig .fg-p2 { fill: var(--bluesoft); stroke: var(--blue); stroke-width: 1.6; }
.fig .fg-p3 { fill: var(--greensoft); stroke: var(--green); stroke-width: 1.6; }
.fig .fg-cut { fill: none; stroke: var(--ink3); stroke-width: 1.4; stroke-dasharray: 5 4; }
.fig .fg-big { font-size: 20px; font-family: Georgia, serif; dominant-baseline: middle; }
.fig .fg-mid { font-size: 16px; font-family: Georgia, serif; fill: var(--ink3); dominant-baseline: middle; }
.fig .fg-side text { font-style: italic; fill: var(--ink2); }
