/* mun.kids — same look as the MUN slides: ink, cream, pink, sky; chunky type; stickers. */

:root {
  --ink: #17142E;
  --ink-2: #231F42;
  --ink-line: #3A3462;
  --paper: #FFF6EA;
  --paper-hi: #FFFDF8;
  --paper-2: #F1E8DA;
  --pink: #FF4D7E;
  --pink-text: #C8184F;
  --sky: #3FB8F5;
  --sky-text: #0E6FA8;
  --body: #4B4766;
  --body-dark: #CFC9EA;
  --display: 'Bricolage Grotesque', 'Arial Black', Arial, sans-serif;
  --text: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --radius: 24px;
  --shadow: 6px 6px 0 var(--ink);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--text);
  overflow-x: hidden;
}
/* clip, not hidden: Safari (Mac, iPad) won't keep the top bar sticky under a body with overflow hidden */
@supports (overflow-x: clip) { body { overflow-x: clip; } }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.center-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding-top: 48px; padding-bottom: 48px; }
.center-page .del-icon { width: 160px; }
.muted { color: var(--body); }
.small { font-size: 15px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 15px; }
.inline { display: inline; margin: 0; }

/* ---------- type */
.display-xl, .display-l, .display-m, .display-s { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; }
.display-xl { font-size: clamp(48px, 9vw, 112px); letter-spacing: -0.035em; line-height: 0.95; }
.display-l  { font-size: clamp(36px, 5.6vw, 68px); }
.display-m  { font-size: clamp(30px, 4.2vw, 48px); }
.display-s  { font-size: 28px; }
.lede { font-size: clamp(18px, 2vw, 22px); color: var(--body); max-width: 60ch; }
.display-m + .lede, .display-l + .lede { margin-top: 12px; }
.hand { font-family: var(--hand); font-weight: 700; font-size: 30px; color: var(--pink-text); line-height: 1.1; }
.marker { position: relative; white-space: nowrap; z-index: 0; }
.marker::after {
  content: ""; position: absolute; left: -4px; right: -6px; bottom: 0.06em; height: 0.36em;
  background: var(--pink); z-index: -1; border-radius: 6px; transform: rotate(-1.5deg) scaleX(0); transform-origin: left;
  animation: mark 0.7s 0.4s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes mark { to { transform: rotate(-1.5deg) scaleX(1); } }

.pill {
  display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--pink); color: var(--ink); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.pill-sky { background: var(--sky); }
.pill-ink { background: var(--ink); color: var(--pink); }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--text); font-weight: 700; font-size: 18px; text-decoration: none;
  padding: 14px 24px; border-radius: 999px; border: 3px solid var(--ink);
  background: var(--paper-hi); color: var(--ink); cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-pink { background: var(--pink); }
.btn-ghost { background: transparent; }
.btn-sky { background: var(--sky); }
.btn-sm { font-size: 15px; padding: 8px 16px; box-shadow: 3px 3px 0 var(--ink); }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--body); font-size: 15px; }
.linkish.danger { color: var(--pink-text); }

.card { background: var(--paper-hi); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-dark { background: var(--ink-2); border: 2px solid var(--ink-line); border-radius: var(--radius); }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 246, 234, 0.92); backdrop-filter: blur(8px); border-bottom: 3px solid var(--ink); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.logo b { color: var(--pink-text); }
.logo-mark { width: 38px; height: 38px; flex: none; transition: transform .3s; }
.logo:hover .logo-mark { transform: rotate(-14deg) scale(1.08); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link { text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; font-size: 16px; }
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--paper-2); }
.nav-btn { display: inline-block; white-space: nowrap; text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 16px; margin-left: 6px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; }
.nav-btn:hover { background: var(--pink); color: var(--ink); }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; padding: 7px 14px 7px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: var(--ink); font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.menu-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 22px; height: 22px; }
.burger i { display: block; height: 3px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
.burger i:nth-child(2) { width: 70%; }
.menu-btn:hover .burger i:nth-child(2) { width: 100%; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.ico { width: 22px; height: 22px; flex: none; }
.btn .ico { width: 20px; height: 20px; }
@media (max-width: 760px) { .nav-link { display: none; } }
.nav-drop { position: relative; }
/* MUN 107: the chair's script */
.chair-script { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
@media (max-width: 860px) { .chair-script { grid-template-columns: 1fr; } }
.chair-script li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.chair-script h3 { margin: 0 0 6px; font-size: 19px; }
.chair-script .say { margin: 0 0 6px; font-style: italic; background: var(--paper); border-radius: 12px; padding: 8px 12px; }
.chair-script .small { margin: 0; }
.chair-n { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 3px solid var(--ink); border-radius: 50%; background: var(--pink); font: 800 19px/1 var(--display); }
.chair-xp { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; align-self: start; }
.chair-xp .label { margin: 0; }
.xp-inline { margin: 0; }
.xp-inline .xp-item { border-color: var(--ink); background: var(--paper); }
.xp-inline .xp-thumb { width: 150px; }
.extra-card { display: flex; align-items: center; gap: 20px; margin-top: 30px; padding: 18px 22px; color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.extra-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.extra-card > svg, .extra-card > .del { flex: none; width: 90px; height: auto; }
.extra-txt { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.extra-txt strong { font-family: var(--display); font-size: 26px; }
.extra-card .btn { flex: none; }
@media (max-width: 600px) { .extra-card { flex-wrap: wrap; } .extra-card > svg, .extra-card > .del { width: 64px; } }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.nav-drop-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.nav-drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-drop-btn.is-current, .nav-drop-btn[aria-expanded="true"] { background: var(--paper-2); }
.nav-drop-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 300px; padding: 8px; display: flex; flex-direction: column; gap: 2px; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); }
.nav-drop-menu[hidden] { display: none; }
.nav-drop-menu a { display: flex; flex-direction: column; padding: 7px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; line-height: 1.25; }
.nav-drop-menu a b { font-size: 15px; }
.nav-drop-menu a span { font-size: 14px; color: var(--body); }
.nav-drop-menu a:hover, .nav-drop-menu a:focus-visible { background: var(--paper-2); outline: none; }
.nav-drop-menu a[aria-current] { background: var(--sky); }
.nav-drop-menu a[aria-current] span { color: var(--ink); }
.nav-drop-menu a.is-extra { border-top: 2px dashed var(--paper-2); border-radius: 0 0 12px 12px; margin-top: 4px; padding-top: 9px; }
@media (max-width: 760px) { .nav-drop { display: none; } }
.menu-lessons { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px 58px; }
.menu-lessons a { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border: 2px solid var(--ink-line); border-radius: 999px; color: var(--paper); text-decoration: none; font-weight: 700; font-size: 15px; }
.menu-lessons a:hover, .menu-lessons a[aria-current] { background: var(--paper); color: var(--ink); }
@media (max-width: 560px) {
  .logo span { font-size: 20px; }
  .logo-mark { width: 32px; height: 32px; }
  .topbar-in { gap: 8px; }
  .nav-btn { padding: 7px 12px; margin-left: 2px; font-size: 14px; }
}
@media (max-width: 360px) { .menu-word { display: none; } .menu-btn { padding: 7px 9px; } }

/* slide-out menu */
.menu-shade { position: fixed; inset: 0; z-index: 70; background: rgba(23, 20, 46, .45); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s; }
.menu { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(380px, 90vw); overflow-y: auto; overscroll-behavior: contain; background: var(--ink); color: var(--paper); border-left: 3px solid var(--ink); padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 6px; transform: translateX(104%); visibility: hidden; transition: transform .32s cubic-bezier(.2, .9, .3, 1.1), visibility 0s linear .32s; }
html.menu-open .menu { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .9, .3, 1.1), visibility 0s; }
html.menu-open .menu-shade { opacity: 1; visibility: visible; transition: opacity .25s, visibility 0s; }
html.menu-open { overflow: hidden; }
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.menu-head .hand { color: var(--pink); font-size: 32px; }
.menu-x { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink-line); background: var(--ink-2); color: var(--paper); cursor: pointer; flex: none; }
.menu-x:hover { background: var(--pink); color: var(--ink); border-color: var(--pink); }
.menu-group { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--body-dark); margin: 14px 0 4px; }
.menu-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.menu-link { display: flex; align-items: center; gap: 14px; padding: 9px 12px 9px 8px; border-radius: 18px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.01em; transition: background .15s, transform .15s; }
.menu-link:hover { background: var(--ink-2); transform: translateX(4px); }
.menu-link[aria-current="page"] { background: var(--paper); color: var(--ink); }
.menu-ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; border: 2px solid var(--ink); color: var(--ink); background: var(--pink); flex: none; transform: rotate(-4deg); transition: transform .2s; }
.tone-1 .menu-ico { background: var(--sky); transform: rotate(3deg); }
.tone-2 .menu-ico { background: var(--paper); transform: rotate(-2deg); }
.menu-link:hover .menu-ico { transform: rotate(0) scale(1.08); }
.menu-foot { margin-top: auto; padding-top: 104px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; position: relative; }
.menu-foot .btn { box-shadow: 3px 3px 0 var(--pink); border-color: var(--paper); }
.menu-who { flex-basis: 100%; font-size: 14px; color: var(--body-dark); word-break: break-all; }
.menu-out { position: relative; }
.menu-foot .del-icon { position: absolute; left: 50%; bottom: calc(100% - 4px); transform: translateX(-50%); width: 96px; opacity: .95; --ink: #FFF6EA; --paper: #231F42; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .menu { transition: none; } }

.flash { margin: 16px 0 0; padding: 12px 18px; border: 2px solid var(--ink); border-radius: 16px; background: var(--sky); font-weight: 600; }
.flash-warn { background: #FFD9A8; }

/* ---------- sections */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-tight { padding-top: 32px; }
.section-alt { background: var(--paper-2); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .lede { color: var(--body-dark); }

/* ---------- hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 64px); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: center; }
.hero-copy .lede { margin: 22px 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 22px; transform: rotate(-2deg); }
.hero-art { position: relative; }
.del-hero { width: 100%; max-width: 480px; margin: 0 auto; overflow: visible; }
.del-hero .hello { font-family: var(--display); font-weight: 800; font-size: 76px; fill: var(--ink); }
.del-hero .placard-text { font-family: var(--display); font-weight: 800; font-size: 56px; fill: var(--ink); }
.del-hero .arm { transform-box: view-box; transform-origin: 350px 432px; animation: wave .55s ease-in-out infinite alternate; }
.del-hero .body { animation: bob 1.8s ease-in-out infinite; }
.del-hero .bubble { transform-box: view-box; transform-origin: 350px 160px; }
.del-hero .bubble.pop { animation: pop .35s ease-out; }
.del-hero .eye { transform-box: fill-box; transform-origin: center; animation: blink 4s infinite; }
@keyframes wave { from { transform: rotate(-18deg); } to { transform: rotate(22deg); } }
@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
.float-card {
  position: absolute; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: 0.04em;
  background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 12px; padding: 8px 14px; box-shadow: 4px 4px 0 var(--ink);
  animation: floaty 3.6s ease-in-out infinite;
}
.fc1 { top: 40%; left: -2%; background: var(--pink); --r: -8deg; }
.fc2 { top: 62%; right: -2%; background: var(--sky); --r: 7deg; animation-delay: -1.2s; }
.fc3 { bottom: 4%; left: 8%; --r: 4deg; animation-delay: -2.4s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-12px) rotate(var(--r)); } }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; margin: 0 auto; order: -1; }
  .float-card { font-size: 14px; }
}

/* ---------- ticker */
.ticker { background: var(--ink); color: var(--paper); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); overflow: hidden; padding: 14px 0; }
.ticker-track { display: flex; width: max-content; align-items: center; gap: 22px; animation: tick 60s linear infinite; }
.ticker-track span { font-family: var(--display); font-weight: 800; font-size: 24px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.02em; }
.ticker-track i { width: 12px; height: 12px; border-radius: 50%; background: var(--pink); flex: none; }
.ticker-track i:nth-of-type(3n) { background: var(--sky); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- split + chat */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-copy .lede + .lede { margin-top: 16px; }
.split-copy h2 { margin-bottom: 20px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.chat { background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 32px; box-shadow: 8px 8px 0 var(--ink); padding: 18px 20px 22px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px solid var(--paper-2); }
.chat-head small { display: block; color: var(--body); font-size: 14px; }
.chat-avatar .logo-mark { width: 44px; height: 44px; }
.chat-body { display: flex; flex-direction: column; gap: 10px; min-height: 330px; }
.msg { align-self: flex-start; max-width: 85%; background: var(--paper-2); padding: 10px 16px; border-radius: 20px 20px 20px 6px; font-size: 17px; }
.msg b { display: block; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--pink-text); }
.msg.me { align-self: flex-end; background: var(--sky); border-radius: 20px 20px 6px 20px; }
.msg.me b { color: var(--ink); }
.typing { font-size: 15px; font-style: italic; color: var(--body); }
.typing span { animation: dots 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes dots { 50% { opacity: .1; } }
.js [data-chat] .msg, .js [data-chat] .typing { opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .35s, transform .35s cubic-bezier(.2,.9,.3,1.3); }
.js [data-chat] .is-shown { opacity: 1; transform: none; }

/* ---------- moves */
.moves { list-style: none; padding: 0; margin-top: 36px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.move { padding: 18px 16px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .2s; }
.move:hover { transform: rotate(-2deg) translateY(-4px); }
.move .del-icon { width: 130px; height: 130px; }
.move h3 { font-family: var(--display); font-weight: 800; font-size: 26px; }
.move p { color: var(--body); font-size: 16px; }
.move-num { font-size: 36px; }
@media (max-width: 980px) { .moves { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .moves { grid-template-columns: repeat(2, 1fr); } .move .del-icon { width: 100px; height: 100px; } }

/* ---------- spinner */
.spin { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.spin-copy h2 { margin-bottom: 16px; }
.spinner { padding: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spinner-label { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pink); }
.spinner-name { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; min-height: 1.2em; }
.spinner-name.landed { animation: pop .4s ease-out; color: var(--sky); }
.spinner-mission { color: var(--body-dark); max-width: 36ch; min-height: 3em; }
@media (max-width: 860px) { .spin { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .topic-q { opacity: .22; top: auto; bottom: -30px; } }

/* ---------- topic band */
.topic-band { background: var(--pink); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); position: relative; overflow: hidden; }
.topic-in { position: relative; }
.topic-in h2 { max-width: 16ch; margin-bottom: 18px; }
.topic-band .lede { color: var(--ink); }
.topic-in > *:not(.topic-q) { position: relative; z-index: 1; }
.topic-q { position: absolute; z-index: 0; right: 0; top: -40px; font-family: var(--display); font-weight: 800; font-size: clamp(200px, 30vw, 380px); line-height: 1; color: var(--paper); opacity: .35; transform: rotate(12deg); pointer-events: none; }

/* ---------- course map */
.map { list-style: none; padding: 0; margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: stop; }
.map-card { display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px; text-decoration: none; height: 100%; transition: transform .15s, box-shadow .15s; }
a.map-card:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 9px 9px 0 var(--ink); }
.map-num { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; }
.map-tag { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky-text); }
.map-card strong { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.15; }
.map-blurb { color: var(--body); font-size: 16px; flex: 1; }
.map-status { align-self: flex-start; margin-top: 8px; font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--paper-2); }
.is-open .map-card { background: var(--paper-hi); }
.is-open .map-status { background: var(--pink); }
.is-soon .map-card { opacity: .72; box-shadow: 4px 4px 0 var(--ink); }
.map-note { margin-top: 24px; color: var(--body); }
@media (max-width: 860px) { .map { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .map { grid-template-columns: 1fr; } }

/* ---------- final */
.final { background: var(--paper-2); border-top: 3px solid var(--ink); }
.final-in { display: flex; align-items: center; gap: 32px; }
.final-in .del-icon { width: 200px; flex: none; }
.final-in .lede { margin: 10px 0 24px; }
@media (max-width: 620px) { .final-in { flex-direction: column; text-align: center; } }

/* ---------- footer */
.footer { background: var(--ink); color: var(--body-dark); padding: 48px 0; }
.footer-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; }
.footer-big { font-family: var(--display); font-weight: 800; font-size: 36px; color: var(--paper); }
.footer-big b { color: var(--pink); }
.footer .hand { color: var(--pink); font-size: 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; flex-basis: 100%; }
.footer-links a { color: var(--paper); font-weight: 700; text-decoration-color: var(--pink); text-underline-offset: 4px; }

/* ---------- reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- login */
.login-main { min-height: calc(100vh - 68px - 160px); display: grid; place-items: center; padding: 40px 20px; }
.login-card { width: 100%; max-width: 460px; padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.login-card .del-icon { width: 110px; height: 110px; align-self: center; }
.login-card h1 { text-align: center; }
.login-card > .muted { text-align: center; }
.login-foot { text-align: center; font-size: 24px; margin-top: 6px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 16px; border: 0; padding: 0; margin: 0; }
.field small { font-weight: 400; color: var(--body); }
.field input, .field select, .field textarea {
  width: 100%; border: 3px solid var(--ink); border-radius: 14px; background: var(--paper-hi); padding: 12px 14px; font-size: 17px; font-weight: 400;
}
.field textarea { resize: vertical; min-height: 140px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 15px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--sky); }
.code-input { font-family: var(--display) !important; font-weight: 800 !important; font-size: 34px !important; letter-spacing: 0.3em; text-align: center; }
.alert { background: #FFD9E2; border: 2px solid var(--pink-text); border-radius: 14px; padding: 10px 14px; font-weight: 600; }
.alert-dev { background: #D9F1FF; border-color: var(--sky-text); }
.restart { text-align: center; }

/* ---------- page head (course, lesson, admin) */
.page-head { background: var(--paper-2); border-bottom: 3px solid var(--ink); padding: 48px 0 40px; }
.page-head-tight { padding-bottom: 28px; }
.page-head-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-head-in .del-icon { width: 170px; flex: none; }
.page-head h1 { margin-bottom: 12px; }
@media (max-width: 700px) { .page-head-in .del-icon { display: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips span { font-weight: 700; font-size: 15px; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; }

/* ---------- lesson: videos */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 28px; }
.video { overflow: hidden; }
.video figcaption { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 2px; }
.video figcaption strong { font-family: var(--display); font-size: 22px; }
.video figcaption span { color: var(--body); font-size: 15px; }
.yt { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-bottom: 3px solid var(--ink); background: var(--ink); position: relative; padding: 0; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--pink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transition: transform .15s; }
.yt-play::after { content: ""; position: absolute; left: 32px; top: 24px; border-style: solid; border-width: 17px 0 17px 28px; border-color: transparent transparent transparent var(--ink); }
.yt:hover .yt-play { transform: scale(1.1) rotate(-6deg); }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }

/* ---------- video popup */
.lightbox { padding: 0; border: 0; margin: 0; background: transparent; width: 100%; height: 100%; max-width: none; max-height: none; color: var(--paper); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(23, 20, 46, .84); }
.lb-inner { width: min(1100px, 94vw, calc((100vh - 140px) * 16 / 9)); background: var(--ink); border: 3px solid var(--paper); border-radius: 22px; box-shadow: 8px 8px 0 var(--pink); overflow: hidden; animation: lbIn .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes lbIn { from { transform: scale(.92) translateY(14px); opacity: 0; } }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; }
.lb-title { font-family: var(--display); font-weight: 800; font-size: clamp(17px, 2.2vw, 22px); line-height: 1.15; }
.lb-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--paper); background: var(--pink); color: var(--ink); font: 700 30px/1 var(--text); cursor: pointer; }
.lb-close:hover { background: var(--sky); }
.lb-frame { aspect-ratio: 16 / 9; background: #000; }
.lb-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.lb-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding: 10px 18px 12px; font-size: 14px; color: var(--body-dark); }
.lb-foot a { color: var(--sky); font-weight: 700; }
@media (max-width: 600px) { .lb-foot span { display: none; } .lb-inner { border-radius: 16px; box-shadow: 4px 4px 0 var(--pink); } }
.seen-badge { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sky); color: var(--ink); font-size: 13px; font-weight: 800; }
.seen-badge .ico { width: 16px; height: 16px; }
.video-note { display: block; font-style: normal; font-size: 14px; font-weight: 600; color: var(--pink-text); margin-top: 4px; }
.video figcaption .video-links { margin-top: 6px; font-size: 14px; }

/* ---------- "From the real UN" link strips */
.un-links .display-s { margin: 8px 0 4px; }
.un-links > .muted { margin: 0 0 14px; }
.un-link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.un-link { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.un-link:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.un-link b { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.un-link b .icon, .un-link b svg { width: 16px; height: 16px; flex: none; }
.un-link span { font-size: 14px; color: var(--body); line-height: 1.4; }
.un-link-video { background: var(--sky); }
.un-link-video span { color: var(--ink); }
.lesson-un { padding-top: 0; }
.topic-un { margin-top: 36px; }
.video-links a { color: var(--ink); font-weight: 700; }

/* ---------- video library */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.filter-row button, .filter-row a { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; font-weight: 700; font-size: 15px; padding: 8px 16px; min-height: 42px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.filter-row button:hover, .filter-row a:hover { background: var(--paper-2); }
.filter-row button.is-on, .filter-row a.is-on { background: var(--ink); color: var(--paper); }
.vgroup { margin-top: 44px; scroll-margin-top: 90px; }
.vgroup-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.vgroup-head .muted { margin-top: 4px; }
.vgroup-count { margin-top: 10px; font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sky-text); }
.vgroup .videos { margin-top: 18px; }
.chips .chip-sky { background: var(--sky); }
.yt-ext { text-decoration: none; color: var(--paper); }
.ext-art { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 18px 22px; background: radial-gradient(circle at 85% 20%, var(--pink) 0 18%, transparent 19%), var(--ink); }
.ext-art b { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); line-height: .95; letter-spacing: -.02em; }
.ext-sticker { position: absolute; right: 18px; top: 18px; font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--ink); transform: rotate(8deg); }
.ext-go { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 14px 5px 10px; transition: transform .15s; }
.ext-go .ico { width: 18px; height: 18px; }
.yt-ext:hover .ext-go { transform: rotate(-3deg) scale(1.05); }

/* ---------- about */
.about-hero { padding: clamp(36px, 6vw, 72px) 0; overflow: hidden; background: var(--paper-2); border-bottom: 3px solid var(--ink); }
.about-hero-in { display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: center; }
.about-hero .lede { margin: 20px 0 28px; }
.about-hero .display-xl { font-size: clamp(44px, 7.4vw, 96px); }
.about-art { position: relative; max-width: 360px; margin: 0 auto; width: 100%; }
.about-art .del-icon { width: 100%; animation: bob 2.2s ease-in-out infinite; }
.about-art .fc1 { top: 18%; left: -6%; }
.about-art .fc2 { top: auto; bottom: 10%; right: -4%; }
@media (max-width: 860px) { .about-hero-in { grid-template-columns: 1fr; } .about-art { max-width: 240px; order: -1; } }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { display: flex; flex-direction: column; gap: 8px; padding: 22px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 9px 9px 0 var(--ink); }
.feature h3 { font-family: var(--display); font-size: 28px; line-height: 1.05; }
.feature p { color: var(--body); flex: 1; }
.feature-go { font-weight: 800; color: var(--pink-text); }
.feature-ico { width: 52px; height: 52px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 16px; transform: rotate(-5deg); flex: none; }
.feature-ico .ico { width: 26px; height: 26px; }
.skill { align-items: flex-start; }
.skill .del-icon { width: 110px; height: 110px; margin: -6px 0 4px -10px; }
.big-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 8px; }
.big-stats p { display: flex; flex-direction: column; gap: 4px; }
.big-stats b { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 9vw, 120px); line-height: .9; color: var(--pink); }
.big-stats p:nth-child(even) b { color: var(--sky); }
.big-stats span { color: var(--body-dark); font-weight: 600; font-size: 18px; max-width: 22ch; }
@media (max-width: 760px) { .big-stats { grid-template-columns: 1fr 1fr; } }
.who { padding: 24px 26px; }
.ticks { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); background: var(--sky); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 10px; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.final .cta-row { margin-top: 0; }

/* ---------- help */
.help-search { display: block; margin-top: 22px; max-width: 520px; }
.help-search input { width: 100%; border: 3px solid var(--ink); border-radius: 999px; padding: 14px 22px; font-size: 18px; background: var(--paper-hi); box-shadow: 4px 4px 0 var(--ink); }
.help-search input:focus { outline: none; box-shadow: 4px 4px 0 var(--ink), 0 0 0 5px var(--sky); }
.topic-chip { font-weight: 700; font-size: 15px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); text-decoration: none; box-shadow: 2px 2px 0 var(--ink); }
.topic-chip:hover { background: var(--pink); }
.help-topic { margin-top: 40px; scroll-margin-top: 90px; }
.help-title { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.4vw, 34px); }
.faq { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; max-width: 900px; }
.faq-item { box-shadow: 4px 4px 0 var(--ink); border-radius: 20px; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; font-weight: 700; font-size: 19px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--pink); font: 800 22px/1 var(--text); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); background: var(--sky); }
.faq-a { padding: 0 20px 18px; color: var(--body); font-size: 17px; }
.faq-a a { color: var(--pink-text); font-weight: 700; }
.faq-a b { color: var(--ink); }
.help-empty { padding: 18px 22px; margin-top: 20px; font-weight: 600; }
mark.hl { background: #FFE08A; color: inherit; border-radius: 4px; padding: 0 2px; }

/* ---------- my progress */
.ring { position: relative; width: 170px; height: 170px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 14; }
.ring .ring-bg { stroke: var(--paper-hi); }
.ring .ring-fg { stroke: var(--pink); stroke-linecap: round; }
.ring > span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; color: var(--body); font-size: 15px; }
.ring b { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--ink); }
@media (max-width: 700px) { .page-head-in .ring { width: 120px; height: 120px; } .ring b { font-size: 32px; } }
@media (max-width: 420px) { .page-head-in .ring { display: none; } }
.continue-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.continue-row > :only-child { grid-column: 1 / -1; }
@media (max-width: 760px) { .continue-row { grid-template-columns: 1fr; } }
.continue { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px 70px 22px 24px; text-decoration: none; background: var(--pink); transition: transform .15s, box-shadow .15s; }
.continue .muted { color: var(--ink); }
.continue .label { color: var(--ink); }
.continue strong { font-family: var(--display); font-size: clamp(24px, 3vw, 32px); line-height: 1.08; }
.continue-alt { background: var(--sky); }
a.continue:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.continue-go { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper-hi); font: 800 24px/1 var(--text); }
.prog-grid { list-style: none; padding: 0; margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .prog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .prog-grid { grid-template-columns: 1fr; } }
.prog { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.prog-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.prog strong { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.prog-badge { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper-2); }
.prog.is-done .prog-badge { background: var(--sky); }
.prog.is-going .prog-badge { background: var(--pink); }
.bar { display: block; width: 100%; height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--pink); border-radius: 999px; }
.prog.is-done .bar i { background: var(--sky); }
.prog-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--body); flex: 1; }
.prog-lines li { display: flex; gap: 8px; align-items: flex-start; }
.prog-lines .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--ink); }
.prog-lines b { color: var(--ink); }
.stickers { list-style: none; padding: 0; margin-top: 28px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px 16px; }
@media (max-width: 900px) { .stickers { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .stickers { grid-template-columns: repeat(2, 1fr); } }
.sticker { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.sticker-face { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--paper); background: var(--pink); color: var(--ink); font: 800 40px/1 var(--display); box-shadow: 4px 4px 0 var(--ink-line); transform: rotate(-8deg); margin-bottom: 6px; transition: transform .2s; }
.sticker-face .ico { width: 44px; height: 44px; }
.sticker.s-1 .sticker-face { background: var(--sky); transform: rotate(6deg); }
.sticker.s-2 .sticker-face { background: var(--paper); transform: rotate(-3deg); }
.sticker.s-3 .sticker-face { background: #FFD27A; transform: rotate(9deg); }
.sticker.got:hover .sticker-face { transform: rotate(0) scale(1.08); }
.sticker.locked .sticker-face { background: var(--ink-2); color: var(--body-dark); border-style: dashed; border-color: var(--ink-line); box-shadow: none; }
.sticker b { font-family: var(--display); font-size: 18px; line-height: 1.1; }
.sticker-how { font-size: 14px; color: var(--body-dark); }
.sticker.got .sticker-how { color: var(--pink); font-weight: 700; }

@media (max-width: 560px) {
  .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; }
  .stat b { font-size: 28px; }
  .stat span { font-size: 14px; line-height: 1.2; }
}

/* ---------- teacher pages */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 7px 14px 7px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); text-decoration: none; }
.admin-tabs a .ico { width: 18px; height: 18px; }
.admin-tabs a:hover { background: var(--paper); }
.admin-tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.pick { border: 2px solid var(--ink); border-radius: 999px; padding: 8px 14px; background: var(--paper-hi); font-weight: 600; font-size: 15px; }
.sort-hint { margin: -4px 0 8px; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--ink); }
th[aria-sort="ascending"]::after { content: " ▲"; }
th[aria-sort="descending"]::after { content: " ▼"; }
.score-table td { white-space: nowrap; }
.lesson-cells { display: inline-flex; gap: 3px; }
.lesson-cells i { position: relative; width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 6px; font: 800 11px/18px var(--text); text-align: center; font-style: normal; overflow: hidden; background: linear-gradient(to top, var(--pink) var(--f), var(--paper-hi) var(--f)); }
.lesson-cells i.c-done { background: var(--sky); }
.lesson-cells i.c-new { color: var(--body); border-color: #B9B3CF; }
.score-pill { display: inline-block; font-weight: 800; font-size: 14px; padding: 2px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }
.score-pill.perfect { background: var(--sky); }
.stat-on b { color: #1B8A4B; }
.activity-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 22px; margin: 22px 0; align-items: start; }
@media (max-width: 900px) { .activity-grid { grid-template-columns: 1fr; } }
.act-card { padding: 20px 22px; min-width: 0; }
.act-card h2, .people h2 { margin-bottom: 12px; }
.online-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.online-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 12px; border-radius: 14px; background: var(--paper); }
.online-list .where { margin-left: auto; font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--sky); border: 2px solid var(--ink); }
.feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; max-height: 460px; overflow-y: auto; font-size: 16px; }
.feed li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--paper-2); }
.feed-when { color: var(--body); font-size: 14px; }
@media (max-width: 480px) { .feed li { grid-template-columns: 1fr; gap: 0; } }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); background: #C9C3DC; flex: none; }
.dot-on { background: #2BD66F; animation: pulse 1.6s ease-in-out infinite; }
.dot-today { background: #FFD27A; }
.dot-week { background: var(--sky); }
.dot-never { background: transparent; border-style: dashed; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(43, 214, 111, .25); } }
.status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 15px; }

