/* Sherlock Academy design system. Tokens first: four interfaces share them and vary
   only in density. Every text/background pair below meets WCAG AA contrast. */
:root {
  --navy: #14233f; --navy-2: #1f3358; --parchment: #f6efe0; --paper: #fffdf7; --ink: #1d2433; --muted: #5a6172;
  --gold: #8a6914; --gold-bright: #d9b65c; --burgundy: #7a1f35; --line: #dccfb4; --ok: #1f6b45; --ok-bg: #e4f2e9; --warn: #8a4b00; --warn-bg: #fbeed6; --bad: #a12038; --bad-bg: #fae6ea;
  --serif: Georgia, "Times New Roman", serif; --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 8px; --shadow: 0 1px 3px rgba(20,35,63,.14);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--parchment); color: var(--ink); font: 16px/1.55 var(--sans); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; } a { color: var(--burgundy); }
:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 2px; }
.skip { position: absolute; left: -999px; background: #fff; padding: 8px; z-index: 9; } .skip:focus { left: 8px; top: 8px; }
.top { background: var(--navy); color: #fff; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 10px 16px; border-bottom: 3px solid var(--gold-bright); }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; font: 700 1.1rem var(--serif); }
.brand small { display: block; font: 400 .72rem var(--sans); color: var(--gold-bright); }
.seal { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold-bright); display: grid; place-items: center; color: var(--gold-bright); }
#nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
#nav a { color: #fff; padding: 6px 10px; border-radius: 6px; text-decoration: none; font-size: .92rem; }
#nav a[aria-current="page"] { background: var(--navy-2); box-shadow: inset 0 -2px var(--gold-bright); }
.who { font-size: .85rem; display: flex; gap: 8px; align-items: center; }
.who button { background: transparent; border: 1px solid var(--gold-bright); color: #fff; min-height: 32px; padding: 2px 10px; }
.banner { background: var(--warn-bg); color: #5d3400; padding: 5px 16px; font-size: .82rem; text-align: center; }
main { max-width: 1040px; margin: 0 auto; padding: 22px 16px 60px; outline: none; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.hero { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 16px; border: 1px solid var(--gold-bright); }
.hero h1 { color: #fff; } .hero .eyebrow { color: var(--gold-bright); }
.eyebrow { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 4px; }
.muted { color: var(--muted); font-size: .9rem; }
button, .btn { font: 600 .95rem var(--sans); background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: 6px; padding: 9px 16px; cursor: pointer; min-height: 44px; display: inline-block; text-decoration: none; }
button:hover, .btn:hover { background: var(--navy-2); }
button.ghost, .btn.ghost { background: transparent; color: var(--navy); }
button.ghost:hover { background: #efe6d2; }
button.gold { background: var(--gold-bright); color: #1d1a10; border-color: var(--gold-bright); }
button:disabled { opacity: .55; cursor: default; }
input, select, textarea { font: inherit; color: inherit; background: #fff; border: 1px solid #8d8672; border-radius: 6px; padding: 9px; width: 100%; min-height: 44px; }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 4px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { margin-bottom: 12px; }
.bar { height: 10px; background: #eadfc8; border-radius: 6px; overflow: hidden; } .bar > span { display: block; height: 100%; background: var(--gold); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #eadfc8; color: var(--ink); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.auto { background: #e4e9f5; color: var(--navy); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; } th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; } th { color: var(--navy); font-family: var(--serif); }
.scroll { overflow-x: auto; }
blockquote { margin: 0 0 12px; padding: 10px 14px; background: #f9f4e6; border-left: 4px solid var(--gold); font-family: var(--serif); }
.passage { font-family: var(--serif); background: #f9f4e6; padding: 12px; border-radius: 6px; margin-bottom: 10px; white-space: pre-line; }
.option { display: flex; gap: 10px; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 1px solid #8d8672; font-weight: 400; margin-bottom: 6px; }
.option:hover { background: #f4ecda; } .option.right { background: var(--ok-bg); border-color: var(--ok); } .option.wrong { background: var(--bad-bg); border-color: var(--bad); }
.option b { flex: none; }
.feedback { padding: 10px 12px; border-radius: 6px; margin-top: 8px; font-size: .95rem; } .feedback.ok { background: var(--ok-bg); } .feedback.no { background: var(--bad-bg); } .feedback.hint { background: var(--warn-bg); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); text-decoration: none; color: var(--navy); font-size: .9rem; }
.tabs a[aria-current="true"] { background: var(--navy); color: #fff; }
.board { display: grid; gap: 10px; } .pin { background: #fff8e4; border: 1px solid var(--gold); padding: 12px; border-radius: 4px; }
.pin.good { border-color: var(--ok); background: var(--ok-bg); } .pin.badp { border-color: var(--bad); background: var(--bad-bg); }
.flash { min-height: 170px; display: flex; flex-direction: column; justify-content: center; text-align: center; font-family: var(--serif); }
.flash .w { font-size: 1.6rem; color: var(--navy); }
.block { border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin-bottom: 10px; background: #fff; } .block.hid { opacity: .6; }
.event { font-size: .85rem; padding: 4px 0; border-bottom: 1px dotted var(--line); }
#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 6px; display: none; z-index: 5; max-width: calc(100% - 32px); }
#toast.on { display: block; }
.login { max-width: 640px; margin: 0 auto; }
.roles { display: grid; gap: 10px; }
.roles button { text-align: left; }
.roles small { display: block; font-weight: 400; opacity: .9; }
ul.tidy { padding-left: 18px; margin: 0 0 8px; }
@media (max-width: 720px) { #nav { order: 3; flex: 1 1 100%; } #nav a { padding: 8px 10px; } .who { margin-left: auto; } h1 { font-size: 1.6rem; } }
@media (prefers-reduced-motion: no-preference) { .card { transition: box-shadow .15s; } }
@media print { .top, .banner, button { display: none; } }

/* Student world: night-time London. Only students get it; parents and staff keep the calmer parchment. */
body[data-role="student"] { background: #0c1730 linear-gradient(#0c1730, #1a2a4d 420px, #1a2a4d); }
body[data-role="student"] main > h1 { color: #fff; }
body[data-role="student"] main > p, body[data-role="student"] main > p.muted { color: #dfe5f2; }
body[data-role="student"] main > p a { color: var(--gold-bright); }
.night { position: relative; border-radius: var(--radius); overflow: hidden; background: #0c1730; border: 1px solid var(--gold-bright); margin-bottom: 16px; min-height: 340px; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.night-in { position: relative; padding: 26px 20px; color: #fff; text-align: center; }
.night-in h1 { color: #fff; }
.night-in .eyebrow { color: var(--gold-bright); }
.telegram { position: relative; text-align: left; max-width: 620px; margin: 0 auto 90px; background: #f3e6c4; color: #2a2113; padding: 18px 20px; font-family: "Courier New", Courier, monospace; font-size: .98rem; box-shadow: 0 8px 22px rgba(0,0,0,.5); transform: rotate(-.5deg); border-top: 5px solid var(--burgundy); }
.telegram h1 { color: #2a2113; font-family: var(--serif); margin-top: 4px; padding-right: 74px; }
.tg-head { font-size: .72rem; letter-spacing: .12em; color: #6a5328; margin: 0; }
.tg-q { font-weight: 700; border-top: 1px dashed #8d7748; padding-top: 10px; margin: 0; }
.stamp { position: absolute; top: 14px; right: 12px; border: 3px solid var(--burgundy); color: var(--burgundy); font: 700 .7rem var(--sans); text-transform: uppercase; padding: 3px 6px; transform: rotate(9deg); letter-spacing: .05em; background: transparent; }
.envelope { position: relative; display: block; width: min(320px, 100%); height: 190px; margin: 18px auto 6px; background: #efdfb6; color: #2a2113; border: 0; border-radius: 4px; box-shadow: 0 10px 26px rgba(0,0,0,.55); overflow: hidden; font-family: "Courier New", Courier, monospace; }
.envelope:hover { background: #f5e8c7; }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 100px; background: #e2cf9f; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.env-to { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: .85rem; }
.wax { position: absolute; left: 50%; top: 74px; transform: translateX(-50%); width: 54px; height: 54px; border-radius: 50%; background: var(--burgundy); color: #f5dfae; display: grid; place-items: center; font: 700 .72rem var(--serif); box-shadow: inset 0 0 0 4px #5e1426, 0 2px 4px rgba(0,0,0,.4); }
.wax.small { position: static; transform: none; flex: none; width: 44px; height: 44px; font-size: .62rem; }
.trail { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); counter-reset: none; }
.trail a { display: block; height: 100%; padding: 12px; border-radius: 6px; text-decoration: none; color: var(--ink); background: #f4ecda; border: 1px dashed #a4946e; }
.trail small { display: block; color: var(--muted); margin-bottom: 4px; }
.trail .dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 6px; }
.trail .done a { background: var(--ok-bg); border: 1px solid var(--ok); } .trail .done .dot { background: var(--ok); }
.trail .next a { background: #fff4d2; border: 2px solid var(--gold); } .trail .next .dot { background: var(--burgundy); }
.dossier { position: relative; background: #e6d3a3; color: #2a2113; padding: 22px 18px 18px; border-radius: 4px 14px 4px 4px; box-shadow: var(--shadow); }
.dossier h2 { color: #2a2113; } .dossier .muted { color: #4d3f22; } .dossier .eyebrow { color: var(--burgundy); }
.dossier dl { margin: 0; font-family: "Courier New", Courier, monospace; font-size: .92rem; }
.dossier dl div { display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #8d7748; }
.dossier dt { font-weight: 700; } .dossier dd { margin: 0; }
.redact { background: #171717; color: #171717; padding: 0 6px; border-radius: 1px; user-select: none; }
.clip { position: absolute; top: -6px; right: 26px; width: 16px; height: 40px; border: 3px solid #70737b; border-radius: 8px; }
.night-note { background: #0c1730; color: #fff; border: 1px solid var(--gold-bright); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.night-note .eyebrow { color: var(--gold-bright); } .sealed-note { display: flex; gap: 12px; align-items: center; } .sealed-note p { margin: 0; }
.how { padding-left: 20px; }
.stampbtn { flex: 1 1 170px; text-align: left; background: #fff; color: var(--ink); border: 2px solid #8d8672; font-weight: 400; }
.stampbtn:hover { background: #f4ecda; }
.stampbtn b { font: 700 1.2rem var(--serif); margin-right: 4px; } .stampbtn small { display: block; color: var(--muted); }
.stampbtn[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--gold-bright); box-shadow: 0 0 0 2px var(--gold-bright); } .stampbtn[aria-pressed="true"]:hover { background: var(--navy); } .stampbtn[aria-pressed="true"] small { color: #dfe5f2; }
.letter { background: #fbf4df; }
.segs { line-height: 2.1; }
.seg { display: inline; min-height: 0; padding: 4px 6px; background: #fff; color: var(--ink); border: 1px dashed #8d8672; font: 400 1.05rem var(--serif); text-align: left; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.seg:hover { background: #f4ecda; }
.seg.mO { background: #e3edfb; border: 1px solid #27508f; } .seg.mI { background: #f8e4cd; border: 1px solid #8a4b00; }
.seg.good { outline: 2px solid var(--ok); } .seg.off { outline: 3px solid var(--bad); }
.tag { display: inline-block; min-width: 20px; text-align: center; background: var(--navy); color: #fff; border-radius: 3px; font: 700 .75rem var(--sans); padding: 0 4px; }
.nf { align-items: flex-end; } .notes { list-style: none; padding: 0; margin: 12px 0 0; } .notes li { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.cork { background-color: #9d7443; background-image: radial-gradient(#7f5a2f 1px, transparent 1.5px), radial-gradient(#b48c58 1px, transparent 1.5px); background-size: 9px 9px, 13px 13px; background-position: 0 0, 4px 6px; border: 10px solid #4d3216; border-radius: 6px; padding: 14px; margin-bottom: 16px; display: grid; gap: 14px; }
.cork-note { justify-self: center; background: #fff7c7; color: #2a2113; padding: 8px 14px; margin: 0; font-weight: 700; box-shadow: 0 3px 7px rgba(0,0,0,.35); transform: rotate(-1deg); }
.cork .pin { position: relative; display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 0; background: #fffdf4; color: var(--ink); border: 0; border-radius: 2px; padding: 16px 14px 12px; box-shadow: 0 4px 9px rgba(0,0,0,.4); transform: rotate(var(--t, 0deg)); }
.cork .pin label { margin: 0; font: 400 1rem var(--serif); }
.lbl { display: block; font: 700 .68rem var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--burgundy); margin-bottom: 3px; }
.tack { position: absolute; top: -6px; left: 50%; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ef7c7c, #a12038); box-shadow: 0 2px 3px rgba(0,0,0,.5); }
.thread { height: 3px; background: #b9b09a; border-radius: 2px; }
.cork .pin.good .thread { background: #c21f2f; height: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.cork .pin.good { background: #f2fae9; } .cork .pin.badp { background: var(--bad-bg); }
.ok-stamp { display: none; position: absolute; right: 8px; top: 6px; border: 2px solid var(--ok); color: var(--ok); font: 700 .66rem var(--sans); text-transform: uppercase; padding: 1px 5px; transform: rotate(5deg); }
.cork .pin.good .ok-stamp { display: block; }
@media (max-width: 620px) { .cork .pin { grid-template-columns: 1fr; gap: 8px; } .thread { display: none; } .telegram { margin-bottom: 60px; } }
@media (prefers-reduced-motion: no-preference) {
  .fog { animation: drift 16s ease-in-out infinite alternate; } .f2 { animation-duration: 23s; animation-direction: alternate-reverse; }
  .flick { animation: flick 5s infinite; }
  .envelope:hover .wax { transform: translateX(-50%) scale(1.08); }
}
@keyframes drift { from { transform: translateX(-50px); } to { transform: translateX(60px); } }
@keyframes flick { 0%, 91%, 100% { opacity: 1; } 93% { opacity: .55; } 96% { opacity: .85; } }

.repeats { color: var(--burgundy); font-weight: 600; font-size: .9rem; }
.hw-item { display: grid; grid-template-columns: minmax(0, 3fr) minmax(170px, 2fr); gap: 10px; align-items: center; padding: 8px; border-bottom: 1px dotted var(--line); border-left: 4px solid transparent; }
.hw-item label { font: 400 1rem var(--serif); margin: 0; }
.hw-item.good { border-left-color: var(--ok); background: var(--ok-bg); } .hw-item.off { border-left-color: var(--bad); background: var(--bad-bg); }
@media (max-width: 560px) { .hw-item { grid-template-columns: 1fr; } }

.send { background: var(--burgundy); border-color: var(--burgundy); } .send:hover { background: #5e1426; }
.sendpair { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.plan { list-style: none; padding: 0; margin: 0; }
.previewbar { background: var(--warn-bg); padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile { position: relative; text-align: left; background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 400; padding: 10px 10px 10px 28px; } .tile:hover { background: #f4ecda; }
.tile small { display: block; color: var(--muted); } .tile.off { opacity: .72; } .tile strong { display: block; }
.dot2 { position: absolute; left: 10px; top: 16px; width: 11px; height: 11px; border-radius: 50%; background: #9aa0ad; } .tile.on .dot2 { background: #1f9d5c; box-shadow: 0 0 0 3px #d5f2e1; }
.lastact { color: var(--navy) !important; font-weight: 600; }
.grid th, .grid td { text-align: center; padding: 4px; white-space: nowrap; } .grid tbody th { text-align: left; }
.c { min-width: 34px; font-weight: 700; } .c.yes { background: var(--ok-bg); color: var(--ok); } .c.no { background: var(--bad-bg); color: var(--bad); } .c.fixed { background: var(--warn-bg); color: var(--warn); } .c.none { color: #8f8f8f; }
.qh { min-height: 32px; padding: 2px 8px; background: var(--paper); color: var(--navy); }
.qh:hover { background: #efe6d2; }
.qd { background: #f9f4e6; padding: 12px; border-radius: 6px; margin-top: 10px; }
.wb-tools { margin: 10px 0; }
.pen[aria-pressed="true"] { background: var(--navy); color: #fff; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #777; vertical-align: -2px; margin-right: 5px; }
#wb { width: 100%; aspect-ratio: 16 / 9; background: #fffdf7; border: 2px solid var(--navy); border-radius: 6px; touch-action: none; cursor: crosshair; display: block; }
#stage { position: fixed; inset: 0; background: #0c1730; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; }
.stage-t { color: #fff; margin: 0 0 8px; text-align: center; }
#stage canvas { background: #fffdf7; border-radius: 6px; max-width: 100%; max-height: calc(100% - 50px); aspect-ratio: 16 / 9; width: min(100%, calc((100vh - 70px) * 16 / 9)); }
.videobox { width: min(100%, calc((100vh - 70px) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; } .videobox iframe { width: 100%; height: 100%; border: 0; }
.vrow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px dotted var(--line); }

/* Lesson editor */
main.wide { max-width: 1320px; }
.ed-top { position: sticky; top: 0; z-index: 3; background: var(--parchment); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.saved { font-size: .85rem; color: var(--muted); max-width: 300px; }
.seg2 { display: inline-flex; } .seg2 button { background: #fff; color: var(--navy); border-radius: 0; } .seg2 button:first-child { border-radius: 6px 0 0 6px; } .seg2 button:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; } .seg2 button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.ed-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; align-items: start; }
.ed-out { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.ed-out ol { list-style: none; padding: 0; margin: 0 0 10px; }
.ed-out li button { display: flex; align-items: center; gap: 8px; width: 100%; background: transparent; color: var(--ink); border: 0; font-weight: 400; text-align: left; padding: 6px; min-height: 38px; font-size: .88rem; }
.ed-out li button:hover { background: #f4ecda; } .ed-out li.sel button { background: #e8edf7; box-shadow: inset 3px 0 var(--navy); } .ed-out li.hid { opacity: .55; } .ed-out li.over { box-shadow: 0 -2px var(--burgundy); } .ed-out li.dragging { opacity: .4; } .ed-out li { cursor: grab; }
.ot { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oi { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: #efe6d2; color: var(--navy); font-size: .85rem; }
.edb { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px 16px; box-shadow: var(--shadow); max-width: 820px; margin: 0 auto; } .edb.sel { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); } .edb.hid { opacity: .65; }
.edb header { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.edtools { margin-left: auto; display: flex; gap: 2px; opacity: .55; } .edb:hover .edtools, .edb.sel .edtools, .edtools:focus-within { opacity: 1; }
.ic { min-height: 32px; min-width: 32px; padding: 2px 7px; background: transparent; color: var(--navy); border: 1px solid transparent; font-weight: 500; font-size: .85rem; } .ic:hover { background: #efe6d2; }
.edt { border: 1px solid transparent; background: transparent; font: 1.05rem/1.6 var(--serif); padding: 6px; overflow: hidden; resize: none; } .edt:hover, .edt:focus { background: #fff; border-color: #8d8672; }
.edh { border: 1px solid transparent; background: transparent; font: 700 1.35rem var(--serif); color: var(--navy); } .edh:hover, .edh:focus { background: #fff; border-color: #8d8672; }
.fmt { display: flex; gap: 3px; margin-bottom: 3px; } .fmt button { min-height: 30px; padding: 1px 9px; font-size: .85rem; }
.addrow { text-align: center; padding: 6px 0; max-width: 820px; margin: 0 auto; }
.addbtn { min-height: 30px; padding: 1px 14px; background: transparent; color: var(--muted); border: 1px dashed #a4946e; border-radius: 99px; font-size: .82rem; } .addbtn:hover { background: var(--navy); color: #fff; border-style: solid; }
.addmenu { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; background: var(--paper); border: 1px solid var(--navy); border-radius: var(--radius); padding: 10px; text-align: left; box-shadow: 0 6px 18px rgba(20,35,63,.2); }
.addmenu button[role="menuitem"] { background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 400; } .addmenu button[role="menuitem"]:hover { background: #f4ecda; border-color: var(--navy); } .addmenu strong, .addmenu small { display: block; } .addmenu small { color: var(--muted); font-size: .76rem; }
.filerow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; } .filerow input[data-f] { flex: 1; min-width: 180px; } .filerow label { margin: 0; cursor: pointer; }
.check { display: flex; gap: 8px; font-weight: 400; align-items: center; margin: 8px 0; } .check input { width: auto; min-height: 0; }
.edimg { max-width: 100%; max-height: 260px; border-radius: 6px; display: block; margin-bottom: 8px; }
.prev { margin: 0 auto; } .prev.desktop { max-width: 980px; } .prev.phone { max-width: 390px; border: 10px solid #1d2433; border-radius: 26px; padding: 12px; background: var(--parchment); }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(480px, 100%); background: var(--paper); box-shadow: -6px 0 24px rgba(0,0,0,.28); padding: 20px; overflow: auto; z-index: 6; }
.go { min-height: 30px; padding: 1px 9px; font-size: .82rem; }
.callout { background: #fff7dc; border-left: 5px solid var(--gold); padding: 10px 14px; border-radius: 4px; margin: 8px 0; } .callout p:last-child { margin-bottom: 0; }
.lb { margin-bottom: 10px; } .fig { margin: 0; } .fig img { max-width: 100%; border-radius: 6px; } .fig figcaption { color: var(--muted); font-size: .88rem; }
.lessonflow .videobox { width: 100%; }
@media (max-width: 860px) { .ed-grid { grid-template-columns: 1fr; } .ed-out { position: static; max-height: 260px; } .ed-top { position: static; } }

/* Signing in and people */
.stack { display: grid; gap: 12px; }
.field { display: grid; gap: 4px; font-weight: 600; }
.field input { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #8a93a6; border-radius: 8px; width: 100%; box-sizing: border-box; }
.error { color: #a4231c; font-weight: 600; margin: 0; }
.login > * + * { margin-top: 14px; }
.consent { border: 1px solid #c9cfdb; border-radius: 8px; padding: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.linkbox { border: 2px solid #b08a2e; }
.linkbox .row { display: flex; gap: 8px; flex-wrap: wrap; }
.linkbox input { flex: 1 1 240px; min-width: 0; font: inherit; padding: 8px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.person { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; }
.person .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.family { border-top: 1px solid #e0e4ec; padding-top: 4px; }
.guardians { margin-left: 18px; }
button.small { padding: 5px 10px; font-size: .88rem; }
.who a { color: inherit; }

/* Envelopes, scores, sentence repairs and the gradebook */
.longcase h2 { margin-top: 0; color: #fff; }
.envs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.env-card { background: #f3ead2; color: #2b2413; border-radius: 6px; padding: 12px; display: grid; gap: 4px; justify-items: start; }
.env-card small { font-size: .85rem; }
.env-card.open { background: #dcebd9; }
.env-card.missed { background: #e4dfd6; opacity: .85; }
.clue { background: #fbf6e6; color: #2b2413; border-left: 4px solid #b08a2e; padding: 10px 14px; margin: 10px 0; font-family: var(--serif); }
.clue .eyebrow { color: #6d5412; margin: 0 0 4px; }
.clue p:last-child { margin: 0; }
.score-card { background: #fff; border: 2px solid #b08a2e; border-radius: 8px; padding: 18px; margin: 16px 0; }
.score-card.missed { border-color: #8a93a6; }
.big-score { font: 700 3rem var(--serif); margin: 0; color: var(--navy); }
.submitbar { display: flex; gap: 14px; align-items: flex-start; }
.fixbox { margin-top: 8px; display: grid; gap: 4px; }
.fixbox input { font: inherit; padding: 8px; width: 100%; box-sizing: border-box; }
.fixbox[hidden] { display: none; }
.fixnote p { margin: 6px 0 0; }
.fix-ok { color: #1f6b45; font-weight: 600; }
.fix-no { color: #8a4b08; font-weight: 600; }
.report { white-space: pre-wrap; font-family: var(--serif); background: #fffdf7; border: 1px solid #e0e4ec; padding: 14px; border-radius: 6px; }
.gbwrap { max-height: 70vh; overflow: auto; }
table.gb { border-collapse: separate; border-spacing: 0; min-width: 100%; }
table.gb th, table.gb td { padding: 6px 10px; white-space: nowrap; background: #fff; border-bottom: 1px solid #e0e4ec; text-align: center; }
table.gb thead th { position: sticky; top: 0; z-index: 2; background: #e8ebf2; }
table.gb tr > th:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: #f7f8fb; }
table.gb thead th:first-child { z-index: 3; background: #e8ebf2; }
.gc.low, .gc.low .gbtn { color: #a4231c; font-weight: 700; }
.gc.none { color: #99a; }
.gc.final { font-weight: 700; }
.uh.unwritten { color: #8b93a5; font-weight: 400; }
button.gbtn { background: none; border: 0; color: var(--navy); min-height: 0; padding: 2px 4px; text-decoration: underline; font-weight: 600; }
button.gbtn:hover { background: #eef1f7; }
tr[hidden] { display: none; }

/* pictures, charts and the Case Wall */
.ico{width:44px;height:44px;flex:none;display:block}
.trail .ico{margin:4px auto}
.hw>.ico{float:right;margin-left:10px}
.wordpic{display:flex;justify-content:center}.wordpic .ico{width:72px;height:72px}
.clue-head{display:flex;align-items:center;gap:10px}.clue-head .eyebrow{margin:0}
.fig img,.lb img{display:block;width:100%;height:auto;border-radius:8px}
.chartfig{margin:12px 0;background:#fbf6e8;border:1px solid #d8ccae;border-radius:8px;padding:10px}
.chart{display:block;width:100%;max-width:640px;height:auto;margin:0 auto}
.chartfig summary{cursor:pointer;font-size:.9rem;margin-top:6px}
.chartfig figcaption{margin-bottom:6px;color:#14213d}
.datatable{width:100%;color:#14213d}
.clue .chartfig{color:#14213d}
.envs.light .env-card{color:inherit;text-decoration:none}
.wall{padding:18px}.wall-clues{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;align-items:start}
.wall .clue{background:#fbf6e8;color:#14213d;padding:12px;border-radius:4px;box-shadow:0 3px 8px rgba(0,0,0,.35);margin:0}
.wall .clue .eyebrow{color:#7a1f2e}
.suspects{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px}
.suspect h3{margin:8px 0 0}.suspect p{margin:4px 0}
.portrait{display:block;width:100%;max-width:150px;height:auto;border-radius:8px}
.proof{background:#fffdf6}.proofp{line-height:1.9}
.actu{text-decoration-thickness:2px;text-underline-offset:3px}.actn{font-weight:700;color:#7a1f2e;margin-left:2px}
.chartnote{font-size:.8rem;margin:6px 0 0}

/* Clue and award pop-ups */
dialog.reward { position: fixed; inset: 0; margin: auto; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); color: var(--ink); border: 3px solid var(--gold-bright); border-radius: 12px; padding: 24px; text-align: center; }
dialog.reward::backdrop { background: rgba(14, 24, 44, .78); }
dialog.reward h2 { margin: 4px 0 10px; font-family: var(--serif); font-size: 1.6rem; color: var(--navy); }
dialog.reward h2:focus { outline: none; }
dialog.reward .clue { text-align: left; }
dialog.reward .wax.small { position: static; transform: none; margin: 0 auto 8px; }
dialog.reward .big-score { margin: 4px 0; }
.reward-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.medal { width: 104px; height: 104px; margin: 0 auto 10px; padding: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold-bright) 60%, var(--gold)); border: 4px solid var(--gold); box-shadow: 0 0 0 5px #fff3c4; }
.medal svg { display: block; width: 100%; height: 100%; }
.medal.small { width: 64px; height: 64px; padding: 12px; margin: 0; border-width: 3px; box-shadow: none; }
.award-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.award-card { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbf6e6; }
.award-card small { font-size: .85rem; color: var(--muted); }
.award-card.locked { background: #f1efe9; }
.award-card.locked .medal { background: #d9d5cb; border-color: #aaa596; filter: grayscale(1); }
.sparks { display: none; }
@media (prefers-reduced-motion: no-preference) {
  dialog.reward[open] { animation: reward-in .35s cubic-bezier(.2, 1.4, .4, 1); }
  dialog.reward .medal { animation: medal-in .6s cubic-bezier(.2, 1.5, .4, 1); }
  dialog.reward .reward-paper { animation: paper-up .5s ease-out; }
  dialog.reward #rwseal .wax { animation: wax-pulse 1.4s ease-in-out infinite; }
  dialog.reward:not(.missed) .sparks { display: block; position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
  .sparks i { position: absolute; top: -14px; width: 9px; height: 9px; background: var(--gold-bright); transform: rotate(45deg); animation: spark-fall 1.5s ease-in 1 both; }
  .sparks i:nth-child(1) { left: 10%; } .sparks i:nth-child(2) { left: 26%; animation-delay: .2s; background: var(--burgundy); }
  .sparks i:nth-child(3) { left: 44%; animation-delay: .1s; } .sparks i:nth-child(4) { left: 60%; animation-delay: .35s; background: var(--navy); }
  .sparks i:nth-child(5) { left: 76%; animation-delay: .05s; } .sparks i:nth-child(6) { left: 90%; animation-delay: .25s; background: var(--burgundy); }
}
@keyframes reward-in { from { opacity: 0; transform: scale(.85); } }
@keyframes medal-in { from { transform: scale(0) rotate(-40deg); } }
@keyframes paper-up { from { opacity: 0; transform: translateY(40px); } }
@keyframes wax-pulse { 50% { transform: translateX(-50%) scale(1.1); } }
@keyframes spark-fall { from { opacity: 1; } to { opacity: 0; top: 90%; transform: rotate(280deg); } }

/* ---------- 25 lessons: every lesson wears its own accent ---------- */
:root { --accent: #b8860b; }
.lessonpick select { min-height: 34px; padding: 4px 8px; font-size: .85rem; max-width: 190px; }
.lessonpill { text-decoration: none; }
.lesson-hero { position: relative; border-radius: 14px; overflow: hidden; background: #0c1730; border-bottom: 5px solid var(--accent); margin-bottom: 14px; }
.lesson-cover { display: block; width: 100%; max-height: 380px; object-fit: cover; }
.lesson-cover.ph { height: 240px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #e9dfc0; font-style: italic; background: radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--accent) 55%, #0c1730), #0c1730 70%); }
.lesson-hero-t { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; color: #fff; background: linear-gradient(transparent, rgba(5, 9, 18, .9)); }
.lesson-hero-t h1 { color: #fff; margin: 0; }
.lesson-hero-t .eyebrow { color: #e9dfc0; }
.lesson-skill { margin: 2px 0 0; color: #e9dfc0; font-style: italic; }
.spiral { border-top: 4px solid var(--accent); }
.spiral-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.spiral h3 { margin: 0 0 6px; font-size: 1rem; }
.wordchip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 9px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 22%, #fff); border: 1px solid var(--accent); font-size: .9rem; }
.wordchip.old { background: transparent; opacity: .75; border-style: dashed; }
.notwritten { max-width: 640px; margin: 24px auto; padding: 28px; text-align: center; border-radius: 14px; background: #0c1730; color: #e9dfc0; border-top: 6px solid var(--accent); }
.notwritten h1 { color: #fff; }
.notwritten .eyebrow { color: #e9dfc0; }
.notwritten .muted { color: #bcc4d6; }
.ph-art { font-style: italic; opacity: .85; }
.thisweek { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---------- the course map ---------- */
.map-head { padding: 8px 0 12px; }
.map-tri { border-radius: 16px; padding: 18px 14px 22px; margin-bottom: 18px; color: #f3ecd8; }
.map-tri h2 { color: #fff; margin: 0 0 10px; }
.map-tri .eyebrow { color: #e9dfc0; margin: 0; }
.tri-scarlet { background: linear-gradient(160deg, #2a0f18, #4d1a27 70%, #2a0f18); }
.tri-gaslight { background: linear-gradient(160deg, #0d1a33, #1c3157 70%, #0d1a33); }
.tri-moor { background: linear-gradient(160deg, #121d17, #2c3e2f 70%, #151c18); }
.map-grid { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 16px; }
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-path path { fill: none; stroke: #e9dfc0; stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .55; }
.stop { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 12px; background: #fbf6e9; color: #14213d; text-decoration: none; border: 2px solid transparent; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); min-width: 0; }
a.stop:hover, a.stop:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.stop.current { border-color: #ffd976; box-shadow: 0 0 0 3px rgba(255, 217, 118, .45), 0 3px 10px rgba(0, 0, 0, .35); }
.stop.chosen { outline: 2px dashed #14213d; outline-offset: -5px; }
.stop.locked { background: #d9d4c4; color: #4c5163; }
.stop.locked .stop-thumb { filter: grayscale(.9) brightness(.8); }
.stop-thumb { display: block; aspect-ratio: 5 / 3; border-radius: 8px; overflow: hidden; background: radial-gradient(circle at 65% 25%, var(--accent), #0c1730 75%); }
.stop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 2rem; color: #fff; font-family: var(--serif, Georgia, serif); }
.stop-no { font-size: .75rem; letter-spacing: .03em; color: #5c6275; }
.stop strong { line-height: 1.2; }
.stop small { color: #4c5163; line-height: 1.25; }
.stop-act { font-style: italic; }
.stop .pill { align-self: flex-start; font-size: .7rem; }

/* ---------- activity frame ---------- */
.act-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.act-head h1 { margin: 0; }
.act-pitch { font-style: italic; margin: 4px 0 8px; }
.trydots { display: inline-flex; gap: 6px; padding-top: 8px; }
.trydots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); background: var(--accent); }
.trydots i.used { background: transparent; }
.act-actions { margin: 12px 0; }
.win-banner, .fail-banner { position: relative; padding: 18px 20px; border-radius: 12px; margin: 10px 0 14px; overflow: hidden; color: #f8f3e3; }
.win-banner { background: linear-gradient(135deg, #17422f, #2c6e4f); }
.fail-banner { background: linear-gradient(135deg, #1e2533, #3a4256); }
.win-banner h2, .fail-banner h2 { color: #fff; margin: 0 0 6px; }
.win-banner .eyebrow, .fail-banner .eyebrow { color: #ffe9b0; }
.win-banner .muted, .fail-banner .muted { color: #dfe6d9; }
.bigstamp { float: right; margin-left: 12px; padding: 6px 12px; border: 3px solid #ffd976; color: #ffd976; border-radius: 8px; transform: rotate(-7deg); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; animation: stampin .35s ease-out; }
.bigstamp.coldtrail { color: #bcd0ea; border-color: #bcd0ea; }
@keyframes stampin { from { transform: rotate(-7deg) scale(2.2); opacity: 0; } to { transform: rotate(-7deg) scale(1); opacity: 1; } }
.closing { border: 0; padding: 0; margin: 14px 0 0; }
.radio { display: flex; gap: 8px; font-weight: 400; margin: 8px 0; align-items: flex-start; }
.radio input { width: auto; min-height: 0; margin-top: 4px; }
.good { border-color: #2c6e4f !important; }
.off { border-color: #a12038 !important; }

/* hotspot */
.hs-wrap { background: #0a1020; border-radius: 12px; padding: 8px; color: #e9dfc0; }
.hs-stage { position: relative; border-radius: 8px; overflow: hidden; line-height: 0; }
.hs-stage img { width: 100%; display: block; }
.hs-spot { position: absolute; padding: 0; min-height: 0; background: transparent; border: 2px solid transparent; border-radius: 12px; cursor: zoom-in; }
.hs-spot:hover, .hs-spot:focus-visible { border-color: rgba(255, 217, 118, .9); box-shadow: 0 0 22px rgba(255, 217, 118, .55) inset, 0 0 18px rgba(255, 217, 118, .4); background: rgba(255, 217, 118, .06); }
.hs-spot.seen::after { content: "✓"; position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; line-height: 22px; font-size: 13px; color: #14213d; text-align: center; background: #ffd976; border-radius: 50%; }
.hs-count { margin: 8px 4px 2px; font-size: .92rem; }
.hs-list { margin: 4px; font-size: .92rem; }
.hs-note .pap { background: #f5edd8; color: #14213d; padding: 12px 14px; border-radius: 6px; margin: 8px 4px; transform: rotate(-.4deg); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.notebook { background: #f7f0dc; background-image: repeating-linear-gradient(transparent 0 27px, #d8ccae 27px 28px); padding: 16px 18px; border-radius: 10px; margin-top: 14px; border-left: 6px solid var(--accent); }
.hs-notes { list-style: none; margin: 0; padding: 0; }
.hs-entry { background: #fffdf7; border: 2px solid #d8ccae; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.hs-entry p { margin: 4px 0 8px; }

/* compare */
.doc-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doc { padding: 16px; border-radius: 4px; box-shadow: 0 3px 12px rgba(0, 0, 0, .18); font-family: var(--serif, Georgia, serif); }
.doc-A { background: #fff9e8; border-top: 6px double #14213d; transform: rotate(-.3deg); }
.doc-B { background: #f1f5f8; border-top: 6px double #7a1f2e; transform: rotate(.3deg); }
.doc h2 { margin: 2px 0 10px; }
.doc-kicker { margin: 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #5c6275; }
.passage-btn { display: block; width: 100%; text-align: left; font: inherit; background: transparent; color: inherit; border: 0; border-left: 4px solid transparent; padding: 8px 10px; margin: 4px 0; min-height: 44px; border-radius: 0 6px 6px 0; }
.passage-btn:hover { background: rgba(0, 0, 0, .04); }
.passage-btn.sel { border-left-color: var(--accent); background: rgba(255, 217, 118, .35); }
.linktag { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; text-align: center; margin-left: 5px; border-radius: 50%; background: #14213d; color: #fff; font-size: .75rem; }
.linker { position: sticky; bottom: 8px; margin: 10px 0; padding: 10px 14px; border-radius: 10px; background: #fff; box-shadow: 0 3px 14px rgba(0, 0, 0, .25); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; z-index: 3; }
.linker.ready { border: 2px solid var(--accent); }
.linkrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border: 2px solid #eadfc4; border-radius: 8px; margin: 4px 0; list-style: none; }

/* route */
.rt-map { width: 100%; display: block; border-radius: 12px; background: #e7d9b4; border: 3px solid #5c4a2b; }
.rt-sea { fill: #e7d9b4; }
.rt-contour { fill: none; stroke: #c3ad7c; stroke-width: 2; }
.rt-leg { fill: none; stroke: #8b7a55; stroke-width: 5; stroke-dasharray: 3 12; stroke-linecap: round; }
.rt-leg.now { stroke: #14213d; }
.rt-leg.done { stroke: #7a1f2e; stroke-dasharray: none; stroke-width: 7; }
.rt-detour { fill: none; stroke: #a12038; stroke-width: 4; stroke-dasharray: 8 6; }
.rt-x { fill: #a12038; }
.rt-xt { fill: #fff; font-size: 14px; text-anchor: middle; }
.rt-node circle { fill: #14213d; stroke: #fff; stroke-width: 3; }
.rt-node text { font: 700 24px Georgia, serif; fill: #14213d; text-anchor: middle; paint-order: stroke; stroke: #e7d9b4; stroke-width: 5; }
.rt-me { fill: #ffd976; stroke: #7a1f2e; stroke-width: 4; }
.rt-meter { margin: 8px 2px; }

/* timeline */
.tl { padding: 8px 0; }
.tl-end { text-align: center; font-style: italic; color: #5c6275; margin: 4px 0; }
.tl-line { list-style: none; position: relative; margin: 0; padding: 0; }
.tl-line::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: linear-gradient(#14213d, var(--accent)); border-radius: 3px; }
.tl-item { position: relative; display: flex; align-items: center; padding: 8px 0; width: 50%; }
.tl-item:nth-child(odd) { justify-content: flex-end; padding-right: 30px; }
.tl-item:nth-child(even) { margin-left: 50%; padding-left: 30px; }
.tl-dot { position: absolute; top: 50%; width: 30px; height: 30px; line-height: 30px; text-align: center; margin-top: -15px; border-radius: 50%; background: #ffd976; border: 2px solid #14213d; font-weight: 700; z-index: 1; }
.tl-item:nth-child(odd) .tl-dot { right: -15px; }
.tl-item:nth-child(even) .tl-dot { left: -15px; }
.tl-card { background: #fffdf7; border: 2px solid #d8ccae; border-radius: 10px; padding: 8px 12px; width: 100%; cursor: grab; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.tl-card p { margin: 0 0 6px; }
.tl-item.over .tl-card { border-color: var(--accent); }
.tl-item.good .tl-card { border-color: #2c6e4f; background: #eef7f0; }
.tl-item.off .tl-card { border-color: #a12038; background: #fbeeee; }

/* branching */
.storybook { background: #fbf4df; background-image: radial-gradient(circle at 10% 0, rgba(122, 90, 24, .12), transparent 40%); padding: 22px 24px; border-radius: 4px 16px 16px 4px; border-left: 12px solid #5c1825; box-shadow: 0 4px 16px rgba(0, 0, 0, .22); font-family: var(--serif, Georgia, serif); }
.story-title { margin: 6px 0; }
.story-text { font-size: 1.12rem; line-height: 1.55; }
.story-text::first-letter { font-size: 2.6em; float: left; line-height: .9; padding: 4px 8px 0 0; color: #7a1f2e; }
.story-art { width: 100%; border-radius: 8px; margin: 6px 0; }
.story-choices { display: grid; gap: 10px; margin: 14px 0; }
.story-choice { text-align: left; background: #fff; color: #14213d; border: 2px solid #5c1825; border-radius: 10px; padding: 12px 14px; font: inherit; }
.story-choice:hover:not(:disabled) { background: #5c1825; color: #fff; }
.story-choice:disabled { opacity: .45; text-decoration: line-through; }
.consequence { padding: 10px 14px; border-left: 4px solid; margin: 10px 0; font-style: italic; }
.consequence.good { border-color: #2c6e4f; background: #eef7f0; }
.consequence.bad { border-color: #a12038; background: #fbeeee; }
.candles i { display: inline-block; width: 8px; height: 22px; margin: 0 3px; background: linear-gradient(#ffd976 28%, #f5edd8 28%); border: 1px solid #7a5a18; vertical-align: middle; }
.candles i.out { background: #bdb6a4; }
.story-so-far { font-size: .95rem; color: #4c5163; }

/* lockbox */
.ironcase { background: linear-gradient(#2e3238, #15171b); border: 3px solid #4b5059; border-radius: 12px; padding: 18px; color: #d9dde4; box-shadow: inset 0 0 26px rgba(0, 0, 0, .7); }
.locks { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.lockslot { text-align: center; width: 84px; }
.lockslot small { display: block; line-height: 1.15; margin-top: 4px; }
.padlock { width: 58px; height: 66px; display: block; margin: 0 auto; }
.padlock rect { fill: #7c8088; }
.padlock .shackle { stroke: #b7bbc3; transition: transform .5s; transform-origin: 46px 34px; }
.padlock .kh { fill: #15171b; }
.padlock .kh2 { stroke: #15171b; }
.padlock.now rect { fill: #c9a34a; }
.padlock.open rect { fill: #2c6e4f; }
.padlock.open .shackle { transform: translateY(-9px) rotate(28deg); stroke: #7fd0a4; }
.alarm { text-align: center; margin: 12px 0 0; }
.alarm i { display: inline-block; width: 13px; height: 13px; border-radius: 50%; margin: 0 3px; background: #33373e; border: 1px solid #666; vertical-align: middle; }
.alarm i.on { background: #e24848; box-shadow: 0 0 8px #e24848; }
.opened { list-style: none; padding: 0; margin: 10px 0; color: #2c6e4f; }
.lock-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lock-form label { width: 100%; }
.lock-in { max-width: 260px; font-size: 1.2rem; letter-spacing: .08em; }
.lock-in.number { max-width: 150px; font-family: monospace; font-size: 1.5rem; text-align: center; }

/* data lab */
.labdesk { background: #e8efe9; border: 2px solid #90a896; border-radius: 12px; padding: 12px; }
.lab-step { display: flex; gap: 12px; background: #fff; border: 2px solid #d4ddd6; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.lab-no { flex: 0 0 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 6px; background: #1f5a44; color: #fff; font-weight: 700; }
.lab-step > div { flex: 1; min-width: 0; }
.plot { width: 100%; }
.plot-col { fill: rgba(122, 31, 46, .08); stroke: #7a1f2e; stroke-dasharray: 4 4; }
.plot-range { display: block; margin-top: 6px; }
.plot-range input { width: 100%; }

/* logic grid */
.logic-wrap { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.clue-pad { background: #fff7c9; padding: 14px; box-shadow: 2px 3px 9px rgba(0, 0, 0, .18); transform: rotate(-.5deg); }
.clue-pad ol { padding-left: 18px; }
.clue-pad .check { font-weight: 400; display: flex; gap: 6px; align-items: flex-start; }
.clue-pad input { width: auto; min-height: 0; margin-top: 4px; }
.logic { border-collapse: collapse; }
.logic th, .logic td { border: 1px solid #14213d; padding: 0; text-align: center; }
.logic th { padding: 4px 6px; background: #eef0f4; font-size: .85rem; }
.lg-i span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; display: inline-block; max-height: 130px; }
.lg-g { background: #14213d !important; color: #fff; }
.lg-b { width: 42px; height: 42px; min-height: 0; padding: 0; background: #fff; color: #14213d; border: 0; font-size: 1.2rem; border-radius: 0; }
.lg-b.yes { background: #dff0e4; color: #1f6b45; font-weight: 700; }
.lg-b.no { color: #a12038; background: #f7f3e8; }
.lg-c.good { outline: 2px solid #2c6e4f; outline-offset: -2px; }
.lg-c.off { outline: 3px solid #a12038; outline-offset: -3px; }

/* cipher */
.cipher-sheet { background: #16120c; color: #f5edd8; padding: 18px; border-radius: 10px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.cipher-w { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cipher-c { display: inline-flex; flex-direction: column; align-items: center; width: 36px; }
.cipher-l { font: 700 1.25rem/1.6 monospace; color: #ffd976; }
.glyph { width: 30px; height: 38px; }
.glyph path { fill: none; stroke: #ffd976; stroke-width: 3; stroke-linecap: round; }
.cipher-freq .glyph path { stroke: #14213d; }
.cipher-freq .cipher-l { color: #14213d; }
.cipher-in, .cipher-v { width: 34px; height: 36px; min-height: 0; padding: 0; text-align: center; font: 700 1.05rem monospace; text-transform: uppercase; border-radius: 4px; line-height: 36px; }
.cipher-v { background: #ffd976; color: #16120c; }
.cipher-c.good .cipher-in { background: #dff0e4; }
.cipher-c.off .cipher-in { background: #f8dcdc; }
.cipher-lit { align-self: flex-end; padding-bottom: 8px; font-size: 1.2rem; }
.freq { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.freq-b { display: flex; flex-direction: column; align-items: center; width: 32px; }
.freq-b span { width: 16px; background: var(--accent); }

/* sort */
.sort-tray { background: #efe7d2; border-radius: 10px; padding: 12px; }
.sort-loose { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.sort-card { background: #fffdf7; color: #14213d; border: 2px solid #b7a67d; border-radius: 6px; padding: 8px 12px; text-align: left; font: inherit; max-width: 100%; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); cursor: grab; }
.sort-card small { display: block; color: #4c5163; margin-top: 4px; }
.sort-card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
.sort-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.sort-bin { background: #2c3a52; border-radius: 10px 10px 4px 4px; padding: 8px; min-height: 130px; }
.sort-bin.over { outline: 3px solid #ffd976; }
.bin-head { display: block; width: 100%; background: #c9a34a; color: #14213d; border: 0; border-radius: 6px; padding: 8px; text-align: center; font: inherit; }
.bin-head small { display: block; }
.bin-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

/* highlight */
.claimcard { background: #14213d; color: #f5edd8; padding: 14px 18px; border-radius: 10px; }
.claimcard .eyebrow { color: #ffd976; margin: 0; }
.claim { font-size: 1.2rem; font-style: italic; margin: 4px 0; }
.claimcard .muted { color: #c5cede; margin: 0; }
.pagetext { background: #fffef8; padding: 22px; border: 1px solid #e0d7bf; margin-top: 12px; line-height: 1.85; font-family: var(--serif, Georgia, serif); font-size: 1.08rem; }
.hl { display: inline; background: none; color: inherit; border: 0; padding: 1px 2px; font: inherit; min-height: 0; text-align: left; line-height: inherit; border-bottom: 1px dotted #b7a67d; border-radius: 0; }
.hl:hover { background: rgba(255, 234, 120, .35); }
.hl.on { background: linear-gradient(100deg, rgba(255, 233, 100, .15), rgba(255, 233, 100, .9) 6%, rgba(255, 233, 100, .8) 94%, rgba(255, 233, 100, .2)); }
.hl.good { background: #cdeed9; }
.hl.off { background: #f7cfcf; }

/* interview */
.iv { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.iv-side { background: #1e2533; color: #e9dfc0; border-radius: 12px; padding: 14px; }
.iv-side h2 { color: #fff; margin: 8px 0 0; }
.iv-side .muted { color: #bcc4d6; }
.iv-side .portrait { width: 96px; height: 96px; }
.witness-sil { width: 96px; height: 96px; border-radius: 8px; background: radial-gradient(circle at 50% 36%, #0a0f18 26%, transparent 27%), radial-gradient(ellipse at 50% 100%, #0a0f18 46%, #39425a 47%); }
.iv-q { display: block; width: 100%; text-align: left; background: #2c3650; color: #fff; border: 1px solid #5a6685; border-radius: 8px; padding: 9px 11px; margin: 6px 0; font: inherit; }
.iv-q:hover { background: #3c4769; }
.iv-chat { background: #f4f1e8; border-radius: 12px; padding: 14px; min-height: 240px; }
.bub-q { margin: 8px 0 4px auto; max-width: 80%; width: fit-content; background: #14213d; color: #fff; padding: 8px 12px; border-radius: 12px 12px 2px 12px; }
.bub-a { max-width: 85%; width: fit-content; background: #fff; border: 2px solid #d8ccae; padding: 8px 12px; border-radius: 12px 12px 12px 2px; }
.bub-a p { margin: 0 0 6px; }
.bub-a.flagged { border-color: #a12038; background: #fff4f1; }
.bub-a.caught { border-color: #2c6e4f; background: #eef7f0; }

/* word vault */
.vault-meter { display: flex; gap: 5px; margin: 6px 0 12px; }
.vault-meter i { flex: 1; height: 10px; border-radius: 3px; background: #e0d7bf; }
.vault-meter i.r { background: #2c6e4f; }
.vault-meter i.w { background: #a12038; }
.vaultcard { background: linear-gradient(#fbf6e9, #f3eacf); border: 2px solid #7a5a18; }

/* mastery map */
.mgrid th[scope=row] { text-align: left; font-weight: 400; font-size: .85rem; min-width: 150px; }
.mc { width: 34px; text-align: center; font-size: .78rem; }
.mc.hi { background: #bfe5cb; }
.mc.mid { background: #f6e5a8; }
.mc.lo { background: #f4c0c0; }
.mc.none { background: #f6f3ea; }

/* parent page */
.pcover { position: relative; border-radius: 14px; overflow: hidden; background: #0c1730; border-bottom: 5px solid var(--accent); }
.pcover img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.cover-ph { height: 210px; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-style: italic; color: #e9dfc0; background: radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--accent) 55%, #0c1730), #0c1730 70%); }
.pcover-t { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 14px; color: #fff; background: linear-gradient(transparent, rgba(5, 9, 18, .92)); }
.pcover-t h1 { color: #fff; margin: 0; }
.pcover-t p { margin: 2px 0; }
.pcover-t .eyebrow { color: #e9dfc0; }
.headsup { background: #fff4d6; border-left: 5px solid #c9792b; padding: 10px 14px; margin: 12px 0; border-radius: 0 8px 8px 0; }
.pgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 14px; }
.pgrid .card { margin: 0; }
.dinnerq { font-size: 1.05rem; line-height: 1.45; }
.dinnerq li { margin: 8px 0; }
.family { border-top: 4px solid var(--accent); }
.shelf { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 8px; border-bottom: 6px solid #7a5a18; min-height: 40px; }
.tro { width: 84px; text-align: center; }
.tro small { display: block; line-height: 1.15; }
.report { white-space: pre-wrap; }
.accuse-t { background: #f6f2e4; padding: 10px 12px; border-radius: 8px; margin-top: 8px; }

/* accusation */
.accuse { border: 3px solid #5c1825; }
.sus-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.sus-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px; border: 2px solid #d8ccae; border-radius: 10px; cursor: pointer; font-weight: 600; }
.sus-card:has(input:checked) { border-color: #5c1825; background: #fbeeee; }
.sus-card input { width: auto; min-height: 0; }
.reveal { background: #0c1730; color: #f5edd8; padding: 16px 18px; border-radius: 10px; margin-top: 10px; }
.reveal h2 { color: #fff; }
.reveal .eyebrow { color: #ffd976; }
.clue-img { width: 48px; height: 48px; object-fit: contain; }

@media (max-width: 720px) {
  .doc-pair, .logic-wrap, .iv { grid-template-columns: minmax(0, 1fr); }
  .doc-A, .doc-B, .clue-pad { transform: none; }
  .tl-line::before { left: 15px; }
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: 8px 0 8px 40px; justify-content: flex-start; }
  .tl-item:nth-child(odd) .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 0; right: auto; }
  .lesson-cover.ph, .cover-ph { height: 200px; }
  .lesson-hero-t, .pcover-t { position: static; background: #0c1730; padding: 12px 14px; }
  .story-text { font-size: 1.02rem; }
  .storybook { padding: 16px; }
  .map-tri { padding: 14px 8px 18px; }
  .map-grid { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .bigstamp, .padlock .shackle { animation: none; transition: none; }
  a.stop:hover { transform: none; }
}

/* Text that sits directly on the student's dark page. */
body[data-role="student"] .act-head h1, body[data-role="student"] .map-head h1 { color: #fff; }
body[data-role="student"] .act-pitch, body[data-role="student"] .act > p.muted, body[data-role="student"] .map-head p, body[data-role="student"] .rt-meter, body[data-role="student"] .tl-end, body[data-role="student"] .act > .row, body[data-role="student"] .opened li { color: #dfe5f2; }
body[data-role="student"] .act-head .eyebrow, body[data-role="student"] .map-head .eyebrow, body[data-role="student"] main > p.eyebrow { color: var(--gold-bright); }
.lessonpill { background: transparent; color: #fff; border: 1px solid var(--gold-bright); }
.lessonpick select { color: #14213d; background: #fff; }
#fd:empty { display: none; }
.bigstamp { opacity: 1; position: static; font-size: .95rem; line-height: 1.2; }

/* ---------- examinations: the sealed paper, the Bluebook-style player, results and growth ---------- */
.exam-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 16px; }
.exam-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); background: #f3e6c4; color: #2a2113; text-decoration: none; border: 1px solid var(--gold-bright); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.exam-card strong { display: block; font: 700 1.1rem var(--serif); margin: 2px 0 4px; } .exam-card small { color: #5b4a26; }
.exam-card.submitted .wax { background: var(--ok); box-shadow: inset 0 0 0 4px #134a2f; }
.exam-card.closed, .exam-card.not_ready { opacity: .8; }
.exam-entry { background: #0c1730 radial-gradient(circle at 50% 0, #213a6b, #0c1730 70%); border: 1px solid var(--gold-bright); border-radius: var(--radius); padding: 30px 16px; }
.exam-paper { position: relative; max-width: 660px; margin: 0 auto; background: #f3e6c4 repeating-linear-gradient(transparent 0 29px, rgba(141,119,72,.16) 29px 30px); color: #2a2113; padding: 26px 24px 22px; box-shadow: 0 14px 34px rgba(0,0,0,.6); border-radius: 2px; }
.exam-paper h1, .exam-paper h2 { color: #2a2113; } .exam-paper h1 { font-size: 2rem; padding-right: 80px; } .exam-paper .eyebrow { color: var(--burgundy); }
.exam-paper .tg-head { padding-right: 100px; }
.exam-blurb { font: italic 1.08rem/1.55 var(--serif); }
.exam-rules { padding-left: 20px; } .exam-rules li { margin-bottom: 6px; }
.exam-wait { background: #fff7dc; border: 1px dashed #8d7748; padding: 10px 12px; }
.exam-seal { position: relative; height: 78px; margin: 16px -24px; }
.exam-seal::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 14px; transform: translateY(-50%); background: var(--burgundy); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.exam-seal .wax { top: 50%; transform: translate(-50%, -50%); width: 66px; height: 66px; }
.exam-seal.mini { height: 70px; margin: 0 0 6px; } .exam-seal.mini::before { left: 20%; right: 20%; }
.exam-paper.broken .exam-seal::before { opacity: 0; } .exam-paper.broken .exam-seal .wax { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .exam-seal::before { transition: opacity .5s .15s; }
  .exam-paper.broken .exam-seal .wax { animation: seal-crack .6s ease-in forwards; }
  .exam-card { transition: transform .15s; } .exam-card:hover { transform: translateY(-2px); }
}
@keyframes seal-crack { 0% { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(1); } 40% { transform: translate(-50%, -50%) rotate(-12deg) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, 10%) rotate(25deg) scale(.6); } }

.exam { background: var(--paper); border: 1px solid var(--gold-bright); border-radius: var(--radius); display: flex; flex-direction: column; min-height: calc(100vh - 150px); color: var(--ink); }
.exam-bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px 12px; align-items: center; background: var(--navy); color: #fff; padding: 8px 14px; border-bottom: 3px solid var(--gold-bright); border-radius: var(--radius) var(--radius) 0 0; }
.exam-name { display: flex; flex-direction: column; align-items: flex-start; } .exam-name .eyebrow { color: var(--gold-bright); margin: 0; } .exam-name strong { font-family: var(--serif); }
.linkish { background: none; border: 0; color: #fff; text-decoration: underline; padding: 0; min-height: 30px; font-weight: 400; font-size: .85rem; }
.linkish:hover { background: none; color: var(--gold-bright); }
.exam-clock { text-align: center; font: 700 1.35rem var(--sans); font-variant-numeric: tabular-nums; min-width: 120px; }
.exam-clock #xclock { display: block; min-height: 1.6rem; }
.exam-clock .xhide { background: transparent; border: 1px solid var(--gold-bright); min-height: 30px; padding: 1px 12px; font-size: .78rem; }
.exam-clock.low #xclock { color: #ffc2c2; }
.exam-save { justify-self: end; font-size: .82rem; color: #dfe5f2; text-align: right; } .exam-save.bad { color: #ffd2a8; font-weight: 700; }
.exam-dirs { background: #fff7dc; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.exam-body { flex: 1; }
.exam-split { display: grid; grid-template-columns: 1fr 1fr; height: 100%; }
.exam-split.solo { grid-template-columns: minmax(0, 760px); justify-content: center; }
.exam-passage { padding: 22px; border-right: 6px double var(--line); font: 1.06rem/1.7 var(--serif); }
.xpassage { white-space: pre-line; }
.exam-q { padding: 22px; }
.exam-qhead { display: flex; align-items: center; gap: 10px; background: #efe6d2; border-bottom: 2px dashed #8d8672; padding: 6px 8px; margin-bottom: 14px; }
.qbox { background: var(--navy); color: #fff; font-weight: 700; min-width: 34px; text-align: center; padding: 4px 8px; border-radius: 3px; }
.xmark { background: transparent; color: var(--ink); border: 1px solid transparent; font-weight: 600; min-height: 36px; padding: 4px 10px; display: inline-flex; gap: 6px; align-items: center; }
.xmark:hover { background: #e6dcc4; } .xmark[aria-pressed="true"] { color: var(--burgundy); border-color: var(--burgundy); background: var(--bad-bg); }
.exam-stem { font: 700 1.06rem/1.55 var(--serif); outline: none; }
.xopt { position: relative; display: flex; gap: 12px; align-items: center; border: 1px solid #8d8672; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; font: 400 1rem/1.45 var(--sans); cursor: pointer; background: #fff; }
.xopt:hover { background: #f8f2e3; }
.xopt input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.xopt b { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--navy); display: grid; place-items: center; color: var(--navy); }
.xopt:has(input:checked) { border: 2px solid var(--navy); background: #e6ecf8; } .xopt:has(input:checked) b { background: var(--navy); color: #fff; }
.xopt:has(input:focus-visible) { outline: 3px solid var(--burgundy); outline-offset: 2px; }
.exam-pop { position: sticky; bottom: 64px; z-index: 2; max-height: 62vh; overflow: auto; border-top: 2px solid var(--gold-bright); padding: 14px 18px; background: #fbf6ea; box-shadow: 0 -8px 18px rgba(20,35,63,.2); }
.exam-foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: #f4ecda; position: sticky; bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.exam-foot #xnav { flex: 0 1 auto; }
.xgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 10px 8px; margin: 12px 0; }
.xcell { position: relative; min-height: 44px; padding: 0; background: #fff; color: var(--navy); border: 1px dashed var(--navy); font-weight: 700; }
.xcell:hover { background: #efe6d2; } .xcell.ans { background: var(--navy); color: #fff; border-style: solid; } .xcell.cur { box-shadow: 0 0 0 3px var(--gold-bright); }
.xcell.mk::after { content: "⚑"; position: absolute; top: -10px; right: -6px; color: var(--burgundy); font-size: 1rem; }
.xlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); }
.xlegend i.xcell { display: inline-block; width: 18px; height: 18px; min-height: 0; vertical-align: middle; border-radius: 3px; } .xlegend i.xcell.mk::after { top: -9px; right: -7px; font-size: .8rem; }
.exam-review h2:focus { outline: none; }
.exam-review { padding: 22px; max-width: 760px; margin: 0 auto; }
.verdict { text-align: center; } .verdict h1 { color: #fff; } .verdict .big-score { color: var(--gold-bright); }
.dombars { display: grid; gap: 12px; } .dombar .bar { height: 14px; }
.option.static { cursor: default; } .option.static:hover { background: #fff; }
.option.static.right:hover { background: var(--ok-bg); } .option.static.wrong:hover { background: var(--bad-bg); }
.growth-lines li { margin-bottom: 4px; } .nextline { background: #fff7dc; border-left: 4px solid var(--gold); padding: 8px 12px; }
.notecard { border-left: 4px solid var(--navy); }
.wordres li.w { color: #6d1424; }
.map-exams { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; } .map-exams .eyebrow { margin: 0 6px 0 0; } .map-exams a.pill { text-decoration: none; }
.xmanage summary { cursor: pointer; } .xmanage[open] { min-width: 220px; } .xstudents td, .xstudents th { min-width: 110px; }
.examnote .btn { margin: 4px 6px 4px 0; }
.keyitem .passage { font-size: 1.1rem; }
@media (max-width: 720px) {
  .exam-split { grid-template-columns: 1fr; } .exam-passage { border-right: 0; border-bottom: 6px double var(--line); padding: 16px; } .exam-q { padding: 16px; }
  .exam-bar { grid-template-columns: 1fr auto; } .exam-save { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .exam-foot { padding: 8px; } .exam-foot button { padding: 9px 10px; }
  .exam-paper { padding: 22px 16px 18px; } .exam-paper h1 { font-size: 1.6rem; } .exam-seal { margin: 14px -16px; }
}

/* During a sitting the course menu steps aside, as on the real test. */
body.in-exam #nav, body.in-exam .banner, body.in-exam .lessonpill { display: none; }

/* The question being worked on, or reviewed, is unmistakable */
.xcell.cur { background: var(--gold-bright); color: var(--navy); border: 2px solid var(--navy); outline: 3px solid var(--gold-bright); outline-offset: 2px; }
.xcell.cur.ans { background: var(--gold-bright); color: var(--navy); }
.keynav { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; padding: 10px; margin: 12px 0; background: #0c1730; border-radius: 10px; }
.keynav .xcell { min-height: 36px; }

/* The Family Case: a manila case file on a night-time desk */
.fcase { background: #0c1730 radial-gradient(ellipse at 50% 0, #22355c, #0c1730 70%); border: 1px solid var(--gold-bright); border-radius: 14px; padding: 34px 16px 18px; margin: 16px 0; }
.fc-folder { position: relative; max-width: 760px; margin: 0 auto; background: #ead7a8 linear-gradient(#efdfb6, #e4cf9a); color: #2a2113; border-radius: 4px 10px 6px 6px; padding: 22px 22px 18px; box-shadow: 0 12px 30px rgba(0,0,0,.55); }
.fc-tab { position: absolute; top: -26px; left: 18px; background: #e4cf9a; color: #5c4520; padding: 4px 16px 6px; border-radius: 8px 8px 0 0; font: 700 .72rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.fc-folder h2, .fc-folder h3 { color: #2a2113; font-family: var(--serif); }
.fc-folder h3 { margin-top: 20px; border-bottom: 1px dashed #8d7748; padding-bottom: 4px; }
.fc-folder .eyebrow { color: var(--burgundy); margin: 0; }
.fc-folder .muted { color: #4d3f22; }
.fc-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 6px; padding-right: 110px; }
.fc-folder h2 { padding-right: 96px; font-size: 1.55rem; }
.fc-stamp { position: absolute; top: 18px; right: 16px; border: 3px double var(--burgundy); color: var(--burgundy); font: 700 .74rem var(--sans); text-transform: uppercase; letter-spacing: .08em; padding: 4px 8px; transform: rotate(8deg); opacity: .85; }
.fc-stamp.closed { border-color: var(--ok); color: var(--ok); font-size: .9rem; opacity: 1; }
.fc-wire { background: #f6ecd0; font-family: "Courier New", Courier, monospace; padding: 12px 14px; border-top: 4px solid var(--burgundy); box-shadow: 0 2px 5px rgba(0,0,0,.18); transform: rotate(-.4deg); margin: 10px 0 14px; }
.fc-wire p:last-child { margin: 0; }
.fc-missing { background: #fffaf0; border-left: 5px solid var(--burgundy); padding: 10px 12px; margin: 0; }
.fc-missing .lbl { margin-bottom: 2px; }
.fc-scene { padding-left: 22px; } .fc-scene li { margin: 6px 0; }
.fc-plan { margin: 14px 0; background: #fffdf4; padding: 8px; border: 1px solid #b7a274; }
.fc-plan img { display: block; width: 100%; height: auto; }
.fc-plan figcaption { font-size: .82rem; color: #4d3f22; text-align: center; margin-top: 4px; }
.fc-note { margin-top: -4px; }
.fc-people { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 6px; }
.fc-people > .fc-person { flex: 1 1 200px; max-width: 236px; }

.fc-person { position: relative; display: flex; flex-direction: column; background: #fffdf4; border: 1px solid #b7a274; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 16px rgba(42,33,19,.22); transition: transform .2s ease, box-shadow .2s ease; }
.fc-person:nth-child(odd) { transform: rotate(-.6deg); } .fc-person:nth-child(even) { transform: rotate(.6deg); }
.fc-person:hover { transform: rotate(0) translateY(-3px); box-shadow: 0 12px 24px rgba(42,33,19,.3); }
.fc-portrait { position: relative; overflow: hidden; aspect-ratio: 8 / 9; background: #14233f; border-bottom: 4px solid #2a2113; }
.fc-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; filter: sepia(.12) contrast(1.04); }
.fc-cameo { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #2a3f66 0%, #101b33 70%); }
.fc-cameo::before { content: ""; position: absolute; width: 62%; height: 74%; border-radius: 50%; border: 2px solid rgba(217,182,92,.75); box-shadow: 0 0 0 6px rgba(217,182,92,.12), inset 0 0 40px rgba(0,0,0,.45); background: radial-gradient(ellipse at 50% 35%, #34497a, #16223f 75%); }
.fc-cameo span { position: relative; font: 700 3.4rem/1 var(--serif); color: #e5c36e; text-shadow: 0 2px 10px rgba(0,0,0,.5); letter-spacing: .02em; }
.fc-num { position: absolute; left: 8px; top: 8px; font: 700 .64rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #f6ecd0; background: rgba(12,23,48,.72); border: 1px solid rgba(217,182,92,.6); padding: 3px 7px; border-radius: 4px; }
.fc-person header { padding: 10px 12px 8px; text-align: center; background: linear-gradient(#efdfb6, #e6d29f); border-bottom: 1px solid #c9b07a; }
.fc-person strong { display: block; font: 700 1.12rem/1.2 var(--serif); color: #1c1608; }
.fc-person small { display: block; margin-top: 2px; font: 600 .74rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #6a5530; }
.fc-said { position: relative; font-family: var(--serif); font-size: .97rem; line-height: 1.5; margin: 0; padding: 12px 14px 14px; flex: 1; }
.fc-lbl { display: block; font: 700 .62rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--burgundy); margin-bottom: 4px; }
.fc-person.crossed { background: #eee7d6; }
.fc-person.crossed .fc-photo, .fc-person.crossed .fc-cameo { filter: grayscale(1) contrast(.9) brightness(.8); }
.fc-person.crossed .fc-said, .fc-person.crossed header { opacity: .6; }
.fc-person.crossed strong { text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 3px; }
.fc-x { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-14deg); border: 3px solid #d23a3a; color: #ff6b6b; font: 800 1rem var(--sans); text-transform: uppercase; letter-spacing: .14em; padding: 6px 12px; background: rgba(20,10,10,.55); border-radius: 6px; white-space: nowrap; }
.fc-person.culprit { box-shadow: 0 0 0 4px var(--gold-bright), 0 12px 26px rgba(0,0,0,.35); }
.fc-person.culprit .fc-num { background: var(--gold-bright); color: #14233f; }
@media (prefers-reduced-motion: reduce) { .fc-person { transition: none; } }
@media (max-width: 480px) {
  .fc-people > .fc-person { max-width: none; display: grid; grid-template-columns: 112px 1fr; transform: none; }
  .fc-person .fc-portrait { grid-row: 1; grid-column: 1; border-bottom: 0; border-right: 3px solid #2a2113; }
  .fc-person header { grid-row: 1; grid-column: 2; display: flex; flex-direction: column; justify-content: center; text-align: left; border-bottom: 0; }
  .fc-person .fc-said { grid-column: 1 / -1; border-top: 1px solid #c9b07a; }
  .fc-cameo span { font-size: 2.2rem; }
  .fc-num { font-size: .56rem; padding: 2px 5px; left: 5px; top: 5px; }
  .fc-x { top: 58%; font-size: .56rem; padding: 3px 5px; letter-spacing: .06em; border-width: 2px; }
}
.fc-facts { padding-left: 20px; } .fc-facts li { margin: 6px 0; }
.fc-q { background: #2a2113; color: #f6ecd0; padding: 12px 14px; border-radius: 4px; margin: 16px 0 12px; font-family: var(--serif); font-size: 1.05rem; }
.print-only { display: none; }
.fc-acc fieldset { border: 0; padding: 0; margin: 0 0 10px; }
.fc-acc legend { margin-bottom: 8px; }
.fc-pick { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fc-opt { display: flex; gap: 8px; align-items: center; min-height: 44px; margin: 0; padding: 8px 10px; background: #fffdf4; border: 2px solid #b7a274; border-radius: 6px; cursor: pointer; font: 600 .95rem var(--sans); }
.fc-opt input { width: auto; min-height: 0; margin: 0; accent-color: var(--burgundy); }
.fc-opt:has(input:checked) { border-color: var(--burgundy); background: #fbeee6; }
.fc-opt.out { opacity: .5; cursor: default; text-decoration: line-through; }
.fc-folder .feedback.no { background: #f9e1e5; border-left: 4px solid var(--bad); margin: 0 0 12px; }
.fc-hints { margin-top: 14px; }
.fc-hints ol { padding-left: 22px; } .fc-hints li { margin: 6px 0; background: #fffaf0; padding: 6px 10px; border-radius: 4px; }
.fc-hints button { margin: 4px 0 8px; }
.fc-hints button:disabled { opacity: .75; color: #4d3f22; border-color: #8d7748; }
.fc-reveal { position: relative; background: #0c1730; color: #f5edd8; padding: 18px; border-radius: 8px; margin-top: 6px; }
.fc-reveal h3 { color: #fff; border: 0; margin-top: 4px; font-size: 1.35rem; }
.fc-reveal .eyebrow { color: #ffd976; }
.fc-reveal:focus { outline: none; }
.fc-steps { padding-left: 22px; } .fc-steps li { margin: 6px 0; }
.fc-award { display: flex; gap: 12px; align-items: center; background: #1b2b4f; border: 1px solid var(--gold-bright); border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
.fc-award p { margin: 0; }
@media (max-width: 560px) {
  .fcase { padding: 32px 8px 10px; border-radius: 10px; }
  .fc-folder { padding: 18px 14px 14px; }
  .fc-head { padding-right: 0; } .fc-folder h2 { padding-right: 0; font-size: 1.35rem; }
  .fc-stamp { position: static; display: inline-block; margin: 0 0 10px; transform: rotate(-3deg); }
  .fc-wire { font-size: .92rem; }
  .fc-person, .fc-person:nth-child(odd), .fc-person:nth-child(even) { transform: none; }
}
@media print {
  .noprint { display: none !important; }
  body.print-fcase main > :not(#fcase), body.print-fcase .top, body.print-fcase .banner, body.print-fcase #toast { display: none !important; }
  body.print-fcase main { padding: 0; max-width: none; }
  body.print-fcase .fcase { background: none; border: 0; padding: 0; margin: 0; }
  body.print-fcase .fc-folder { box-shadow: none; background: #fff; border: 1px solid #999; }
  body.print-fcase .fc-tab { position: static; display: inline-block; background: none; padding: 0; }
  body.print-fcase .fc-person { break-inside: avoid; transform: none; }
  body.print-fcase .fc-person.crossed { background: #fff; } body.print-fcase .fc-person.crossed p, body.print-fcase .fc-person.crossed header { opacity: 1; } body.print-fcase .fc-person.crossed strong { text-decoration: none; } body.print-fcase .fc-x { display: none; }
  body.print-fcase .fc-person.culprit { box-shadow: none; }
  body.print-fcase .fc-person.crossed .fc-photo, body.print-fcase .fc-person.crossed .fc-cameo { filter: none; } body.print-fcase .fc-person.culprit .fc-num { background: rgba(12,23,48,.72); color: #f6ecd0; }
  body.print-fcase .fc-plan { break-inside: avoid; }
  body.print-fcase .fc-q { background: none; color: #000; border: 2px solid #000; }
  body.print-fcase .print-only { display: block; margin-top: 18px; line-height: 2.4; }
}

.dispatch-job { background: #f3ead2; border-left: 5px solid var(--gold); border-radius: 6px; padding: 10px 14px; margin: 12px 0; }
.dispatch-job p { margin: 0 0 10px; }
.fc-howto { background: #fffaf0; border: 2px dashed var(--burgundy); border-radius: 8px; padding: 10px 14px; margin: 10px 0 14px; }
.fc-howto p { margin: 0 0 6px; }
.fc-howto ol { margin: 0; padding-left: 20px; }

/* ---------- notices, privacy and permission ---------- */
.site-foot { max-width: 1040px; margin: 0 auto; padding: 18px 16px 40px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
.site-foot nav a { color: var(--navy); }
.site-foot p { margin: 0 0 6px; }
.banner.danger { background: var(--bad-bg); color: var(--bad); }
.banner a { color: inherit; font-weight: 700; }
.legal { max-width: 52rem; margin: 0 auto 16px; }
.legal h2 { margin-top: 1.4em; } .legal address { font-style: normal; margin-bottom: 12px; }
.legal .dates, .legal .toc { color: var(--muted); font-size: .9rem; }
mark.todo, .legal mark { background: var(--warn-bg); color: var(--warn); padding: 0 3px; }
.notice { background: #f9f4e6; border-left: 4px solid var(--gold); padding: 10px 14px; margin-bottom: 10px; border-radius: 4px; }
.notice h3 { margin-top: 0; }
.agree-text { border: 1px dashed var(--line); padding: 8px 10px; border-radius: 6px; }
.consentbox { margin: 6px 0 10px; } .consentbox summary { cursor: pointer; font-weight: 600; }
.consentbox textarea { font-size: .85rem; }
.request { padding: 6px 0; } .warnbox { border-color: var(--bad); background: var(--bad-bg); }
.videobox.embed-wait { display: grid; place-items: center; color: #fff; text-align: center; padding: 16px; }
.videobox.embed-wait p { font-size: .85rem; max-width: 34rem; margin: 10px auto 0; } .videobox.embed-wait a { color: var(--gold-bright); }
@media print { .site-foot nav, #legalBanner, #consentBanner, .noprint, #toast { display: none !important; } .legal { box-shadow: none; border: 0; } }
body[data-role="student"] .site-foot { color: #dfe5f2; border-top-color: #2c3d63; }
body[data-role="student"] .site-foot nav a { color: var(--gold-bright); }
body[data-role="student"] main > .legal { color: var(--ink); }
@media (max-width: 560px) {
  .legal table, .legal tbody, .legal tr, .legal td { display: block; }
  .legal thead { display: none; }
  .legal tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .legal td { border: 0; padding: 2px 0; }
  .legal td:first-child { font-weight: 700; color: var(--navy); }
}

/* ---------- The public Family Case page (#/case) ---------- */
main.pub { max-width: 1120px; padding-top: 18px; }
.pub-hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 520px; display: flex; align-items: flex-end; background: #0c1730 var(--art) center/cover no-repeat; box-shadow: 0 24px 60px rgba(12,23,48,.35); }
.pub-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,14,30,.92) 0%, rgba(8,14,30,.72) 48%, rgba(8,14,30,.15) 100%), linear-gradient(0deg, rgba(8,14,30,.85) 0%, transparent 45%); }
.pub-hero-in { position: relative; padding: clamp(26px, 5vw, 60px); max-width: 680px; color: #e8edf6; }
.pub-kicker { display: inline-flex; align-items: center; gap: 10px; font: 700 .76rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); background: rgba(217,182,92,.12); border: 1px solid rgba(217,182,92,.45); padding: 8px 14px; border-radius: 99px; margin: 0 0 18px; }
.pub-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6a5c; box-shadow: 0 0 0 0 rgba(255,106,92,.7); animation: pubpulse 2s infinite; }
@keyframes pubpulse { 70% { box-shadow: 0 0 0 10px rgba(255,106,92,0); } 100% { box-shadow: 0 0 0 0 rgba(255,106,92,0); } }
.pub-hero h1 { color: #fff; font-size: clamp(2.5rem, 6.5vw, 4.6rem); line-height: 1.02; letter-spacing: -.02em; margin: 0 0 18px; }
.pub-hero h1 em { color: var(--gold-bright); }
.pub-sub { font-size: clamp(1.02rem, 1.8vw, 1.2rem); line-height: 1.6; color: #d5dceb; margin: 0 0 26px; max-width: 34em; }
.pub-sub strong { color: #fff; }
.pub-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.pbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 99px; font: 700 1.02rem var(--sans); text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.pbtn:hover { transform: translateY(-2px); }
.pbtn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pbtn-gold { background: var(--gold-bright); color: #14233f; box-shadow: 0 10px 26px rgba(217,182,92,.35); }
.pbtn-gold:hover { background: #e4c36d; }
.pbtn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.pbtn-ghost:hover { background: rgba(255,255,255,.1); }
.pbtn-line { background: transparent; color: var(--navy); border-color: var(--navy); }
.pbtn-line:hover { background: rgba(20,35,63,.06); }
.pub-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 30px 0 0; padding: 22px 0 0; border-top: 1px solid rgba(255,255,255,.16); }
.pub-stats li { font: 600 .82rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #aab5ca; }
.pub-stats b { display: block; font: 700 2rem/1 var(--serif); color: #fff; letter-spacing: 0; text-transform: none; margin-bottom: 4px; }
.pub-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0 10px; }
.pub-how > div { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; position: relative; }
.pub-how span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--gold-bright); font: 700 1.1rem var(--serif); margin-bottom: 12px; }
.pub-how h2 { font-size: 1.25rem; margin: 0 0 6px; }
.pub-how p { margin: 0; color: var(--muted); font-size: .97rem; }
main.pub .fcase { margin: 26px 0; border-radius: 22px; padding-top: 44px; }
.pub-done { margin: 0 0 26px; }
.pub-done-in { text-align: center; background: radial-gradient(900px 300px at 50% 0, #2b4677, #14233f 70%); color: #dfe5f0; border-radius: 22px; padding: 40px 22px; }
.pub-done-in h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 10px 0 8px; }
.pub-done-in p { margin: 0 auto 20px; max-width: 32em; }
.pub-done-in .pub-next { margin: 16px auto 0; font-size: .9rem; color: #a9b4c9; }
.pub-stamp { display: inline-block; font: 700 .8rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #ff8d80; border: 2px solid #ff8d80; border-radius: 6px; padding: 7px 12px; transform: rotate(-4deg); }
.pub-pitch { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(26px, 4vw, 50px); margin: 10px 0 14px; box-shadow: 0 12px 34px rgba(20,35,63,.08); }
.pub-eyebrow { font: 700 .76rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--burgundy); margin: 0 0 10px; }
.pub-pitch h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.12; letter-spacing: -.01em; }
.pub-pitch p { color: #3b4356; }
.pub-facts { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.pub-facts li { position: relative; padding-left: 26px; font-weight: 600; color: var(--navy); font-size: .97rem; }
.pub-facts li::before { content: ""; position: absolute; left: 0; top: .3em; width: 14px; height: 14px; border-radius: 50%; background: var(--gold-bright); box-shadow: inset 0 0 0 4px #fff3d2; }
.pub-collage { position: relative; height: 340px; }
.pub-collage img { position: absolute; width: 72%; border-radius: 14px; box-shadow: 0 18px 40px rgba(12,23,48,.35); border: 4px solid #fff; }
.pub-collage img:nth-child(1) { left: 0; top: 0; transform: rotate(-5deg); }
.pub-collage img:nth-child(2) { right: 0; top: 70px; transform: rotate(4deg); z-index: 2; }
.pub-collage img:nth-child(3) { left: 10%; bottom: 0; transform: rotate(-1deg); z-index: 1; }
.pub-fine { text-align: center; color: var(--muted); font-size: .85rem; }
@media (max-width: 860px) {
  .pub-how { grid-template-columns: 1fr; }
  .pub-pitch { grid-template-columns: 1fr; }
  .pub-collage { height: 260px; }
}
@media (max-width: 560px) {
  .pub-hero { min-height: 600px; border-radius: 16px; }
  .pub-hero::before { background: linear-gradient(0deg, rgba(8,14,30,.95) 0%, rgba(8,14,30,.8) 55%, rgba(8,14,30,.45) 100%); }
  .pub-ctas .pbtn { width: 100%; }
  .pub-facts { grid-template-columns: 1fr; }
  .pub-collage { height: 220px; }
  .pub-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .pub-stats li { font-size: .66rem; letter-spacing: .06em; }
  .pub-stats b { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { .pub-dot { animation: none; } .pbtn { transition: none; } }
dialog.sharebox { width: min(460px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 26px 24px 20px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 70px rgba(12,23,48,.45); }
dialog.sharebox::backdrop { background: rgba(12,23,48,.6); }
.sharebox h2 { margin: 0 0 4px; font-size: 1.5rem; }
.sharebox p { margin: 0 0 12px; }
.sharebox textarea { width: 100%; font: .95rem/1.5 var(--sans); padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; resize: none; margin: 4px 0 14px; }
.share-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-opts .pbtn { min-height: 48px; padding: 0 10px; font-size: .95rem; width: 100%; }
.sharebox #sharenote { margin: 10px 0 0; font-size: .9rem; min-height: 1.2em; }
.sharex { position: absolute; top: 10px; right: 12px; min-height: 0; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); border: 0; font-size: 1.6rem; line-height: 1; }
.sharex:hover { background: #efe6d2; }
@media (max-width: 420px) { .share-opts { grid-template-columns: 1fr; } }