/* ---------- sessions: hub + setup */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .hub-grid { grid-template-columns: 1fr; } }
.hub-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.hub-join { background: var(--sky); }
.hub-join .label { color: var(--ink); }
.join-input { width: 100%; border: 3px solid var(--ink); border-radius: 18px; padding: 10px 14px; background: var(--paper-hi); text-transform: uppercase; }
.join-input::placeholder { color: #C9C3DC; }
.hub-start .btn .ico { width: 20px; height: 20px; }
.hub-h { margin: 40px 0 14px; }
.sess-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.sess { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; box-shadow: 4px 4px 0 var(--ink); }
.sess > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 280px; }
.sess strong { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.sess .muted { font-size: 15px; }
.narrow-form { max-width: 880px; }
.setup-form { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.country-pick legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.pick-tools { font-size: 15px; margin-bottom: 10px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chip { position: relative; }
.pick-chip input { position: absolute; left: 0; top: 0; opacity: 0; width: 1px !important; height: 1px; padding: 0 !important; border: 0 !important; }
.pick-chip span { display: inline-block; font-weight: 700; font-size: 15px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); color: var(--body); text-decoration: line-through; cursor: pointer; }
.pick-chip input:checked + span { background: var(--sky); color: var(--ink); text-decoration: none; }
.pick-chip input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.setup-form textarea { font-family: var(--text); font-size: 16px; min-height: 80px; }

/* ---------- sessions: room */
.room-page { padding-bottom: 0; }
.room-head { background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--ink); padding: 22px 0; }
.room-head-in { display: grid; grid-template-columns: 1fr auto; gap: 14px 28px; align-items: center; }
.room-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.room-kicker .pill { margin: 0; }
.code-chip { display: inline-flex; align-items: center; gap: 6px; font: 800 16px/1 var(--display); letter-spacing: .12em; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--paper); background: transparent; color: var(--paper); cursor: pointer; }
.code-chip .ico { width: 16px; height: 16px; }
.code-chip:hover { background: var(--paper); color: var(--ink); }
.room-status span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.st-live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #2BD66F; animation: pulse 1.6s infinite; }
.st-off { color: #FFD27A; }
.st-closed { color: var(--body-dark); }
.room-head h1 { color: var(--paper); }
.room-agenda { color: var(--body-dark); margin-top: 6px; }
.room-agenda b { color: var(--paper); }
.room-agenda .muted { color: var(--body-dark); opacity: .8; }
.counters { display: flex; gap: 10px; }
.counters p { display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 8px 12px; border: 2px solid var(--ink-line); border-radius: 18px; background: var(--ink-2); }
.counters b { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--pink); }
.counters p:nth-child(2) b { color: var(--sky); }
.counters p:nth-child(3) b { color: var(--paper); }
.counters span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--body-dark); }
.room-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.room-actions .btn { box-shadow: 3px 3px 0 var(--pink); border-color: var(--paper); }
.room-actions .ico { width: 18px; height: 18px; }
@media (max-width: 760px) { .room-head-in { grid-template-columns: 1fr; } .counters p { min-width: 0; flex: 1; } }
.room-toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 80; max-width: min(520px, 92vw); padding: 10px 18px; border: 2px solid var(--ink); border-radius: 14px; background: var(--sky); font-weight: 700; box-shadow: 4px 4px 0 var(--ink); }
.room-toast.bad { background: #FFD9E2; }
.room-body { padding-top: 22px; padding-bottom: 60px; }
.room-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.room-tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; padding: 8px 14px 8px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); cursor: pointer; }
.room-tabs button .ico { width: 18px; height: 18px; }
.room-tabs button.on { background: var(--ink); color: var(--paper); }
.room-tabs button:disabled { opacity: .4; cursor: default; }
.tab-badge { position: absolute; top: -8px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--pink); color: var(--ink); border: 2px solid var(--ink); font: 800 11px/16px var(--text); font-style: normal; text-align: center; }
@media (max-width: 860px) {
  .room-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; flex-wrap: nowrap; overflow-x: auto; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--ink); border-top: 3px solid var(--ink); scrollbar-width: none; }
  .room-tabs::-webkit-scrollbar { display: none; }
  .room-tabs button { flex: 1 0 auto; flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--body-dark); min-width: 64px; }
  .room-tabs button .ico { width: 22px; height: 22px; }
  .room-tabs button.on { background: var(--pink); color: var(--ink); }
  .tab-badge { top: 0; right: 4px; }
  .room-page .footer { padding-bottom: 110px; }
  .room-body { padding-bottom: 100px; }
}
.panel { display: flex; flex-direction: column; gap: 18px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.room-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: 4px 4px 0 var(--ink); }
.room-split { margin-top: 0; align-items: start; }
.room-h { font-family: var(--display); font-weight: 800; font-size: 22px; }
.room-h small { font-family: var(--text); font-size: 15px; font-weight: 600; }
.room-h-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stage { padding: 22px 22px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.stage-name { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 6vw, 60px); line-height: 1.02; min-height: 1.05em; }
.stage-name .muted { font-size: .5em; font-weight: 700; }
.stage-time { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 14vw, 132px); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stage-time.warn { color: var(--pink-text); }
.stage-time.over { color: var(--pink-text); font-size: clamp(40px, 8vw, 80px); animation: shake .5s 2; }
@keyframes shake { 25% { transform: translateX(-6px) rotate(-2deg); } 75% { transform: translateX(6px) rotate(2deg); } }
.stage-bar { display: block; width: min(560px, 100%); height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.stage-bar i { display: block; height: 100%; width: 0; background: var(--sky); transition: width .25s linear; }
.stage-bar i.over { background: var(--pink); }
.stage-btns { justify-content: center; margin-top: 8px; }
.stage-big .stage-time { font-size: clamp(80px, 18vw, 170px); }
.stage-hint { color: var(--body); font-size: 17px; }
.caucus-clock { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px 12px; padding: 6px 14px; border-radius: 999px; background: var(--paper-2); font-size: 15px; font-weight: 700; }
.caucus-clock b { font-family: var(--display); font-size: 26px; font-variant-numeric: tabular-nums; }
.caucus-clock b.over, .caucus-clock b.warn { color: var(--pink-text); font-size: 26px; animation: none; }
.preset-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.preset-row button { font-weight: 700; font-size: 14px; padding: 6px 12px; min-height: 36px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; }
.preset-row button.on { background: var(--ink); color: var(--paper); }
.room-card .preset-row { justify-content: flex-start; }
.q-list, .m-list, .log-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.q-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--paper); font-weight: 600; }
.q-list li.q-now { background: var(--pink); }
.q-list li.q-now em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.q-list .q-empty { background: transparent; font-weight: 400; }
.q-n { font-family: var(--display); font-weight: 800; color: var(--pink-text); min-width: 20px; }
.q-btns { margin-left: auto; display: flex; gap: 4px; }
.q-btns button { width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper-hi); font: 700 16px/1 var(--text); cursor: pointer; }
.add-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.add-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; padding: 8px 14px; min-height: 42px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.add-chip:hover:not(:disabled) { background: var(--sky); }
.add-chip.raised { background: var(--pink); animation: wiggle 1.2s ease-in-out infinite; }
.add-chip.in { opacity: .45; box-shadow: none; cursor: default; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 60% { transform: rotate(0); } }
.roll-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; }
@media (max-width: 760px) { .roll-list { grid-template-columns: 1fr; } }
.roll-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper-hi); }
.roll-list li.roll-pv { background: #E4F5FE; }
.roll-list li.roll-p { background: #FFF1D6; }
.roll-list li.roll-a { opacity: .6; }
.rc-name { font-weight: 700; display: flex; flex-direction: column; line-height: 1.2; }
.rc-name small { font-weight: 500; color: var(--body); font-size: 13px; }
.seg3 { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; flex: none; }
.seg3 button { border: 0; background: var(--paper-hi); padding: 7px 10px; font-weight: 700; font-size: 13px; cursor: pointer; min-height: 36px; }
.seg3 button + button { border-left: 2px solid var(--ink); }
.seg3 button.on { background: var(--ink); color: var(--paper); }
.m-list li { padding: 10px 12px; border: 2px solid var(--paper-2); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; }
.m-list li.m-top { border-color: var(--pink); background: #FFF0F4; }
.m-list .q-empty { border: 0; padding: 0; }
.m-text { display: flex; flex-direction: column; }
.m-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.log-list li { font-size: 15px; padding: 6px 0; border-bottom: 1px solid var(--paper-2); }
.log-list b.ok { color: var(--sky-text); }
.log-list b.no { color: var(--pink-text); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { flex: 1 1 200px; border: 3px solid var(--ink); border-radius: 14px; padding: 9px 12px; background: var(--paper-hi); font-size: 16px; }
.edit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.edit-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 600; font-size: 15px; }
.edit-chip button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; font: 700 16px/1 var(--text); cursor: pointer; }
.edit-chip button:hover { background: var(--pink); }
.people-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.people-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; border-radius: 12px; background: var(--paper); }
.p-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; flex: 1 1 140px; }
.people-list select { border: 2px solid var(--ink); border-radius: 10px; padding: 6px 8px; background: var(--paper-hi); max-width: 100%; }
.vote-card { gap: 14px; }
.tally { display: flex; width: 100%; height: 26px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.tally span { display: block; height: 100%; transition: width .3s; }
.t-yes { background: var(--sky); }
.t-no { background: var(--pink); }
.t-ab { background: #FFD27A; }
.tally-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 16px; }
.tally-nums b { font-family: var(--display); font-size: 24px; }
.ballots { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; }
.ballot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper-hi); cursor: pointer; text-align: left; }
.ballot span { font-weight: 700; font-size: 15px; }
.ballot b { font-family: var(--display); font-size: 18px; }
.ballot small { font-size: 11px; font-weight: 800; color: var(--body); }
.ballot.yes { background: var(--sky); }
.ballot.no { background: var(--pink); }
.ballot.abstain { background: #FFD27A; }
.result-banner { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 3px solid var(--ink); border-radius: 18px; }
.result-banner b { font-family: var(--display); font-size: 30px; line-height: 1; }
.result-banner.pass { background: var(--sky); }
.result-banner.fail { background: var(--pink); }
/* delegate */
.delegate { display: flex; flex-direction: column; gap: 18px; }
.join-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.me-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.me-country { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; }
.placard { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: transparent; cursor: pointer; font-weight: 800; font-size: 15px; }
.placard-card { display: block; min-width: 150px; padding: 18px 16px; border: 3px solid var(--ink); border-radius: 12px; background: var(--paper-hi); box-shadow: 4px 4px 0 var(--ink); font: 800 22px/1 var(--display); transition: transform .3s cubic-bezier(.2, .9, .3, 1.4), background .2s; }
.placard.up .placard-card { background: var(--pink); transform: translateY(-14px) rotate(-6deg); }
.placard:hover .placard-card { transform: translateY(-4px); }
.placard.up:hover .placard-card { transform: translateY(-16px) rotate(-8deg); }
.live { padding: 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.live .tally, .live .tally-nums { max-width: 560px; }
.vote-me { font-weight: 800; margin-top: 8px; }
.vote-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; width: 100%; max-width: 520px; }
.vb { font: 800 22px/1 var(--display); padding: 20px 10px; border: 3px solid var(--ink); border-radius: 18px; background: var(--paper-hi); cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.vb.yes.on { background: var(--sky); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.vb.no.on { background: var(--pink); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.vb.ab.on { background: #FFD27A; transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
/* summary */
.summary-panel { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.sum-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .sum-stats { grid-template-columns: 1fr 1fr; } }
.sum-stats p { display: flex; flex-direction: column; padding: 14px 16px; border: 3px solid var(--ink); border-radius: 18px; background: var(--paper-hi); box-shadow: 4px 4px 0 var(--ink); }
.sum-stats b { font-family: var(--display); font-size: 34px; line-height: 1; }
.sum-stats span { color: var(--body); font-weight: 600; font-size: 14px; }
.speak-bars { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.speak-bars li { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: 15px; }
.sb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-bar { height: 14px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.sb-bar i { display: block; height: 100%; background: var(--pink); border-radius: 999px; }
.speak-bars li:nth-child(even) .sb-bar i { background: var(--sky); }
.sb-num { color: var(--body); white-space: nowrap; font-size: 14px; }
.sum-actions { margin-top: 4px; }
/* projector view */
.screen-page .topbar, .screen-page .footer, .screen-page .skip { display: none; }
.screen-page { background: var(--paper); }
.room-screen .room-head { padding: 18px 0; }
.room-screen .wrap { max-width: 1600px; }
.room-screen .room-head h1 { font-size: clamp(36px, 4vw, 64px); }
.room-screen .room-actions { grid-column: auto; justify-content: flex-end; }
.room-screen .room-head-in { grid-template-columns: 1fr auto auto; }
.screen-body { padding: 26px 0 30px; min-height: calc(100vh - 150px); }
.screen-grid { display: grid; grid-template-columns: 2.2fr 1fr; gap: 26px; align-items: start; }
.screen-main { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 28px; border: 3px solid var(--ink); border-radius: 30px; background: var(--paper-hi); box-shadow: 8px 8px 0 var(--ink); min-height: 60vh; justify-content: center; }
.screen-main .stage-name { font-size: clamp(48px, 7vw, 120px); }
.screen-main .stage-time.huge { font-size: clamp(90px, 16vw, 260px); }
.screen-main .stage-bar { height: 22px; width: min(900px, 100%); }
.screen-main .label { font-size: 18px; }
.screen-main .tally { height: 44px; max-width: 900px; }
.screen-main .tally-nums { font-size: 22px; justify-content: center; }
.screen-main .tally-nums b { font-size: 44px; }
.screen-main .result-banner b { font-size: 60px; }
.screen-main .sum-stats, .screen-main .room-split, .screen-main .sum-actions { width: 100%; text-align: left; }
.screen-main .sum-actions { display: none; }
.screen-side { padding: 22px; color: var(--paper); display: flex; flex-direction: column; gap: 12px; }
.screen-side .label { color: var(--pink); font-size: 15px; }
.screen-side .q-list li { background: var(--ink-2); color: var(--paper); font-size: 22px; }
.screen-side .q-list li.q-now { background: var(--pink); color: var(--ink); }
.screen-side .q-empty { color: var(--body-dark); }
.screen-raised { display: flex; flex-wrap: wrap; gap: 8px; }
.screen-raised span { padding: 6px 12px; border-radius: 999px; background: var(--pink); color: var(--ink); font-weight: 800; }
.screen-roll { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sr-chip { display: flex; flex-direction: column; padding: 10px 16px; border: 3px solid var(--ink); border-radius: 16px; font-weight: 800; font-size: 22px; background: var(--paper); }
.sr-chip small { font-size: 13px; font-weight: 600; color: var(--body); }
.sr-chip.roll-pv { background: var(--sky); }
.sr-chip.roll-p { background: #FFD27A; }
.sr-chip.roll-a { opacity: .45; }
.screen-motions { width: 100%; max-width: 900px; text-align: left; font-size: 22px; }
.screen-join { margin-top: 18px; text-align: center; font-size: 22px; color: var(--body); }
.room-screen:has(.screen-dock) .screen-body { padding-bottom: 150px; }
.room-screen.dock-hidden .screen-body { padding-bottom: 60px; }
.screen-dock { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; width: min(1100px, calc(100vw - 24px)); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dock-row { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--ink); color: var(--paper); border: 3px solid var(--paper); border-radius: 22px; box-shadow: 6px 6px 0 var(--pink); }
.dock-main, .dock-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.dk { border: 3px solid var(--paper); background: var(--ink-2); color: var(--paper); font: 800 20px/1 var(--text); padding: 12px 20px; border-radius: 999px; cursor: pointer; min-height: 52px; }
.dk:hover { background: var(--sky); color: var(--ink); border-color: var(--ink); }
.dk-pink { background: var(--pink); color: var(--ink); border-color: var(--ink); min-width: 120px; }
.dk kbd { font: 700 13px/1 var(--text); padding: 3px 6px; margin-left: 6px; border: 1px solid currentColor; border-radius: 6px; opacity: .75; }
.dock-label { font-size: 14px; color: var(--body-dark); font-weight: 700; }
.dk-tab { border: 2px solid var(--ink-line); background: transparent; color: var(--paper); font: 700 15px/1 var(--text); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.dk-tab.on { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.dock-keys { font-size: 13px; color: var(--body-dark); margin-left: 6px; }
.dock-row { position: relative; }
.qr svg { display: block; width: 100%; height: auto; }
.screen-col { display: flex; flex-direction: column; gap: 18px; }
.screen-qr { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.screen-qr .qr { width: 150px; flex: none; }
.screen-qr p { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.screen-qr b { font-family: var(--display); font-size: 26px; line-height: 1.05; }
.screen-qr span { color: var(--body); font-size: 16px; overflow-wrap: anywhere; }
.join-big { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(23, 20, 46, .92); padding: 16px; }
.join-big[hidden] { display: none; }
.join-big-in { background: var(--paper-hi); border: 4px solid var(--ink); border-radius: 30px; box-shadow: 10px 10px 0 var(--pink); padding: 26px 34px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-height: calc(100vh - 32px); }
.qr-big { width: min(62vh, 80vw); }
.join-big-url { margin: 0; font-family: var(--display); font-size: clamp(28px, 4vw, 54px); font-weight: 800; letter-spacing: .01em; }
.join-big-url b { color: var(--pink-text); letter-spacing: .06em; }
.join-big-hint { margin: 0; font-size: clamp(16px, 1.8vw, 24px); color: var(--body); }
.join-big .btn kbd { font: 700 13px/1 var(--text); padding: 3px 6px; margin-left: 6px; border: 1px solid currentColor; border-radius: 6px; }
.dk.dk-qr { border-color: var(--sky); }
.share-top { display: flex; align-items: center; gap: 16px; }
.share-qr { width: 132px; flex: none; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; }
.share-top .share-code { flex-direction: column; align-items: flex-start; gap: 2px; }
.share-code small { font-size: 13px; color: var(--body); }
.qr-dlg .share-in { align-items: center; text-align: center; }
.qr-dlg .share-head { width: 100%; }
.qr-pop { width: min(320px, 72vw); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; }
.qr-pop-url { font-size: 30px; }
.share-dlg { padding: 0; border: 3px solid var(--ink); border-radius: 24px; background: var(--paper-hi); color: var(--ink); box-shadow: 8px 8px 0 var(--pink); width: min(440px, calc(100vw - 32px)); }
.share-dlg::backdrop { background: rgba(23, 20, 46, .6); }
.share-in { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.share-head h2 { margin: 0; }
.share-x { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.share-x .ico { width: 18px; height: 18px; }
.share-code { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.share-code span { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--body); }
.share-code b { font-family: var(--display); font-size: 34px; letter-spacing: .08em; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); font: 700 16px/1.1 var(--text); color: var(--ink); text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.share-opt:hover { background: var(--sky); }
.share-opt .ico { width: 22px; height: 22px; flex: none; }
.share-link { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--paper-2); font-size: 15px; overflow-wrap: anywhere; }
.dock-hide { position: absolute; top: 10px; right: 12px; border: 2px solid var(--ink-line); background: transparent; color: var(--body-dark); font: 700 13px/1 var(--text); padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.dock-hide:hover { color: var(--paper); border-color: var(--paper); }
.dock-show { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 50; border: 3px solid var(--ink); background: var(--paper-hi); font: 800 15px/1 var(--text); padding: 10px 16px; border-radius: 999px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.room-screen.dock-hidden .dock-row { display: none; }
.room-screen.dock-hidden .dock-show { display: block; }
@media (max-width: 900px) { .dock-hide { position: static; align-self: center; } }
.screen-roll button.sr-chip, .screen-raised button { cursor: pointer; font-family: inherit; color: var(--ink); }
.screen-raised button { padding: 6px 12px; border-radius: 999px; background: var(--pink); color: var(--ink); font-weight: 800; font-size: 18px; border: 2px solid var(--ink); }
.menu-fs { margin-top: 4px; }
.menu-fs[hidden] { display: none; }
.screen-raised button:hover, .screen-roll button.sr-chip:hover { outline: 3px solid var(--sky); outline-offset: 2px; }
@media (max-width: 700px) { .dk { font-size: 16px; padding: 10px 14px; min-height: 44px; } .dock-keys { display: none; } }
@media print { .screen-dock { display: none; } }
.screen-join b { font-family: var(--display); color: var(--ink); font-size: 30px; letter-spacing: .02em; }
@media (max-width: 900px) { .screen-grid { grid-template-columns: 1fr; } .room-screen .room-head-in { grid-template-columns: 1fr; } }
@media print {
  .room-page .topbar, .room-page .footer, .room-tabs, .room-head .room-actions, .sum-actions, .delegate > :not(.summary-panel), [data-chair-only] .panel:not([data-panel="summary"]) { display: none !important; }
  .room-head { background: #fff; color: #000; }
}

/* ---------- topics, countries, conference */
.topic-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 14px 0 20px; padding: 10px 16px; border: 2px dashed var(--ink); border-radius: 16px; background: var(--paper-hi); color: var(--ink); font-size: 16px; }
.topic-banner a { color: var(--ink); text-decoration-color: var(--pink); }
.topic-banner .label { color: var(--pink-text); }
.topic-banner .linkish { margin-left: auto; }
.section-ink .topic-banner { background: var(--ink-2); border-color: var(--ink-line); color: var(--paper); }
.section-ink .topic-banner a, .section-ink .topic-banner .linkish { color: var(--paper); }
.section-ink .topic-banner .muted { color: var(--body-dark); }
.topic-pick-row { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 6px; }
.topic-pick-row .linkish { margin-left: 0; font-size: 15px; }
.topic-pick { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.topic-pick select { max-width: 100%; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 12px; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 600; }
.topic-pick-note { flex-basis: 100%; }
.topic-banner.is-preview { border-style: solid; border-color: var(--pink); }
.section-ink .topic-pick select { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (max-width: 560px) { .topic-pick { flex-wrap: wrap; width: 100%; } .topic-pick select { width: 100%; } }
.teams.teams-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .teams.teams-3 { grid-template-columns: 1fr; } }
html:not(.presenting) main > section[id] { scroll-margin-top: 70px; }
.team-paper { background: var(--paper-2); }
.topic-quote { margin-top: 24px; padding: 18px 22px; border-left: 6px solid var(--pink); background: var(--paper-hi); border-radius: 0 16px 16px 0; font-size: 20px; }
.topic-quote cite a { color: var(--body); }
.topic-grid { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .topic-grid { grid-template-columns: 1fr; } }
.topic-card { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.topic-card.is-on { background: #FFF0F4; }
.topic-card h2 { font-family: var(--display); font-size: 26px; line-height: 1.05; }
.topic-card .tc-q { font-weight: 700; }
.topic-card .muted { font-size: 15px; }
.topic-card .btn-row { margin-top: auto; padding-top: 8px; align-items: center; }
.topic-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.topic-top .pill { margin: 0; }
.tag.tag-sky { background: var(--sky); color: var(--ink); }
.tag.tag-pink { background: var(--pink); color: var(--ink); }
.topic-intro { align-items: start; }
.topic-para + .topic-para { margin-top: 14px; }
.vocab-stack { grid-template-columns: 1fr; margin-top: 0; }
/* Topic pages: the story keeps a readable width; the words sit beside it in two columns (one on phones) */
.topic-intro > * { min-width: 0; }
.vocab.vocab-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .vocab.vocab-stack { grid-template-columns: 1fr; } }
.source-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.source-list li { padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper-hi); }
.source-list a { font-weight: 700; color: var(--ink); text-decoration-color: var(--pink); }
.fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .fact-grid { grid-template-columns: 1fr 1fr; } }
.fact { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: 4px 4px 0 var(--ink); }
.fact b { font-family: var(--display); font-size: 24px; line-height: 1.1; }
.fact small { color: var(--body); font-size: 13px; }
.section-h { margin: 32px 0 12px; }
.stance-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 860px) { .stance-list { grid-template-columns: 1fr; } }
.stance-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: 4px 4px 0 var(--ink); }
.stance-card.is-on { background: #FFF0F4; }
.stance-card h3 { font-size: 17px; }
.stance-card h3 a { color: var(--ink); }
.stance-card .big-q { font-size: 22px; }
.country-group { margin-top: 28px; }
.country-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.country-chips .add-chip { text-decoration: none; color: var(--ink); animation: none; }
.country-chips .add-chip.mine { background: var(--ink); color: var(--paper); }
.conf-grid { margin-top: 0; }
.prep-list li { font-size: 17px; }
.prep-list a { font-weight: 700; color: var(--ink); text-decoration-color: var(--pink); }
.nav-staff { background: var(--sky); color: var(--ink); border-color: var(--ink); }
.nav-staff[aria-current="page"], .nav-staff:hover { background: var(--pink); color: var(--ink); }
optgroup { font-weight: 700; }

/* ---------- roles, schools, profile */
.role-teacher { background: #FFD27A; }
.role-principal { background: var(--paper-2); }
.seg-tabs { align-self: flex-start; }
.seg-tabs button { font-size: 14px; padding: 6px 12px; }
.school-list { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.school-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; box-shadow: 4px 4px 0 var(--ink); }
.school-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; }
.school-top .chips { margin-top: 0; }
.school-edit summary { list-style: none; cursor: pointer; }
.school-edit summary::-webkit-details-marker { display: none; }
.school-edit[open] summary { margin-bottom: 10px; }
.school-edit form + form { margin-top: 10px; }
.profile-grid { margin-top: 0; }
.share-box { border: 2px dashed var(--ink-line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.share-box legend { font-weight: 700; padding: 0 6px; }
.contact-card { padding: 10px 12px; border-radius: 14px; background: var(--paper); display: flex; flex-direction: column; gap: 2px; }
.contact-card + .contact-card { margin-top: 8px; }
.contact-card a { color: var(--ink); font-weight: 700; }

/* ---------- lesson: flip cards */
.flips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.flip { position: relative; height: 170px; border: 0; padding: 0; background: none; cursor: pointer; perspective: 800px; text-align: left; }
.flip-front, .flip-back { position: absolute; inset: 0; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 18px 22px; backface-visibility: hidden; transition: transform .5s cubic-bezier(.3,1.3,.5,1); }
.flip-front { background: var(--paper-hi); }
.flip-front strong { font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1; }
.flip-front small { color: var(--body); font-size: 15px; }
.flip-back { background: var(--sky); transform: rotateY(180deg); font-family: var(--display); font-weight: 800; font-size: 32px; align-items: center; text-align: center; }
.flip:nth-child(3) .flip-back { background: var(--pink); }
.flip[aria-pressed="true"] .flip-front { transform: rotateY(-180deg); }
.flip[aria-pressed="true"] .flip-back { transform: rotateY(0); }
@media (max-width: 760px) { .flips { grid-template-columns: repeat(2, 1fr); } .flip-front strong { font-size: 30px; } }

/* ---------- lesson: timeline + teams */
.timeline { list-style: none; padding: 0; margin-top: 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 4px; background: var(--ink); border-radius: 2px; }
.timeline li { position: relative; padding-top: 44px; display: flex; flex-direction: column; gap: 4px; }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--pink); border: 3px solid var(--ink); }
.timeline li:last-child::before { background: var(--sky); }
.timeline b { font-family: var(--display); font-size: 26px; }
.timeline span { color: var(--body); }
.twist { margin: 26px 0 36px; transform: rotate(-1.5deg); }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; gap: 26px; padding-left: 48px; }
  .timeline::before { left: 14px; right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
  .timeline li { padding-top: 0; }
  .timeline li::before { left: -48px; }
}
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.team { padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; }
.team ul { margin: 0; padding-left: 22px; font-size: 19px; }
.team-name { align-self: flex-start; font-family: var(--display); font-weight: 800; font-size: 24px; padding: 4px 16px; border-radius: 999px; border: 2px solid var(--ink); }
.team-pink { background: var(--pink); }
.team-sky { background: var(--sky); }
blockquote { font-size: 20px; font-style: italic; }
blockquote cite { display: block; font-style: normal; font-size: 15px; color: var(--body); margin-top: 6px; }
@media (max-width: 760px) { .teams { grid-template-columns: 1fr; } }

/* ---------- lesson: speech builder */
.builder { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; margin-top: 28px; align-items: start; }
.builder-form { display: flex; flex-direction: column; gap: 18px; }
.field-dark span, .abc legend { color: var(--paper); }
.field-dark input, .field-dark select { border-color: var(--ink-line); background: var(--ink-2); color: var(--paper); }
.abc { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.abc legend { font-weight: 600; font-size: 16px; margin-bottom: 6px; padding: 0; }
.abc label { cursor: pointer; }
.abc input { position: absolute; opacity: 0; }
.abc label span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--ink-line); background: var(--ink-2); font-size: 15px; transition: transform .12s; }
.abc label span b { font-family: var(--display); font-size: 32px; line-height: 1; }
.abc input:checked + span { background: var(--pink); color: var(--ink); border-color: var(--pink); transform: rotate(-2deg); }
.abc label:nth-child(3) input:checked + span { background: var(--sky); border-color: var(--sky); }
.abc label:nth-child(4) input:checked + span { background: var(--paper); border-color: var(--paper); }
.abc input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 3px; }
.speech { color: var(--ink); padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; }
.speech-label { font-size: 30px; }
.speech-text { font-size: 22px; line-height: 1.55; min-height: 7em; }
.speech-text .blank { color: var(--pink-text); font-weight: 700; }
.speech-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.timer { font-family: var(--display); font-weight: 800; font-size: 30px; min-height: 1.2em; }
.timer.done { color: var(--pink-text); }
.timer.warn { color: var(--pink); }
.timer-btns { display: inline-flex; gap: 8px; }
.timer-btns .btn.is-running { background: var(--paper); color: var(--ink); }
.timer-bar { display: block; height: 10px; border-radius: 999px; background: var(--paper-2); border: 2px solid var(--ink); overflow: hidden; margin-top: 6px; }
.timer-bar i { display: block; height: 100%; width: 0; background: var(--sky); transition: width .2s linear; }
.timer-bar i.done { background: var(--pink); }
.builder-tips { margin-top: 22px; color: var(--body-dark); }
@media (max-width: 860px) { .builder { grid-template-columns: 1fr; } }

/* ---------- lesson: vocab + next */
.vocab { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 28px; }
.vocab .card { padding: 18px; }
.vocab dt { font-family: var(--display); font-weight: 800; font-size: 22px; }
.vocab dd { color: var(--body); font-size: 16px; margin-top: 4px; }
@media (max-width: 980px) { .vocab { grid-template-columns: repeat(2, 1fr); } }
.next { margin-top: 48px; padding: 24px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.next h3 { font-family: var(--display); font-size: 26px; }
.next .pill { margin-bottom: 8px; }

/* ---------- lesson: shared bits (MUN 102–106) */
.head-actions { margin-top: 18px; }
.present-btn svg { width: 20px; height: 20px; }
.videos-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .videos-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .videos-3 { grid-template-columns: 1fr; } }
.cards-3, .cards-4 { display: grid; gap: 20px; margin-top: 28px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cards-4 { grid-template-columns: 1fr; } }
.tile { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.tile-big { font-family: var(--display); font-weight: 800; font-size: 64px; line-height: .9; }
.tile h3 { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.tile p { color: var(--body); }
.tile-pink { background: var(--pink); }
.tile-sky { background: var(--sky); }
.tile-paper { background: var(--paper-2); }
.tile-pink p, .tile-sky p, .tile.bg-pink p, .tile.bg-sky p { color: var(--ink); }
.num-list { list-style: none; padding: 0; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; counter-reset: n; max-width: 900px; }
.num-list li { counter-increment: n; display: flex; gap: 16px; align-items: baseline; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 20px; padding: 14px 18px; box-shadow: 4px 4px 0 var(--ink); font-size: 19px; }
.num-list li::before { content: counter(n); font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--pink-text); min-width: 26px; }
.section-ink .num-list li { background: var(--ink-2); border-color: var(--ink-line); box-shadow: none; color: var(--paper); }
.section-ink .num-list li::before { color: var(--pink); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-block; font-weight: 700; font-size: 16px; padding: 5px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); }
.chip-pink { background: var(--pink); }
.chip-sky { background: var(--sky); }
.chip-paper { background: var(--paper-2); }
.chip-x { background: #FFE3EA; color: var(--ink); }
.chip-x::before { content: "\2715"; margin-right: 6px; color: var(--pink-text); font-weight: 800; }
.chip i { font-style: italic; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.compare > .card { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.banned-card { margin-top: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.banned-card > p { margin: 0; }
.banned-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 6px 0; }
@media (max-width: 860px) { .banned-grid { grid-template-columns: 1fr; } }
.banned-item { background: var(--paper); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.banned-item h3 { margin: 0; font-size: 19px; }
.banned-item p { margin: 0; }
.banned-no, .banned-yes { font-size: 15px; }
.banned-no span, .banned-yes span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.banned-no { color: var(--body); }
.banned-no s { text-decoration-color: var(--pink-text); text-decoration-thickness: 1px; }
.banned-no span { color: var(--pink-text); }
.banned-yes { font-weight: 700; }
.banned-yes span { color: #1E8A55; }
.label { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pink-text); }
.section-ink .label { color: var(--pink); }
.big-q { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; }
.hand-note { margin-top: 22px; transform: rotate(-1.5deg); }
.note { margin-top: 20px; color: var(--body); font-size: 16px; }
.section-ink .note { color: var(--body-dark); }

/* quiz */
.quiz { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.quiz-item { padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; box-shadow: 4px 4px 0 var(--ink); }
.quiz-q { flex: 1 1 320px; font-size: 19px; font-weight: 600; }
.quiz-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz-opts button { font-weight: 700; font-size: 15px; padding: 10px 16px; min-height: 44px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; }
.quiz-opts button:hover:not(:disabled) { background: var(--paper-2); }
.quiz-opts button:disabled { cursor: default; opacity: .6; }
.quiz-opts button.is-answer { background: var(--sky); opacity: 1; }
.quiz-opts button.is-picked { background: var(--ink); color: var(--paper); opacity: 1; }
.quiz-opts button.is-picked.is-answer { background: var(--sky); color: var(--ink); box-shadow: 0 0 0 3px var(--ink); }
.quiz-why { flex-basis: 100%; font-size: 16px; color: var(--body); }
.quiz-why b { color: var(--ink); }
.quiz-item.is-right { background: #E4F5FE; }
.quiz-item.is-wrong { background: #FFE6EC; }
.quiz-score { margin-top: 14px; font-weight: 700; min-height: 1.5em; }

/* countdown clock */
.clock { padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--ink); }
.clock-label { font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-text); }
.clock-time { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 12vw, 120px); line-height: 1; font-variant-numeric: tabular-nums; }
.clock.done .clock-time { color: var(--pink-text); font-size: clamp(40px, 8vw, 80px); }
.clock-btns, .clock-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.clock-presets button { font-size: 14px; font-weight: 700; padding: 6px 12px; min-height: 36px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; }
.clock-presets button.is-on { background: var(--ink); color: var(--paper); }
.split-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; margin-top: 28px; align-items: start; }
@media (max-width: 860px) { .split-2 { grid-template-columns: 1fr; } }

/* builders */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field-dark textarea { width: 100%; border: 3px solid var(--ink-line); border-radius: 14px; background: var(--ink-2); color: var(--paper); padding: 12px 14px; font: 400 17px/1.45 var(--text); min-height: 96px; resize: vertical; }
.field-dark input::placeholder, .field-dark textarea::placeholder { color: #8C86AE; }
.field-dark textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--sky); }
.field-dark small { color: var(--body-dark); font-weight: 400; }
.abc-2 { grid-template-columns: repeat(2, 1fr); }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper-2); }
.checks li.ok::before { background: var(--sky); }
.checks li.warn::before { background: var(--pink); }
.meter { font-weight: 700; font-size: 16px; }
.speech-text .c { color: var(--pink-text); font-weight: 700; }
.speech-text .i { color: var(--sky-text); font-weight: 700; }
.motion-text { font-size: 24px; line-height: 1.5; font-weight: 600; }
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.outcomes .card { padding: 16px 18px; color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.outcomes strong { display: block; font-family: var(--display); font-size: 24px; }
@media (max-width: 760px) { .outcomes { grid-template-columns: 1fr; } }

/* cut the fluff */
.fluff { padding: 20px 22px; font-size: 21px; line-height: 2.2; margin-top: 20px; }
.fluff button { font: inherit; border: 0; background: transparent; padding: 2px 5px; margin: 0 -1px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.fluff button:hover { background: var(--paper-2); }
.fluff button.is-cut { text-decoration: line-through; text-decoration-color: var(--pink-text); text-decoration-thickness: 3px; color: var(--body); background: #FFE1E8; }
.fluff.checked button.missed { background: #FFD9A8; }
.fluff.checked button.wrong { box-shadow: inset 0 0 0 2px var(--sky-text); }
.fluff-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }
.fluff-result { font-weight: 600; flex: 1 1 300px; }

/* draft resolution + paper previews */
.draft { padding: 22px 24px; color: var(--ink); font-family: 'Times New Roman', Times, Georgia, serif; font-size: 18px; line-height: 1.55; }
.draft h3 { font-family: var(--display); font-size: 24px; margin-bottom: 6px; }
.draft .meta { font-family: var(--text); font-size: 15px; color: var(--body); }
.draft ol { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.draft li { display: flex; gap: 8px; align-items: flex-start; }
.draft li > span { flex: 1; }
.draft .up, .draft .rm { flex: none; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); cursor: pointer; font: 700 16px var(--text); }
.draft .flag { display: block; font-family: var(--text); font-size: 13px; font-weight: 700; color: var(--pink-text); }
.draft .empty-note { font-family: var(--text); color: var(--body); font-size: 16px; margin-top: 12px; }
.add-clause { display: flex; flex-direction: column; gap: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.paper { background: #FFFFFF; color: #111; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 6px 6px 0 var(--ink); padding: 32px 36px; font-family: 'Times New Roman', Times, serif; font-size: 17px; line-height: 1.5; text-align: justify; }
.paper h3 { font-family: 'Times New Roman', Times, serif; font-size: 19px; text-align: center; }
.paper .paper-meta { text-align: center; margin-bottom: 14px; }
.paper p + p { margin-top: 10px; }
.paper .ph { color: #8A85A6; font-style: italic; }
.wordcount { font-size: 14px; color: var(--body-dark); font-weight: 600; }
.example p + p { margin-top: 12px; }
.example .tag { display: inline-block; vertical-align: 1px; margin-right: 6px; font-family: var(--text); }
.tag.tag-pink { background: var(--pink); color: var(--ink); }
.tag.tag-sky { background: var(--sky); color: var(--ink); }
.tag-paper { background: var(--paper-2); color: var(--ink); }
#print-root { display: none; }

/* where the world stands */
.tracker { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.tracker-row { display: grid; grid-template-columns: 210px 1fr; gap: 12px; align-items: center; }
.tracker-label { font-weight: 800; font-size: 15px; text-align: center; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 10px; }
.tracker-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tracker-chips button { font-weight: 700; font-size: 15px; padding: 8px 14px; min-height: 42px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.tracker-chips button:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
@media (max-width: 640px) { .tracker-row { grid-template-columns: 1fr; gap: 8px; } .tracker-label { justify-self: start; } }
.bg-pink { background: var(--pink); }
.bg-sky { background: var(--sky); }
.bg-paper { background: var(--paper-2); }
.bg-white { background: var(--paper-hi); }
.lookup { margin-top: 26px; display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .lookup { grid-template-columns: 1fr; } }
.country-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.country-card h3 { font-family: var(--display); font-size: 32px; line-height: 1; }
.country-card .src a { font-weight: 700; }
.stance { align-self: flex-start; font-weight: 800; font-size: 14px; padding: 4px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.status-line { font-size: 16px; color: var(--body-dark); min-height: 1.5em; }
fieldset.wak { border: 0; padding: 0; margin: 0; }

/* course complete */
.done-map { list-style: none; padding: 0; margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.done-map li { padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 4px 4px 0 var(--ink); }
.done-map b { font-family: var(--display); font-size: 22px; white-space: nowrap; }
@media (max-width: 760px) { .done-map { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .done-map { grid-template-columns: 1fr; } }

/* mobile tidy-ups */
.vocab-wide { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .vocab-wide { grid-template-columns: 1fr; } }
@media (max-width: 440px) { .vocab { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .section { padding: 48px 0; }
  .page-head { padding: 32px 0 28px; }
  .quiz-opts { width: 100%; }
  .quiz-opts button { flex: 1 1 auto; }
  .speech { padding: 20px 18px; }
  .draft, .paper { padding: 20px 18px; }
  .next { padding: 20px; }
}

/* ---------- present on a projector */
.present-bar { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: none; align-items: center; gap: 4px; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 6px; box-shadow: 0 6px 24px rgba(23, 20, 46, .35); }
.present-bar button { border: 0; background: transparent; color: var(--paper); font: 800 22px/1 var(--text); min-width: 52px; height: 52px; border-radius: 999px; cursor: pointer; }
.present-bar button:hover { background: var(--ink-2); }
.present-bar .p-exit { background: var(--pink); color: var(--ink); font-size: 16px; padding: 0 20px; }
.present-bar .p-exit:hover { background: var(--sky); }
.present-bar span { font-weight: 700; font-size: 16px; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
html.presenting .present-bar { display: flex; }
html.presenting .topbar, html.presenting .footer, html.presenting .skip, html.presenting .head-actions, html.presenting .flash { display: none; }
html.presenting { scroll-snap-type: y proximity; scroll-padding-top: 0; }
html.presenting body { background: var(--paper); }
html.presenting main { zoom: var(--pz, 1); }
html.presenting main > section { min-height: calc(100vh / var(--pz, 1)); display: flex; flex-direction: column; justify-content: center; scroll-snap-align: start; padding-top: 48px; padding-bottom: 72px; }
html.presenting main > section > .wrap { width: 100%; }
html.presenting .page-head .del-icon { display: block; width: 220px; }
@media (max-width: 700px) { html.presenting main > section { padding-top: 32px; padding-bottom: 96px; } }

/* ---------- print just the position paper */
@media print {
  @page { margin: 1in; }
  body.print-paper > *:not(#print-root) { display: none !important; }
  body.print-paper #print-root { display: block; }
  body.print-paper { background: #FFFFFF; }
  #print-root .paper { border: 0; box-shadow: none; padding: 0; font-size: 12pt; line-height: 1.45; }
  #print-root .paper .ph { display: none; }
}

/* ---------- admin */
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.stat { padding: 12px 20px; display: flex; align-items: baseline; gap: 8px; box-shadow: 4px 4px 0 var(--ink); }
.stat b { font-family: var(--display); font-size: 34px; line-height: 1; }
.stat span { color: var(--body); font-weight: 600; }
.admin-grid { display: grid; grid-template-columns: 360px 1fr; gap: 28px; align-items: start; }
@media (max-width: 1240px) { .admin-grid { grid-template-columns: 1fr; } } /* below this the list needs the full width */
.admin-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 88px; }
@media (max-width: 1240px) { .admin-side { position: static; } }
/* Laptops and tablets: the side cards sit two across above the list instead of one long column. */
@media (min-width: 821px) and (max-width: 1240px) {
  .admin-side { display: block; columns: 2 320px; column-gap: 22px; }
  .admin-side > * { break-inside: avoid; margin: 0 0 22px; }
  .admin-side > :only-child { column-span: all; }
}
.add-form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.mail-check { padding: 20px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; box-shadow: 4px 4px 0 var(--ink); }
.mail-find { display: flex; gap: 8px; width: 100%; }
.mail-find input { flex: 1 1 auto; min-width: 0; border: 2px solid var(--ink); border-radius: 12px; padding: 8px 12px; font-size: 16px; background: var(--paper-hi); }
.mail-log { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }
.mail-log li { padding: 6px 10px; border-radius: 10px; background: var(--paper); }
.mail-log li.is-bad { background: #FFD3DF; }
.mail-log .mono { font-weight: 700; margin-right: 4px; }
.mail-log li.stopped-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.mail-log li.stopped-row form { margin: 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-pick label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.role-pick input { width: auto; accent-color: var(--pink-text); }
.people { padding: 18px; min-width: 0; }
.people-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.people-tools input[type="search"] { flex: 1; min-width: 200px; border: 3px solid var(--ink); border-radius: 999px; padding: 9px 16px; background: var(--paper); }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 7px 14px; font-weight: 600; font-size: 15px; cursor: pointer; }
.seg button.is-on { background: var(--ink); color: var(--paper); }
.table-scroll { overflow-x: auto; position: relative; }
.people-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.people-table th { text-align: left; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--body); padding: 8px 10px; border-bottom: 3px solid var(--ink); white-space: nowrap; }
.people-table td { padding: 10px; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
.people-table tr:hover td { background: var(--paper); }
#people .people-table th { white-space: normal; } /* lets the list fit next to "Add people" without scrolling */
.role { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); text-transform: uppercase; letter-spacing: 0.06em; }
.role-admin { background: var(--pink); }
.role-student { background: var(--sky); }
.role-parent { background: #C4B5FF; }
.tag { font-size: 12px; font-weight: 700; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
.actions { white-space: nowrap; text-align: right; }
.actions form { display: inline; }
.edit { display: block; position: relative; margin-bottom: 6px; }
.edit summary { cursor: pointer; text-decoration: underline; color: var(--body); font-size: 15px; list-style: none; }
.edit summary::-webkit-details-marker { display: none; }
.edit[open] > summary::before { content: ''; position: fixed; inset: 0; z-index: 40; background: rgba(23, 20, 46, 0.4); cursor: default; }
.edit-form { position: fixed; left: 50%; top: 50%; transform: translate(-50%, calc(-50% + 34px)); z-index: 41; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); text-align: left; white-space: normal; }
.edit-form .field input, .edit-form .field select { padding: 8px 10px; font-size: 15px; border-width: 2px; }
.edit-form .edit-title { font-weight: 800; font-size: 18px; margin: 0; }
.edit-form .edit-btns { display: flex; gap: 12px; align-items: center; }
.empty { padding: 20px; text-align: center; }

/* ---------- teacher tables on phones and small tablets: one card per row (site.js adds the labels) */
.sort-pick { display: none; }
@media (max-width: 820px) {
  .people { padding: 12px; }
  .people-tools input[type="search"] { flex-basis: 100%; min-width: 0; }
  .sort-pick { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--body); }
  .sort-pick select { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 999px; padding: 7px 12px; background: var(--paper); font-size: 15px; font-weight: 600; color: var(--ink); }
  .table-scroll.has-cards { overflow: visible; }
  .people-table.is-cards, .people-table.is-cards tbody { display: block; width: 100%; }
  .people-table.is-cards thead { display: none; }
  .people-table.is-cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 12px 14px; margin: 0 0 10px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper-hi); box-shadow: 3px 3px 0 var(--ink); }
  .people-table.is-cards tr[hidden] { display: none; }
  .people-table.is-cards td { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; min-width: 0; padding: 3px 0; border: 0; background: none !important; overflow-wrap: anywhere; font-size: 15px; }
  .people-table.is-cards td::before { content: attr(data-label); flex: 0 0 92px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--body); line-height: 1.3; }
  .people-table.is-cards td > .cv { flex: 1; min-width: 0; }
  .people-table.is-cards td.is-empty { display: none; }
  .people-table.is-cards td:first-child { display: block; padding: 0 0 6px; font-size: 17px; line-height: 1.35; }
  .people-table.is-cards td:first-child::before, .people-table.is-cards td.actions::before { content: none; }
  .people-table.is-cards td.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 0 0; border-top: 1px dashed var(--paper-2); text-align: left; white-space: normal; }
  .people-table.is-cards td.actions > form { display: flex; }
  .people-table.is-cards td.actions > details.edit { margin: 0; }
  .people-table.is-cards td.actions > details > summary,
  .people-table.is-cards td.actions > form > button.linkish,
  .people-table.is-cards td.actions > form > .btn,
  .people-table.is-cards td.actions > a { display: inline-flex; align-items: center; min-height: 38px; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
  .people-table.is-cards td.actions > form > button.danger { margin-left: 0; border-color: var(--pink-text); color: var(--pink-text); background: transparent; }
  .people-table.is-cards td.actions > form:last-child:has(> .danger) { margin-left: auto; }
  /* People: the role goes right under the name, without a label. */
  #people .people-table.is-cards td:nth-child(2) { display: block; padding: 0 0 6px; font-size: 13px; }
  #people .people-table.is-cards td:nth-child(2)::before { content: none; }
  #people .people-table.is-cards td:nth-child(2) .cv br { display: none; }
  #people .people-table.is-cards td:nth-child(2) .cv .muted { margin-left: 6px; }
  /* Roll call: the buttons and the note get the full width, big enough to tap. */
  .roll-table.is-cards td:nth-child(3), .roll-table.is-cards td:nth-child(4) { flex-direction: column; align-items: stretch; gap: 4px; padding-top: 6px; }
  .roll-table.is-cards td:nth-child(3)::before, .roll-table.is-cards td:nth-child(4)::before { flex: none; }
  .roll-table.is-cards .roll-seg { display: flex; width: 100%; }
  .roll-table.is-cards .roll-seg label { flex: 1 1 auto; }
  .roll-table.is-cards .roll-seg label.rs-clear { flex: 0 0 auto; }
  .roll-table.is-cards .roll-seg span { padding: 10px 4px; text-align: center; font-size: 13px; }
  .roll-table.is-cards .roll-seg .rs-clear span { padding: 10px 12px; }
  .roll-table.is-cards .roll-note { min-width: 0; font-size: 16px; }
  .edit-form .field input, .edit-form .field select { font-size: 16px; } /* 16px stops phones zooming in on tap */
  /* The scoreboard has too many columns for cards: it scrolls, with the names pinned. */
  .score-table th:first-child, .score-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper-hi); box-shadow: 2px 0 0 var(--paper-2); }
  .score-table td:first-child { white-space: normal; min-width: 130px; max-width: 150px; }
}

/* ---------- motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js .reveal, .js [data-chat] .msg, .js [data-chat] .typing { opacity: 1; transform: none; }
}

/* ---------- legal pages, consent, contact */
.legal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.legal-card { padding: 20px 22px; }
.legal-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--display); font-weight: 800; font-size: 21px; }
.legal-card h3 svg { width: 26px; height: 26px; flex: none; stroke: var(--pink-text); }
.legal-card p { margin: 0 0 10px; font-size: 16px; line-height: 1.5; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card a { color: var(--pink-text); font-weight: 700; }
.legal-doc { max-width: 780px; }
.legal-doc h2 { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.01em; margin: 44px 0 12px; scroll-margin-top: 90px; }
.legal-doc h3 { font-size: 19px; margin: 24px 0 8px; }
.legal-doc p, .legal-doc li { font-size: 17px; line-height: 1.6; }
.legal-doc p { margin: 0 0 12px; }
.legal-doc ul { padding-left: 22px; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc a { color: var(--pink-text); font-weight: 600; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 15px; color: var(--body); }
.legal-toc { columns: 2 240px; padding: 18px 22px 18px 40px; margin: 24px 0 0; }
.legal-toc li { font-size: 16px; break-inside: avoid; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--paper-2); }
.legal-table th { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 3px solid var(--ink); }
.legal-table td:first-child { font-weight: 700; }
.legal-short { padding: 22px 24px; background: var(--ink); color: var(--paper); border-radius: var(--radius); }
.legal-short ul { margin: 0; padding-left: 20px; }
.legal-short li { color: var(--paper); }
.legal-short b { color: var(--sky); }
.consent-form { padding: 26px; margin-top: 26px; }
.consent-form h2 { margin: 0 0 6px; }
.consent-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); font-size: 16px; line-height: 1.45; cursor: pointer; }
.consent-check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--pink-text); }
.consent-check .tag { vertical-align: 1px; }
.consent-check.is-required { border-color: var(--pink-text); }
.consent-check a { color: var(--pink-text); font-weight: 700; }
.tag.tag-opt { background: var(--sky); color: var(--ink); }
.consent-done { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.contact-form { padding: 26px; }
.contact-form textarea { font: 400 17px/1.5 var(--text) !important; min-height: 170px; }
.contact-side .card { padding: 20px 22px; margin-bottom: 18px; }
.contact-side h2 { margin: 0 0 8px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.captcha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; border: 2px dashed var(--ink); border-radius: 16px; background: var(--paper); }
.captcha-box { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.captcha-box input { width: 24px; height: 24px; accent-color: var(--pink-text); }
.captcha-state { font-weight: 600; color: var(--body); font-size: 15px; }
.captcha.is-busy .captcha-state::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border: 3px solid var(--sky); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.captcha.is-done { border-style: solid; background: #E3F6E9; }
.captcha.is-done .captcha-state { color: #1D7A3E; }
.captcha-note { flex-basis: 100%; font-size: 13px; color: var(--body); }
.captcha-sum { flex-basis: 100%; }
@keyframes spin { to { transform: rotate(360deg); } }
.msg { padding: 18px 20px; } /* home page chat bubbles */

/* ---------- messages (conversations) */
.msg-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.msg-tabs a { display: inline-flex; align-items: center; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.msg-tabs a:hover { background: var(--paper-2); }
.msg-tabs a.is-on { background: var(--ink); color: var(--paper); }
.msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.msg-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.msg-row:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.msg-row.is-done { opacity: .75; }
.msg-dot { flex: none; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; border: 2px solid transparent; }
.msg-row.is-unread .msg-dot { background: var(--pink); border-color: var(--ink); }
.msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-top { font-size: 17px; overflow-wrap: anywhere; }
.msg-row:not(.is-unread) .msg-top b { font-weight: 700; }
.msg-row.is-unread .msg-top b { font-weight: 900; }
.msg-with { font-size: 14px; font-weight: 600; color: var(--body); }
.msg-snip { font-size: 15px; color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
@media (max-width: 560px) {
  .msg-row { flex-wrap: wrap; }
  .msg-side { flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; padding-left: 24px; justify-content: flex-start; text-align: left; gap: 8px; }
}
.msg-empty { padding: 22px; text-align: center; }
.msg-meta { font-size: 14px; color: var(--body); margin-top: 8px; }
.msg-meta .tag, .msg-side .tag { white-space: nowrap; }
.msg-wrap { max-width: 820px; }
.msg-thread { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg-post { align-self: flex-start; width: min(100%, 640px); background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 20px 20px 20px 6px; padding: 12px 16px; box-shadow: 3px 3px 0 var(--ink); }
.msg-post.is-mine { align-self: flex-end; background: var(--sky); border-radius: 20px 20px 6px 20px; }
.msg-post.is-note { background: #FFF1B8; border-style: dashed; box-shadow: none; }
.msg-who { margin: 0 0 4px; font-size: 14px; }
.msg-who .tag { vertical-align: 1px; }
.msg-post .msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.5; }
.msg-event { align-self: center; text-align: center; font-size: 13px; color: var(--body); }
.msg-event span { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--paper-2); }
/* The mun.kids assistant (inc/ai_inbox.php) */
.tag.tag-ai { background: #D9CCFF; color: var(--ink); }
.msg-post.is-ai { background: #EFE8FF; }
.msg-post.is-ai.is-note { background: #FFF1B8; }
.msg-typing .msg-body { color: var(--body); }
.msg-typing.is-slow .typing-dots { display: none; }
.typing-dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 4px; }
.typing-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: .25; animation: typing-dot 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes typing-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing-dots i { animation: none; opacity: .6; } }
.msg-ai-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 10px; border-top: 2px dashed var(--paper-2); }
.msg-ai-tools p { margin: 0; flex: 1 1 260px; }
.msg-reply { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.msg-reply-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.msg-reply-row .btn { margin-left: auto; }
.msg-reply-row .role-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.msg-reply-row .role-pick input { width: auto; accent-color: var(--pink-text); }
.msg-reply.is-note { background: #FFF1B8; }
.msg-tools { margin-top: 16px; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.msg-tools .btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.msg-tools form { display: inline-flex; }
.msg-tools .inline-form select { flex: 1 1 200px; font-size: 15px; padding: 7px 10px; }
.msg-new .field select optgroup { font-weight: 800; }
.msg-reply textarea, .msg-new textarea { font: 400 17px/1.5 var(--text); min-height: 130px; }
.menu-btn { position: relative; }
.topbar-in { position: relative; }
.menu-hint { position: absolute; right: 2px; top: calc(100% + 8px); z-index: 19; display: inline-flex; align-items: flex-end; gap: 2px; padding: 0; border: 0; background: none; font-family: var(--hand); font-weight: 700; font-size: 24px; line-height: 1; color: var(--pink-text); cursor: pointer; white-space: nowrap; animation: hint-bob 1.8s ease-in-out infinite; text-shadow: 0 0 6px var(--paper), 0 0 2px var(--paper); }
.menu-hint[hidden] { display: none; }
.menu-hint svg { width: 34px; height: 26px; order: 2; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
@keyframes hint-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .menu-hint { animation: none; } }
html.presenting .menu-hint, html.menu-open .menu-hint, html.touring .menu-hint { display: none; }
.menu-dot { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--sky); color: var(--ink); border: 2px solid var(--ink); font-size: 12px; font-weight: 900; line-height: 1; }
.to-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25; height: 50px; padding: 0 18px 0 14px; display: inline-flex; align-items: center; gap: 6px; border: 3px solid var(--ink); border-radius: 999px; background: var(--pink); color: var(--ink); font: 800 17px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; animation: popIn .22s ease-out; }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { background: var(--pink); transform: translateY(-2px); }
.to-top:focus-visible { outline: 3px solid var(--pink-text); outline-offset: 3px; }
.to-top[hidden] { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) { .to-top { display: none !important; } } /* phones: swipe up instead */
body:has(.room-tabs) .to-top, body:has(.present-bar) .to-top, body:has(.roll-save) .to-top { bottom: calc(84px + env(safe-area-inset-bottom)); }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.lb-ask { position: relative; width: 100%; height: 100%; display: grid; place-items: center; background: #000 center / cover no-repeat; }
.lb-ask::before { content: ''; position: absolute; inset: 0; background: rgba(23, 20, 46, .78); }
.lb-ask-in { position: relative; max-width: 520px; padding: 20px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.lb-ask-in p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--paper); }
.lb-ask-in a { color: var(--sky); font-weight: 700; }
.lb-remember { font-size: 14px; color: var(--body-dark); display: inline-flex; gap: 8px; align-items: center; }
.lb-remember input { accent-color: var(--pink); width: 18px; height: 18px; }
@media (max-width: 520px) { .lb-ask-in p { font-size: 14px; } .lb-ask-in { gap: 8px; padding: 12px; } }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--body-dark); margin-top: 6px; }
.footer-legal a { color: var(--body-dark); }
.footer-credit { font-size: 14px; color: var(--body-dark); margin: 4px 0 0; }
.footer-credit b { color: var(--paper); }
.footer-credit a { color: var(--sky); font-weight: 700; }
.nav-badges { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: #FFD27A; color: var(--ink); text-decoration: none; font: 800 16px/1 var(--display); box-shadow: 2px 2px 0 var(--ink); }
.nav-badges .ico { width: 18px; height: 18px; fill: var(--ink); }
.nav-badges:hover { background: var(--pink); }
.shelf-wrap { margin-top: -26px; position: relative; z-index: 2; }
.badge-shelf { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 20px; text-decoration: none; background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 6px 6px 0 var(--pink); }
.badge-shelf:hover { transform: translate(-1px, -1px); }
.bs-count { display: flex; flex-direction: column; line-height: 1; }
.bs-count b { font-family: var(--display); font-size: 44px; color: #FFD27A; }
.bs-count small { color: var(--body-dark); font-size: 13px; font-weight: 700; }
.bs-icons { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 200px; }
.bs-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--ink-line); color: var(--ink-line); font: 800 16px/1 var(--display); }
.bs-badge.got { border: 2px solid var(--paper); background: var(--pink); color: var(--ink); transform: rotate(-6deg); }
.bs-badge.got.s-1 { background: var(--sky); transform: rotate(5deg); }
.bs-badge.got.s-2 { background: var(--paper); }
.bs-badge.got.s-3 { background: #FFD27A; transform: rotate(-3deg); }
.bs-badge .ico { width: 20px; height: 20px; }
.bs-next { display: flex; flex-direction: column; gap: 2px; max-width: 240px; }
.bs-next small { color: var(--pink); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.bs-next b { font-family: var(--display); font-size: 20px; }
.bs-next span { color: var(--body-dark); font-size: 14px; }
.badge-toast { position: fixed; left: 50%; top: 86px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 14px; background: #FFD27A; color: var(--ink); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); text-decoration: none; animation: toastIn .5s cubic-bezier(.2, .9, .3, 1.4); overflow: visible; max-width: calc(100vw - 32px); }
.badge-toast.out { opacity: 0; transform: translate(-50%, -20px); transition: all .5s; }
.bt-star { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--pink); border: 3px solid var(--ink); font-size: 26px; animation: spinIn 1s ease-out; }
.badge-toast small { display: block; font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.badge-toast b { font-family: var(--display); font-size: 22px; }
.confetti { position: absolute; top: 50%; width: 8px; height: 14px; border-radius: 2px; background: var(--pink); animation: confetti 1.4s ease-out forwards; pointer-events: none; }
.confetti.c1 { background: var(--sky); } .confetti.c2 { background: var(--ink); }
@keyframes toastIn { from { transform: translate(-50%, -40px) scale(.8); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
@keyframes spinIn { from { transform: rotate(-200deg) scale(.4); } to { transform: none; } }
@keyframes confetti { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(calc((var(--x, 1) * 40px) - 20px), 120px) rotate(540deg); opacity: 0; } }
@media (max-width: 600px) { .nav-badges { padding: 5px 9px; font-size: 14px; } .bs-next { max-width: none; } }
.login-legal { margin: 14px 0 0; font-size: 14px; color: var(--body); text-align: center; }
.login-legal a { color: var(--body); }
.slip { margin-top: 30px; padding: 22px 24px; border: 3px dashed var(--ink); border-radius: 18px; }
.slip-wrap { scroll-margin-top: 90px; }
.slip-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.slip-top h2 { margin: 0; }
.slip-form b { color: var(--pink-text); }
.slip-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.slip-done { border-style: solid; }
.slip-done h2 { margin-top: 0; }
.slip-summary td:first-child { width: 42%; }
.print-only { display: none; }
.admin-default { padding: 16px 20px; margin-top: 18px; border-style: dashed; }
.admin-default p { margin: 0 0 10px; font-size: 16px; }
.admin-default select { border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px; background: var(--paper); }
.share-box { padding: 20px 22px; margin-bottom: 20px; }
.share-box h2 { margin: 0 0 6px; }
.copy-row { display: flex; gap: 10px; align-items: center; margin: 10px 0 0; }
.copy-row input { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 12px; padding: 9px 12px; background: var(--paper); font: 400 15px/1.2 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.missing-list { padding: 16px 20px; margin-top: 18px; }
.missing-list summary { cursor: pointer; }
.inline-link { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.inline-link input { width: 170px; border: 2px solid var(--ink); border-radius: 10px; padding: 5px 8px; font-size: 14px; }
.slip h2 { margin-top: 0 !important; }
.slip-line { display: flex; gap: 12px; align-items: flex-end; margin: 16px 0; font-size: 16px; }
.slip-line span { flex: none; font-weight: 700; }
.slip-line i { flex: 1; border-bottom: 2px solid var(--ink); height: 1.2em; }
.slip-box { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 16px; }
.slip-box i { flex: none; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 4px; margin-top: 2px; }
@media print {
  .legal-print .topbar, .legal-print .footer, .legal-print .no-print, .legal-print .to-top, .legal-print .skip { display: none !important; }
  .legal-print, .legal-print main { background: #fff; }
  .legal-print .page-head { background: #fff; border: 0; padding: 0 0 10px; }
  .legal-print .card { box-shadow: none; border-width: 2px; }
  .legal-print .legal-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .legal-print .legal-card { padding: 10px 12px; break-inside: avoid; }
  .legal-print .legal-card p, .legal-print .legal-doc p, .legal-print .legal-doc li { font-size: 12px; }
  .legal-print .section { padding: 10px 0; }
  .legal-print .slip { break-inside: avoid; }
  .legal-print .print-only { display: block; }
  .print-slip-only main > section:first-child, .print-slip-only .legal-cards, .print-slip-only .legal-doc { display: none !important; }
  .print-slip-only .slip { margin-top: 0; }
  .slip-print-head { font-size: 11px; margin: 0 0 4px; }
  .slip-print-head span { color: #000; }
  .legal-print .sig-online, .legal-print .captcha, .legal-print .hp, .legal-print .slip-form .alert { display: none !important; }
  .legal-print .slip-form .field input { border: 0; border-bottom: 1.5px solid #000; border-radius: 0; background: transparent; box-shadow: none; padding: 4px 0; font-size: 13px; }
  .legal-print .slip-form .field span { font-size: 12px; }
  .legal-print .slip-form .consent-check { border: 0; padding: 4px 0; background: transparent; font-size: 12px; }
  .legal-print .slip-form .tag { background: transparent; color: #000; border: 1px solid #000; }
  .legal-print .slip-form b { color: #000; }
  .legal-print .slip-form { gap: 8px; }
}

.seg a.seg-link { padding: 7px 14px; font-weight: 600; font-size: 15px; text-decoration: none; }
.seg a.seg-link.is-on { background: var(--ink); color: var(--paper); }
.page-head .seg { margin-top: 14px; background: var(--paper-hi); }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--pink); color: var(--ink); font-size: 13px; font-weight: 800; }

/* ---------- classes + roll call */
.class-list { display: flex; flex-direction: column; gap: 16px; }
.class-card { padding: 18px 20px; }
.class-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.class-head h2 { margin: 0; }
.class-card p { margin: 8px 0; }
.class-edit summary { cursor: pointer; text-decoration: underline; color: var(--body); font-size: 15px; margin-top: 6px; }
.class-edit form { margin-top: 12px; }
.check-list { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.class-topic-form { display: inline-flex; gap: 6px; align-items: center; }
.class-topic-form select { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 10px; font-size: 14px; background: var(--paper); max-width: 150px; }
.roll-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 14px 0 6px; }
.roll-filters .field { min-width: 180px; }
.roll-table td { vertical-align: middle; }
.dot-on { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #2BB673; margin-right: 6px; box-shadow: 0 0 0 3px rgba(43, 182, 115, .2); }
.roll-seg { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.roll-seg label { cursor: pointer; }
.roll-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.roll-seg span { display: block; padding: 6px 11px; font-size: 14px; font-weight: 700; border-right: 1px solid var(--paper-2); }
.roll-seg label:last-child span { border-right: 0; }
.roll-seg input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: -3px; }
.roll-seg .rs-present input:checked + span { background: #2BB673; color: #fff; }
.roll-seg .rs-late input:checked + span { background: #FFD27A; }
.roll-seg .rs-absent input:checked + span { background: var(--pink); }
.roll-seg .rs-excused input:checked + span { background: var(--sky); }
.roll-seg .rs-clear span { color: var(--body); }
.roll-note { width: 100%; min-width: 140px; border: 2px solid var(--paper-2); border-radius: 10px; padding: 6px 8px; font-size: 14px; background: var(--paper); }
.roll-save { position: sticky; bottom: 0; padding: 12px 0 4px; background: linear-gradient(transparent, var(--paper-hi) 30%); display: flex; justify-content: flex-end; }
.roll-export { padding: 20px 22px; margin-top: 20px; max-width: 560px; display: flex; flex-direction: column; gap: 10px; }
.roll-export h2 { margin: 0; }
.record-form { padding: 20px 22px; margin-top: 20px; display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.record-form h2, .record-form p { margin: 0; }

/* family page (parents) */
.chips .chip-link { font-weight: 700; font-size: 15px; background: var(--pink); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; text-decoration: none; }
.family-kid + .family-kid { border-top: 3px dashed var(--paper-2); }
.kid-head h2 { margin: 0; }
.kid-head .chips { margin-top: 10px; }
.family-badges { margin-top: 22px; }
.family-awards-h { margin: 24px 0 0; }
.family-grid { margin-top: 22px; }
.family-grid > *, .req-wrap > * { min-width: 0; }
.room-card h3 { margin: 0; }
.lesson-meter { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lesson-meter li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 58px; gap: 10px; align-items: center; font-size: 15px; }
.lesson-meter .lm-pct { font-weight: 800; text-align: right; font-size: 14px; }
@media (max-width: 480px) { .lesson-meter li { grid-template-columns: 1fr 58px; } .lesson-meter .bar { grid-column: 1 / -1; grid-row: 2; } }
.roll-mini td, .roll-mini th { padding: 6px 8px; font-size: 15px; }
.consent-card.is-done { border-color: #2BB673; }
.consent-card details[open] summary { margin-bottom: 10px; }

/* people: family inside the edit pop-up */
.edit-form .edit-main { display: flex; flex-direction: column; gap: 10px; }
.edit-family { border-top: 2px dashed var(--paper-2); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.edit-sub { font-weight: 800; margin: 0; }
.fam-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 10px; background: var(--paper); border-radius: 12px; font-size: 14px; }
.fam-add summary { font-size: 14px; }
.fam-add form { margin-top: 8px; }

/* request access (home page) */
.req-wrap { align-items: center; }
.req-wrap .lede + .small { margin-top: 14px; }
.req-form { padding: 22px; }
.req-kind { display: flex; padding: 0; margin: 0; align-self: flex-start; }
.req-kind label { cursor: pointer; }
.req-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.req-kind span { display: block; padding: 8px 16px; font-weight: 700; }
.req-kind input:checked + span { background: var(--ink); color: var(--paper); }
.req-kind input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: -3px; }
.req-form:has(input[name="kind"][value="student"]:checked) [data-kind="parent"],
.req-form:has(input[name="kind"][value="parent"]:checked) [data-kind="student"] { display: none; }

/* access requests (staff) */
.req-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.req-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.req-card h2, .req-card p { margin: 0; }
.req-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.req-note { background: #FFF6EA; border-radius: 12px; padding: 8px 12px; font-size: 15px; }
.req-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 6px; }
.req-actions .inline-form select { flex: 1 1 140px; font-size: 15px; padding: 7px 10px; }

/* globe */
.globe-modes { margin-bottom: 16px; }
.globe-modes button { font-size: 16px; padding: 9px 18px; font-weight: 700; }
.globe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .globe-grid { grid-template-columns: 1fr; } }
.globe-stage { position: relative; padding: 0; overflow: hidden; background-color: #0F0D24;
  /* space: a few soft stars and a glow behind the planet */
  background-image:
    radial-gradient(circle at 50% 50%, rgba(63, 184, 245, .16) 0, rgba(63, 184, 245, 0) 62%),
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.9) 50%, transparent 52%),
    radial-gradient(1px 1px at 22% 72%, rgba(255,255,255,.7) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 84% 12%, rgba(255,255,255,.85) 50%, transparent 52%),
    radial-gradient(1px 1px at 91% 64%, rgba(255,255,255,.7) 50%, transparent 52%),
    radial-gradient(2px 2px at 6% 88%, rgba(255,210,122,.8) 50%, transparent 52%),
    radial-gradient(1px 1px at 70% 92%, rgba(255,255,255,.6) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 40% 6%, rgba(255,255,255,.7) 50%, transparent 52%),
    radial-gradient(1px 1px at 58% 30%, rgba(255,255,255,.35) 50%, transparent 52%),
    radial-gradient(1px 1px at 33% 45%, rgba(255,255,255,.3) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 95% 90%, rgba(255,77,126,.7) 50%, transparent 52%),
    radial-gradient(ellipse at 20% 0%, #2A2160 0, rgba(42, 33, 96, 0) 55%),
    radial-gradient(ellipse at 100% 100%, #23194D 0, rgba(35, 25, 77, 0) 50%); }
.globe-stage canvas { position: relative; z-index: 1; display: block; touch-action: none; cursor: grab; outline: none; }
.globe-stage canvas.globe-sea { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.globe-stage canvas:active { cursor: grabbing; }
.globe-stage canvas:focus-visible { box-shadow: inset 0 0 0 4px var(--sky); }
.globe-zoom { position: absolute; z-index: 2; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; }
.globe-zoom button { width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper-hi); font: 800 22px/1 var(--display); cursor: pointer; display: grid; place-items: center; box-shadow: 2px 2px 0 var(--ink); }
.globe-zoom button svg { width: 22px; height: 22px; }
.globe-zoom button:active { transform: translate(2px, 2px); box-shadow: none; }
.globe-tip { position: absolute; z-index: 2; left: 12px; bottom: 10px; margin: 0; background: var(--paper); color: var(--ink); font-weight: 700; font-size: 14px; border-radius: 999px; padding: 4px 12px; pointer-events: none; box-shadow: 2px 2px 0 var(--pink); }
.is-game .globe-tip { display: none; }
.globe-full-btn .fs-close, .is-full .globe-full-btn .fs-open { display: none; }
.is-full .globe-full-btn .fs-close { display: grid; place-items: center; }
.globe-full-btn .fs-open { display: grid; place-items: center; }
/* full screen: the globe area fills the screen (the real Fullscreen API, or pinned over the page) */
.globe-wrap.is-full { position: fixed; inset: 0; z-index: 90; max-width: none; width: 100%; height: 100vh; height: 100dvh; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; background: #0F0D24; }
.globe-wrap.is-full .globe-modes { margin: 0; align-self: flex-start; background: var(--paper-hi); }
.globe-wrap.is-full .globe-grid { flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 12px; }
.globe-wrap.is-full .globe-stage { height: 100%; min-height: 0; }
.globe-wrap.is-full .globe-side { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.globe-wrap.is-full > .note { display: none; }
@media (max-width: 900px) {
  .globe-wrap.is-full { padding: 8px; gap: 8px; }
  .globe-wrap.is-full .globe-grid { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
  .globe-wrap.is-full .globe-side { max-height: 40vh; max-height: 40dvh; }
  .globe-wrap.is-full .globe-panel[data-panel="game"] { position: static; }
  .globe-wrap.is-full .globe-legend { display: none; }
}
html.globe-full { overflow: hidden; }
html.globe-full .ai-fab, html.globe-full .ai-panel, html.globe-full .to-top, html.globe-full .menu-hint { display: none !important; }
.globe-noscript { padding: 20px; }
.globe-panel { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.globe-panel [data-setup], .globe-panel [data-round], .globe-panel [data-done] { display: flex; flex-direction: column; gap: 12px; }
.globe-panel [hidden] { display: none !important; }
.globe-search { display: flex; gap: 8px; }
.globe-search input { flex: 1; min-width: 0; border: 3px solid var(--ink); border-radius: 14px; padding: 9px 12px; font-size: 16px; background: var(--paper-hi); }
.globe-info { background: var(--paper); border-radius: 16px; padding: 14px 16px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.globe-info h2, .globe-info p { margin: 0; }
.globe-flag { font-size: 40px; line-height: 1; }
.globe-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 15px; }
.globe-facts dt { font-weight: 700; color: var(--body); }
.globe-facts dd { margin: 0; font-weight: 600; }
.globe-info .btn { align-self: flex-start; }
.globe-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; font-weight: 600; }
.globe-legend li { display: flex; align-items: center; gap: 6px; }
.globe-legend i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--ink); }
.g-african { background: #FFD27A; } .g-asia-pacific { background: #8FD694; } .g-eastern-european { background: #C4B5FF; }
.g-latin-america-caribbean { background: #FFA8BE; } .g-western-european-others { background: #8ED3F7; } .g-none { background: #E4DCCD; }
.globe-score { display: flex; flex-wrap: wrap; gap: 8px; }
.globe-score span { font-weight: 800; font-size: 15px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; }
.globe-score .streak { background: #FFD27A; }
.globe-q { font: 800 22px/1.2 var(--display); margin: 0; }
.globe-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.globe-opt { border: 3px solid var(--ink); border-radius: 16px; background: var(--paper-hi); padding: 12px 10px; font: 700 16px/1.2 var(--text); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); min-height: 60px; }
.globe-opt:hover:not(:disabled) { background: var(--paper-2); }
.globe-opt:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.globe-opt:disabled { cursor: default; opacity: .6; }
.globe-opt.is-good { background: #2BB673; color: #fff; opacity: 1; }
.globe-opt.is-bad { background: var(--pink); opacity: 1; }
.globe-final { font: 800 64px/1 var(--display); margin: 0; }
.globe-final b { color: var(--pink-text); }
.globe-band .split { align-items: center; }
.globe-teaser { display: block; max-width: 420px; margin: 0 auto; transition: transform .4s; }
.globe-teaser:hover { transform: rotate(-8deg) scale(1.03); }
.globe-teaser img { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .globe-side { order: 2; } .globe-panel[data-panel="game"] { position: sticky; bottom: 8px; z-index: 5; } }

/* research with AI */
.ai-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 20px; }
.ai-rule { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.ai-rule b { font: 800 34px/1 var(--display); color: var(--pink-text); }
.ai-rule h3, .ai-rule p { margin: 0; }
.ai-rule h3 { font: 800 20px/1.15 var(--display); }
.ai-fill { padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; margin: 22px 0; }
@media (max-width: 760px) { .ai-fill { grid-template-columns: 1fr; } }
.ai-prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ai-prompt { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.ai-prompt h3 { margin: 0; }
.ai-prompt .btn { align-self: flex-start; margin-top: auto; }
.ai-tag { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pink-text); }
.ai-text { margin: 0; white-space: pre-wrap; background: var(--paper); border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.5; max-height: 260px; overflow: auto; }
.ai-age { background: #FFF6EA; border: 2px solid var(--ink); border-radius: 16px; padding: 12px 16px; }
.ai-steps { display: flex; flex-direction: column; gap: 12px; padding-left: 22px; margin: 16px 0; }
.ai-steps li { padding-left: 4px; }
.ai-steps .btn { margin-right: 8px; }
.ai-skill { padding: 16px 18px; }
.ai-skill summary { cursor: pointer; }
.ai-skill pre { white-space: pre-wrap; font-size: 13px; line-height: 1.5; max-height: 520px; overflow: auto; background: var(--paper); border-radius: 12px; padding: 12px; margin: 12px 0 0; }
.ai-tools td { vertical-align: top; }
.ai-callout { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-top: 20px; text-decoration: none; color: var(--ink); background: #FFF6EA; }
.ai-callout .ico { width: 30px; height: 30px; flex: none; color: var(--pink-text); }
.ai-callout:hover { transform: translate(-1px, -1px); }

/* galleries */
.crumbs { margin: 0 0 8px; font-weight: 700; }
.crumbs a { color: var(--ink); }
.gal-switch { margin-top: 14px; max-width: 420px; }
.gal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.gal-card { display: flex; flex-direction: column; gap: 8px; padding: 0 0 16px; overflow: hidden; text-decoration: none; color: var(--ink); }
.gal-card:hover { transform: translate(-2px, -2px); }
.gal-card strong { font: 800 20px/1.15 var(--display); padding: 0 16px; }
.gal-meta { padding: 0 16px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gal-cover { aspect-ratio: 4 / 3; background: var(--paper-2); display: grid; place-items: center; border-bottom: 3px solid var(--ink); overflow: hidden; }
.gal-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-cover .ico { width: 54px; height: 54px; color: var(--body); }
.gal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gal-item { position: relative; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: var(--paper-hi); box-shadow: 3px 3px 0 var(--ink); }
.gal-item > a { display: block; position: relative; aspect-ratio: 1; background: var(--paper-2); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-item .yt-play { position: absolute; }
.gal-noimg { position: absolute; inset: 0; display: grid; place-items: center; }
.gal-noimg .ico { width: 48px; height: 48px; }
.gal-out { position: absolute; left: 8px; bottom: 8px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.gal-cap { margin: 0; padding: 6px 10px; font-size: 14px; font-weight: 600; border-top: 2px solid var(--paper-2); }
.gal-del { position: absolute; top: 6px; right: 6px; }
.gal-del button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper-hi); display: grid; place-items: center; cursor: pointer; padding: 0; }
.gal-del .ico { width: 16px; height: 16px; }
.gal-manage { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; align-items: start; }
.gal-form { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.gal-form h2 { margin: 0; }
.gal-form summary { cursor: pointer; font-size: 18px; }
details.gal-form[open] summary { margin-bottom: 12px; }
.gal-vis { gap: 8px; }
.gal-form textarea { font-family: var(--text); font-size: 16px; min-height: 90px; }
.section-ink p.muted { color: var(--body-dark); }
.gal-vis .role-pick { align-items: flex-start; }
.gal-rules { background: #FFF6EA; border: 2px dashed var(--ink); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.gal-rules p { margin: 0 0 4px; }
.gal-rules ul { margin: 0 0 6px; padding-left: 18px; }
.gal-lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.gal-lb::backdrop { background: rgba(23, 20, 46, .92); }
.gal-lb[open] { display: grid; place-items: center; }
.gal-lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 94vw; }
.gal-lb img { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 12px; background: #000; }
.gal-lb figcaption { color: var(--paper); font-weight: 600; text-align: center; }
.gal-lb-open { color: var(--sky); font-weight: 700; font-size: 15px; }
.gal-lb-open[hidden] { display: none; }
.gal-lb-x, .gal-lb-nav { position: fixed; border: 3px solid var(--paper); background: rgba(23,20,46,.6); color: var(--paper); border-radius: 50%; width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer; }
.gal-lb-x { top: 14px; right: 14px; }
.gal-lb-prev { left: 12px; top: 50%; }
.gal-lb-next { right: 12px; top: 50%; }
.gal-lb-count { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); color: var(--paper); font-weight: 700; margin: 0; }

.school-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.school-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.school-card .ico { width: 30px; height: 30px; flex: none; color: var(--pink-text); }
.school-card span:first-of-type { display: flex; flex-direction: column; flex: 1; }
.school-card small { color: var(--body); font-weight: 600; }

.sess-where { gap: 8px; }
.sess-where .role-pick { align-items: flex-start; font-weight: 500; }
.sess-where select { margin-left: 6px; border: 2px solid var(--ink); border-radius: 10px; padding: 4px 8px; font-size: 15px; background: var(--paper-hi); }

.add-parent summary { color: var(--pink-text); font-weight: 700; }
/* people: parent-only fields show when "Parent" is picked */
form:has(select[name="role"] option[value="parent"]:checked) [data-not-parent] { display: none; }
form:has(select[name="role"] option[value="parent"]:not(:checked)) [data-parent-only] { display: none; }

.gal-lb video { max-width: 94vw; max-height: 80vh; border-radius: 12px; background: #000; display: block; }
.gal-lb-media { display: flex; justify-content: center; }
.gal-pending { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 12px; background: #FFF6EA; }
.gal-pending .ico { width: 32px; height: 32px; }
.vup-progress { display: flex; flex-direction: column; gap: 6px; }
.vup-progress .bar { height: 16px; }
.vup-progress .bar i { width: 0; transition: width .3s; }

/* charts */
.chart-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.chart-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 90px; }
.chart-card.is-hidden { opacity: .55; }
.chart-card:target { box-shadow: 0 0 0 5px var(--pink), var(--shadow); }
.chart-thumb { display: block; aspect-ratio: 16 / 10; background: var(--paper-2); border-bottom: 3px solid var(--ink); overflow: hidden; }
.chart-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .25s; }
.chart-thumb:hover img { transform: scale(1.03); }
.chart-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.chart-body h2, .chart-body p { margin: 0; }
.chart-actions { margin-top: auto !important; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chart-edit { display: grid; grid-template-columns: 64px 1fr; gap: 6px; margin-bottom: 4px; }
.chart-edit input { border: 2px solid var(--ink); border-radius: 10px; padding: 6px 8px; font-size: 15px; background: var(--paper-hi); min-width: 0; }
.chart-edit input[name=about] { grid-column: 1 / -1; }
.chart-edit .btn { grid-column: 1 / -1; justify-self: start; }
.chart-edit input[type=checkbox] { padding: 0; width: auto; }
.chart-edit .lesson-pick { grid-column: 1 / -1; }
.lesson-pick { border: 0; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-pick legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.lesson-pick legend small { font-weight: 500; color: var(--body); }
.lesson-pick label { display: inline-flex; }
.lesson-pick input { position: absolute; opacity: 0; pointer-events: none; }
.lesson-pick span { display: inline-block; padding: 4px 11px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 14px; background: var(--paper-hi); cursor: pointer; }
.lesson-pick input:checked + span { background: var(--sky); }
.lesson-pick input:focus-visible + span { outline: 3px solid var(--pink-text); outline-offset: 2px; }
.chart-toggle { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--paper-2); font-size: 15px; }
.chart-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 14px 0 10px; }
.chart-mini { padding: 0; overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.chart-mini img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 3px solid var(--ink); display: block; }
.chart-mini span { padding: 8px 12px; font-weight: 700; }
.gal-lb img[src*="/charts/"], .gal-lb img[src*="ch="] { background: #fff; }

/* admin viewing the site as someone else */
.viewas-bar { position: sticky; top: 0; z-index: 45; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; padding: 8px 16px; background: #FFD27A; border-bottom: 3px solid var(--ink); font-weight: 600; font-size: 15px; text-align: center; }
.viewas-bar .ico { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.viewas-role { color: var(--body); font-weight: 500; }
.viewas-bar button { border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: #FFD27A; font-weight: 800; padding: 5px 14px; cursor: pointer; font-size: 14px; }
.viewing-as .topbar { top: var(--viewas-h, 55px); } /* site.js measures the bar */
@media (max-width: 640px) { .viewas-bar { font-size: 14px; gap: 4px 10px; padding: 6px 12px; } .viewas-bar .viewas-role { display: none; } }

/* certificates */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 18px 0; }
.cert { display: flex; gap: 14px; padding: 14px; align-items: flex-start; color: var(--ink); }
.cert-thumb { position: relative; flex: none; width: 88px; height: 88px; border-radius: 12px; border: 2px solid var(--ink); background: #FFF1C9; display: grid; place-items: center; overflow: hidden; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cert-icon .ico { width: 44px; height: 44px; color: #B7791F; }
.cert-pdf { position: absolute; bottom: 4px; right: 4px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 5px; }
.cert-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cert-body p { margin: 0; }
.cert-award { font: 800 19px/1.15 var(--display); }
.cert-who { font-weight: 700; }
.cert-share .role-pick { font-size: 14px; }
.cert-form { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-top: 18px; }
.cert-form h3 { margin: 0; }
.section-ink .cert-form, .section-ink .cert { color: var(--ink); }
.section-ink .cert .muted { color: var(--body); }

/* phones: stack paired fields (kept last so it beats the admin rule above) */
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- explainer videos (pull-down) */
.nav-xp { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 7px 13px 7px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); color: var(--ink); font: 700 15px/1 var(--text); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, background .12s; }
.nav-xp .ico { width: 18px; height: 18px; }
.nav-xp:hover, .nav-xp[aria-expanded="true"] { background: var(--sky); transform: translateY(-1px); }
.nav-xp:focus-visible { outline: 3px solid var(--pink-text); outline-offset: 2px; }
@media (max-width: 1180px) { .nav-xp span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .nav-xp { padding: 7px 9px; } }
@media (max-width: 760px) { .nav-xp { display: none; } }
.menu-xp { display: flex; align-items: center; gap: 12px; width: 100%; margin: 6px 0 4px; padding: 12px 14px; border: 2px solid var(--paper); border-radius: 16px; background: var(--sky); color: var(--ink); font: 800 17px/1.2 var(--display); text-align: left; cursor: pointer; box-shadow: 3px 3px 0 var(--pink); }
.menu-xp .ico { width: 26px; height: 26px; flex: none; }
.menu-xp small { display: block; font: 500 13px/1.3 var(--text); color: var(--ink-2); margin-top: 2px; }
.menu-sheets { display: flex; align-items: center; gap: 12px; width: 100%; margin: 6px 0 4px; padding: 12px 14px; border: 2px solid var(--paper); border-radius: 16px; background: #FFD27A; color: var(--ink); font: 800 17px/1.2 var(--display); text-decoration: none; box-shadow: 3px 3px 0 var(--pink); }
.menu-sheets .ico { width: 26px; height: 26px; flex: none; }
.menu-sheets small { display: block; font: 500 13px/1.3 var(--text); color: var(--ink-2); margin-top: 2px; }
.menu-sheets:hover, .menu-sheets[aria-current="page"] { background: var(--paper); }
.menu-sheets:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.xp-panel { position: fixed; z-index: 65; right: max(16px, calc((100vw - var(--wrap)) / 2 + 16px)); top: 76px; width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 14px; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); opacity: 0; transform: translateY(-10px); transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.2); }
.xp-panel.is-open { opacity: 1; transform: none; }
@media (max-width: 760px) { .xp-panel { left: 12px; right: 12px; width: auto; } }
.xp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.xp-head .display-s { margin: 2px 0 0; }
.xp-x { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; }
.xp-x .ico { width: 18px; height: 18px; }
.xp-x:hover { background: var(--pink); }
.xp-sub { margin: 12px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--body); }
.xp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
/* Videos recorded in both shapes: the phone one on phones, the full-page one on bigger screens. */
@media (max-width: 700px) { .xp-only-wide { display: none; } }
@media (min-width: 701px) { .xp-only-phone { display: none; } }
.xp-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 2px solid transparent; border-radius: 16px; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.xp-item:hover, .xp-item:focus-visible { border-color: var(--ink); background: var(--paper); outline: none; box-shadow: 3px 3px 0 var(--ink); }
.xp-thumb { position: relative; flex: none; width: 116px; aspect-ratio: 16 / 9; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--paper-2); }
.xp-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.xp-thumb i { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid var(--ink); border-radius: 50%; background: var(--pink); }
.xp-thumb i .ico { width: 16px; height: 16px; margin-left: 2px; }
.xp-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.xp-txt b { font: 800 17px/1.2 var(--display); }
.xp-txt span { font-size: 14px; line-height: 1.35; color: var(--body); }
.xp-txt small { font-size: 12px; font-weight: 700; color: var(--sky-text); }
.xp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--paper-2); }
.xp-foot p { margin: 0; }
.xp-player { padding: 0; border: 3px solid var(--ink); border-radius: 20px; background: var(--ink); color: var(--paper); width: min(1100px, 94vw); max-height: 94vh; overflow: hidden; box-shadow: 8px 8px 0 var(--pink); }
.xp-player::backdrop { background: rgba(23, 20, 46, .72); backdrop-filter: blur(3px); }
.xp-player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; font: 800 18px/1.2 var(--display); }
.xp-player video { display: block; width: 100%; max-height: calc(94vh - 60px); aspect-ratio: 16 / 9; background: #000; }
.xp-player.is-tall { width: auto; }
.xp-player.is-tall video { width: auto; height: min(calc(94vh - 60px), 900px); aspect-ratio: 9 / 16; max-width: 94vw; }

/* ---------------------------------------------------------------- first-time guide (tour) */
.tour-block { position: fixed; inset: 0; z-index: 95; }
.tour-shade { position: fixed; inset: 0; z-index: 96; background: rgba(23, 20, 46, .55); }
.tour-ring { position: fixed; z-index: 96; pointer-events: none; border: 3px solid var(--pink); border-radius: 16px; box-shadow: 0 0 0 5px rgba(255, 77, 126, .35), 0 0 0 200vmax rgba(23, 20, 46, .55); transition: top .3s, left .3s, width .3s, height .3s; }
.tour-pop { position: fixed; z-index: 98; padding: 14px 18px 12px; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s; }
.tour-pop.is-in { opacity: 1; transform: none; }
.tour-count { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-text); }
.tour-title { margin: 4px 0 4px; font: 800 22px/1.15 var(--display); color: var(--ink); }
.tour-text { margin: 0 0 12px; font-size: 16px; line-height: 1.45; color: var(--body); }
.tour-btns { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-btns span { display: flex; gap: 8px; }
.tour-btns .btn[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-pop, .xp-panel { transition: none; } }
@media print { .tour, .xp-panel, .nav-xp { display: none !important; } }
.menu-tour { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 6px; padding: 10px 14px; border: 2px dashed var(--body-dark); border-radius: 16px; background: none; color: var(--paper); font: 700 16px/1.2 var(--text); text-align: left; cursor: pointer; }
.menu-tour .ico { width: 22px; height: 22px; }
.menu-tour:hover { border-color: var(--pink); color: var(--pink); }
.xp-err { margin: 0; padding: 10px 16px 14px; color: var(--paper); font-size: 15px; }
.xp-err a { color: var(--sky); }
.flash-inline { margin: 6px 0 8px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #FFE7A3; color: var(--ink); }

/* ---------- share button (top bar) */
.nav-share { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-left: 6px; padding: 0; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, background .12s; }
.nav-share .ico { width: 18px; height: 18px; }
.nav-share:hover, .nav-share[aria-expanded="true"] { background: #FFD27A; transform: translateY(-1px); }
.nav-share:focus-visible { outline: 3px solid var(--pink-text); outline-offset: 2px; }
@media (max-width: 760px) { .nav-share { width: 36px; height: 36px; margin-left: 2px; } }
.share-pop { position: fixed; z-index: 66; right: max(16px, calc((100vw - var(--wrap)) / 2 + 16px)); top: 76px; width: min(360px, calc(100vw - 24px)); padding: 14px 16px 12px; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
.share-pop[hidden] { display: none; }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.share-title { margin: 0; font: 800 20px/1.2 var(--display); }
.share-url { margin: 4px 0 10px; color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.share-app { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px; border: 0; border-radius: 14px; background: none; color: var(--ink); font: 600 12.5px/1.2 var(--text); text-decoration: none; cursor: pointer; text-align: center; }
.share-app:hover, .share-app:focus-visible { background: var(--paper-2); outline: none; }
.share-app .ico, .share-dot { width: 40px; height: 40px; border-radius: 999px; border: 2px solid var(--ink); }
.share-app .ico { padding: 8px; background: var(--sky); box-sizing: border-box; }
.share-copy .ico { background: var(--pink); }
.share-dot { display: grid; place-items: center; color: #fff; font: 800 16px/1 var(--text); }
.share-copy.is-done .ico { background: #2BB673; }
.share-pop [data-share-login] { margin: 8px 0 0; }

/* ---------- video editing (admins) */
.video-edit { border-top: 2px dashed var(--paper-2); margin: 0 18px 14px; padding-top: 8px; }
.video-edit summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; background: var(--paper-hi); }
.video-edit summary::-webkit-details-marker { display: none; }
.video-edit summary .ico { width: 15px; height: 15px; }
.video-edit[open] summary { background: #FFD27A; }
.video-edit-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.video-edit-form .field span small { font-weight: 500; color: var(--body); }
.video-edit-form .field input, .video-edit-form .field select { width: 100%; min-width: 0; }
.video-edit-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.video-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 2px 0 0; }
.video-edit-note { margin: 0; }
.video-removed { display: flex; flex-direction: column; justify-content: space-between; min-height: 160px; border-style: dashed; background: var(--paper-2); }
.video-removed-note { margin: 0; padding: 16px 18px 6px; font-size: 15px; }
.video-add { margin-top: 18px; padding: 14px 20px; }
.video-add summary { display: flex; align-items: center; gap: 8px; font: 800 20px/1.2 var(--display); cursor: pointer; list-style: none; }
.video-add summary::-webkit-details-marker { display: none; }
.video-add summary .muted { font: 500 14px var(--text); margin-left: auto; }
.video-add-form { max-width: 640px; }
.video-edit-form .field { font-size: 15px; gap: 4px; }
.video-edit-form .field input, .video-edit-form .field select { padding: 8px 10px; font-size: 15px; border-width: 2px; }

/* ---------- AI helper ("Ask", bottom right) */
.ai-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 26; height: 52px; padding: 0 18px 0 14px; display: inline-flex; align-items: center; gap: 7px; border: 3px solid var(--ink); border-radius: 999px; background: var(--sky); color: var(--ink); font: 800 17px/1 var(--display); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; transition: transform .12s; }
.ai-fab svg, .ai-icon svg, .ai-send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab:focus-visible { outline: 3px solid var(--pink-text); outline-offset: 3px; }
.ai-fab[aria-expanded="true"] { background: #FFD27A; }
html.has-ai .to-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
body:has(.room-tabs) .ai-fab, body:has(.present-bar) .ai-fab, body:has(.roll-save) .ai-fab { bottom: calc(84px + env(safe-area-inset-bottom)); }
html.has-ai body:has(.roll-save) .to-top, html.has-ai body:has(.present-bar) .to-top { bottom: calc(148px + env(safe-area-inset-bottom)); }
html.presenting .ai-fab, html.presenting .ai-panel, html.lb-open .ai-fab, html.menu-open .ai-fab, html.touring .ai-fab { display: none; }
.ai-panel { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 64; width: min(410px, calc(100vw - 24px)); height: min(620px, calc(100vh - 110px)); height: min(620px, calc(100dvh - 110px)); display: flex; flex-direction: column; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-bottom: 3px solid var(--ink); background: var(--sky); }
.ai-face { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); font: 800 13px/1 var(--display); }
.ai-head-t { flex: 1; min-width: 0; }
.ai-title { margin: 0; font: 800 18px/1.15 var(--display); }
.ai-sub { margin: 1px 0 0; font-size: 12.5px; color: var(--ink-2); }
.ai-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); color: var(--ink); cursor: pointer; }
.ai-icon svg { width: 18px; height: 18px; }
.ai-icon:hover { background: #FFD27A; }
.ai-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin-bottom: 0; }
.ai-msg ul, .ai-msg ol { margin: 4px 0 6px; padding-left: 20px; }
.ai-msg a { color: var(--sky-text); font-weight: 700; }
.ai-me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-bot { align-self: flex-start; background: var(--paper-2); color: var(--ink); border-bottom-left-radius: 4px; }
.ai-err { background: #FFE3EA; }
.ai-typing { display: inline-flex; gap: 5px; padding: 13px 15px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--body); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .15s; } .ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.ai-chips[hidden] { display: none; }
.ai-chip { padding: 6px 11px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); font: 600 13.5px/1.2 var(--text); color: var(--ink); cursor: pointer; text-align: left; }
.ai-chip:hover { background: #FFD27A; }
.ai-form { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; border-top: 2px solid var(--paper-2); }
.ai-form textarea { flex: 1; min-width: 0; resize: none; max-height: 140px; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 16px; font: 500 15.5px/1.35 var(--text); background: var(--paper); color: var(--ink); }
.ai-form textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--sky); }
.ai-send { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: var(--ink); cursor: pointer; }
.ai-send:disabled { opacity: .5; cursor: wait; }
.ai-foot { margin: 0; padding: 6px 12px 9px; font-size: 11.5px; line-height: 1.35; color: var(--body); background: var(--paper); }
.ai-foot a { color: var(--ink); }
.ai-card { align-self: stretch; padding: 12px; border: 2px solid var(--ink); border-radius: 16px; background: #FFF3C4; box-shadow: 3px 3px 0 var(--ink); }
.ai-card-why { margin: 0; font-size: 13px; color: var(--body); }
.ai-card-t { margin: 2px 0 6px; font: 800 17px/1.2 var(--display); }
.ai-card-q { width: 100%; box-sizing: border-box; resize: vertical; padding: 7px 9px; border: 2px solid var(--ink); border-radius: 10px; font: 13px/1.35 var(--text); background: var(--paper-hi); }
.ai-card-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ai-card-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); }
.ai-card-note a { color: var(--ink); font-weight: 700; }
.ai-fwd { align-self: stretch; }
.ai-fwd[hidden] { display: none; }
.ai-fwd-open { width: 100%; padding: 8px 12px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--paper); font: 700 14px var(--text); color: var(--ink); cursor: pointer; }
.ai-fwd-open[hidden] { display: none; }
.ai-fwd-form { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); }
.ai-fwd-form[hidden] { display: none; }
.ai-fwd-form p { margin: 0; }
.ai-fwd-form label { display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 13.5px; }
.ai-fwd-form small { font-weight: 500; color: var(--body); }
.ai-fwd-form input, .ai-fwd-form textarea { padding: 7px 10px; border: 2px solid var(--ink); border-radius: 10px; font: 14px var(--text); background: var(--paper-hi); }
.ai-fwd-row { display: flex; align-items: center; gap: 12px; }
.ai-fwd-ok { margin: 0; padding: 8px 12px; border-radius: 12px; background: #DDF4E6; font-weight: 700; font-size: 14px; }
@media (max-width: 600px) {
  .ai-fab { height: 48px; padding: 0 15px 0 12px; font-size: 16px; }
  .ai-panel { left: 0; right: 0; bottom: 0; width: auto; height: 86vh; height: 86dvh; border-radius: 22px 22px 0 0; border-width: 3px 0 0; box-shadow: 0 -6px 0 rgba(23, 20, 46, .15); }
  html.ai-open .ai-fab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ai-typing span { animation: none; opacity: .6; } }

/* ---------- settings and AI chats (admin) */
.settings-wrap { display: grid; gap: 22px; max-width: 900px; }
.settings-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.settings-card h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.settings-card h2 .ico { width: 26px; height: 26px; }
.settings-card .btn { align-self: flex-start; }
.settings-h { margin: 8px 0 0; font: 800 18px var(--display); }
.settings-card p { margin: 0; }
.switch-row { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--pink-text); }
.settings-table td { vertical-align: middle; }
.settings-table select { max-width: 100%; padding: 6px 8px; border: 2px solid var(--ink); border-radius: 10px; font-size: 14px; background: var(--paper-hi); }
.settings-table .tag .ico { width: 13px; height: 13px; vertical-align: -2px; }
.settings-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.settings-nums .field { font-size: 14px; }
.settings-nums small { font-weight: 500; color: var(--body); }
.settings-nums input { padding: 8px 10px; font-size: 15px; border-width: 2px; }
.settings-key { border: 2px dashed var(--paper-2); border-radius: 14px; padding: 10px 14px; }
.settings-key summary { font-weight: 700; cursor: pointer; }
.settings-key[open] { display: flex; flex-direction: column; gap: 10px; }
.settings-card .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .settings-card .row-2 { grid-template-columns: 1fr; } }
.chat-view { padding: 22px 24px; max-width: 760px; }
.chat-turns { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.row-flag td { background: #FFE3EA; }

/* ---------- support page */
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; align-items: start; }
.support-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.support-card h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.support-card h2 .ico { width: 26px; height: 26px; color: var(--pink-text); }
.support-card p { margin: 0; }
.support-card .btn .ico { width: 20px; height: 20px; }
.support-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.support-note .ico, .support-mini .ico, .ai-helper-note .ico { width: 18px; height: 18px; vertical-align: -3px; color: var(--pink-text); }
.support-mini { padding: 12px 16px; margin: 0; }
.footer-ver { opacity: .8; }
@media (max-width: 420px) { .nav:has(.nav-staff) .menu-word { display: none; } .nav:has(.nav-staff) .menu-btn { padding-right: 10px; } }

/* ---------- class openers (Charts → Ice Breakers, Finish the Sentence): projector boards */
.opener-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; margin-top: 18px; }
.opener-link { display: flex; align-items: center; gap: 18px; padding: 18px 22px; color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.opener-link:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.opener-link.tone-pink { background: #FFE3EA; }
.opener-link.tone-sky { background: #DDF1FC; }
.opener-link .del-icon { flex: none; width: 92px; height: 92px; }
.opener-link-t { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.opener-link-t strong { font: 800 26px/1.1 var(--display); }
.opener-link-t span { font-size: 15px; color: var(--ink-2); }
.opener-link-t .opener-link-n { font-size: 13px; font-weight: 700; color: var(--body); }
.opener-link .btn { flex: none; }
@media (max-width: 520px) { .opener-link { flex-wrap: wrap; } .opener-link .del-icon { width: 64px; height: 64px; } }

.opener-top { padding-bottom: 0; }
.opener-back { margin: 0 0 12px; }
.opener-back a { color: var(--ink); font-weight: 700; }
.opener-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.opener-levels { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.opener-levels label { display: inline-flex; }
.opener-levels input { position: absolute; opacity: 0; pointer-events: none; }
.opener-levels span { display: inline-flex; flex-direction: column; padding: 8px 18px 7px; border: 3px solid var(--ink); border-radius: 18px; background: var(--paper-hi); font: 800 19px/1.1 var(--display); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .1s; }
.opener-levels small { font: 600 12.5px/1.3 var(--text); color: var(--body); }
.opener-levels span:hover { transform: translateY(-1px); }
.opener-levels input:checked + span { background: var(--ink); color: var(--paper); }
.opener-levels input:checked + span small { color: var(--body-dark); }
.opener-levels input:focus-visible + span { outline: 3px solid var(--pink-text); outline-offset: 3px; }
.opener-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.opener-btns .btn .ico { width: 20px; height: 20px; }

.opener-stage { --qs: 26px; position: relative; overflow: hidden; width: min(var(--wrap), calc(100% - 32px)); margin: 22px auto 0; padding: 30px 34px 26px; background: var(--paper); border: 4px solid var(--ink); border-radius: 34px; box-shadow: 8px 8px 0 var(--ink); display: flex; flex-direction: column; gap: 22px; }
.opener-sky { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.opener-sky i { position: absolute; display: block; border-radius: 50%; opacity: .5; animation: op-float 9s ease-in-out infinite; }
.opener-sky i:nth-child(1) { width: 140px; height: 140px; background: #FFD9E3; top: -40px; left: 38%; }
.opener-sky i:nth-child(2) { width: 90px; height: 90px; background: #D6EFFC; top: 30%; right: -30px; animation-delay: -2s; }
.opener-sky i:nth-child(3) { width: 60px; height: 60px; background: #FFF1C4; bottom: 10%; left: -20px; animation-delay: -4s; }
.opener-sky i:nth-child(4) { width: 22px; height: 22px; background: var(--pink); top: 18%; left: 52%; opacity: .35; animation-delay: -1s; }
.opener-sky i:nth-child(5) { width: 16px; height: 16px; background: var(--sky); top: 62%; left: 48%; opacity: .4; animation-delay: -6s; }
.opener-sky i:nth-child(6) { width: 26px; height: 26px; border: 4px solid #FFD27A; background: none; bottom: 6%; right: 22%; opacity: .7; animation-delay: -3s; }
@keyframes op-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, -12px); } }
.opener-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.opener-kicker { display: inline-block; margin: 0 0 6px; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sky); font: 800 14px/1.2 var(--text); letter-spacing: .08em; text-transform: uppercase; }
.opener-title { margin: 0; font: 800 clamp(44px, 6.2vw, 92px)/1 var(--display); letter-spacing: -.02em; }
.opener-hand { margin: 8px 0 0; font: 700 clamp(26px, 2.6vw, 40px)/1 var(--hand); color: var(--pink-text); transform: rotate(-2deg); transform-origin: left; }
.opener-head .del-icon { flex: none; width: clamp(90px, 11vw, 170px); height: auto; }
.opener-grid { position: relative; z-index: 1; list-style: none; margin: 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px 24px; }
.opener-grid.is-blanks { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.op-card { --bg: #FFD9E3; --dot: var(--pink); position: relative; display: flex; flex-direction: column; min-height: 168px; padding: 30px 24px 22px; background: var(--bg); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 5px 5px 0 var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.op-card:nth-child(odd) { transform: rotate(-.8deg); }
.op-card:nth-child(even) { transform: rotate(.7deg); }
.op-card:hover, .op-card:focus-visible { transform: rotate(0) translate(-2px, -3px); box-shadow: 8px 8px 0 var(--ink); outline: none; }
.op-card.is-off { display: none; }
.op-card.is-hot { transform: scale(1.05) rotate(0); box-shadow: 0 0 0 6px var(--ink), 10px 10px 0 var(--ink); z-index: 2; }
.op-tone-0 { --bg: #FFD9E3; --dot: #FF4D7E; } .op-tone-1 { --bg: #D6EFFC; --dot: #3FB8F5; } .op-tone-2 { --bg: #FFF1C4; --dot: #FFD27A; }
.op-tone-3 { --bg: #DDF4E6; --dot: #2BB673; } .op-tone-4 { --bg: #E9E4FC; --dot: #9B8CF0; } .op-tone-5 { --bg: #FFE6D2; --dot: #FF9F5A; }
.op-num { position: absolute; top: -20px; left: 18px; display: grid; place-items: center; width: 46px; height: 46px; border: 3px solid var(--ink); border-radius: 50%; background: var(--dot); font: 800 22px/1 var(--display); }
.op-ico { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper-hi); }
.op-ico .ico { width: 26px; height: 26px; }
.op-tag { align-self: flex-start; margin: 0 0 8px; padding: 3px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 800 13px/1.3 var(--text); letter-spacing: .1em; text-transform: uppercase; }
.op-q { margin: 6px 52px 0 0; font: 800 var(--qs)/1.18 var(--display); color: var(--ink); letter-spacing: -.005em; }
.op-aside { display: inline-block; font-size: .72em; font-weight: 700; color: var(--ink-2); }
.op-blank { display: flex; flex-direction: column; gap: 1.1em; margin-top: auto; padding-top: 1.2em; }
.op-blank i { display: block; border-bottom: 4px dashed rgba(23, 20, 46, .3); }
.opener-foot { position: relative; z-index: 1; margin: 0; align-self: flex-end; font: 800 22px/1 var(--display); }
.opener-foot b { color: var(--pink-text); }
.opener-tips { padding-top: 18px; }
@media (max-width: 600px) { .opener-stage { padding: 22px 18px 18px; border-radius: 26px; } .opener-head .del-icon { display: none; } .opener-btns .btn { padding: 8px 14px; font-size: 15px; } }

/* Present: the board fills the screen (full screen when the browser allows it) */
.opener-stage.is-presenting { position: fixed; inset: 0; z-index: 90; width: auto; height: 100vh; height: 100dvh; margin: 0; padding: 3.2vh 3.6vw 7vh; border: 0; border-radius: 0; box-shadow: none; gap: 2vh; }
.opener-stage.is-presenting .opener-head .del-icon { width: 17vh; }
.opener-stage.is-presenting .opener-title { font-size: clamp(40px, 8.5vh, 120px); }
.opener-stage.is-presenting .opener-hand { font-size: clamp(24px, 4.4vh, 60px); }
.opener-stage.is-presenting .opener-kicker { font-size: clamp(13px, 1.8vh, 22px); }
.opener-stage.is-presenting .opener-grid { flex: 1; min-height: 0; display: flex; flex-wrap: wrap; justify-content: center; align-content: stretch; gap: 4.4vh 2.2vw; padding-top: 3vh; }
.opener-stage.is-presenting .op-card:not(.is-off) { flex: 0 0 calc((100% - (var(--cols, 3) - 1) * 2.2vw) / var(--cols, 3)); height: calc((100% - (var(--rows, 1) - 1) * 4.4vh) / var(--rows, 1)); }
.opener-stage.is-presenting .op-card { min-height: 0; padding: 4.6vh 1.8vw 2.4vh; border-width: 4px; border-radius: 3vh; }
.opener-stage.is-presenting .op-num { width: 6.4vh; height: 6.4vh; top: -3vh; font-size: 3.2vh; border-width: 4px; }
.opener-stage.is-presenting .op-ico { width: 6vh; height: 6vh; top: 1.6vh; right: 1.4vw; }
.opener-stage.is-presenting .op-ico .ico { width: 3.4vh; height: 3.4vh; }
.opener-stage.is-presenting .op-tag { font-size: 1.9vh; padding: .4vh 1.2vh; margin-bottom: 1vh; }
.opener-stage.is-presenting .op-q { margin-right: 6.4vh; }
.opener-stage.is-presenting .opener-grid:not(.is-blanks) .op-card { justify-content: center; }
.opener-stage.is-presenting .opener-grid:not(.is-blanks) .op-tag { margin-top: -1vh; }
.opener-stage.is-presenting .opener-foot { position: absolute; left: 3.6vw; bottom: 2.4vh; font-size: 2.8vh; }
.opener-stage:fullscreen { background: var(--paper); }
.opener-stage::backdrop { background: var(--paper); }
html.op-presenting, html.op-presenting body { overflow: hidden; }
html.op-presenting .ai-fab, html.op-presenting .to-top, html.op-presenting .menu-hint, html.op-presenting .ai-panel { display: none !important; }

.op-present-bar { display: none; }
.opener-stage.is-presenting .op-present-bar { position: absolute; z-index: 5; right: 2vw; bottom: 1.8vh; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; opacity: .55; transition: opacity .2s; }
.opener-stage.is-presenting .op-present-bar:hover, .opener-stage.is-presenting .op-present-bar:focus-within { opacity: 1; }
.op-present-bar button, .op-one-bar .op-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); color: var(--ink); font: 700 15px/1 var(--text); cursor: pointer; }
.op-present-bar .ico, .op-one-bar .ico { width: 17px; height: 17px; }
.op-bar-levels { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.op-bar-levels button { border: 0; border-radius: 0; }
.op-bar-levels button + button { border-left: 2px solid var(--ink); }
.op-bar-levels button.is-on { background: var(--ink); color: var(--paper); }
.op-present-bar .op-exit { background: var(--pink); }

/* One at a time: one huge question */
.op-one { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vh; padding: 5vh 5vw 4vh; background: var(--paper); }
.op-one[hidden] { display: none; }
.op-one-card { --bg: #FFD9E3; --dot: var(--pink); position: relative; display: flex; flex-direction: column; justify-content: center; width: min(1200px, 88vw); min-height: 46vh; max-height: 68vh; padding: 9vh 6vw 7vh; background: var(--bg); border: 5px solid var(--ink); border-radius: 44px; box-shadow: 12px 12px 0 var(--ink); animation: op-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.op-one-card .op-num { width: 11vh; height: 11vh; top: -5.5vh; left: 4vw; font-size: 5.6vh; border-width: 5px; }
.op-one-card .op-ico { width: 10vh; height: 10vh; top: 3vh; right: 3vw; border-width: 3px; }
.op-one-card .op-ico .ico { width: 5.6vh; height: 5.6vh; }
.op-one-card .op-tag { font-size: 2.6vh; padding: .6vh 1.8vh; margin-bottom: 2vh; }
.op-one-card .op-q { margin: 0 10vh 0 0; font-size: var(--qs-one, 7vh); line-height: 1.12; }
.op-one-card .op-blank { padding-top: 5vh; gap: 5vh; }
.op-one-card .op-blank i { border-bottom-width: 6px; }
@keyframes op-pop { from { transform: scale(.82) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
.op-one-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.op-round { display: grid; place-items: center; width: 64px; height: 64px; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper-hi); font: 800 30px/1 var(--display); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.op-round:hover { background: #FFD27A; }
.op-count { min-width: 90px; text-align: center; font: 800 26px/1 var(--display); }
.op-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.op-burst span { position: absolute; left: 50%; top: 45%; width: 14px; height: 22px; border-radius: 4px; background: var(--c); animation: op-confetti 1.1s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes op-confetti { from { transform: translate(-50%, -50%) rotate(0); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .opener-sky i, .op-one-card, .op-burst span { animation: none; }
  .op-burst { display: none; }
}

/* =====================================================================
 * Class sheets (/admin/sheets): made for a phone first, a sheet on a big screen
 * ===================================================================== */
.sheets-page .page-head .lede { font-size: 18px; margin: 0; }
.sheets-page label.role-pick { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; cursor: pointer; }
.sheets-page label.role-pick input { width: 22px; height: 22px; accent-color: var(--pink-text); }
.sheet-empty { display: flex; gap: 18px; align-items: center; padding: 20px 22px; margin-bottom: 18px; }
.sheet-empty .del-icon { width: 96px; flex: none; }
.sheet-empty h2 { margin: 0 0 6px; }
.sheet-empty p { margin: 0; }

/* the classes, as a row you can swipe */
.sheet-classes { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 -4px 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.sheet-classes a, .sheet-add-class { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; gap: 2px; min-width: 150px; max-width: 240px; padding: 10px 16px; border: 3px solid var(--ink); border-radius: 18px; background: var(--paper-hi); color: var(--ink); text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
.sheet-classes a b { font: 800 17px/1.2 var(--display); }
.sheet-classes a span { font-size: 14px; color: var(--body); }
.sheet-classes a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.sheet-classes a[aria-current="page"] span { color: var(--body-dark); }
.sheet-add-class { flex-direction: row; align-items: center; justify-content: center; gap: 6px; min-width: 0; border-style: dashed; box-shadow: none; background: transparent; font: 700 16px/1 var(--text); cursor: pointer; }
.sheet-add-class[aria-expanded="true"] { background: var(--paper-2); }

.sheet-new, .sheet-sched, .sheet-add-date, .add-student { display: flex; flex-direction: column; gap: 14px; padding: 20px; margin: 4px 0 20px; max-width: 620px; }
.sheet-new h2, .sheet-sched h3, .add-student h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.sheet-new p, .sheet-sched p, .add-student p { margin: 0; }
.sheet-new .btn, .sheet-sched .btn, .add-student .btn { align-self: flex-start; }
.sheet-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-suggest .chip { cursor: pointer; font-family: var(--text); color: var(--ink); }
.sheet-suggest .chip.is-on { background: #FFD27A; }
.sheet-add-date { flex-direction: row; flex-wrap: wrap; align-items: flex-end; margin-top: 0; }
.sheet-add-date .field { flex: 1 1 200px; }

.sheet-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin: 6px 0 12px; }
.sheet-title { font: 800 clamp(26px, 6vw, 36px)/1.05 var(--display); letter-spacing: -.01em; margin: 0 0 4px; }
.sheet-head p { margin: 0; }
.sheet-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sheet-dl-lab { font-size: 14px; font-weight: 700; color: var(--body); }

/* Attendance · About me · Students: stays under the top bar */
.sheet-tabs { position: sticky; top: 71px; z-index: 12; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 0 0 16px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper-hi); box-shadow: 3px 3px 0 var(--ink); }
.sheet-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 700 16px/1.1 var(--text); cursor: pointer; }
.sheet-tabs button .ico { width: 19px; height: 19px; }
.sheet-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.sheet-tabs button:focus-visible { outline: 3px solid var(--sky); outline-offset: 1px; }
.sheet-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: 13px; font-weight: 800; }
.sheet-tabs button[aria-selected="true"] .sheet-n { background: var(--pink); }
html:has(.viewas-bar) .sheet-tabs { top: 112px; }

/* the class days, as a strip you can swipe */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 -4px 4px; -webkit-overflow-scrolling: touch; }
.day-chip { position: relative; flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 0 7px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper-hi); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; line-height: 1.25; }
.day-chip b { font: 800 24px/1.05 var(--display); }
.day-chip i { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 0 6px; border-radius: 999px; background: var(--pink); color: var(--ink); font: 700 11px/16px var(--text); font-style: normal; }
.day-chip.is-on { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--pink); }
.day-chip.is-future { border-style: dashed; }
.day-chip.is-off { opacity: .55; background: repeating-linear-gradient(-45deg, var(--paper-hi) 0 6px, var(--paper-2) 6px 12px); }
.day-chip.is-off.is-on { opacity: 1; background: var(--ink-2); }
.day-chip.is-off i { background: var(--paper-2); }
.day-add { justify-content: center; gap: 2px; cursor: pointer; border-style: dashed; background: transparent; font: 600 13px/1.2 var(--text); }

.day-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin: 4px 0 12px; box-shadow: 4px 4px 0 var(--ink); }
.day-head h3 { font: 800 21px/1.15 var(--display); margin: 0 0 6px; }
.day-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.dc { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; border: 2px solid var(--ink); font-size: 13px; font-weight: 600; background: var(--paper-hi); }
.dc b { font-size: 15px; }
.dc-present { background: #CDEFDD; }
.dc-late { background: #FFE7B3; }
.dc-absent { background: #FFD3DF; }
.dc-excused { background: #D3EEFC; }
.dc.is-zero { opacity: .45; }
.dc-none:not(.is-zero) { background: #FFD27A; }
.day-head [data-all-present][disabled] { opacity: .45; pointer-events: none; }
.day-head-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sheet-off { padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-off p { margin: 0; }

/* one card per student, four big buttons */
.sh-roll { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.sh-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 10px 14px; border: 3px solid var(--ink); border-left-width: 8px; border-radius: 18px; background: var(--paper-hi); transition: background-color .15s, border-color .15s; }
.sh-row[data-status="present"] { background: #EAF8F0; border-left-color: #2BB673; }
.sh-row[data-status="late"] { background: #FFF4DC; border-left-color: #F4B63F; }
.sh-row[data-status="absent"] { background: #FFE9EF; border-left-color: var(--pink); }
.sh-row[data-status="excused"] { background: #E9F6FE; border-left-color: var(--sky); }
.sh-who { min-width: 0; display: flex; flex-direction: column; }
.sh-who b { font-size: 18px; line-height: 1.2; }
.sh-who > span { font-size: 13px; color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Phones on the attendance list: tap to call, WhatsApp, add or fix in place */
.sh-phone { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 5px; }
.sh-phone:empty { display: none; }
.sh-phone.is-saving { opacity: .55; }
.sh-tel { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; padding: 3px 12px 3px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); }
.sh-tel .ico { width: 16px; height: 16px; }
.sh-tel span { font-size: inherit; color: inherit; direction: ltr; unicode-bidi: isolate; }
.sh-wa { font-size: 14px; font-weight: 700; color: #0E7A3E; }
.sh-ph-edit { display: inline-flex; border: 0; background: none; padding: 6px; margin: -6px 0; color: var(--body); cursor: pointer; border-radius: 8px; }
.sh-ph-edit .ico { width: 17px; height: 17px; }
.sh-ph-edit:hover, .sh-ph-edit:focus-visible { color: var(--ink); background: var(--paper-2); }
.sh-ph-add { display: inline-flex; align-items: center; gap: 4px; font: 700 14px/1 var(--text); color: var(--body); background: transparent; border: 2px dashed currentColor; border-radius: 999px; padding: 5px 12px 5px 8px; cursor: pointer; }
.sh-ph-add .ico { width: 15px; height: 15px; }
.sh-ph-add:hover, .sh-ph-add:focus-visible { color: var(--ink); background: var(--paper); }
.sh-ph-form { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 340px; }
.sh-ph-form input { flex: 1 1 auto; min-width: 0; font: 600 17px/1.2 var(--text); padding: 8px 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper-hi); color: var(--ink); direction: ltr; }
.sh-ph-form input:focus { outline: none; box-shadow: 0 0 0 3px var(--sky); }
.sh-ph-form input.is-bad { border-color: var(--pink-text); background: #FFE9EF; }
.sh-ph-ok { flex: none; font: 700 14px/1 var(--text); padding: 10px 14px; border-radius: 999px; border: 2px solid var(--ink); background: var(--pink); color: var(--ink); cursor: pointer; }
.sh-ph-x { flex: none; font: 700 20px/1 var(--text); width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--body); cursor: pointer; }
.sh-ph-x:hover { background: var(--paper-2); color: var(--ink); }
.sh-phones { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 10px; padding: 8px 10px 8px 14px; border: 2px dashed var(--body); border-radius: 16px; font-size: 15px; }
.sh-phones > span { display: inline-flex; align-items: center; gap: 6px; }
.sh-phones .ico { width: 18px; height: 18px; }
.sh-phones.is-collecting { background: #FFF4DC; border: 2px solid var(--ink); position: sticky; top: 138px; z-index: 11; /* under the sticky tabs */ box-shadow: 3px 3px 0 var(--ink); }
.stu-phone { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--body); }
.stu-phone .ico { width: 16px; height: 16px; }
.stu-phone input { font: 600 16px/1.2 var(--text); color: var(--ink); width: 210px; max-width: 100%; padding: 5px 8px; border: 2px solid var(--paper-2); border-radius: 10px; background: transparent; direction: ltr; }
.stu-phone input:focus { outline: none; border-color: var(--ink); background: var(--paper); box-shadow: 0 0 0 3px var(--sky); }
.stu-phone input.is-saving { opacity: .6; }
.stu-phone input.is-saved { border-color: #2BB673; background: #EAF8F0; }
.stu-phone input.is-bad { border-color: var(--pink-text); background: #FFE9EF; }
.stu-tel, .roll-tel { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.stu-tel .ico, .roll-tel .ico { width: 14px; height: 14px; }
.sh-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 6px 2px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper-hi); color: var(--ink); font: 700 13px/1.1 var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform .08s; }
.rb .ico { width: 20px; height: 20px; }
.rb:active { transform: scale(.94); }
.rb:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.rb[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.rb-present[aria-pressed="true"] { background: #2BB673; color: #fff; }
.rb-late[aria-pressed="true"] { background: #FFD27A; }
.rb-absent[aria-pressed="true"] { background: var(--pink); }
.rb-excused[aria-pressed="true"] { background: var(--sky); }
.rb[disabled] { cursor: default; opacity: .7; }
.rb[disabled][aria-pressed="false"] { opacity: .35; }
@media (min-width: 700px) {
  .sh-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
  .sh-btns { flex: none; width: 400px; }
  .rb { flex-direction: row; gap: 6px; min-height: 46px; font-size: 14px; }
}

/* the whole sheet */
.sheet-grid, .sheet-more { margin: 0 0 14px; border: 3px solid var(--ink); border-radius: 18px; background: var(--paper-hi); }
.sheet-grid > summary, .sheet-more > summary { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 44px 12px 16px; cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; }
.sheet-grid > summary::-webkit-details-marker, .sheet-more > summary::-webkit-details-marker { display: none; }
.sheet-grid > summary::after, .sheet-more > summary::after { content: '▾'; position: absolute; right: 18px; top: 12px; transition: transform .2s; }
.sheet-grid[open] > summary::after, .sheet-more[open] > summary::after { transform: rotate(180deg); }
.sheet-grid > summary .small { font-weight: 500; flex-basis: 100%; }
.sheet-grid > p, .sheet-more > p { margin: 8px 16px 14px; }
.sheet-more { background: transparent; border-width: 2px; border-style: dashed; }
.sheet-more > summary { font-size: 15px; }
.sheet-more form { padding: 0 16px; margin: 0 0 12px; }
.sheet-more .stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sheet-more .row-2 { width: 100%; }
.grid-scroll { overflow-x: auto; margin: 0 8px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.att-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.att-grid th, .att-grid td { padding: 3px; text-align: center; border-bottom: 1px solid var(--paper-2); }
.att-grid thead th { font-weight: 700; line-height: 1.2; padding: 6px 3px; white-space: nowrap; color: var(--body); }
.att-grid thead th.is-day { color: var(--ink); background: #FFE7B3; border-radius: 10px 10px 0 0; }
.att-grid tbody th { position: sticky; left: 0; z-index: 1; background: var(--paper-hi); text-align: left; font-size: 14px; font-weight: 600; padding-right: 10px; min-width: 110px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 2px 0 0 var(--paper-2); }
.att-grid thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--paper-hi); text-align: left; }
.gc { width: 36px; height: 36px; border: 2px solid var(--paper-2); border-radius: 10px; background: var(--paper); color: var(--ink); font: 800 15px/1 var(--display); cursor: pointer; touch-action: manipulation; }
.gc:focus-visible { outline: 3px solid var(--sky); outline-offset: 1px; }
.gc-present { background: #2BB673; border-color: #2BB673; color: #fff; }
.gc-late { background: #FFD27A; border-color: #F4B63F; }
.gc-absent { background: var(--pink); border-color: var(--pink); }
.gc-excused { background: var(--sky); border-color: var(--sky); }
.gc[disabled] { cursor: default; }
.gc-pct { font-weight: 800; min-width: 48px; }

/* About me: cards on a phone, a sheet on a big screen */
.about-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.about-find { flex: 1 1 200px; max-width: 320px; border: 2px solid var(--ink); border-radius: 999px; padding: 9px 16px; font-size: 16px; background: var(--paper-hi); }
.about-sheet { display: grid; gap: 12px; margin-bottom: 20px; }
.about-headrow { display: none; }
.about-row.card { padding: 12px 14px 14px; box-shadow: 4px 4px 0 var(--ink); display: grid; grid-template-columns: 1fr; gap: 8px; }
.about-row[hidden] { display: none; }
.about-who { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.about-who b { font: 800 19px/1.2 var(--display); }
.about-saved { font-size: 13px; font-weight: 700; color: var(--body); }
.about-saved.is-ok { color: #1E8A55; }
.about-saved.is-bad { color: var(--pink-text); }
.about-cell { display: flex; flex-direction: column; gap: 3px; }
.about-lab { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--body); }
.about-lab .ico { width: 16px; height: 16px; }
.about-cell textarea { width: 100%; min-height: 44px; resize: none; overflow: hidden; border: 2px solid var(--paper-2); border-radius: 12px; padding: 9px 11px; background: var(--paper); color: var(--ink); font: 400 16px/1.35 var(--text); }
.about-cell textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--sky); background: var(--paper-hi); }
.about-cell textarea.is-dirty { border-color: #F4B63F; }
.about-cell textarea[readonly] { background: transparent; border-style: dashed; }
@media (min-width: 560px) and (max-width: 1023px) {
  .about-row.card { grid-template-columns: 1fr 1fr; }
  .about-who { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .about-sheet { gap: 0; border: 3px solid var(--ink); border-radius: 18px; overflow: clip; background: var(--paper-hi); box-shadow: var(--shadow); }
  .about-headrow, .about-row.card { display: grid; grid-template-columns: minmax(150px, 1fr) repeat(4, minmax(0, 1.25fr)); gap: 0; align-items: stretch; }
  .about-headrow { position: sticky; top: 129px; z-index: 2; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px; }
  .about-headrow span { padding: 10px 12px; }
  .about-row.card { padding: 0; border: 0; border-top: 1px solid var(--paper-2); border-radius: 0; box-shadow: none; }
  .about-row.card:nth-child(odd) { background: #FFFAF1; }
  .about-who { flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12px; }
  .about-who b { font: 700 16px/1.25 var(--text); }
  .about-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .about-cell { border-left: 1px solid var(--paper-2); padding: 4px; }
  .about-cell textarea { border-color: transparent; background: transparent; font-size: 15px; min-height: 40px; }
  .about-cell textarea:hover { border-color: var(--paper-2); }
}

/* Students */
.add-list { margin: 0 0 20px; max-width: 620px; padding: 0; }
.add-list > summary { padding: 14px 20px; font-weight: 700; cursor: pointer; }
.add-list form { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.add-list .field { width: 100%; }
.add-list textarea { min-height: 120px; }
.stu-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.stu-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 14px; box-shadow: 4px 4px 0 var(--ink); }
.stu-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.stu-name { font: 700 18px/1.2 var(--text); color: var(--ink); border: 2px solid transparent; border-radius: 10px; padding: 4px 8px; margin-left: -10px; background: transparent; width: 100%; max-width: 360px; }
.stu-name:hover { border-color: var(--paper-2); }
.stu-name:focus { outline: none; border-color: var(--ink); background: var(--paper); box-shadow: 0 0 0 3px var(--sky); }
.stu-name.is-saving { opacity: .6; }
.stu-name.is-saved { border-color: #2BB673; background: #EAF8F0; }
.stu-email { font-size: 14px; color: var(--body); overflow-wrap: anywhere; }
.stu-seen { color: var(--body); font-size: 13px; }
.stu-acts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.stu-acts form { margin: 0; }
.stu-acts .linkish { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; min-height: 36px; }
.stu-acts .ico { width: 17px; height: 17px; }
.stu-fix[open] { flex-basis: 100%; }
.stu-fix > summary { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; min-height: 36px; list-style: none; cursor: pointer; }
.stu-fix > summary::-webkit-details-marker { display: none; }
.stu-fix form { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 6px 0 4px; padding: 12px; border: 2px dashed var(--paper-2); border-radius: 14px; max-width: 420px; }
.stu-fix .field { width: 100%; }

/* saved / not saved */
.sheet-toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 80; max-width: min(92vw, 460px); margin: 0; padding: 11px 18px; border: 3px solid var(--ink); border-radius: 16px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; box-shadow: 3px 3px 0 var(--pink); transform: translate(-50%, 160%); opacity: 0; transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), opacity .2s; pointer-events: none; }
.sheet-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.sheet-toast.is-bad { background: #FFD3DF; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }

@media (max-width: 760px) {
  .sheets-page .page-head { padding: 22px 0 18px; }
  .sheets-page .page-head h1 { font-size: 34px; margin-bottom: 6px; }
  .sheets-page .page-head .lede { font-size: 16px; }
  .sheets-page .admin-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 14px; padding: 0 20px 6px; -webkit-overflow-scrolling: touch; }
  .sheets-page .admin-tabs a { flex: none; }
  .sheets-page .section-tight { padding-top: 18px; }
  .sheet-tabs button { font-size: 15px; gap: 4px; padding: 6px 4px; }
  .sheet-tabs button .ico { display: none; }
  .sheet-dl { gap: 6px; }
  .sheet-dl .btn-sm { padding: 7px 12px; font-size: 14px; gap: 6px; }
  .sheet-dl .btn .ico { width: 17px; height: 17px; }
  .sheet-empty { flex-direction: column; text-align: center; }
  .sheet-new .row-2, .sheet-sched .row-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) { .sheet-tabs button { font-size: 14px; } .rb { font-size: 12px; } }
@media (max-width: 760px) { .sheets-page .menu-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .sheet-toast { transition: none; } }

/* ---------- Rules of procedure: the student guide (/rules-of-procedure) */
.rop-page { --rop-pink: #FFE3EA; --rop-sky: #DDF1FC; --rop-sun: #FFF1C2; --rop-mint: #DFF5E8; --rop-lilac: #ECE5FF; }
.rop-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rop-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.rop-jump a:hover, .rop-jump a:focus-visible { background: var(--sky); }
.rop-jump b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 14px; }
.rop-wrap { max-width: 920px; }
.rop-sec { scroll-margin-top: 70px; }
.rop-kicker { font-weight: 800; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--pink-text); margin: 0 0 6px; }
.rop-h { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 2.6vw, 28px); text-transform: uppercase; letter-spacing: .01em; margin: 38px 0 10px; display: flex; align-items: center; gap: 10px; scroll-margin-top: 80px; }
.rop-h .ico { width: 26px; height: 26px; color: var(--pink-text); }
.rop-n { color: var(--pink-text); }
.rop-sub { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 0 0 4px; }
.rop-p { font-size: 19px; line-height: 1.55; max-width: 66ch; margin: 0 0 12px; }
.rop-label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--body); }
.rop-label .ico { width: 18px; height: 18px; color: var(--pink-text); }
.rop-box { margin: 14px 0 6px; padding: 16px 20px; border: 3px solid var(--ink); border-radius: 20px; background: var(--paper-hi); box-shadow: 4px 4px 0 var(--ink); font-size: 18px; line-height: 1.5; }
.section-alt .rop-box { background: var(--paper-hi); }
.rop-box > p:last-child { margin-bottom: 0; }
.rop-box-big { display: flex; align-items: center; gap: 16px; margin-top: 22px; background: var(--rop-sun); font-size: clamp(19px, 2.2vw, 23px); }
.rop-box-big .ico { width: 44px; height: 44px; flex: none; color: var(--ink); }
.rop-box-big p { margin: 0; }
/* "Say this": a speech bubble with the words to say */
.rop-say { position: relative; margin: 14px 0 22px; padding: 16px 20px 18px; border: 3px solid var(--ink); border-radius: 22px 22px 22px 6px; background: var(--rop-pink); box-shadow: 4px 4px 0 var(--ink); }
.rop-say .rop-label { color: var(--pink-text); }
.rop-line { margin: 0; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.4; font-weight: 600; }
.rop-fill { background: var(--rop-sun); color: var(--ink); font-weight: 800; padding: 0 5px; border-radius: 6px; border: 2px dashed var(--ink); white-space: nowrap; }
.rop-example { font-size: 18px; line-height: 1.5; padding: 10px 16px; border-left: 6px solid var(--sky); background: var(--paper-hi); border-radius: 0 14px 14px 0; max-width: 72ch; }
/* the day at a glance */
.rop-steps { list-style: none; margin: 24px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.rop-step { position: relative; }
.rop-step + .rop-step::before { content: ""; position: absolute; left: 50%; top: -20px; width: 3px; height: 18px; background: var(--ink); }
.rop-step + .rop-step::after { content: ""; position: absolute; left: calc(50% - 6px); top: -8px; border: 7px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.rop-step a { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; padding: 14px 18px; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); color: var(--ink); text-decoration: none; background: var(--paper-hi); transition: transform .12s, box-shadow .12s; }
.rop-step a:hover, .rop-step a:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.rop-num { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--ink); color: var(--paper); font-family: var(--display); font-weight: 800; font-size: 26px; }
.rop-step-t { display: flex; flex-direction: column; gap: 3px; }
.rop-step-t b { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: .01em; }
.rop-step-t span { font-size: 17px; line-height: 1.45; }
.rop-go { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.rop-step.tone-pink a, .rop-point.tone-pink, .rop-diff-c.tone-pink, .rop-part.tone-pink .rop-tag { background: var(--rop-pink); }
.rop-step.tone-sky a, .rop-point.tone-sky, .rop-diff-c.tone-sky, .rop-part.tone-sky .rop-tag { background: var(--rop-sky); }
.rop-step.tone-sun a, .rop-point.tone-sun, .rop-part.tone-sun .rop-tag { background: var(--rop-sun); }
.rop-step.tone-mint a, .rop-point.tone-mint { background: var(--rop-mint); }
.rop-step.tone-lilac a { background: var(--rop-lilac); }
/* speaking */
.rop-ticks { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.rop-ticks li { position: relative; padding-left: 36px; font-size: 18px; line-height: 1.5; }
.rop-ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317142E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 16px no-repeat; border: 2px solid var(--ink); }
.rop-boost { display: flex; align-items: center; gap: 18px; margin-top: 34px; padding: 6px 22px 18px; border: 3px solid var(--ink); border-radius: 24px; background: var(--rop-sun); box-shadow: 5px 5px 0 var(--ink); font-size: 18px; line-height: 1.55; }
.rop-boost .rop-h { margin-top: 16px; }
.rop-boost p { margin: 0 0 10px; }
.rop-boat { width: 110px; flex: none; color: var(--ink); }
/* caucuses */
.rop-formula { margin: 16px 0 6px; }
.rop-formula ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: f; }
.rop-formula li { counter-increment: f; position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border: 3px solid var(--ink); border-radius: 18px; background: var(--rop-sky); box-shadow: 4px 4px 0 var(--ink); font-size: 17px; }
.rop-formula li::after { content: counter(f); position: absolute; top: 10px; right: 12px; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--ink); opacity: .2; }
.rop-formula li .ico { width: 28px; height: 28px; }
.rop-formula li b { font-family: var(--display); font-size: 22px; }
.rop-formula li span { color: var(--body); }
.rop-formula-1 ol { grid-template-columns: 1fr; }
.rop-formula-1 li { flex-direction: row; align-items: center; gap: 12px; background: var(--rop-mint); }
.rop-formula-1 li::after { display: none; }
.rop-formula-1 li span { color: var(--ink); font-size: 19px; }
.rop-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rop-diff-c { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); }
.rop-diff-c b { font-family: var(--display); font-size: 34px; line-height: 1; }
.rop-diff-c span { font-size: 19px; font-weight: 600; }
/* cheat sheet */
.rop-words { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 0; }
.rop-words > div { padding: 12px 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper-hi); }
.rop-words dt { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--pink-text); }
.rop-words dd { margin: 2px 0 0; font-size: 17px; line-height: 1.45; }
.rop-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.rop-point { padding: 16px 18px; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); }
.rop-point h4 { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: .02em; margin: 0 0 6px; }
.rop-point p { margin: 0 0 8px; font-size: 17px; line-height: 1.45; }
.rop-quote { position: relative; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--paper-hi); border: 2px solid var(--ink); font-weight: 600; margin: 0 !important; }
/* resolutions */
.rop-three { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 10px; counter-reset: t; }
.rop-three li { counter-increment: t; display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper-hi); font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.rop-three li::before { content: counter(t); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pink); font-family: var(--display); font-weight: 800; }
.rop-header { margin: 0; display: grid; gap: 4px; }
.rop-header > div { display: flex; flex-wrap: wrap; gap: 6px; }
.rop-header dt { font-weight: 800; }
.rop-header dd { margin: 0; }
.rop-clause { margin: 0; padding-left: 26px; font-size: 18px; line-height: 1.55; }
.rop-clause ol { padding-left: 26px; margin: 4px 0 0; }
.rop-anatomy { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.rop-part { display: grid; grid-template-columns: 210px 1fr; gap: 0; border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; background: var(--paper-hi); }
.rop-tag { margin: 0; padding: 14px 16px; border-right: 3px solid var(--ink); font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1.25; display: flex; align-items: center; }
.rop-paper { padding: 14px 18px; font-family: Georgia, 'Times New Roman', serif; font-size: 17px; line-height: 1.5; }
.rop-paper p { margin: 0 0 4px; }
.rop-paper .rop-clause { font-size: 17px; }
.rop-more { margin-top: 30px; padding-top: 18px; border-top: 3px dashed var(--paper-2); }
.rop-more p:last-child { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rop-more a { padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-hi); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.rop-more a:hover, .rop-more a:focus-visible { background: var(--sky); }
@media (max-width: 760px) {
  .rop-formula ol, .rop-diff, .rop-words, .rop-points { grid-template-columns: 1fr; }
  .rop-step a { grid-template-columns: 48px 1fr; gap: 12px; padding: 12px 14px; }
  .rop-go { display: none; }
  .rop-num { width: 46px; height: 46px; font-size: 21px; border-radius: 13px; }
  .rop-step-t b { font-size: 18px; }
  .rop-step-t span { font-size: 16px; }
  .rop-part { grid-template-columns: 1fr; }
  .rop-tag { border-right: 0; border-bottom: 3px solid var(--ink); padding: 10px 14px; font-size: 16px; }
  .rop-boost { flex-direction: column; align-items: flex-start; }
  .rop-boat { width: 80px; align-self: flex-end; margin-top: -10px; }
  .rop-fill { white-space: normal; }
}
html.presenting .rop-jump { display: none; }
/* Charts page and lessons: the way in */
.rop-feature { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px 22px; text-decoration: none; color: var(--ink); background: var(--rop-sun, #FFF1C2); }
.rop-feature .del-icon { width: 92px; height: 92px; }
.rop-feature strong { display: block; font-family: var(--display); font-size: 26px; line-height: 1.15; }
.rop-feature span { color: var(--body); font-size: 17px; }
.rop-feature:hover .btn, .rop-feature:focus-visible .btn { background: var(--pink); }
.rop-lesson-link { margin: 26px 0 0; max-width: 900px; }
@media (max-width: 640px) { .rop-feature { grid-template-columns: 1fr; } .rop-feature .del-icon { width: 72px; height: 72px; } }
@media print {
  .rop-page .topbar, .rop-page .footer, .rop-page .skip, .rop-page .to-top, .rop-page .ai-fab, .rop-page .head-actions, .rop-page .rop-jump, .rop-page .rop-more, .rop-page .present-bar, .rop-page .page-head .del-icon { display: none !important; }
  .rop-page, .rop-page main, .rop-page .section-alt, .rop-page .page-head { background: #fff !important; border: 0 !important; }
  .rop-page { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rop-page .page-head { padding: 0 0 6px; }
  .rop-page .rop-sec { break-before: page; padding: 0; }
  .rop-page #glance { break-before: auto; }
  .rop-page .rop-box, .rop-page .rop-say, .rop-page .rop-step a, .rop-page .rop-formula li, .rop-page .rop-diff-c, .rop-page .rop-point, .rop-page .rop-boost { box-shadow: none; break-inside: avoid; }
  .rop-page .rop-part, .rop-page .rop-words > div { break-inside: avoid; }
  /* about one printed page per part, like the handout */
  @page { size: A4; margin: 12mm; }
  .rop-page .wrap { max-width: none; padding: 0; }
  .rop-page .display-l { font-size: 30px; }
  .rop-page .display-m { font-size: 24px; }
  .rop-page .lede { font-size: 13px; margin-top: 4px; }
  .rop-page .rop-kicker { font-size: 10px; margin-bottom: 2px; }
  .rop-page .rop-h { font-size: 15px; margin: 14px 0 4px; }
  .rop-page .rop-h .ico { width: 16px; height: 16px; }
  .rop-page .rop-sub { font-size: 14px; }
  .rop-page .rop-p, .rop-page .rop-ticks li, .rop-page .rop-box, .rop-page .rop-example, .rop-page .rop-words dd, .rop-page .rop-point p, .rop-page .rop-clause, .rop-page .rop-paper, .rop-page .rop-paper .rop-clause, .rop-page .rop-formula li, .rop-page .rop-boost, .rop-page .rop-header { font-size: 12px; line-height: 1.4; }
  .rop-page .rop-p { margin-bottom: 6px; }
  .rop-page .rop-label { font-size: 9px; margin-bottom: 2px; }
  .rop-page .rop-label .ico { width: 12px; height: 12px; }
  .rop-page .rop-line { font-size: 15px; }
  .rop-page .rop-box, .rop-page .rop-say { padding: 7px 12px; margin: 8px 0; border-width: 2px; border-radius: 12px; }
  .rop-page .rop-box-big { font-size: 14px; }
  .rop-page .rop-box-big .ico { width: 24px; height: 24px; }
  .rop-page .rop-steps { gap: 12px; margin: 10px 0 6px; }
  .rop-page .rop-step a { grid-template-columns: 38px 1fr; gap: 10px; padding: 6px 10px; border-width: 2px; border-radius: 12px; }
  .rop-page .rop-go { display: none; }
  .rop-page .rop-num { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
  .rop-page .rop-step-t b { font-size: 13px; }
  .rop-page .rop-step-t span { font-size: 12px; }
  .rop-page .rop-step + .rop-step::before { top: -11px; height: 9px; }
  .rop-page .rop-step + .rop-step::after { top: -5px; border-width: 5px; left: calc(50% - 4px); }
  .rop-page .rop-ticks li { padding-left: 24px; }
  .rop-page .rop-ticks li::before { width: 16px; height: 16px; background-size: 11px; top: 1px; }
  .rop-page .rop-boost { margin-top: 12px; padding: 2px 14px 8px; border-width: 2px; }
  .rop-page .rop-boost .rop-h { margin-top: 8px; }
  .rop-page .rop-boat { width: 60px; }
  .rop-page .rop-formula { margin: 8px 0 4px; }
  .rop-page .rop-formula ol { gap: 8px; }
  .rop-page .rop-formula li { padding: 7px 10px; border-width: 2px; border-radius: 12px; }
  .rop-page .rop-formula li b { font-size: 14px; }
  .rop-page .rop-formula li .ico { width: 16px; height: 16px; }
  .rop-page .rop-formula li::after { font-size: 18px; }
  .rop-page .rop-formula-1 li span { font-size: 12px; }
  .rop-page .rop-example { padding: 5px 10px; }
  .rop-page .rop-diff { gap: 8px; }
  .rop-page .rop-diff-c { padding: 8px 12px; border-width: 2px; border-radius: 12px; }
  .rop-page .rop-diff-c b { font-size: 18px; }
  .rop-page .rop-diff-c span { font-size: 12px; }
  .rop-page .rop-words { gap: 6px; }
  .rop-page .rop-words > div { padding: 5px 10px; border-radius: 10px; }
  .rop-page .rop-words dt { font-size: 13px; }
  .rop-page .rop-points { gap: 8px; margin-bottom: 8px; }
  .rop-page .rop-point { padding: 7px 10px; border-width: 2px; border-radius: 12px; }
  .rop-page .rop-point h4 { font-size: 12px; margin-bottom: 2px; }
  .rop-page .rop-point p { margin-bottom: 4px; }
  .rop-page .rop-quote { padding: 4px 8px; border-width: 1.5px; }
  .rop-page .rop-three { gap: 6px; }
  .rop-page .rop-three li { font-size: 11px; padding: 3px 10px 3px 3px; border-width: 2px; }
  .rop-page .rop-three li::before { width: 20px; height: 20px; font-size: 11px; }
  .rop-page .rop-anatomy { gap: 6px; }
  .rop-page .rop-part { grid-template-columns: 150px 1fr; border-width: 2px; border-radius: 12px; }
  .rop-page .rop-tag { font-size: 12px; padding: 6px 10px; border-right-width: 2px; }
  .rop-page .rop-paper { padding: 6px 12px; }
  .rop-page .rop-fill { border-width: 1.5px; padding: 0 3px; }
  .rop-page .rop-sec .rop-wrap { zoom: 1.18; }
}
