/* =========================================================
   AttainIQ — design tokens + shared components
   Warm neutral surfaces, soft rounded cards, dark/periwinkle pill buttons
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&family=Anton&family=Playfair+Display:wght@500;700;800&family=Caveat:wght@500;700&family=Space+Mono:wght@400;700&family=Tinos:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  --bg: #ffffff;
  --surface: #f3efea;
  --surface-2: #faf8f5;
  --surface-3: #e9e4dc;
  --ink: #1e1c19;
  --muted: #6e6a64;
  --line: #e6e1d9;
  --accent: #5a5ee6;
  --accent-hover: #4b4fd8;
  --accent-soft: #eceaff;
  --green: #3f7d4e;
  --ok: #2f8f57;
  --bad: #d8463f;
  --warn: #a8690f;
  --warn-bg: #fff3dc;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 28, 25, .04), 0 8px 24px rgba(30, 28, 25, .06);
  --shadow-lg: 0 18px 50px rgba(30, 28, 25, .16);
  --c0: #ee6b5f; --c1: #5a5ee6; --c2: #eea935; --c3: #4c9a62;
  --c4: #8e8ae8; --c5: #2f9fb0; --c6: #e05a95; --c7: #5e6378;
  --tint-beige: #efe9e2; --tint-lavender: #eceaff; --tint-rose: #fbe8e5; --tint-sage: #e4efe4; --tint-sky: #e5edfb;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0 0 .6em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
code { background: var(--surface); padding: .1em .35em; border-radius: 6px; font-size: .9em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 1px solid var(--line); background: var(--bg); padding: .62em 1.15em;
  border-radius: 999px; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .06s ease, background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn:hover { background: var(--surface-2); border-color: #d6d0c6; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: #33302b; }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-hover); }
.btn.green { background: var(--green); color: #fff; border-color: var(--green); }
.btn.soft { background: var(--surface); border-color: var(--surface); }
.btn.soft:hover { background: var(--surface-3); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { color: var(--bad); }
.btn.big { font-size: 1.06rem; padding: .8em 1.5em; }
.btn.small { padding: .38em .8em; font-size: .88rem; font-weight: 500; }
.btn.icon { width: 40px; height: 40px; padding: 0; flex: none; }
.circle-arrow {
  width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center;
  background: transparent; cursor: pointer; transition: background .15s, color .15s; flex: none;
}
.circle-arrow:hover, .hero-card:hover .circle-arrow { background: var(--ink); color: #fff; }

/* ---------- form fields ---------- */
input[type=text], input[type=number], input[type=password], input[type=search], input[type=email], input[type=url], select, textarea {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .62em .8em; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
label { font-size: .85rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: .35em; }
.toggle { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; font-weight: 500; color: var(--ink); cursor: pointer; margin: 0 0 12px; }
.toggle input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle small { display: block; color: var(--muted); font-weight: 400; font-size: .84rem; margin-top: 2px; }

/* ---------- utilities ---------- */
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.badge { display: inline-flex; align-items: center; gap: .3em; font-size: .72rem; font-weight: 700; padding: .22em .62em; border-radius: 999px; background: var(--accent); color: #fff; letter-spacing: .01em; }
.badge.soft { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.ok { background: #e3f3e8; color: var(--ok); }
.badge.grey { background: var(--surface); color: var(--muted); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: .75em 1.2em; border-radius: 999px; z-index: 200; max-width: 92vw; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-weight: 500;
}
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { border: 1.5px dashed var(--line); border-radius: var(--radius-lg); padding: 46px 20px; text-align: center; color: var(--muted); }

/* ---------- logo (original AttainIQ mark) ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; display: inline-grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; flex: none; }
.logo-mark i { display: block; border-radius: 4px; }
.logo-mark i:nth-child(1) { background: var(--c0); border-radius: 50% 50% 4px 50%; }
.logo-mark i:nth-child(2) { background: var(--c1); }
.logo-mark i:nth-child(3) { background: var(--ink); }
.logo-mark i:nth-child(4) { background: var(--c2); border-radius: 4px 50% 50% 50%; }
.logo-mark.sm { width: 24px; height: 24px; gap: 2px; }
a.logo { cursor: pointer; transition: opacity .15s; }
a.logo:hover { opacity: .8; }
a.logo:focus-visible { outline: 2px solid var(--c0); outline-offset: 4px; border-radius: 6px; }

/* ---------- answer colours ---------- */
.opt-c0 { --c: var(--c0); } .opt-c1 { --c: var(--c1); } .opt-c2 { --c: var(--c2); } .opt-c3 { --c: var(--c3); }
.opt-c4 { --c: var(--c4); } .opt-c5 { --c: var(--c5); } .opt-c6 { --c: var(--c6); } .opt-c7 { --c: var(--c7); }
.shape { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 10px; background: rgba(255,255,255,.24); font-size: .9em; flex: none; }

/* =========================================================
   Teacher app shell
   ========================================================= */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 28px 22px 22px; overflow-y: auto; }
.sidebar .logo { margin: 0 0 30px 6px; }
.sidebar .new-btn { align-self: flex-start; font-size: 1.05rem; padding: .78em 1.4em; margin-bottom: 34px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; text-decoration: none; font-size: 1.02rem; color: var(--ink); position: relative; cursor: pointer; }
.nav a:hover { background: var(--surface); }
.nav a.active { font-weight: 700; }
.nav a.active::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-label { font-size: .85rem; color: var(--muted); margin: 26px 14px 8px; }
.sidebar .foot { margin-top: auto; padding-top: 24px; display: grid; gap: 2px; }
.sidebar .foot a { padding: 7px 14px; font-size: .93rem; text-decoration: none; border-radius: 10px; cursor: pointer; }
.sidebar .foot a:hover { background: var(--surface); }

.main { padding: 26px 44px 70px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; }
.search { position: relative; flex: 0 1 700px; margin: 0; }
.search input { background: var(--surface); border-color: var(--surface); border-radius: 12px; padding: .85em 1em .85em 2.8em; font-size: 1rem; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: #dceedd; display: grid; place-items: center; font-weight: 700; color: var(--green); border: 0; cursor: pointer; flex: none; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: .75em 1.15em; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: .92rem; }
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #bbb; }
.status-pill.on { background: var(--green); color: #fff; }
.status-pill.on .dot { background: #b9f0c9; }

.page-title { font-size: 2.1rem; font-weight: 500; margin: 0 0 22px; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 54px 0 20px; }
.section-head h2 { font-size: 1.35rem; margin: 0; font-weight: 600; }
.section-head .link { margin-left: auto; font-weight: 600; text-decoration: none; cursor: pointer; background: none; border: 0; padding: 0; font-size: 1rem; }

/* ---------- popovers / menus ---------- */
.popover { position: fixed; z-index: 120; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; max-height: calc(100dvh - 30px); overflow-y: auto; }
.popover > button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.popover > button:hover { background: var(--surface); }
.popover > button.danger { color: var(--bad); }
.popover .ph { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 10px 12px 4px; text-transform: uppercase; letter-spacing: .04em; }
.popover .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.newmenu { padding: 22px 24px 14px; width: 620px; max-width: calc(100vw - 30px); }
.nm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nm-grid button { border: 0; background: none; text-align: left; padding: 10px; border-radius: 14px; cursor: pointer; display: grid; gap: 6px; }
.nm-grid button:hover { background: var(--surface-2); }
.nm-icon { width: 58px; height: 58px; border: 1.5px solid var(--line); border-radius: 14px; display: grid; place-items: center; background: #fff; margin-bottom: 6px; }
.nm-icon svg { width: 30px; height: 30px; }
.nm-grid b { font-size: 1.15rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.nm-grid span.d { color: var(--muted); line-height: 1.3; }
.nm-sep { height: 1px; background: var(--line); margin: 14px 0 8px; }
.nm-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px; border-radius: 12px; cursor: pointer; font-size: 1.02rem; }
.nm-row:hover { background: var(--surface-2); }
.profile-menu { width: 330px; padding: 18px; }
.profile-menu .who { font-size: 1.15rem; margin-bottom: 2px; display: flex; gap: 8px; align-items: center; }
.profile-menu .box { background: #e9f3ea; border-radius: 14px; padding: 14px 16px; margin: 14px 0 8px; font-size: .95rem; }
.profile-menu > button { font-size: 1rem; padding: 11px 12px; }

/* ---------- hero cards ---------- */
.hero { display: grid; grid-template-columns: 2.15fr 1fr 1fr; gap: 14px; }
.hero-card { background: var(--surface); border-radius: var(--radius-xl); padding: 34px 36px 36px; display: flex; flex-direction: column; cursor: pointer; min-height: 470px; transition: transform .15s ease; text-decoration: none; position: relative; overflow: hidden; }
.hero-card:hover { transform: translateY(-2px); }
.hero-card .brand { display: flex; align-items: center; gap: 10px; font-size: 1.85rem; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 26px; }
.hero-card .brand svg { width: 28px; height: 28px; }
.hero-card .art { border-radius: 18px; height: 178px; margin-bottom: 30px; overflow: hidden; position: relative; flex: none; }
.hero-card .lede { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.015em; flex: 1; }
.hero-live { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; cursor: default; }
.hero-live:hover { transform: none; }
.big-claim { font-family: var(--display); font-size: clamp(2.6rem, 4vw, 4rem); line-height: 1; text-transform: uppercase; letter-spacing: .005em; margin: 0 0 22px; font-weight: 400; }
.hero-live p { font-size: 1.15rem; line-height: 1.38; max-width: 380px; }

/* CSS-only illustrations */
.collage { position: relative; min-height: 330px; }
.collage .ring { position: absolute; width: 200px; height: 200px; border-radius: 50%; left: 0; top: 60px; background: conic-gradient(var(--c1) 0 52%, var(--c4) 52% 74%, var(--c0) 74% 100%); -webkit-mask: radial-gradient(circle, transparent 46%, #000 47%); mask: radial-gradient(circle, transparent 46%, #000 47%); }
.collage .panel { position: absolute; right: 0; top: 10px; width: 72%; height: 230px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 20px 22px; display: flex; flex-direction: column; }
.collage .panel b { font-size: .95rem; margin-bottom: 12px; }
.collage .panel .bars-mini { flex: 1; display: flex; align-items: flex-end; gap: 10px; }
.collage .panel .bars-mini i { flex: 1; background: var(--c); border-radius: 8px 8px 3px 3px; }
.collage .words { position: absolute; left: 22%; bottom: 0; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 16px 20px; width: 64%; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: center; }
.collage .words span { font-weight: 800; line-height: 1; }
.art-phone { background: linear-gradient(135deg, #2b2a52, #4a47a8); display: grid; place-items: center; }
.art-phone .phone { width: 92px; height: 150px; background: #fff; border-radius: 16px; padding: 10px 8px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 22px 1fr 1fr; gap: 5px; box-shadow: 0 14px 30px rgba(0,0,0,.35); transform: rotate(-6deg); }
.art-phone .phone b { grid-column: 1 / -1; background: var(--surface-3); border-radius: 5px; }
.art-phone .phone i { border-radius: 7px; }
.art-phone .float { position: absolute; right: 18px; top: 20px; background: #fff; border-radius: 10px; padding: 6px 10px; font-size: .78rem; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.art-phone .float.b { right: auto; left: 16px; top: auto; bottom: 18px; background: var(--ok); color: #fff; }
.art-doc { background: linear-gradient(135deg, #dcefdc, #b6dcbd); display: grid; place-items: center; }
.art-doc .paper { width: 140px; height: 150px; background: #fff; border-radius: 12px; padding: 14px 12px; display: grid; gap: 7px; align-content: start; box-shadow: 0 14px 30px rgba(30,80,40,.22); transform: rotate(3deg); }
.art-doc .paper span { height: 7px; border-radius: 4px; background: var(--surface-3); }
.art-doc .paper span.q { background: var(--ink); width: 80%; }
.art-doc .paper .lk { display: flex; gap: 4px; }
.art-doc .paper .lk i { flex: 1; height: 10px; border-radius: 50%; border: 1.5px solid var(--surface-3); }
.art-doc .paper .lk i.on { background: var(--c1); border-color: var(--c1); }
.art-doc .arrow { position: absolute; right: 16px; bottom: 16px; background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: .78rem; font-weight: 700; }

/* ---------- "Start with AI" tiles ---------- */
.tiles-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tile { border: 1.5px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); padding: 22px 16px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; font-size: 1.12rem; font-weight: 500; text-align: center; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tile:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.tile svg { width: 46px; height: 46px; }
.tile small { display: block; font-size: .82rem; color: var(--muted); font-weight: 400; margin-top: -6px; }

/* ---------- popular features ---------- */
.features { background: var(--surface-2); border-radius: var(--radius-xl); padding: 40px 50px 44px; }
.features h2 { font-size: 1.35rem; margin-bottom: 26px; }
.feature-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.feature { text-align: center; cursor: pointer; font-size: 1.1rem; }
.feature .box { background: var(--bg); border-radius: 22px; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 14px; transition: transform .15s, box-shadow .15s; }
.feature:hover .box { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature svg { width: 46%; height: 46%; }

/* ---------- templates ---------- */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; }
.carousel::-webkit-scrollbar { display: none; }
.tpl { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; scroll-snap-align: start; background: var(--bg); transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.tpl:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tpl .thumb { height: 200px; padding: 26px 0 26px 30px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; align-items: center; font-size: 1.05rem; line-height: 1.3; overflow: hidden; }
.tpl .thumb .t { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tpl .meta { padding: 22px 28px 24px; border-top: 1px solid var(--line); }
.tpl .meta h3 { font-size: 1.2rem; font-weight: 500; margin: 0 0 6px; }
.mini-art { position: relative; height: 130px; }
.mini-art .donut { position: absolute; left: 0; top: 0; width: 130px; height: 130px; border-radius: 50%; background: conic-gradient(var(--c1) 0 55%, var(--c4) 55% 80%, var(--c0) 80%); -webkit-mask: radial-gradient(circle, transparent 42%, #000 43%); mask: radial-gradient(circle, transparent 42%, #000 43%); }
.mini-art .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-art .cards i { height: 52px; border-radius: 6px; background: rgba(255,255,255,.75); position: relative; }
.mini-art .cards i::before, .mini-art .cards i::after { content: ""; position: absolute; left: 12px; right: 18px; height: 4px; border-radius: 2px; background: #d3cdc4; top: 16px; }
.mini-art .cards i::after { top: 28px; right: 34px; }
.mini-art .hbars { display: grid; gap: 8px; padding-top: 6px; }
.mini-art .hbars i { height: 16px; border-radius: 5px; background: var(--c); }
.tint-beige { background: var(--tint-beige); } .tint-lavender { background: var(--tint-lavender); } .tint-rose { background: var(--tint-rose); }
.tint-sage { background: var(--tint-sage); } .tint-sky { background: var(--tint-sky); }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); cursor: pointer; display: grid; place-items: center; flex: none; }
.round-btn:hover { background: var(--surface-3); }

/* ---------- doc grid ---------- */
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.qz { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg); cursor: pointer; transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.qz:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.qz .thumb { aspect-ratio: 16 / 9; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.qz .thumb .qtext { font-size: .98rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 72%; }
.qz .thumb .thumb-art { position: absolute; right: 14px; bottom: 12px; width: 64px; height: 64px; opacity: .95; }
.qz .meta { padding: 14px 16px 16px; display: flex; align-items: flex-start; gap: 8px; border-top: 1px solid var(--line); }
.qz .meta h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 4px; }
.kind-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; background: #fff; color: var(--ink); }
.kind-badge.k-quiz { color: #9a5d06; }
.kind-badge.k-presentation { color: var(--accent); }
.kind-badge.k-form { color: var(--green); }
.kind-badge.closed { background: var(--ink); color: #fff; }
.menu-btn { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; line-height: 1; flex: none; }
.menu-btn:hover { background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-f { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: .62em 1.2em; font-weight: 600; cursor: pointer; font-size: 1rem; }
.chip-f:hover { border-color: #cfc8bd; }
.chip-f.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---------- survey landing ---------- */
.survey-hero { background: var(--surface); border-radius: var(--radius-xl); padding: 56px 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.survey-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 4.6vw, 4.6rem); line-height: 1; text-transform: uppercase; margin: 0 0 22px; letter-spacing: .005em; }
.survey-hero h1 span { color: var(--accent); }
.survey-hero p { font-size: 1.3rem; line-height: 1.4; margin-bottom: 26px; }
.laptop { position: relative; padding-bottom: 14px; }
.laptop .screen { background: #fff; border: 12px solid #151515; border-bottom-width: 14px; border-radius: 18px 18px 6px 6px; aspect-ratio: 16 / 10.5; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 12%; gap: 10px; }
.laptop .base { position: absolute; left: -7%; right: -7%; bottom: 0; height: 16px; background: linear-gradient(#3a3a3a, #1b1b1b); border-radius: 0 0 16px 16px; }
.laptop .base::before { content: ""; position: absolute; left: 42%; right: 42%; top: 0; height: 5px; background: #111; border-radius: 0 0 6px 6px; }
.laptop .q { font-size: .95rem; font-weight: 600; align-self: stretch; }
.laptop .box { align-self: stretch; border: 1px solid #cfcac2; border-radius: 8px; height: 64px; font-size: .72rem; padding: 6px 8px; color: var(--muted); }
.laptop .sub { background: var(--accent); color: #fff; border-radius: 99px; padding: 5px 16px; font-size: .75rem; font-weight: 700; }

/* ---------- results ---------- */
table.results { width: 100%; border-collapse: collapse; }
table.results th { text-align: left; font-size: .85rem; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.results td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.results tr.clickable { cursor: pointer; }
table.results tr.clickable:hover td { background: var(--surface-2); }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0 30px; }
.stat-tile { background: var(--surface); border-radius: var(--radius-lg); padding: 18px 20px; }
.stat-tile b { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-tile span { color: var(--muted); font-size: .92rem; }
.rcard { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 14px; background: #fff; }
.rcard h3 { font-size: 1.08rem; margin: 0 0 4px; }
.rcard .sub { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 90px; gap: 12px; align-items: center; margin-bottom: 8px; font-size: .95rem; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 26px; background: var(--surface); border-radius: 8px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--c, var(--accent)); border-radius: 8px; min-width: 2px; }
.hbar .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.hbar.correct .lbl { font-weight: 700; color: var(--ok); }
.hist { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin: 6px 0 8px; }
.hist .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: .8rem; color: var(--muted); }
.hist .col i { width: 100%; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.hist-labels { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); }
.lik-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.lik-table td, .lik-table th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.lik-table th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.lik-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; min-width: 160px; background: var(--surface); }
.stack i { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.text-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.text-list div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: .95rem; white-space: pre-wrap; }
.pct-bar { display: flex; align-items: center; gap: 10px; }
.pct-bar .track { flex: 1; height: 10px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.pct-bar .track i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.review-row td { background: var(--surface-2); }
.rv-list { display: grid; gap: 8px; }
.rv { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; background: #fff; border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); }
.rv .mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--bad); }
.rv.ok .mark { background: var(--ok); }
.rv.skip .mark { background: var(--muted); }
.rv .qt { font-weight: 600; margin-bottom: 4px; white-space: pre-wrap; }
.rv .ans { font-size: .92rem; color: var(--muted); }
.rv .ans b { color: var(--ink); font-weight: 600; }
.rv .pts { font-weight: 700; white-space: nowrap; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(30, 28, 25, .42); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s ease; }
.modal { background: #fff; border-radius: var(--radius-xl); width: min(860px, 100%); max-height: calc(100dvh - 40px); overflow: auto; padding: 32px 34px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal.wide { width: min(1480px, 100%); padding: 30px 44px 40px; }
.modal h2 { font-size: 1.6rem; font-weight: 600; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.mtabs { display: flex; gap: 34px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.mtabs button { border: 0; background: none; padding: 14px 0; font-size: 1.15rem; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mtabs button.active { color: var(--ink); border-color: var(--accent); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px; margin-top: 26px; }
.seg { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: .55em 1.05em; border-radius: 999px; cursor: pointer; font-weight: 600; }
.seg button.active { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.warn-list { background: var(--warn-bg); color: #6b4a0f; border-radius: 14px; padding: 12px 16px; font-size: .92rem; margin-top: 12px; }
.share-link { display: flex; gap: 8px; }
.share-link input { font-weight: 600; }
.share-qr { width: 180px; height: 180px; border-radius: 14px; border: 1px solid var(--line); padding: 8px; background: #fff; }

/* =========================================================
   Editors (presentation / quiz / survey)
   ========================================================= */
.editor { display: grid; grid-template-rows: auto 1fr; height: 100dvh; background: var(--surface); }
.ed-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line); min-height: 72px; }
.ed-left, .ed-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ed-right { justify-content: flex-end; }
.ed-title { display: flex; flex-direction: column; min-width: 0; }
.ed-title input { border: 0; font-size: 1.12rem; font-weight: 600; background: transparent; padding: .2em .4em; border-radius: 8px; width: min(360px, 32vw); }
.ed-title input:hover { background: var(--surface); }
.ed-title span { padding-left: .5em; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.ed-tabs { display: flex; gap: 30px; align-self: stretch; }
.ed-tabs button { border: 0; background: none; font-size: 1.08rem; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; padding: 0 2px; display: flex; align-items: center; gap: 8px; margin-bottom: -11px; }
.ed-tabs button.active { color: var(--ink); border-color: var(--accent); }
.ed-tabs .count { background: var(--surface); border-radius: 999px; padding: .1em .6em; font-size: .9rem; color: var(--ink); }
.ed-body { display: grid; grid-template-columns: 230px 1fr 360px 62px; min-height: 0; }
.slides { overflow-y: auto; padding: 16px 14px 40px; }
.slides .new-slide { width: 100%; margin-bottom: 14px; font-size: 1.02rem; }
.slide-thumb { display: grid; grid-template-columns: 22px 1fr; gap: 8px; margin-bottom: 10px; cursor: pointer; }
.slide-thumb .n { font-size: .85rem; color: var(--muted); padding-top: 6px; text-align: right; }
.slide-thumb .box { aspect-ratio: 16 / 10; background: #fff; border-radius: 12px; border: 2px solid transparent; padding: 9px 10px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.slide-thumb.active .box { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.slide-thumb .box .t { font-size: .7rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding-right: 18px; }
.slide-thumb .box .ic { position: absolute; top: 7px; right: 7px; width: 14px; height: 14px; }
.slide-thumb .box .mbars { display: flex; gap: 3px; height: 14px; align-items: flex-end; }
.slide-thumb .box .mbars i { flex: 1; background: var(--c); border-radius: 2px; }
.slide-thumb .box .flag { position: absolute; bottom: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 0 3px #fff; }
.slide-thumb .box .marks-tag { position: absolute; bottom: 5px; left: 8px; font-size: .62rem; font-weight: 700; color: var(--muted); }
.slide-thumb.welcome .box { background: var(--surface-2); }
.canvas { overflow: auto; padding: 22px 26px; display: flex; flex-direction: column; align-items: center; }
.canvas-inner { width: 100%; max-width: 980px; background: #fff; border-radius: 18px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; min-height: 520px; }
.slide-preview { width: 100%; max-width: 880px; aspect-ratio: 16 / 9; background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--line), var(--shadow); padding: 5% 6%; display: flex; flex-direction: column; container-type: inline-size; overflow: hidden; }
.slide-preview .sp-meta { font-size: 1.5cqw; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; gap: 2cqw; }
.slide-preview .sp-q { font-size: 3.5cqw; font-weight: 700; line-height: 1.2; margin: 2.4cqw 0 2.8cqw; white-space: pre-wrap; }
.slide-preview .sp-q.empty { color: #bdb7ae; }
.slide-preview .sp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; margin-top: auto; }
.slide-preview .sp-opt { background: var(--c); color: #fff; border-radius: 1.8cqw; padding: 1.8cqw 2cqw; font-size: 2.1cqw; font-weight: 700; display: flex; gap: 1.2cqw; align-items: center; min-height: 6.5cqw; }
.slide-preview .sp-opt.is-correct::after { content: "✓"; margin-left: auto; background: rgba(255,255,255,.28); border-radius: 50%; width: 3.4cqw; height: 3.4cqw; display: grid; place-items: center; font-size: 1.9cqw; flex: none; }
.slide-preview .sp-opt.blank { opacity: .4; }
.slide-preview .sp-type { margin-top: auto; border: 2px dashed var(--line); border-radius: 1.8cqw; padding: 2.4cqw; font-size: 2cqw; color: var(--muted); }
.slide-preview .sp-type b { color: var(--ok); }
.slide-preview .sp-bars { margin-top: auto; display: flex; gap: 2.4cqw; align-items: flex-end; height: 22cqw; }
.slide-preview .sp-bars .b { flex: 1; display: flex; flex-direction: column; gap: 1cqw; align-items: center; justify-content: flex-end; height: 100%; }
.slide-preview .sp-bars .b i { width: 100%; background: var(--c); border-radius: 1cqw 1cqw 0 0; }
.slide-preview .sp-bars .b span { font-size: 1.6cqw; font-weight: 600; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-preview .sp-cloud { margin-top: auto; margin-bottom: auto; display: flex; flex-wrap: wrap; gap: .4cqw 2cqw; justify-content: center; align-items: baseline; opacity: .3; }
.slide-preview .sp-cloud span { font-weight: 800; line-height: 1.05; }
.slide-preview .sp-cards { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6cqw; opacity: .5; }
.slide-preview .sp-cards i { height: 11cqw; border-radius: 1.4cqw; }
.slide-preview .sp-scales { margin-top: auto; display: grid; gap: 2.2cqw; }
.slide-preview .sp-scale .lbl { font-size: 1.9cqw; font-weight: 600; margin-bottom: .8cqw; }
.slide-preview .sp-scale .track { height: .5cqw; background: var(--surface-3); border-radius: 1cqw; position: relative; }
.slide-preview .sp-scale .track i { position: absolute; top: 50%; width: 2.4cqw; height: 2.4cqw; border-radius: 50%; background: var(--c); transform: translate(-50%, -50%); }
.slide-preview .sp-scale .ends { display: flex; justify-content: space-between; font-size: 1.4cqw; color: var(--muted); margin-top: .8cqw; }
.slide-preview.content { display: grid; grid-template-columns: 1fr; align-content: center; gap: 3cqw; }
.slide-preview.content.has-img { grid-template-columns: 1.1fr 1fr; align-items: center; }
.slide-preview .sp-h { font-size: 5cqw; font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 2cqw; }
.slide-preview .sp-body { font-size: 2.3cqw; line-height: 1.45; color: #3b3833; }
.slide-preview .sp-body ul { margin: 0; padding-left: 1.2em; }
.slide-preview .sp-img { width: 100%; height: 100%; max-height: 42cqw; object-fit: cover; border-radius: 2cqw; }
.canvas .hint { margin-top: 16px; color: var(--muted); font-size: .9rem; text-align: center; }

.create-box { width: 100%; max-width: 680px; text-align: center; }
.create-box h2 { font-size: 2.1rem; font-weight: 500; margin-bottom: 30px; }
.prompt { background: var(--surface-2); border-radius: 22px; padding: 10px; text-align: left; }
.prompt .inner { background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); padding: 16px 18px 12px; }
.prompt textarea { border: 0; padding: 0; min-height: 110px; font-size: 1.05rem; resize: none; }
.prompt textarea:focus { outline: none; }
.prompt .bar { display: flex; align-items: center; gap: 10px; }
.prompt .send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; margin-left: auto; flex: none; }
.prompt .send:disabled { background: var(--surface-3); cursor: not-allowed; }
.prompt .note { display: flex; align-items: center; gap: 8px; padding: 12px 10px 4px; font-size: .97rem; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.create-box .choices { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.create-box .choices .btn { padding: 1em 2em; border-radius: 14px; font-size: 1.05rem; }

.panel { overflow-y: auto; background: #fff; border-left: 1px solid var(--line); padding: 22px 22px 60px; }
.panel h3 { font-size: 1rem; margin: 24px 0 10px; }
.panel h3:first-child { margin-top: 0; }
.panel .help { font-size: .86rem; color: var(--muted); margin: 6px 0 0; }
.rail { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; }
.rail button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.rail button:hover { background: var(--surface); }
.rail button.active { background: var(--accent-soft); color: var(--accent); }
.rail button.ai { color: #8a5cf6; }
.rail .sep { width: 28px; height: 1px; background: var(--line); margin: 4px 0; }
.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-pick button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; font-weight: 600; font-size: .78rem; line-height: 1.15; text-align: center; }
.type-pick button svg { width: 26px; height: 26px; }
.type-pick button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.type-group { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 6px; }
.opt-row { display: grid; grid-template-columns: 30px 1fr 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.opt-row.nocheck { grid-template-columns: 1fr 34px; }
.opt-row .correct-toggle { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; font-size: .85rem; color: transparent; }
.opt-row .correct-toggle.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt-row .correct-toggle.sq { border-radius: 8px; }
.opt-row input { border-left: 5px solid var(--c, var(--line)); }
.field { margin-bottom: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.marks-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.marks-row input { width: 92px; }
.marks-row .mchip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .3em .75em; cursor: pointer; font-weight: 600; font-size: .85rem; }
.marks-row .mchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.review-note { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: .9rem; font-weight: 600; margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.review-note button { margin-left: auto; }
.img-drop { border: 1.5px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); font-size: .9rem; }
.img-drop img { max-width: 100%; max-height: 140px; border-radius: 8px; display: block; margin: 0 auto 10px; }
.ed-results { overflow-y: auto; padding: 30px 40px 80px; }
.ed-results .wrap { max-width: 1100px; margin: 0 auto; }
.session-card { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 16px; padding: 18px 22px; margin-bottom: 10px; cursor: pointer; border: 1px solid var(--line); }
.session-card:hover { box-shadow: var(--shadow); }

/* survey preview inside the editor */
.fprev { width: 100%; max-width: 640px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--line), var(--shadow); padding: 34px 40px 36px; }
.fprev .flogo { display: flex; justify-content: center; margin-bottom: 18px; }
.fprev .pbar { height: 5px; background: var(--surface); border-radius: 99px; margin-bottom: 26px; overflow: hidden; }
.fprev .pbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* =========================================================
   Survey questions — shared by the editor preview and the public form page
   ========================================================= */
.fq-num { color: var(--muted); font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.fq-title { font-size: 1.45rem; font-weight: 600; line-height: 1.25; margin-bottom: 8px; white-space: pre-wrap; }
.fq-title .req { color: var(--bad); margin-left: 4px; }
.fq-desc { color: var(--muted); margin-bottom: 18px; white-space: pre-wrap; }
.fq-input { margin-top: 18px; }
.fq-input input[type=text], .fq-input input[type=email], .fq-input textarea, .fq-input select { font-size: 1.05rem; padding: .8em .95em; border-radius: 12px; border-color: #cfcac2; }
.fq-input textarea { min-height: 140px; }
.fq-opts { display: grid; gap: 10px; }
.fq-opt { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #fff; font-size: 1.02rem; text-align: left; width: 100%; transition: border-color .12s, background .12s; }
.fq-opt:hover { border-color: #cbc4b9; }
.fq-opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #bdb6ab; flex: none; display: grid; place-items: center; }
.fq-opt.sq .dot { border-radius: 6px; }
.fq-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.fq-opt.on .dot { border-color: var(--accent); background: var(--accent); }
.fq-opt.on .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.fq-opt.sq.on .dot::after { width: 10px; height: 6px; border-radius: 0; background: none; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.fq-opt.correct { border-color: var(--ok); }
.fq-opt .ok { margin-left: auto; color: var(--ok); font-weight: 800; }
.fq-scale { display: flex; gap: 8px; flex-wrap: wrap; }
.fq-scale button { flex: 1; min-width: 42px; height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.fq-scale button:hover { border-color: #cbc4b9; }
.fq-scale button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fq-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: .88rem; margin-top: 8px; gap: 10px; }
.fq-likert { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.fq-likert th { font-size: .78rem; font-weight: 600; color: var(--muted); padding: 0 4px 4px; text-align: center; vertical-align: bottom; line-height: 1.2; }
.fq-likert td { padding: 10px 4px; background: var(--surface-2); text-align: center; }
.fq-likert td:first-child { text-align: left; padding-left: 14px; border-radius: 12px 0 0 12px; font-size: .97rem; min-width: 180px; }
.fq-likert td:last-child { border-radius: 0 12px 12px 0; }
.fq-likert .lk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #bdb6ab; background: #fff; cursor: pointer; padding: 0; }
.fq-likert .lk.on { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px #fff; }
.fq-likert tr.missing td { background: #fff1ef; }
.lk-mobile { display: none; }
.fq-actions { display: flex; align-items: center; gap: 10px; margin-top: 30px; }
.fq-actions .btn.accent { padding: .8em 2em; font-size: 1.02rem; }
.fq-hint { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.fq-section { border-left: 4px solid var(--accent); padding-left: 16px; }

/* =========================================================
   Public survey page
   ========================================================= */
.fbody { background: #fff; min-height: 100dvh; }
.fbody .ftop { position: sticky; top: 0; background: #fff; z-index: 5; }
.fbody .fprogress { height: 5px; background: var(--surface); }
.fbody .fprogress i { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.fbody .fmain { max-width: 700px; margin: 0 auto; padding: 34px 20px 80px; }
.fbody .flogo { display: flex; justify-content: center; margin-bottom: 40px; }
.preview-banner { background: var(--ink); color: #fff; text-align: center; padding: 8px; font-size: .9rem; font-weight: 600; }
.f-intro h1 { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; }
.f-intro .desc { font-size: 1.08rem; color: #3b3833; white-space: pre-wrap; margin-bottom: 24px; }
.f-done { text-align: center; }
.f-done .big { font-size: 3.2rem; line-height: 1; margin-bottom: 14px; }
.score-card { background: var(--surface); border-radius: var(--radius-xl); padding: 26px; text-align: center; margin: 22px 0; }
.score-card b { display: block; font-size: 2.8rem; letter-spacing: -0.02em; }

/* =========================================================
   Student (phone)
   ========================================================= */
.player { min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }
.player header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.player main { flex: 1; display: flex; flex-direction: column; padding: 0 16px 22px; max-width: 620px; width: 100%; margin: 0 auto; }
.player .screen { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.player .screen.top { justify-content: flex-start; padding-top: 10px; }
.player .card { border: 0; border-radius: var(--radius-xl); padding: 26px 22px; box-shadow: var(--shadow); }
.me-pill { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 8px 6px 12px; font-weight: 600; }
.code-input { font-size: 2.1rem !important; text-align: center; letter-spacing: .3em; font-weight: 800; background: var(--surface) !important; border-color: var(--surface) !important; }
.avatar-big { font-size: 4.6rem; line-height: 1; }
.q-text { font-size: 1.3rem; font-weight: 700; white-space: pre-wrap; }
.q-meta { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted); }
.timer-bar { height: 8px; background: #fff; border-radius: 99px; overflow: hidden; }
.timer-bar > div { height: 100%; background: var(--ink); width: 100%; transition: width .25s linear; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answers.single-col { grid-template-columns: 1fr; }
.answer-btn {
  background: var(--c); color: #fff; border: 0; border-radius: 18px; padding: 18px 14px; min-height: 88px;
  font-weight: 700; font-size: 1.05rem; text-align: left; display: flex; gap: .7em; align-items: center; cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,.14); word-break: break-word;
}
.answer-btn.selected { outline: 4px solid var(--ink); outline-offset: 2px; }
.answer-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.14); }
.player .fq-opt { border-color: #fff; }
.player .fq-opt.on { border-color: var(--accent); }
.slider-row { background: #fff; border-radius: 16px; padding: 14px 16px; }
.slider-row .lbl { font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 10px; }
.slider-row .lbl b { background: var(--accent); color: #fff; border-radius: 8px; padding: 0 9px; min-width: 32px; text-align: center; }
.slider-row input[type=range] { width: 100%; accent-color: var(--accent); }
.slider-row .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.result-panel { border-radius: var(--radius-xl); padding: 2.2rem 1rem; color: #fff; text-align: center; }
.result-panel.ok { background: var(--ok); }
.result-panel.bad { background: var(--bad); }
.result-panel.none { background: var(--muted); }
.result-panel .big { font-size: 2.2rem; font-weight: 800; }
.stat { font-size: 1rem; color: var(--muted); }
.stat b { font-size: 1.7rem; color: var(--ink); }

/* =========================================================
   Presenter (projector)
   ========================================================= */
.present { background: #fff; min-height: 100dvh; padding-bottom: 96px; }
.present .pbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 34px; gap: 1rem; }
.present .stage { padding: 6px 34px 20px; max-width: 1440px; margin: 0 auto; }
.join-banner { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; background: var(--surface); border-radius: var(--radius-xl); padding: 34px 40px; }
.join-banner .code { font-size: clamp(3.2rem, 8vw, 6.4rem); font-weight: 800; letter-spacing: .06em; line-height: 1; }
.join-banner img { width: 220px; height: 220px; border-radius: 18px; background: #fff; padding: 10px; }
.join-banner .url { font-size: 1.5rem; font-weight: 700; }
.join-small { font-size: .98rem; color: var(--muted); background: var(--surface); padding: .5em 1em; border-radius: 999px; }
.join-small b { color: var(--ink); letter-spacing: .04em; }
.players { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { background: var(--surface); border-radius: 999px; padding: 9px 16px; font-weight: 600; cursor: pointer; animation: pop .25s ease; font-size: 1.05rem; }
.chip.off { opacity: .45; }
.chip:hover { background: #fbe0dd; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.p-question { font-size: clamp(1.8rem, 3.4vw, 2.9rem); font-weight: 700; white-space: pre-wrap; margin: 8px 0 26px; letter-spacing: -0.02em; }
.p-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--muted); font-weight: 600; font-size: 1.05rem; }
.countdown { font-size: 3.2rem; font-weight: 800; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 5px solid var(--ink); flex: none; }
.countdown.low { border-color: var(--c0); color: var(--c0); }
.p-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.p-option { background: var(--c); color: #fff; border-radius: 20px; padding: 22px 24px; font-size: 1.5rem; font-weight: 700; display: flex; gap: .7em; align-items: center; }
.p-option.dim { opacity: .3; }
.p-option .tick { margin-left: auto; font-size: 1.8rem; }
.bars { display: flex; align-items: flex-end; gap: 22px; height: 320px; margin: 10px 0 18px; background: var(--surface-2); border-radius: var(--radius-xl); padding: 26px 30px 0; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; min-width: 0; }
.bar .fill { width: 100%; background: var(--c); border-radius: 14px 14px 0 0; min-height: 6px; transition: height .6s cubic-bezier(.2,.8,.2,1); }
.bar.dim .fill { opacity: .3; }
.bar .num { font-size: 1.9rem; font-weight: 800; }
.bar-labels { display: flex; gap: 22px; padding: 0 30px; }
.bar-labels div { flex: 1; text-align: center; font-size: 1.25rem; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.typed-list { display: grid; gap: 10px; margin-bottom: 20px; }
.typed-item { display: flex; justify-content: space-between; background: var(--surface); padding: 16px 20px; border-radius: 16px; font-size: 1.35rem; font-weight: 700; border-left: 8px solid var(--surface-3); }
.typed-item.ok { border-left-color: var(--ok); }
.accepted { font-size: 1.5rem; font-weight: 800; color: var(--ok); margin-bottom: 14px; }
.cloud { min-height: 380px; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; align-items: center; gap: 6px 26px; padding: 20px; background: var(--surface-2); border-radius: var(--radius-xl); }
.cloud span { font-weight: 800; line-height: 1.05; animation: pop .35s ease; }
.cards-grid { columns: 3 280px; column-gap: 16px; }
.cards-grid .oc { break-inside: avoid; border-radius: 18px; padding: 18px 20px; margin-bottom: 16px; font-size: 1.25rem; font-weight: 600; line-height: 1.35; animation: pop .3s ease; overflow-wrap: anywhere; }
.scales { display: grid; gap: 34px; padding: 26px 40px; background: var(--surface-2); border-radius: var(--radius-xl); }
.scales .ends { display: flex; justify-content: space-between; color: var(--muted); font-weight: 600; font-size: 1.05rem; }
.scale-row .lbl { display: flex; justify-content: space-between; font-size: 1.35rem; font-weight: 700; margin-bottom: 14px; gap: 20px; }
.scale-row .lbl span { color: var(--muted); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.scale-row .track { position: relative; height: 8px; background: var(--surface-3); border-radius: 99px; }
.scale-row .track .tick { position: absolute; top: 18px; transform: translateX(-50%); font-size: .95rem; color: var(--muted); }
.scale-row .track .dot { position: absolute; top: 50%; width: 34px; height: 34px; border-radius: 50%; background: var(--c); transform: translate(-50%, -50%); transition: left .6s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 0 6px #fff; }
.scale-row .track .fillbar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); opacity: .35; border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.content-slide { display: grid; grid-template-columns: 1fr; gap: 50px; align-items: center; min-height: 60vh; padding: 20px 10px; }
.content-slide.has-img { grid-template-columns: 1.1fr 1fr; }
.content-slide h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; margin-bottom: 26px; }
.content-slide .body { font-size: clamp(1.3rem, 2vw, 1.8rem); line-height: 1.45; color: #3b3833; }
.content-slide .body ul { padding-left: 1.2em; margin: 0; }
.content-slide img { width: 100%; max-height: 64vh; object-fit: cover; border-radius: 26px; }
.waiting-note { text-align: center; color: var(--muted); font-size: 1.2rem; padding: 40px 0; }
.lb { display: grid; gap: 10px; max-width: 920px; margin: 0 auto; }
.lb-row { display: grid; grid-template-columns: 60px 54px 1fr auto; align-items: center; gap: 12px; background: var(--surface); border-radius: 18px; padding: 14px 22px; font-size: 1.4rem; font-weight: 700; animation: slide .35s ease both; }
.lb-row .rank { color: var(--muted); }
.lb-row .av { font-size: 2rem; }
.lb-row small { color: var(--muted); font-weight: 600; font-size: .95rem; }
@keyframes slide { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 30px 0; }
.podium .step { width: 230px; text-align: center; }
.podium .block { border-radius: 18px 18px 0 0; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: #fff; }
.podium .p1 .block { height: 220px; background: var(--c2); }
.podium .p2 .block { height: 160px; background: var(--c4); }
.podium .p3 .block { height: 120px; background: var(--c0); }
.podium .who { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.podium .av { font-size: 3.2rem; }
.pnav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 14px 34px; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); z-index: 20; }
.pnav .counter { color: var(--muted); font-weight: 600; margin: 0 8px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1320px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-live { grid-column: 1 / -1; }
  .tiles-5 { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .ed-body { grid-template-columns: 200px 1fr 330px 58px; }
  .survey-hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .sidebar .logo, .sidebar .new-btn { margin: 0; }
  .sidebar .nav { display: flex; flex-wrap: wrap; }
  .sidebar .nav-label, .sidebar .foot, #sideRecent { display: none; }
  .main { padding: 16px; }
  .hero, .hero-live { grid-template-columns: 1fr; }
  .tiles-5 { grid-template-columns: 1fr 1fr; }
  .ed-top { grid-template-columns: 1fr; }
  .ed-body { grid-template-columns: 1fr; }
  .slides { display: flex; gap: 8px; overflow-x: auto; }
  .slide-thumb { min-width: 150px; }
  .rail { flex-direction: row; justify-content: center; }
  .join-banner { grid-template-columns: 1fr; }
  .p-options { grid-template-columns: 1fr; }
  .survey-hero { padding: 30px 22px; }
  .content-slide.has-img { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fq-likert { display: none; }
  .lk-mobile { display: grid; gap: 14px; }
  .lk-mobile .item { background: var(--surface-2); border-radius: 14px; padding: 14px; }
  .lk-mobile .item.missing { background: #fff1ef; }
  .lk-mobile .st { font-weight: 600; margin-bottom: 10px; }
  .lk-mobile .opts { display: grid; gap: 6px; }
  .lk-mobile .opts button { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 12px; text-align: left; cursor: pointer; }
  .lk-mobile .opts button.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
  .fbody .fmain { padding-top: 22px; }
  .fq-title { font-size: 1.25rem; }
}
@media (max-width: 380px) { .answers { grid-template-columns: 1fr; } }

/* thumbnails: keep the marks label above the mini bars */
.slide-thumb .box .t { order: 1; }
.slide-thumb .box .marks-tag { position: static; order: 2; margin-top: auto; margin-bottom: 3px; }
.slide-thumb .box .mbars { order: 3; }
.fprev { overflow-x: auto; }
.fprev .fq-likert th { font-size: .7rem; }
.fprev .fq-likert td:first-child { min-width: 140px; font-size: .9rem; }


/* =========================================================
   Login / sign up
   ========================================================= */
.auth-page { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.auth-side { padding: 40px 8vw; display: flex; flex-direction: column; }
.auth-side .logo { margin-bottom: auto; }
.auth-box { width: 100%; max-width: 420px; margin: 40px 0 auto; }
.auth-box h1 { font-size: 2.3rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-box .field { margin-bottom: 16px; }
.auth-box input { padding: .85em 1em; font-size: 1rem; }
.auth-box .btn.accent { width: 100%; padding: .9em; font-size: 1.05rem; margin-top: 6px; }
.auth-switch { margin-top: 22px; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-art { background: var(--surface); margin: 16px; border-radius: 32px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 60px; }
.auth-art h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.6rem, 4.6vw, 4.6rem); line-height: 1; margin-bottom: 18px; }
.auth-art h2 span { color: var(--accent); }
.auth-art p { font-size: 1.2rem; max-width: 460px; }
.auth-art .bubbles { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.auth-art .bubbles span { background: #fff; border-radius: 999px; padding: .6em 1.1em; font-weight: 600; box-shadow: var(--shadow); }
.form-error { background: #fdecea; color: #a32a22; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: .95rem; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 600; font-size: .85rem; }
@media (max-width: 860px) { .auth-page { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* =========================================================
   Design slides (Canva-style)
   ========================================================= */
.design-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; container-type: size; border-radius: inherit; }
.design-stage .el { position: absolute; box-sizing: border-box; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.22; }
.design-stage .el-image img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.design-stage .el-image { overflow: hidden; }
.design-stage .el-emoji { display: grid; place-items: center; line-height: 1; }
.design-stage .el-text.empty { color: rgba(128,128,128,.7) !important; font-style: italic; }
.design-stage .el-image.placeholder { background: repeating-linear-gradient(45deg, rgba(128,128,128,.12) 0 10px, rgba(128,128,128,.2) 10px 20px); display: grid; place-items: center; color: rgba(90,90,90,.9); font-weight: 700; font-size: 1.4cqw; border: 2px dashed rgba(128,128,128,.4); }
.anim-fade { animation: elFade .7s ease both; }
.anim-rise { animation: elRise .7s cubic-bezier(.2,.8,.2,1) both; }
.anim-zoom { animation: elZoom .6s cubic-bezier(.2,.8,.2,1.2) both; }
@keyframes elFade { from { opacity: 0; } }
@keyframes elRise { from { opacity: 0; translate: 0 6%; } }
@keyframes elZoom { from { opacity: 0; scale: .6; } }
.design-wrap { width: 100%; max-width: 900px; position: relative; border-radius: 16px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.design-wrap .design-stage { border-radius: 16px; }
.slide-thumb .box .design-stage { border-radius: 10px; }
.slide-preview .sp-q { font-family: var(--th-head, inherit); }
.design-wrap.editable .el { cursor: move; user-select: none; }
.design-wrap.editable .el:hover { outline: 1.5px dashed rgba(90,94,230,.55); }
.design-wrap.editable .el.selected { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 5; }
.design-wrap.editable .el.editing { cursor: text; user-select: text; outline: 2px solid var(--accent); }
.design-wrap .handle { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--accent); border-radius: 4px; z-index: 6; cursor: nwse-resize; }
.design-wrap .handle.e { cursor: ew-resize; } .design-wrap .handle.s { cursor: ns-resize; }
.design-stage .guide { position: absolute; background: #e05a95; z-index: 7; pointer-events: none; }
.design-stage .guide.gv { top: 0; bottom: 0; width: 1px; left: 50%; }
.design-stage .guide.gh { left: 0; right: 0; height: 1px; top: 50%; }
.design-toolbar { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; background: #fff; padding: 6px; border-radius: 22px; box-shadow: 0 0 0 1px var(--line); }
.design-toolbar .btn { padding: .45em .7em; font-size: .9rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.swatches button.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.swatches input[type=color] { width: 30px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.layout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.layout-grid button { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 6px; cursor: pointer; font-size: .78rem; font-weight: 600; }
.layout-grid button:hover { border-color: var(--accent); }
.layout-grid .mini { aspect-ratio: 16/9; background: var(--surface); border-radius: 6px; position: relative; margin-bottom: 4px; overflow: hidden; }
.layout-grid .mini i { position: absolute; background: #bdb6ab; border-radius: 2px; }
.layout-grid .mini i.h { background: var(--ink); }
.layout-grid .mini i.img { background: #9cc3f5; }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-grid button { border: 2px solid transparent; border-radius: 12px; padding: 0; cursor: pointer; overflow: hidden; text-align: left; background: none; }
.theme-grid button.on { border-color: var(--accent); }
.theme-grid .tprev { aspect-ratio: 16/9; padding: 10px; display: flex; flex-direction: column; justify-content: center; gap: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); border-radius: 10px; }
.theme-grid .tprev b { font-size: 1.05rem; line-height: 1; }
.theme-grid .tprev i { height: 5px; border-radius: 3px; width: 60%; opacity: .5; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 6px; width: 300px; }
.emoji-grid button { border: 0; background: none; font-size: 1.5rem; cursor: pointer; border-radius: 8px; padding: 4px; }
.emoji-grid button:hover { background: var(--surface); }
.shape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; width: 240px; }
.shape-grid button { border: 1px solid var(--line); background: #fff; border-radius: 10px; height: 60px; cursor: pointer; display: grid; place-items: center; }
.shape-grid button i { display: block; width: 32px; height: 32px; background: var(--accent); }
.prop-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.prop-row .btn.small.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.prop-row input[type=range] { flex: 1; accent-color: var(--accent); }

/* themed presenter */
.present.themed { background: var(--p-bg); color: var(--th-ink); }
.present.themed .p-question, .present.themed .content-slide h1 { font-family: var(--th-head); color: var(--th-ink); }
.present.themed .p-meta, .present.themed .muted, .present.themed .join-small { color: var(--th-muted); }
.present.themed .bars, .present.themed .cloud, .present.themed .scales, .present.themed .join-banner, .present.themed .lb-row, .present.themed .typed-item, .present.themed .countdown, .present.themed .chip { background: var(--th-panel); color: var(--th-ink); }
.present.themed .join-small { background: var(--th-panel); }
.present.themed .join-small b, .present.themed .logo { color: var(--th-ink); }
.present.themed .countdown { border-color: var(--th-ink); }
.present.themed .pnav { background: rgba(255,255,255,.9); color: var(--ink); }
.present-design { width: min(calc(100vw - 68px), calc((100dvh - 190px) * var(--ar, 1.7778))); margin: 0 auto; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.flag-chip { color: var(--bad); font-weight: 700; }

/* =========================================================
   Lockdown (exam mode)
   ========================================================= */
.lock-banner { background: #1e1c19; color: #fff; border-radius: 14px; padding: 10px 14px; font-size: .88rem; display: flex; gap: 8px; align-items: center; }
.lock-overlay { position: fixed; inset: 0; background: rgba(30,28,25,.7); z-index: 300; display: grid; place-items: center; padding: 20px; }
.lock-overlay .box { background: #fff; border-radius: 24px; padding: 28px 24px; max-width: 420px; text-align: center; }
.lock-overlay .box .ico { font-size: 3rem; line-height: 1.2; }
.terminated-card { background: #fff3f1; border: 1.5px solid #f6c3bd; border-radius: 20px; padding: 18px; color: #7a231c; }
.terminated-card b { display: block; font-size: 1.15rem; margin-bottom: 4px; color: #a32a22; }
.timer-pill { position: fixed; top: 14px; right: 14px; background: var(--ink); color: #fff; border-radius: 999px; padding: .45em 1em; font-weight: 700; z-index: 20; font-variant-numeric: tabular-nums; }
.timer-pill.low { background: var(--bad); }

/* =========================================================
   Survey extras
   ========================================================= */
.fbody { --accent: var(--f-accent, #5a5ee6); --accent-soft: var(--f-accent-soft, #eceaff); }
.f-header-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 18px; margin-bottom: 24px; display: block; }
.fq-img { max-width: 100%; max-height: 320px; border-radius: 14px; margin: 6px 0 14px; display: block; }
.fq-other { margin-top: 8px; }
.fq-rank { display: grid; gap: 8px; }
.fq-rank .ri { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; cursor: grab; touch-action: none; }
.fq-rank .ri.dragging { opacity: .6; border-color: var(--accent); }
.fq-rank .ri .n { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }
.fq-rank .ri .t { flex: 1; }
.fq-rank .ri button { border: 0; background: var(--surface); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; }
.fq-slider { padding: 10px 2px; }
.fq-slider input { width: 100%; accent-color: var(--accent); }
.fq-slider .val { font-size: 2rem; font-weight: 800; text-align: center; color: var(--accent); }
.fq-slider .val.unset { color: var(--muted); font-size: 1rem; font-weight: 500; }
.f-page .fq-block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.f-page .fq-block:last-of-type { border-bottom: 0; }
.f-page .fq-block .fq-title { font-size: 1.22rem; }
.f-page .fq-block.err .fq-title { color: var(--bad); }
.f-page .fq-err { color: var(--bad); font-size: .9rem; margin-top: 8px; }
.logic-box { background: var(--surface-2); border-radius: 12px; padding: 12px; margin-top: 6px; }
.logic-rule { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; position: relative; padding-right: 30px; }
.logic-rule .full { grid-column: 1 / -1; }
.logic-rule .del { position: absolute; right: 0; top: 4px; }
.jump-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; align-items: center; margin-bottom: 6px; font-size: .9rem; }
.jump-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface-2); border-radius: 14px; padding: 10px 14px; margin: 10px 0 18px; }
.filter-bar select { width: auto; max-width: 320px; }
.nps { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nps span { background: var(--surface); border-radius: 10px; padding: 6px 10px; font-size: .88rem; }
.nps b { font-size: 1.4rem; }
.badge.logic { background: #f3e8ff; color: #7c3aed; }

/* ---------- pricing page ---------- */
.pricing-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; border-bottom: 1px solid var(--line); }
.pricing-top .btn { padding: .7em 1.5em; }
.pricing-main { max-width: 1320px; margin: 0 auto; padding: 56px 32px 72px; }
.pricing-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; text-align: center; font-size: clamp(2.6rem, 7vw, 5.6rem); letter-spacing: 0; line-height: 1; margin: 0 0 36px; }
.pricing-title span { color: var(--accent); }
.billing-toggle { display: flex; width: max-content; margin: 0 0 24px auto; background: var(--surface); border-radius: 999px; padding: 4px; }
.billing-toggle button { border: 0; background: transparent; padding: .6em 1.2em; border-radius: 999px; cursor: pointer; font-weight: 500; }
.billing-toggle button[aria-checked="true"] { background: var(--bg); box-shadow: var(--shadow); font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 32px 28px; display: flex; flex-direction: column; background: var(--bg); }
.plan.featured { background: var(--accent-soft); border-color: #b9b8f3; }
.plan-name { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 2.6rem; letter-spacing: 0; margin: 0 0 10px; display: flex; align-items: flex-start; gap: 8px; }
.plan-star { font-family: var(--font); font-size: .8rem; background: var(--accent); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; }
.plan-tag { min-height: 3em; margin: 0 0 20px; }
.plan-price { font-size: 2.2rem; font-weight: 600; letter-spacing: -0.02em; }
.plan-sub { color: var(--muted); font-size: .93rem; margin: 6px 0 24px; line-height: 1.6; }
.save-badge { background: var(--warn-bg); color: var(--ink); font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .15em .6em; white-space: nowrap; }
.plan-btn { width: 100%; padding: .85em; font-size: 1.02rem; }
.plan-btn.outline { border: 2px solid var(--ink); }
.plan-btn:disabled { background: var(--surface); border-color: var(--surface); opacity: 1; color: #b3ada4; }
.plan-intro { margin: 32px 0 14px; }
.plan-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.plan-features li { display: grid; grid-template-columns: 20px 1fr; column-gap: 10px; }
.plan-features li::before { content: "✓"; color: var(--accent); font-weight: 800; grid-row: span 2; }
.plan-features span { color: var(--muted); font-size: .93rem; }
.pricing-note { text-align: center; margin-top: 36px; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .pricing-top { padding: 12px 16px; }
  .pricing-main { padding: 36px 16px 56px; }
  .plans { grid-template-columns: 1fr; }
  .billing-toggle { margin: 0 auto 24px; }
  .plan-tag { min-height: 0; }
}
.plan-pill { text-decoration: none; background: var(--accent-soft); color: var(--accent); }
.plan-pill.free { background: var(--surface); color: var(--ink); }
.plan-pill:hover { background: var(--accent); color: #fff; }
.plan-status { text-align: center; background: var(--tint-sage); border-radius: var(--radius); padding: 12px 16px; margin: 0 auto 24px; max-width: 560px; }
.plan.current { outline: 2px solid var(--green); outline-offset: -2px; }

/* ---------- slide list: insert points, drag to reorder, undo ---------- */
.slide-thumb { position: relative; }
.slide-insert { display: block; width: 100%; height: 16px; margin: -13px 0 -3px; padding: 0; border: 0; background: transparent; position: relative; z-index: 2; cursor: pointer; }
.slide-insert::before { content: ""; position: absolute; left: 30px; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--accent); opacity: 0; transition: opacity .12s; }
.slide-insert span { position: absolute; left: calc(50% + 15px); top: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .12s, transform .12s; box-shadow: 0 2px 6px rgba(90, 94, 230, .4); }
.slide-insert:hover::before, .slide-insert:focus-visible::before, .slide-insert:hover span, .slide-insert:focus-visible span { opacity: 1; }
.slide-insert:hover span { transform: translate(-50%, -50%) scale(1.1); }
.slide-insert:first-of-type { margin-top: -6px; }
.slide-thumb.dragging { opacity: .35; }
.slide-thumb.drop-before::after, .slide-thumb.drop-after::after { content: ""; position: absolute; left: 30px; right: 0; height: 3px; border-radius: 2px; background: var(--accent); }
.slide-thumb.drop-before::after { top: -7px; }
.slide-thumb.drop-after::after { bottom: -7px; }
.slides-tip { font-size: .75rem; color: var(--muted); text-align: center; margin: 14px 0 0; }
.undo-group { display: inline-flex; gap: 2px; margin-right: 4px; }
.undo-group .btn:disabled { opacity: .3; }
@media (max-width: 900px) { .slide-insert, .slides-tip { display: none; } }

/* =========================================================
   New slide types, formatted text, click-to-reveal, speaker notes, presenter view
   ========================================================= */
/* editor: notes + slide picker */
.notes-box { width: 100%; max-width: 980px; margin-top: 14px; }
.notes-box label { font-weight: 600; font-size: .9rem; margin-bottom: 6px; display: block; }
.notes-box textarea { width: 100%; resize: vertical; min-height: 70px; background: #fff; }
.popover.slide-pick { width: min(560px, calc(100vw - 20px)); padding: 10px 12px 14px; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.pick-grid button { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 9px 12px; border-radius: 12px; cursor: pointer; text-align: left; font-size: .97rem; font-weight: 500; }
.pick-grid button:hover { background: var(--surface); }
.pick-grid .pi { width: 24px; height: 24px; flex: none; display: grid; place-items: center; }
.embed-help { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-top: 8px; font-size: .85rem; }
.embed-help p { margin: 0 0 5px; }

/* editor previews of new types */
.slide-preview .sp-rank { margin-top: auto; display: grid; gap: 1.2cqw; }
.slide-preview .sp-rank div { display: grid; grid-template-columns: 3cqw 26% 1fr; align-items: center; gap: 1.4cqw; font-size: 1.8cqw; font-weight: 600; }
.slide-preview .sp-rank b { background: var(--c); color: #fff; border-radius: 50%; width: 3cqw; height: 3cqw; display: grid; place-items: center; font-size: 1.4cqw; }
.slide-preview .sp-rank span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-preview .sp-rank i { height: 2.4cqw; background: var(--c); border-radius: 1cqw; opacity: .85; }
.slide-preview .sp-qa { margin-top: auto; display: grid; gap: 1.2cqw; }
.slide-preview .sp-qa div { display: flex; justify-content: space-between; gap: 2cqw; background: var(--th-panel, var(--surface-2)); border-radius: 1.4cqw; padding: 1.6cqw 2cqw; font-size: 1.9cqw; font-weight: 600; opacity: .7; }
.slide-preview .sp-qa b { color: var(--accent); white-space: nowrap; }
.slide-preview .sp-hist { height: 20cqw; gap: 1cqw; }
.slide-preview .sp-range { display: flex; justify-content: space-between; gap: 2cqw; font-size: 1.6cqw; color: var(--muted); margin-top: 1cqw; font-weight: 600; }
.slide-preview .sp-range b { color: var(--ok); }
.slide-preview .sp-grid, .grid2 { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 8px; margin-top: auto; }
.slide-preview .sp-grid { height: 30cqw; }
.sp-grid .box, .grid2 .box { position: relative; border-radius: 12px; background: linear-gradient(var(--line), var(--line)) 50% 0 / 2px 100% no-repeat, linear-gradient(var(--line), var(--line)) 0 50% / 100% 2px no-repeat, var(--surface-2); }
.sp-grid .ax, .grid2 .ax { font-weight: 700; color: var(--muted); font-size: .9rem; }
.slide-preview .sp-grid .ax { font-size: 1.5cqw; }
.sp-grid .ax.y, .grid2 .ax.y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; }
.sp-grid .ax.x, .grid2 .ax.x { grid-column: 2; text-align: right; }
.sp-grid .pt, .grid2 .pt { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; transition: left .6s, top .6s; }
.slide-preview .sp-grid .pt { font-size: 1.5cqw; }
.sp-grid .pt i, .grid2 .pt i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px #fff; flex: none; }
.slide-preview .sp-pin, .pin-board { position: relative; margin: auto; max-height: 100%; display: inline-block; align-self: center; }
.slide-preview .sp-pin { height: 36cqw; }
.slide-preview .sp-pin img, .pin-board img { height: 100%; max-width: 100%; object-fit: contain; display: block; border-radius: 12px; }
.slide-preview .sp-pin i, .pin-board i { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: rgba(238, 107, 95, .7); border: 2px solid #fff; transform: translate(-50%, -50%); pointer-events: none; }
.slide-preview .sp-empty { margin: auto; text-align: center; color: var(--muted); font-size: 1.8cqw; }
.slide-preview .sp-empty svg { width: 10cqw; height: 10cqw; opacity: .6; }
.slide-preview.media { padding: 3% 4%; }
.slide-preview .sp-frame { flex: 1; min-height: 0; border-radius: 1.4cqw; overflow: hidden; background: #000; }
.slide-preview .sp-frame iframe, .slide-preview .sp-frame video { width: 100%; height: 100%; border: 0; display: block; }
.slide-preview .sp-join { margin: auto 0; display: grid; grid-template-columns: 1fr 22cqw; gap: 4cqw; align-items: center; background: var(--th-panel, var(--surface)); border-radius: 2cqw; padding: 4cqw; }
.slide-preview .sp-join .l { font-size: 2cqw; color: var(--muted); }
.slide-preview .sp-join .u { font-size: 2.8cqw; font-weight: 700; margin-bottom: 1.6cqw; }
.slide-preview .sp-join .c { font-size: 7cqw; font-weight: 800; letter-spacing: .05em; }
.slide-preview .sp-join .qr svg { width: 100%; height: auto; }
.slide-preview .sp-note { text-align: center; font-size: 1.4cqw; color: var(--muted); margin: 1.5cqw 0 0; }

/* formatted text + click-to-reveal */
.design-stage .el-text.rich { white-space: normal; }
.design-stage .el-text ul, .design-stage .el-text ol { margin: 0; padding-left: 1.2em; }
.design-stage .el-text.editing ul, .design-stage .el-text.editing ol { padding-left: 1.2em; }
.design-stage .build-hidden { visibility: hidden; }
.design-wrap.editable .el[data-step]::before { content: attr(data-step); position: absolute; top: -9px; left: -9px; z-index: 3; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font: 700 11px/18px var(--font); box-shadow: 0 0 0 2px #fff; text-align: center; font-style: normal; pointer-events: none; }
.rt-bar { position: absolute; z-index: 30; display: flex; flex-wrap: wrap; max-width: min(620px, 100%); align-items: center; gap: 2px; background: #1e1c19; border-radius: 12px; padding: 4px; box-shadow: var(--shadow-lg); white-space: nowrap; }
.rt-bar button { border: 0; background: none; color: #fff; min-width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font: 600 .9rem var(--font); }
.rt-bar button:hover { background: rgba(255, 255, 255, .15); }
.rt-bar .sw { min-width: 18px; width: 18px; height: 18px; border-radius: 50%; margin: 0 2px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5); }
.rt-bar .sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .25); margin: 0 4px; }

/* projector: new types */
.present.embedded { padding-bottom: 0; }
.present.embedded .pbar, .present.embedded .pnav { display: none; }
.present.embedded .stage { padding-top: 24px; }
.present.embedded .present-design { width: min(calc(100vw - 68px), calc((100dvh - 60px) * var(--ar, 1.7778))); }
.join-banner.big { padding: 50px 56px; }
.join-banner.big img { width: 280px; height: 280px; }
.join-banner.big .url { font-size: 2.2rem; }
.media-frame { height: calc(100dvh - 260px); min-height: 300px; border-radius: 18px; overflow: hidden; background: #000; }
.media-frame.tall { height: calc(100dvh - 200px); background: #fff; box-shadow: 0 0 0 1px var(--line); }
.media-frame iframe, .media-frame video { width: 100%; height: 100%; border: 0; display: block; }
.media-placeholder { height: 100%; display: grid; place-items: center; color: #fff; font-size: 1.6rem; font-weight: 700; }
.hbars { display: grid; gap: 14px; }
.hrow { display: grid; grid-template-columns: auto minmax(160px, 30%) 1fr 110px; gap: 16px; align-items: center; font-size: 1.35rem; font-weight: 600; }
.hbars .hrow:not(:has(.pos)) { grid-template-columns: minmax(160px, 30%) 1fr 110px; }
.hrow .pos { background: var(--c); color: #fff; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.hrow .lbl { overflow-wrap: anywhere; }
.hrow .track { height: 34px; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.hrow .track i { display: block; height: 100%; background: var(--c); border-radius: 10px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.hrow .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.present.themed .hrow .track { background: var(--th-panel); }
.qa-list { display: grid; gap: 12px; }
.qa-item { display: flex; align-items: center; gap: 16px; text-align: left; width: 100%; border: 0; background: var(--surface-2); color: inherit; border-radius: 16px; padding: 18px 22px; font: 600 1.35rem var(--font); cursor: pointer; }
.qa-item:hover { box-shadow: 0 0 0 2px var(--accent); }
.qa-item .t { flex: 1; overflow-wrap: anywhere; }
.qa-item .v { color: var(--accent); font-weight: 800; white-space: nowrap; }
.qa-item .ok { color: var(--ok); font-size: 1rem; white-space: nowrap; }
.qa-item.done { opacity: .5; }
.present.themed .qa-item { background: var(--th-panel); }
.bars.hist { gap: 8px; height: 280px; padding: 22px 22px 0; }
.bars.hist .bar.hit .fill { box-shadow: 0 0 0 3px var(--ok); }
.hist-axis { display: flex; gap: 8px; padding: 0 22px; color: var(--muted); font-weight: 600; }
.hist-axis span { flex: 1; text-align: center; min-width: 0; font-size: .95rem; }
.num-stats { text-align: center; font-size: 1.4rem; margin-top: 18px; }
.num-stats .ans { color: var(--ok); }
.grid2 { height: calc(100dvh - 330px); min-height: 300px; }
.grid2 .pt { font-size: 1.2rem; }
.grid2.small-grid { height: 280px; }
.grid2.small-grid .pt { font-size: .85rem; }
.pin-board { height: calc(100dvh - 300px); min-height: 280px; display: block; width: fit-content; margin: 0 auto; }
.pin-board.small-pins { height: 260px; }
.present.media-slide .stage { max-width: none; }

/* presenter view */
.presenter { background: #1b1a17; color: #f4f1ec; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.presenter .muted { color: #a8a39b; }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 22px; border-bottom: 1px solid #33302b; }
.pv-top .logo { color: #fff; font-size: 1rem; gap: 10px; }
.pv-clock { display: flex; gap: 22px; align-items: center; font-size: 1.05rem; }
.pv-clock b { font-variant-numeric: tabular-nums; font-size: 1.3rem; }
.pv-clock .btn { color: #fff; }
.pv-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 22px; padding: 18px 22px; min-height: 0; }
.pv-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: #a8a39b; margin-bottom: 8px; }
.pv-label .btn { color: #fff; text-transform: none; }
.pv-screen { position: relative; width: 100%; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px #33302b; }
.pv-screen iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 720px; border: 0; transform-origin: 0 0; pointer-events: none; }
.pv-side { display: flex; flex-direction: column; min-height: 0; }
.pv-next .pv-thumb { border-radius: 10px; overflow: hidden; }
.pv-card { background: #2a2824; border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; }
.pv-card .ic { width: 34px; height: 34px; grid-row: span 2; }
.pv-card b { font-size: 1.05rem; }
.pv-card span:not(.ic) { color: #a8a39b; font-size: .9rem; grid-column: 2; }
.pv-card:not(:has(.ic)) b, .pv-card:not(:has(.ic)) span { grid-column: 1 / -1; }
.pv-notes { flex: 1; overflow-y: auto; background: #2a2824; border-radius: 12px; padding: 16px 18px; line-height: 1.5; min-height: 160px; }
.pv-nav { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid #33302b; }
.pv-nav .round-btn { background: #33302b; color: #fff; font-size: 1.4rem; }
.pv-nav .round-btn:disabled { opacity: .35; }
.presenter .btn.dark { background: var(--accent); border-color: var(--accent); }
.presenter .btn.soft { background: #33302b; border-color: #33302b; color: #fff; }
@media (max-width: 860px) { .pv-main { grid-template-columns: 1fr; } }

/* phone: new types */
.player .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.phone-embed { height: 60dvh; border-radius: 16px; overflow: hidden; background: #fff; }
.phone-embed iframe { width: 100%; height: 100%; border: 0; }
.qa-phone { display: grid; gap: 8px; margin-top: 4px; }
.qa-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 12px 14px; }
.qa-row .t { flex: 1; overflow-wrap: anywhere; }
.qa-row.done { opacity: .55; }
.qa-row .vote { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.qa-row .vote.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rank-phone { display: grid; gap: 8px; }
.rank-item { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 8px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 12px; font-weight: 600; }
.rank-item b { background: var(--accent); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; }
.rank-item .btn.icon { width: 36px; height: 36px; }
.num-pick { display: flex; align-items: center; justify-content: center; gap: 8px; }
.num-pick input { font-size: 2rem; font-weight: 800; text-align: center; max-width: 200px; }
.num-pick span { font-size: 1.4rem; font-weight: 700; }
#numRange { width: 100%; accent-color: var(--accent); }
.pts-row { display: grid; grid-template-columns: 1fr 40px 54px 40px; gap: 8px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 12px; }
.pts-row .lbl { font-weight: 600; overflow-wrap: anywhere; }
.pts-row b { text-align: center; font-size: 1.2rem; }
.grid-item { background: rgba(255, 255, 255, .6); border-radius: 16px; padding: 12px; display: grid; gap: 8px; }
.pin-phone { position: relative; cursor: crosshair; }
.pin-phone img { width: 100%; display: block; border-radius: 14px; }
.pin-phone i { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--bad); border: 3px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }

/* ---------- quiz timers & automatic mode ---------- */
.quiz-clock { display: inline-flex; align-items: center; gap: 6px; align-self: center; padding: 5px 12px; border-radius: 99px; background: var(--surface-2, #f2f0ec); font-size: .9rem; font-variant-numeric: tabular-nums; }
.quiz-clock.low { background: #fbe1dd; color: #b3261e; }
.pnav .quiz-clock { font-size: 1rem; }
.auto-board { display: flex; flex-direction: column; gap: 10px; max-width: 980px; width: 100%; margin: 10px auto 0; overflow-y: auto; }
.auto-row { display: grid; grid-template-columns: 40px minmax(120px, 220px) 1fr 170px; align-items: center; gap: 14px; font-size: 1.2rem; }
.auto-row.off { opacity: .45; }
.auto-row .av { font-size: 1.6rem; }
.auto-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-row .track { height: 12px; border-radius: 99px; background: rgba(127, 127, 127, .18); overflow: hidden; }
.auto-row .track i { display: block; height: 100%; background: var(--c2); border-radius: 99px; transition: width .4s; }
.auto-row .st { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .auto-row { grid-template-columns: 30px 1fr 110px; font-size: 1rem; } .auto-row .track { display: none; } }

/* ---------- student: pick your name from the class list ---------- */
.roster-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; margin-top: 12px; }
.roster-list button { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.roster-list button:hover { border-color: var(--accent); }
.roster-list button span { color: var(--muted); font-size: .85rem; }

/* =========================================================
   Classroom management
   ========================================================= */
input[type=date], input[type=tel] { width: 100%; font: inherit; padding: .7em .9em; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.help { font-size: .86rem; color: var(--muted); margin: 6px 0 0; }
.mtabs a { padding: 14px 0; font-size: 1.05rem; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.mtabs a.active { color: var(--ink); border-color: var(--accent); }
.mtabs:has(a) { overflow-x: auto; gap: 28px; }
.class-head { margin: 10px 0 18px; align-items: flex-start; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-col > .rcard { margin-bottom: 14px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* class cards */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.class-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; background: #fff; transition: box-shadow .15s, transform .15s; }
.class-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.class-card .thumb { padding: 22px 22px 26px; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; }
.class-card .thumb b { font-size: 1.35rem; letter-spacing: -0.01em; }
.class-card .thumb span { color: var(--muted); }
.class-card .meta { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.class-card .nums { display: flex; gap: 14px; flex-wrap: wrap; font-size: .92rem; color: var(--muted); }
.class-card .nums b { color: var(--ink); }
.empty-classes { border: 1.5px dashed var(--line); border-radius: var(--radius-lg); padding: 34px 24px; text-align: center; }
.empty-classes .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 26px; text-align: left; }
.empty-classes .steps > div { background: var(--surface-2); border-radius: var(--radius); padding: 18px; }
.empty-classes .steps b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; margin-bottom: 10px; }
.empty-classes .steps h3 { margin: 0 0 4px; }
.empty-classes .steps p { margin: 0; color: var(--muted); font-size: .92rem; }

/* students */
.stu-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.stu-link:hover b { color: var(--accent); text-decoration: underline; }
.ini { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .8rem; flex: none; }
.ini.big { width: 64px; height: 64px; font-size: 1.4rem; }
.stu-list { display: flex; flex-direction: column; gap: 8px; }
.stu-row { display: flex; align-items: center; gap: 10px; }
.stu-row .stu-link { flex: 1; min-width: 0; }
.rank-n { width: 30px; color: var(--muted); font-weight: 700; }
.chip-num { display: inline-block; min-width: 52px; text-align: center; padding: 3px 9px; border-radius: 99px; background: var(--surface); font-weight: 700; font-size: .88rem; font-variant-numeric: tabular-nums; }
.chip-num.high, .stat-tile b.high { color: var(--ok); }
.chip-num.mid, .stat-tile b.mid { color: var(--warn); }
.chip-num.low, .stat-tile b.low { color: var(--bad); }
.chip-num.high { background: #e3f3e8; } .chip-num.mid { background: var(--warn-bg); } .chip-num.low { background: #fbe1dd; }
.up { color: var(--ok); font-weight: 700; } .down { color: var(--bad); font-weight: 700; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.drop-file { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 46px 20px; border: 2px dashed var(--line); border-radius: var(--radius-lg); cursor: pointer; text-align: center; color: var(--ink); font-size: 1rem; }
.drop-file.over, .drop-file:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop-file.busy { opacity: .5; pointer-events: none; }

/* register + gradebook tables (scroll sideways, names stay put) */
.card.register { padding: 0; overflow-x: auto; }
.register table.results th, .register table.results td { padding: 9px 10px; }
.register .sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 200px; box-shadow: 1px 0 0 var(--line); }
.register tfoot td { background: var(--surface-2); }
.register tfoot .sticky { background: var(--surface-2); }
.register .dcol, .register .acol { cursor: pointer; text-align: center; }
.register .dcol:hover, .register .acol:hover { color: var(--accent); }
.register .acol b { display: block; color: var(--ink); max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.register .acol span { font-weight: 500; font-size: .78rem; }
.att-cell { text-align: center; }
.att { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font-weight: 700; font-size: .8rem; }
.att-P { background: #e3f3e8; color: var(--ok); } .att-A { background: #fbe1dd; color: var(--bad); }
.mark-in { width: 76px !important; padding: .45em .5em !important; text-align: center; }
.mark-in.over { outline: 2px solid var(--bad); }

/* attendance sheet */
.att-sheet { border-color: var(--accent); }
.att-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 22px; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.att-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-seg { display: inline-flex; gap: 4px; }
.att-seg button { width: 34px; height: 32px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; color: var(--muted); }
.att-seg button.on { border-color: transparent; }
.att-seg button.on.att-P { background: var(--ok); color: #fff; } .att-seg button.on.att-A { background: var(--bad); color: #fff; }
.att-seg button:not(.on) { background: #fff; }
.att-bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-bottom: 22px; }
.att-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.att-bars i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: var(--ok); min-height: 2px; }
.att-bars i.mid { background: #e0a030; } .att-bars i.low { background: var(--bad); }
.att-bars span { position: absolute; bottom: -20px; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.att-history { display: flex; flex-wrap: wrap; gap: 6px; }
.att-day { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 8px; border-radius: 10px; font-size: .74rem; min-width: 52px; }
.att-day b { font-size: 1rem; }

/* materials + email */
.mat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mat { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; flex-wrap: wrap; }
.mat .ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.mat a { text-decoration: none; } .mat a:hover b { text-decoration: underline; }
.mat .grow { min-width: 0; overflow-wrap: anywhere; }
.email-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1000px) { .email-layout { grid-template-columns: 1fr; } }
.pick-students { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 14px; max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.pick-students label { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); margin: 0; font-size: .92rem; cursor: pointer; }
.pick-students label.muted { color: var(--muted); }
.warn-box { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: .92rem; }
.box { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.sent-msg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.sent-msg summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.sent-msg pre { white-space: pre-wrap; font-family: inherit; font-size: .92rem; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 10px 0 6px; }
.imp-list { display: flex; flex-direction: column; gap: 8px; }
.imp-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.imp-list button:hover { border-color: var(--accent); }
.imp-list button span { color: var(--muted); font-size: .88rem; }
.imp-list .badge { color: var(--ok) !important; }

/* student page */
.stu-head { display: flex; align-items: center; gap: 16px; margin: 14px 0 6px; flex-wrap: wrap; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; overflow-wrap: anywhere; }
.prog-chart { width: 100%; height: auto; }
.prog-chart .grid { stroke: var(--line); }
.prog-chart .ax { font-size: 11px; fill: var(--muted); }
.prog-chart .avg { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 5; }
.prog-chart .mine { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
.prog-chart .dot { fill: #fff; stroke: var(--accent); stroke-width: 3; }

/* marks import + grades */
.grade-chip { display: inline-block; min-width: 38px; text-align: center; padding: 3px 10px; border-radius: 8px; font-weight: 800; background: var(--surface); }
.grade-chip.high { background: #e3f3e8; color: var(--ok); } .grade-chip.mid { background: var(--warn-bg); color: var(--warn); } .grade-chip.low { background: #fbe1dd; color: var(--bad); }
.register th.excluded, .register td.excluded { opacity: .5; }
.register td.excluded input { background: var(--surface-2); }
.nowrap { white-space: nowrap; }
.grading-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 900px) { .grading-layout { grid-template-columns: 1fr; } }
.inc-list { grid-template-columns: 1fr; }
.scale-rows { display: flex; flex-direction: column; gap: 6px; }
.scale-row { display: grid; grid-template-columns: auto 90px auto 1fr auto; gap: 8px; align-items: center; }
.steps-bar { display: flex; gap: 8px; margin: 14px 0 20px; flex-wrap: wrap; }
.steps-bar span { padding: 6px 14px; border-radius: 99px; background: var(--surface); color: var(--muted); font-weight: 600; font-size: .9rem; }
.steps-bar span.on { background: var(--accent-soft); color: var(--accent); }
.mk-cols tr.off td:not(:first-child) { opacity: .45; }
.mk-cols input[type=text] { min-width: 180px; }
.warn-text { color: var(--warn); font-size: .8rem; } .bad-text { color: var(--bad); font-weight: 600; }
.mk-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; font-weight: 600; font-size: .95rem; }
.mk-summary .ok { color: var(--ok); } .mk-summary .check { color: var(--warn); } .mk-summary .bad { color: var(--bad); } .mk-summary .off { color: var(--muted); }
.mk-names tr.st-check td { background: #fffaf0; } .mk-names tr.st-bad td { background: #fdf0ee; } .mk-names tr.st-off td { opacity: .5; }
.mk-names td.bad, .mk-names td.over { color: var(--bad); font-weight: 700; }
.mk-names select { min-width: 220px; }

/* master overview */
.master-banner { display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-bottom: 22px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--ink); text-decoration: none; border: 1.5px solid transparent; transition: border-color .15s; }
.master-banner:hover { border-color: var(--accent); }
.master-banner .ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--accent); color: #fff; flex: none; }
.master-banner b { display: block; font-size: 1.15rem; }
.master-banner .grow > span { color: var(--muted); font-size: .94rem; }
.term-tag { display: inline-block; margin-top: 6px; font-style: normal; font-size: .78rem; font-weight: 600; background: rgba(255, 255, 255, .7); border-radius: 99px; padding: 2px 10px; align-self: flex-start; }
.g-mini { display: inline-block; font-size: .82rem; background: var(--surface); border-radius: 6px; padding: 1px 6px; margin: 1px 2px 1px 0; white-space: nowrap; }
.g-tiny { margin-left: 6px; font-size: .82rem; }
.master-table th.m-cell { text-align: center; min-width: 110px; }
.master-table th.m-cell b { display: block; color: var(--ink); }
.master-table th.m-cell span { font-weight: 500; font-size: .76rem; }
.master-table td.m-cell { text-align: center; }
.track.vs { position: relative; overflow: visible; }
.avg-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; }
.term-row { display: grid; grid-template-columns: 180px 1fr 1fr; gap: 16px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.term-row .hbar { margin: 0; grid-template-columns: 90px 1fr 60px; }
@media (max-width: 900px) { .term-row { grid-template-columns: 1fr; gap: 6px; } }

.st-badge { display: inline-block; font-weight: 700; font-size: .8rem; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.st-badge.ok { background: #e3f3e8; color: var(--ok); } .st-badge.bad { background: #fbe1dd; color: var(--bad); } .st-badge.check { background: var(--warn-bg); color: var(--warn); }

/* =========================================================
   Personality tests — dashboard, test page, reports
   ========================================================= */
.pt-hero { grid-template-columns: 1.4fr 1fr; padding: 44px 50px; }
.pt-art { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; max-width: 280px; justify-self: center; width: 100%; text-align: center; font-weight: 700; color: var(--muted); }
.pt-art .plot { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; height: 170px; background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 8px; }
.pt-art .plot i { border-radius: 6px 6px 0 0; }
.pt-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.pt-test { border-radius: var(--radius-xl); padding: 26px 28px; display: flex; flex-direction: column; gap: 6px; min-height: 260px; }
.pt-test h3 { font-size: 1.3rem; margin: 0; }
.pt-test .lede { font-size: 1.08rem; font-weight: 600; margin: 4px 0; }
.pt-test .small { color: #45413b; margin-bottom: 18px; }
.pt-share { display: flex; gap: 20px; align-items: center; margin: 18px 0 6px; flex-wrap: wrap; }
.pt-share img { border-radius: 10px; border: 1px solid var(--line); }
.pt-table { overflow-x: auto; }
.pt-table td.small { white-space: nowrap; }
.pt-group { padding: 24px 28px; }

/* test page */
.fbody .fmain.tmain.wide { max-width: 980px; }
.t-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.t-facts span { background: var(--surface); border-radius: 99px; padding: 6px 14px; font-weight: 600; font-size: .92rem; }
.t-note { background: var(--surface-2); border: 0; margin-bottom: 22px; }
.t-steps { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.t-steps span { flex: 1; min-width: 110px; font-size: .82rem; font-weight: 600; color: var(--muted); border-top: 4px solid var(--surface-3); padding-top: 6px; }
.t-steps span.done { border-color: var(--accent-soft); }
.t-steps span.on { border-color: var(--accent); color: var(--ink); }
.t-head h2 { font-size: 1.5rem; }
.tq { border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.tq.missing { border-color: var(--bad); background: #fff8f7; }
.tq-t { font-weight: 600; font-size: 1.06rem; margin-bottom: 12px; }
.tq-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tq-scale button { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 6px; cursor: pointer; font-size: .82rem; line-height: 1.2; min-height: 48px; }
.tq-scale button:hover { border-color: #cbc4b9; }
.tq-scale button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.ml-head, .ml-row { display: grid; grid-template-columns: 1fr 70px 70px; align-items: center; gap: 6px; }
.ml-head b { text-align: center; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ml-row { padding: 6px 0; border-top: 1px solid var(--line); font-size: 1.05rem; font-weight: 500; }
.ml { justify-self: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #bdb6ab; background: #fff; cursor: pointer; padding: 0; }
.ml.on.most { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 5px #fff; }
.ml.on.least { background: var(--bad); border-color: var(--bad); box-shadow: inset 0 0 0 5px #fff; }
.bp-q { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; font-weight: 600; }
.bp-q .side.r { text-align: right; }
.bp-scale { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 4px; }
.bp-scale button { border: 0; background: none; cursor: pointer; padding: 6px; display: grid; place-items: center; }
.bp-scale i { display: block; border-radius: 50%; border: 2px solid #bdb6ab; background: #fff; }
.bp-scale .s1 i, .bp-scale .s5 i { width: 38px; height: 38px; }
.bp-scale .s2 i, .bp-scale .s4 i { width: 30px; height: 30px; }
.bp-scale .s3 i { width: 22px; height: 22px; }
.bp-scale button.on i { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px #fff; }
.t-done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #e3f3e8; border-radius: 16px; padding: 14px 18px; margin-bottom: 26px; }

/* report */
.report { --rp-line: var(--line); }
.rp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 3px solid var(--ink); padding-bottom: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.rp-head h1 { font-size: 2.3rem; margin: 0; letter-spacing: -0.02em; }
.rp-kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; margin-bottom: 4px; }
.rp-date { color: var(--muted); font-weight: 600; }
.rp-sec { margin-bottom: 40px; break-inside: avoid-page; }
.rp-sec > h2 { font-size: 1.35rem; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; font-weight: 700; margin-bottom: 8px; }
.rp-intro { color: var(--muted); font-style: italic; margin-bottom: 16px; }
.rp-h { font-size: 1.08rem; margin: 18px 0 10px; }
.rp-text { font-size: 1.02rem; line-height: 1.6; }
.rp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.rp-bars .hbar { grid-template-columns: minmax(140px, 38%) 1fr auto; }
.rp-bars .hbar .val { white-space: nowrap; min-width: 70px; }
.rp-bars .hbar .track { height: 20px; }
.rp-list { margin: 0 0 8px; padding-left: 20px; line-height: 1.55; }
.rp-list li { margin-bottom: 4px; }
.rp-list.ok li::marker { color: var(--ok); } .rp-list.bad li::marker { color: var(--bad); } .rp-list.warn li::marker { color: var(--warn); }
.rp-rank { margin: 0; padding: 0; list-style: none; counter-reset: r; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rp-rank li { counter-increment: r; padding: 9px 14px; border-top: 1px solid var(--line); font-weight: 600; display: flex; gap: 12px; }
.rp-rank li:first-child { border-top: 0; }
.rp-rank li::before { content: counter(r); width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .8rem; flex: none; }
.rp-score { display: flex; gap: 26px; align-items: center; background: var(--surface-2); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px; }
.rp-score .ring { --p: 0; flex: none; width: 130px; height: 130px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-content: center; text-align: center; position: relative; }
.rp-score .ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface-2); }
.rp-score .ring b, .rp-score .ring span { position: relative; }
.rp-score .ring b { font-size: 2.4rem; line-height: 1; }
.rp-score .ring span { color: var(--muted); font-size: .9rem; }
.rp-band { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.rp-discs { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.rp-disc { width: 240px; }
.rp-disc .gt { text-align: center; font-weight: 700; margin-bottom: 8px; }
.rp-disc .plot { position: relative; height: 210px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: repeating-linear-gradient(to top, transparent 0 20.9px, var(--surface) 20.9px 21.9px); }
.rp-disc .plot .mid { position: absolute; left: 0; right: 0; bottom: 50%; border-top: 2px solid var(--ink); opacity: .6; }
.rp-disc .col { height: 100%; display: flex; align-items: flex-end; }
.rp-disc .bar { width: 100%; border-radius: 5px 5px 0 0; display: block; }
.rp-disc .axis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 6px 12px 0; text-align: center; font-size: .95rem; }
.rp-disc .axis b { display: block; color: var(--muted); font-size: .8rem; }
.rp-table { overflow-x: auto; }
.rp-table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rp-table th, .rp-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.rp-table thead th { background: var(--surface); font-size: .82rem; }
.rp-table tbody th { font-weight: 700; white-space: nowrap; }
.rp-table tr.hl > * { background: var(--accent-soft); }
.rp-pair { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 14px; break-inside: avoid; }
.rp-pair .ph { color: #fff; font-weight: 700; padding: 8px 16px; font-size: 1.05rem; }
.rp-pair .pc { display: grid; grid-template-columns: 1fr 1fr; }
.rp-pair .pc > div { padding: 12px 16px; }
.rp-pair .pc > div + div { border-left: 1px solid var(--line); }
.rp-pair p { margin: 6px 0 0; font-size: .95rem; }
.rp-bipolar .bp { margin-bottom: 18px; break-inside: avoid; }
.rp-bipolar .ends { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; font-size: .95rem; margin-bottom: 5px; }
.rp-bipolar .ends span:last-child { text-align: right; }
.rp-bipolar .ends em { font-style: normal; color: var(--muted); font-size: .85rem; }
.rp-bipolar .ends .pri { font-weight: 700; color: var(--accent); }
.rp-bipolar .bpt { position: relative; height: 22px; background: var(--surface); border-radius: 8px; }
.rp-bipolar .bpt i { position: absolute; top: 0; bottom: 0; }
.rp-bipolar .bpt .l { right: 50%; background: linear-gradient(to left, #8e8ae8, #5a5ee6); border-radius: 8px 0 0 8px; }
.rp-bipolar .bpt .r { left: 50%; background: linear-gradient(to right, #8e8ae8, #5a5ee6); border-radius: 0 8px 8px 0; }
.rp-bipolar .bpt .zero { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; }
.rp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.rp-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; break-inside: avoid; }
.rp-card h4 { font-size: 1.05rem; margin: 0; }
.rp-card .sc { font-size: 1.15rem; }
.rp-card .badge { margin: 6px 0 8px; }
.rp-card p { font-size: .94rem; margin: 6px 0; }
.rp-card .lt { font-weight: 700; font-size: .85rem; margin-top: 10px; }
.rp-card ul { margin: 4px 0 0; padding-left: 18px; font-size: .92rem; }
.rp-credit { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }

@media (max-width: 760px) {
  .pt-hero { grid-template-columns: 1fr; }
  .pt-art { display: none; }
  .rp-row, .rp-pair .pc { grid-template-columns: 1fr; }
  .rp-pair .pc > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .rp-score { flex-direction: column; text-align: center; }
  .rp-bars .hbar { grid-template-columns: 1fr auto; }
  .rp-bars .hbar .track { grid-column: 1 / -1; grid-row: 2; }
  .tq-scale { grid-template-columns: 1fr; }
  .tq-scale button { min-height: 0; text-align: left; padding: 10px 12px; font-size: .95rem; }
  .rp-head h1 { font-size: 1.8rem; }
}

@media print {
  .no-print, .sidebar, .topbar, .ftop, .flogo, .toast { display: none !important; }
  .app { display: block; }
  .main, .fbody .fmain { padding: 0; max-width: none; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-sec { break-inside: auto; }
  .rp-sec > h2 { break-after: avoid; }
}

/* start dialog: who can join */
.net-opts { display: grid; gap: 10px; }
.net-opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; color: var(--ink); font-weight: 400; font-size: 1rem; margin: 0; }
.net-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.net-opt input { margin-top: 4px; accent-color: var(--accent); }
.net-opt b { display: block; }
.net-opt small { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }

/* =========================================================
   Design engine extras: SVG shapes, tables, pickers, print
   ========================================================= */
.design-stage .el-shape.svg svg { width: 100%; height: 100%; display: block; overflow: visible; }
.design-stage .el-table { overflow: hidden; }
.design-stage .el-table table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
.design-stage .el-table th, .design-stage .el-table td { padding: .3em .55em; vertical-align: middle; overflow-wrap: anywhere; line-height: 1.25; }
.design-stage .el-table th { font-weight: 700; }
.design-stage .el-text sub, .design-stage .el-text sup { font-size: .7em; }
.swatches { gap: 5px; }
.swatches button { width: 22px; height: 22px; }
.grad-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.grad-grid button { aspect-ratio: 1; border-radius: 8px; border: 1px solid rgba(0,0,0,.12); cursor: pointer; padding: 0; }
.grad-grid button:hover { box-shadow: 0 0 0 2px var(--accent); }
.shape-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.shape-pick button { height: 40px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; display: grid; place-items: center; color: var(--ink); padding: 0; }
.shape-pick button:hover, .shape-pick button.on { border-color: var(--accent); color: var(--accent); }
.shape-pick.pop { width: 300px; padding: 8px; }
.emoji-grid { max-height: 260px; overflow-y: auto; }
.editor.is-poster .canvas-inner { align-items: center; }
.editor.is-poster .design-wrap { margin: 0 auto; }
.layout-grid .mini { max-height: 110px; margin-left: auto; margin-right: auto; }

/* print / PDF */
.print-body { background: #e9e6e1; margin: 0; }
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.print-page { width: min(92vw, 1000px); margin: 24px auto; background: #fff; box-shadow: 0 6px 30px rgba(0,0,0,.15); overflow: hidden; }
.print-page .design-stage { width: 100%; }
@media print {
  .print-body { background: #fff; }
  .print-page { margin: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .print-page:last-child { break-after: auto; page-break-after: auto; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* poster maker */
.poster-hero-art { display: flex; gap: 14px; align-items: flex-end; justify-content: center; }
.poster-hero-art .ph-card { width: 30%; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.18); background: #fff; }
.poster-hero-art .ph-card:nth-child(2) { width: 34%; transform: translateY(-14px); }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; align-items: start; }
.ptpl { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 4px; font: inherit; color: inherit; }
.ptpl .pv { border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0,0,0,.06); transition: transform .15s, box-shadow .15s; background: #fff; }
.ptpl:hover .pv { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent), 0 10px 26px rgba(0,0,0,.12); }
.ptpl b { font-size: .98rem; margin-top: 6px; }
.ptpl span { font-size: .82rem; color: var(--muted); }
.nm-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .poster-hero-art { display: none; } .nm-grid { grid-template-columns: 1fr 1fr; } }

/* datasets */
.ds-hero .ds-art { display: grid; place-items: center; gap: 10px; text-align: center; font-weight: 700; color: var(--muted); }
.ds-hero .ds-art svg { width: 160px; height: 160px; }
.ds-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 30px 0 14px; }
.ds-bar .search { flex: 1; min-width: 220px; }
.ds-tags { margin-bottom: 22px; }
.ds-tags .chip-f { padding: .4em .9em; font-size: .88rem; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ds-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; background: #fff; min-height: 220px; transition: box-shadow .15s, transform .15s; }
.ds-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ds-card h3 { font-size: 1.08rem; margin: 4px 0 0; }
.ds-card p { margin: 0; }
.ds-src { font-size: .72rem; font-weight: 700; padding: .2em .6em; border-radius: 99px; background: var(--surface); color: var(--muted); }
.ds-src.s-sample { background: #e5edfb; color: #1d4ed8; } .ds-src.s-upload { background: #e3f3e8; color: var(--ok); } .ds-src.s-synthetic { background: var(--accent-soft); color: var(--accent); } .ds-src.s-survey { background: var(--warn-bg); color: var(--warn); }
.ds-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--ink); font-weight: 600; margin-top: 4px; }
.ds-tagrow { display: flex; flex-wrap: wrap; gap: 5px; }
.ds-tagrow i { font-style: normal; font-size: .76rem; background: var(--surface); border-radius: 99px; padding: 2px 9px; color: #4a463f; }
.ds-head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0 6px; }
.ds-tabs { margin-bottom: 18px; }
.ds-about { display: grid; gap: 14px; }
.ds-about .card p { margin-bottom: .5em; }
.ds-tasks { margin: 0; padding-left: 1.2em; line-height: 1.7; }
.ds-type { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--surface); }
.ds-type.t-number { background: #e5edfb; color: #1d4ed8; } .ds-type.t-category { background: #e3f3e8; color: var(--ok); } .ds-type.t-text { background: #fbe8e5; color: #b4412f; }
.ds-type.t-date { background: var(--warn-bg); color: var(--warn); } .ds-type.t-binary { background: var(--accent-soft); color: var(--accent); }
.ds-table { padding: 0; overflow: auto; max-height: 70vh; }
.ds-table table { border-collapse: collapse; font-size: .85rem; width: max-content; min-width: 100%; }
.ds-table th { position: sticky; top: 0; background: var(--surface); text-align: left; padding: 8px 10px; font-weight: 700; white-space: nowrap; z-index: 1; }
.ds-table td { padding: 6px 10px; border-top: 1px solid var(--line); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.ds-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ds-col .hbar { grid-template-columns: minmax(70px, 40%) 1fr 44px; font-size: .82rem; margin-bottom: 5px; }
.ds-col .hbar .track { height: 14px; }
.ds-hist { display: flex; align-items: flex-end; gap: 2px; height: 70px; }
.ds-hist i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 1px; opacity: .85; }
.ds-range { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin: 3px 0 8px; }
.ds-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); }
.ds-stats b { color: var(--ink); }
.syn-cols { display: grid; gap: 6px; margin: 12px 0; }
.syn-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr 1fr 80px 40px; gap: 6px; align-items: center; }
.syn-row input, .syn-row select { padding: .45em .6em; font-size: .9rem; }

/* community */
.cm-layout { display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start; }
.cm-side { position: sticky; top: 16px; }
.cm-topics { display: grid; gap: 2px; }
.cm-topics a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; font-size: .95rem; }
.cm-topics a span { color: var(--muted); font-size: .82rem; }
.cm-topics a:hover { background: var(--surface); }
.cm-topics a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.cm-mine { margin-top: 18px; padding: 14px; }
.cm-sort { margin-bottom: 14px; }
.cm-list { display: grid; gap: 10px; }
.cm-post { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px 12px 8px; background: #fff; cursor: pointer; transition: border-color .12s; }
.cm-post:hover { border-color: #cfc8bd; }
.cm-post h3 { font-size: 1.08rem; margin: 4px 0; }
.cm-excerpt { color: #4a463f; margin: 0 0 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cm-topic { background: var(--surface); border-radius: 99px; padding: 1px 8px; font-weight: 600; color: var(--ink); }
.cm-vote { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 40px; }
.cm-vote button { border: 0; background: none; cursor: pointer; color: #a8a29a; font-size: .95rem; padding: 2px 6px; border-radius: 6px; }
.cm-vote button:hover { background: var(--surface); }
.cm-vote button.up { color: #ff6a00; } .cm-vote button.down { color: #5a5ee6; }
.cm-vote b { font-size: .92rem; }
.cm-c-actions .cm-vote { flex-direction: row; min-width: 0; gap: 2px; }
.cm-full { display: flex; gap: 14px; margin: 14px 0 18px; }
.cm-title { font-size: 1.7rem; margin: 6px 0 10px; }
.cm-body { font-size: 1.02rem; line-height: 1.6; }
.cm-ds { display: inline-block; margin-bottom: 10px; background: #e5edfb; color: #1d4ed8; border-radius: 10px; padding: 6px 12px; text-decoration: none; font-size: .92rem; }
.cm-post-actions { margin-top: 10px; gap: 8px; }
.cm-compose { margin-bottom: 22px; }
.cm-thread { display: grid; gap: 4px; }
.cm-c { padding: 6px 0 0 0; }
.cm-c-head { display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.cm-fold { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 0 2px; }
.cm-c-body { margin: 4px 0 2px 24px; line-height: 1.55; }
.cm-c-body p { margin: 0 0 .4em; }
.cm-c-actions { display: flex; align-items: center; gap: 6px; margin-left: 18px; font-size: .85rem; }
.cm-c-actions > button { border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.cm-c-actions > button:hover { background: var(--surface); color: var(--ink); }
.cm-reply-slot { margin: 6px 0 6px 24px; }
.cm-kids { margin-left: 11px; padding-left: 14px; border-left: 2px solid var(--line); }
.cm-kids:hover { border-left-color: #cfc8bd; }
.cm-analysis { margin-bottom: 18px; }
.cm-analysis h4 { margin: 14px 0 8px; font-size: .95rem; }
.cm-an-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; }
.cm-an-grid .hbar { grid-template-columns: minmax(80px, 40%) 1fr 36px; font-size: .85rem; margin-bottom: 4px; }
.cm-an-grid .hbar .track { height: 14px; }
.cm-sent { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--surface); }
.cm-sent i { display: block; height: 100%; }
.cm-timeline { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.cm-timeline i { flex: 1; background: var(--c5); border-radius: 3px 3px 0 0; min-height: 2px; }
@media (max-width: 1000px) { .cm-an-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .cm-layout { grid-template-columns: 1fr; } .cm-side { position: static; } .syn-row { grid-template-columns: 1fr 1fr; } }
.ds-type.t-id { background: #efe9e2; color: #6e6a64; }

/* =========================================================
   Exams: question paper, scrutiny, scripts, marking
   ========================================================= */
.qp-page { width: min(92vw, 860px); margin: 24px auto; background: #fff; box-shadow: 0 6px 30px rgba(0,0,0,.12); padding: 40px 48px; }
.qp { font-family: 'Times New Roman', Times, 'Tinos', serif; color: #111; font-size: 15px; line-height: 1.45; }
.qp h3 { font-family: var(--font); font-size: 1rem; margin: 22px 0 8px; }
.qp-head { text-align: center; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 14px; }
.qp-inst { font-weight: 700; font-size: 1.15em; text-transform: uppercase; letter-spacing: .03em; }
.qp-title { font-weight: 700; font-size: 1.3em; margin-top: 4px; }
.qp-prog, .qp-course { font-size: 1.02em; }
.qp-course { font-weight: 700; }
.qp-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-weight: 600; }
.qp-keytag { margin-top: 8px; color: #b91c1c; font-weight: 700; letter-spacing: .06em; font-size: .85em; }
.qp-instr, .qp-cos { margin-bottom: 12px; font-size: .95em; }
.qp-sec { margin-top: 14px; break-inside: auto; }
.qp-sec-h { display: flex; justify-content: space-between; border-bottom: 1px solid #555; padding-bottom: 3px; font-size: 1.05em; }
.qp-sec-h span { font-style: italic; }
.qp-sec-i { font-style: italic; margin: 4px 0; font-size: .95em; }
.qp-t { width: 100%; border-collapse: collapse; margin-top: 6px; }
.qp-t th, .qp-t td { border: 1px solid #999; padding: 6px 8px; vertical-align: top; text-align: left; }
.qp-t th { background: #f2f2f2; font-size: .88em; }
.qp-t .n { width: 48px; text-align: center; font-weight: 700; }
.qp-t .m { width: 58px; text-align: center; }
.qp-t tr { break-inside: avoid; }
.qp-opts { margin: 6px 0 0; padding-left: 1.4em; }
.qp-opts li.ok { font-weight: 700; color: #15803d; }
.qp-ans { margin-top: 6px; padding: 6px 8px; background: #f0fdf4; border-left: 3px solid #15803d; font-size: .93em; }
.qp-diff { font-size: .78em; color: #666; margin-top: 4px; font-family: var(--font); }
.qp-img { max-width: 100%; max-height: 260px; margin-top: 6px; }
.qp-end { text-align: center; margin-top: 24px; font-style: italic; }
.qp-rev { border-top: 1px solid #ccc; padding-top: 10px; margin-top: 10px; break-inside: avoid; }
.qp-sign { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 60px; text-align: center; font-weight: 600; }
.qp-sign div { border-top: 1px solid #111; padding-top: 6px; }
@media print { .qp-page { width: auto; margin: 0; padding: 0; box-shadow: none; } @page { size: A4; margin: 16mm; } }
.bp-total { background: var(--surface); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.bp-total b { font-size: 1.6rem; display: block; }
.bp-total span { font-size: .82rem; color: var(--muted); }
.bp-total em { display: block; font-style: normal; color: var(--bad); font-size: .82rem; font-weight: 600; margin-top: 4px; }
.bp h4 { margin: 12px 0 6px; font-size: .85rem; font-family: var(--font); }
.bp .hbar { grid-template-columns: minmax(70px, 40%) 1fr auto; font-size: .78rem; margin-bottom: 4px; font-family: var(--font); }
.bp .hbar .track { height: 10px; }

.ex-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; font-weight: 700; }
.ex-flow span { background: #fff; border-radius: 99px; padding: 8px 14px; box-shadow: var(--shadow); font-size: .9rem; }
.ex-flow i { font-style: normal; color: var(--muted); }
.ex-status { display: inline-block; font-weight: 700; font-size: .78rem; padding: 2px 10px; border-radius: 99px; }
.ex-status.s-draft { background: var(--surface); color: var(--muted); } .ex-status.s-review { background: var(--warn-bg); color: var(--warn); }
.ex-status.s-changes { background: #fbe1dd; color: var(--bad); } .ex-status.s-approved { background: #e3f3e8; color: var(--ok); } .ex-status.s-locked { background: var(--ink); color: #fff; }
.ex-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ex-tabs { margin: 18px 0; }
.ex-tabs a { text-decoration: none; }
.mtabs a { display: inline-block; }
.ex-banner { background: var(--warn-bg); color: #6b4a0b; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; }
.ex-paper-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.ex-side { position: sticky; top: 14px; display: grid; gap: 14px; }
.ex-sec { margin-bottom: 16px; display: grid; gap: 10px; }
.ex-sec-title { font-size: 1.1rem; font-weight: 700; border: 0; padding: 4px 6px; width: auto; flex: 1; background: transparent; }
.ex-sec select { width: auto; padding: .3em .5em; }
.ex-q { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface-2); display: grid; gap: 8px; }
.ex-q-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ex-q-top select { width: auto; padding: .35em .5em; font-size: .85rem; }
.ex-num { width: 58px !important; text-align: center; font-weight: 700; padding: .35em .4em !important; }
.ex-mk { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .82rem; }
.ex-mk input { width: 64px; padding: .35em .5em; }
.ex-q .btn.icon { width: 30px; height: 30px; }
.ex-q textarea { background: #fff; }
.ex-opts { display: grid; gap: 4px; }
.ex-opt { display: grid; grid-template-columns: 22px 22px 1fr; align-items: center; gap: 6px; }
.ex-opt input[type=text] { padding: .35em .6em; }
.ex-q-extra { align-items: flex-start; }
.ex-q-extra details { flex: 1; min-width: 240px; }
.ex-q-extra summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--muted); }
.ex-q-extra details textarea { margin-top: 6px; }
.ex-img { display: flex; align-items: center; gap: 6px; }
.ex-img img { height: 46px; border-radius: 6px; }
.ex-warn { margin-top: 10px; display: grid; gap: 4px; font-size: .82rem; color: var(--warn); }
.ex-paper-layout.locked .ex-q { opacity: .85; }
.ex-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 18px; }
.ex-steps div { background: var(--surface); border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: .9rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.ex-steps b { width: 24px; height: 24px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: .8rem; flex: none; }
.ex-steps .done { background: #e3f3e8; color: var(--ok); } .ex-steps .on { background: var(--accent-soft); color: var(--accent); } .ex-steps .bad { background: #fbe1dd; color: var(--bad); }
.ex-scr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ex-scr .card { margin-bottom: 14px; }
.ex-addrev { display: grid; grid-template-columns: 1fr 1fr 1.2fr 110px auto; gap: 6px; margin-top: 10px; }
.ex-ver { margin-bottom: 16px; }
.ex-ver-h { font-weight: 700; margin-bottom: 8px; font-size: .92rem; }
.ex-rev { margin-bottom: 10px; }
.ex-rev-o { margin: 8px 0; }
.ex-check { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.ex-check span { font-size: .76rem; background: var(--surface); border-radius: 8px; padding: 2px 8px; }
.ex-check .no { background: #fbe1dd; color: var(--bad); } .ex-check .yes { background: #e3f3e8; color: var(--ok); }
.ex-cmt { border-top: 1px solid var(--line); padding: 8px 0 2px; font-size: .92rem; }
.ex-cmt.resolved { opacity: .55; text-decoration: line-through; }
.ex-cmt .btn { float: right; text-decoration: none; }
.ex-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.ex-bulk, .ex-online { margin-bottom: 16px; }
.ex-file { text-decoration: none; font-size: 1.2rem; margin-right: 2px; }
.ex-file-w { display: inline-flex; align-items: flex-start; margin-right: 4px; }
.ex-file-w .ex-file { margin-right: 0; }
.ex-file-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .9rem; line-height: 1; padding: 0 2px; }
.ex-file-x:hover { color: #c0392b; }
.ex-grid input { width: 62px; padding: .3em .4em; text-align: center; }
.ex-grid input.over, .mk-row input.over { outline: 2px solid var(--bad); }
.ex-grid th span { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.ex-hist { display: flex; gap: 4px; align-items: flex-end; height: 160px; }
.ex-hist div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.ex-hist i { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.ex-hist span { font-size: .66rem; color: var(--muted); white-space: nowrap; }
.ex-lvl { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 800; background: var(--surface); }
.ex-lvl.l3 { background: #e3f3e8; color: var(--ok); } .ex-lvl.l2 { background: #eef4ff; color: #1d4ed8; } .ex-lvl.l1 { background: var(--warn-bg); color: var(--warn); } .ex-lvl.l0 { background: #fbe1dd; color: var(--bad); }
.co-row { margin-bottom: 6px; flex-wrap: nowrap; }

/* on-screen marking */
.mk-view { height: 100dvh; display: grid; grid-template-rows: auto 1fr; background: var(--surface); }
.mk-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.mk-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
.mk-script { overflow: auto; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mk-tools { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.95); border-radius: 12px; padding: 6px 12px; box-shadow: var(--shadow); }
.mk-tools input { width: 140px; }
.mk-img { width: 100%; max-width: none; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); transition: transform .2s; }
.mk-pdf { width: 100%; height: calc(100dvh - 140px); border: 0; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.mk-empty { margin: auto; text-align: center; color: var(--muted); }
.mk-panel { background: #fff; border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; }
.mk-sec { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin: 10px 0 4px; }
.mk-q { border-bottom: 1px solid var(--line); padding: 10px 0; display: grid; gap: 6px; }
.mk-q .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-ans { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: .9rem; max-height: 220px; overflow: auto; }
.mk-key { font-size: .85rem; color: #166534; }
.mk-key summary { cursor: pointer; font-weight: 600; }
.mk-row { display: flex; align-items: center; gap: 4px; }
.mk-row input { width: 74px; font-size: 1.1rem; font-weight: 700; text-align: center; padding: .35em; }
.mk-row .btn.small { padding: .3em .55em; }
.mk-total { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 10px; font-size: 1.1rem; }
.mk-total b { font-size: 2rem; }

/* reviewer page */
.rv-body .logo { margin-right: 10px; text-decoration: none; }
.rv-main { width: min(1200px, 96vw); margin: 20px auto 60px; }
.rv-intro h1 { font-size: 1.6rem; margin-bottom: 4px; }
.rv-note { margin-top: 12px; background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: .95rem; }
.rv-note.ok { background: #e3f3e8; }
.rv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: 16px; }
.rv-layout .rv-paper { width: auto; margin: 0; }
.rv-side { position: sticky; top: 70px; display: grid; gap: 14px; }
.rv-cmt textarea { margin-top: 8px; font-family: var(--font); font-size: .88rem; background: #fffbea; border-color: #f4e3a1; }
.rv-form { margin-top: 20px; }
.rv-form h2 { font-size: 1.15rem; margin-top: 10px; }
.rv-check { width: 100%; border-collapse: collapse; }
.rv-check td, .rv-check th { padding: 8px; border-bottom: 1px solid var(--line); text-align: center; }
.rv-check td:first-child { text-align: left; }
@media (max-width: 1000px) { .ex-paper-layout, .ex-scr, .rv-layout, .ex-two { grid-template-columns: 1fr; } .ex-side, .rv-side { position: static; } .mk-body { grid-template-columns: 1fr; } .mk-panel { border-left: 0; } .ex-addrev { grid-template-columns: 1fr 1fr; } .ex-types { grid-template-columns: 1fr; } }

/* exam kinds & purpose */
.ex-group { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 -6px; }
.ex-purpose { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; vertical-align: middle; }
.ex-purpose.p-sum { background: #e8ecff; color: #3b44c4; }
.ex-purpose.p-for { background: #e3f5ea; color: #23784a; }
.ex-purpose.p-dia { background: #fff1d9; color: #9a5a00; }
.ex-purpose.p-pra { background: #f3e6fb; color: #7d3aa8; }
.ex-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 18px 0 6px; }
.ex-kind { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.ex-kind p { margin: 6px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.ex-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ex-purposes { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-purposes label { margin: 0; cursor: pointer; }
.ex-purposes input { position: absolute; opacity: 0; pointer-events: none; }
.ex-purposes span { display: inline-block; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .9rem; }
.ex-purposes input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.mk-bank { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.mk-bank .chip-f { font-size: .76rem; padding: 3px 9px; }
.rv-explain { color: var(--muted); font-style: italic; margin-top: 4px; }
.sb-score { display: flex; align-items: baseline; gap: 8px; justify-content: center; padding: 18px; border-radius: 16px; background: var(--surface-2); margin: 10px 0 16px; }
.sb-score b { font-size: 2.6rem; line-height: 1; }
.sb-score.ok b { color: var(--ok); } .sb-score.bad b { color: var(--bad); }
.sb-q { border-bottom: 1px solid var(--line); padding: 8px 0; }
.sb-q .ok { color: var(--ok); } .sb-q .bad { color: var(--bad); }
.sb-c { font-size: .9rem; color: var(--muted); margin-top: 4px; padding-left: 26px; }

/* Five-Factor Workstyle report */
.w5-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.w5-chip { border-radius: 14px; padding: 14px; background: color-mix(in srgb, var(--c) 10%, var(--surface)); border-top: 5px solid var(--c); display: grid; gap: 2px; }
.w5-chip b { font-size: 1.1rem; color: var(--c); }
.w5-chip small { color: var(--muted); }
.w5-letter { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--c); color: #fff; font-weight: 800; font-size: 1.15rem; flex: none; }
.w5-f { --c: #555; margin-bottom: 22px; break-inside: avoid; }
.w5-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.w5-head b { font-size: 1.25rem; color: var(--c); display: block; }
.w5-head small { color: var(--muted); }
.w5-row { display: grid; grid-template-columns: minmax(120px, 26%) 1fr; gap: 12px; align-items: center; }
.w5-lbl { font-weight: 700; font-size: .88rem; text-align: right; color: var(--c); }
.w5-track { position: relative; height: 10px; border-radius: 6px; margin: 14px 0 4px; background: linear-gradient(to right, color-mix(in srgb, var(--c) 16%, transparent) 0 45%, color-mix(in srgb, var(--c) 32%, transparent) 45% 55%, color-mix(in srgb, var(--c) 16%, transparent) 55%); }
.w5-row.w5-main .w5-track { height: 16px; }
.w5-pin { position: absolute; top: 50%; transform: translate(-50%, -50%); background: var(--c); color: #fff; font-weight: 800; font-size: .78rem; padding: 2px 6px; border-radius: 6px; min-width: 26px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.w5-row.w5-main .w5-pin { font-size: 1rem; padding: 3px 9px; }
.w5-poles, .w5-desc { display: grid; grid-template-columns: 45fr 10fr 45fr; font-size: .78rem; color: var(--muted); }
.w5-poles { font-weight: 800; color: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.w5-poles span:nth-child(2), .w5-desc span:nth-child(2) { text-align: center; white-space: nowrap; justify-self: center; }
.w5-poles span:last-child, .w5-desc span:last-child { text-align: right; }
.w5-desc span.on { color: var(--c); font-weight: 700; }
.w5-levels { display: grid; gap: 10px; margin-bottom: 14px; }
.w5-level { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; opacity: .72; }
.w5-level.on { opacity: 1; border-color: var(--c); border-left: 6px solid var(--c); background: color-mix(in srgb, var(--c) 7%, var(--surface)); }
.w5-level p { margin: 6px 0 0; font-size: .95rem; line-height: 1.5; }
.w5-level b { color: var(--c); text-transform: uppercase; letter-spacing: .03em; font-size: .9rem; }
.w5-you { background: var(--c); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; }
.w5-bell { color: var(--ink); margin: 8px 0 16px; }
.w5-bell svg { width: 100%; max-width: 640px; display: block; margin: 0 auto; }
.w5-bell-v { fill: var(--bg, #fff); }
.w5-facets { display: grid; gap: 8px; margin-bottom: 14px; }
.w5-fc { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; }
.w5-sc { flex: none; width: 40px; height: 30px; border-radius: 8px; background: var(--c); color: #fff; font-weight: 800; display: grid; place-items: center; }
@media (max-width: 640px) {
  .w5-row { grid-template-columns: 1fr; gap: 0; }
  .w5-lbl { text-align: left; margin-top: 8px; }
  .w5-desc { font-size: .7rem; }
}

/* ---------- employee profile (#/profile) ---------- */
.pf { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.pf-side { position: sticky; top: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; overflow: hidden; }
.pf-id { padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid var(--line); }
.pf-id h2 { font-size: 1.35rem; margin: 10px 0 2px; }
.pf-id .badge { align-self: flex-start; margin-top: 8px; }
.pf-mgr { margin-top: 6px; }
.pf-photo { position: relative; width: 96px; height: 96px; border-radius: 50%; cursor: pointer; margin: 0; flex: none; }
.pf-photo img, .pf-photo > span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 2rem; font-weight: 700; }
.pf-photo i { position: absolute; right: 0; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.pf-done { height: 6px; background: var(--surface); border-radius: 99px; margin: 14px 0 4px; overflow: hidden; }
.pf-done span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pf-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; align-self: flex-start; margin-top: 8px; }
.pf-nav { display: flex; flex-direction: column; padding: 8px; }
.pf-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--ink); }
.pf-nav a:hover { background: var(--surface-2); }
.pf-nav a.active { background: var(--accent-soft); color: var(--accent); }
.pf-tiles { margin-top: 0; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pf-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 18px 20px; }
.pf-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pf-card-h h3 { font-size: 1.05rem; margin: 0; flex: 1; }
.pf-card-h h3 .muted { font-weight: 500; font-size: .9rem; }
.pf-pub { font-size: .7rem; font-weight: 700; color: var(--ok); background: #e3f3e8; border-radius: 99px; padding: 2px 8px; }
.pf-private { font-size: .7rem; font-weight: 700; color: var(--muted); background: var(--surface); border-radius: 99px; padding: 1px 7px; }
.pf-dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.pf-dl div.wide { grid-column: 1 / -1; }
.pf-dl dt { font-size: .82rem; color: var(--muted); }
.pf-dl dd { margin: 1px 0 0; overflow-wrap: anywhere; }
.pf-dl a, .pf-rows a { color: var(--accent); text-decoration: none; }
.pf-secret { letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.pf-card .pf-more { display: none; }
.pf-card.open .pf-more { display: block; }
.pf-card.open .pf-rows .pf-more { display: flex; }
.pf-card .pf-link { margin-top: 12px; }
.pf-rows { margin: 0 -8px; }
.pf-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 11px 8px; cursor: pointer; border-radius: 0; }
.pf-row:first-child { border-top: 0; }
.pf-row:hover { background: var(--surface-2); }
.pf-row b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.pf-row small { display: block; color: var(--muted); font-size: .86rem; margin-top: 1px; }
.pf-row svg { color: var(--muted); flex: none; }
.pf-when { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.pf-empty { text-align: center; color: var(--muted); padding: 18px 0 8px; }
.pf-empty p { margin: 0 0 10px; }
.pf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 18px; }
.pf-form .wide { grid-column: 1 / -1; }
.pf-form small { display: block; margin-top: 4px; font-size: .8rem; }
.pf-donut-card { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.pf-donut { width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.pf-donut span { width: 118px; height: 118px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; font-size: .82rem; color: var(--muted); }
.pf-donut b { color: var(--ink); font-size: 1rem; }
.pf-legend { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.pf-legend div { display: flex; align-items: center; gap: 10px; }
.pf-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.pf-bal td b.bad { color: var(--bad); }
.pf-up > div { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.pf-up > div:first-child { border-top: 0; }
.pf-up small { display: block; color: var(--muted); }
.pf-slug { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pf-slug span { padding: 0 4px 0 12px; color: var(--muted); white-space: nowrap; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.pf-slug input { border: 0 !important; border-radius: 0 !important; }
.pf-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.pf-checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: .92rem; margin: 0; }
@media (max-width: 1100px) { .pf-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .pf { grid-template-columns: 1fr; gap: 18px; }
  .pf-side { position: static; }
  .pf-nav { flex-direction: row; overflow-x: auto; gap: 4px; border-top: 0; }
  .pf-nav a { white-space: nowrap; padding: 9px 12px; }
}
@media (max-width: 560px) { .pf-dl, .pf-form, .pf-checks { grid-template-columns: 1fr; } .pf-donut { width: 150px; height: 150px; } .pf-donut span { width: 96px; height: 96px; } }
/* public faculty page / CV (people.html) */
.pp { font-size: .98rem; }
.pp-head { display: flex; gap: 22px; align-items: center; margin-bottom: 14px; }
.pp-head img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; flex: none; }
.pp-head h1 { font-size: 1.9rem; margin: 0 0 4px; }
.pp-role { font-weight: 600; font-size: 1.05rem; }
.pp-metrics { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: .9rem; color: var(--muted); }
.pp-metrics b { color: var(--ink); }
.pp-links { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; font-size: .9rem; }
.pp-links small { color: var(--muted); }
.pp-links a, .pp a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.pp-sum { margin: 0 0 12px; }
.pp-g { font-size: 1.2rem; margin: 26px 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--ink); }
.pp-sec { margin: 14px 0; break-inside: avoid-page; }
.pp-sec h3 { font-size: 1rem; margin: 0 0 6px; }
.pp-row { display: flex; gap: 14px; padding: 5px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.pp-row:first-of-type { border-top: 0; }
.pp-row .muted { font-size: .9rem; }
.pp-when { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.pp-pubs { margin: 0; padding-left: 1.4em; }
.pp-pubs li { margin-bottom: 6px; break-inside: avoid; }
.pp-tag { font-size: .75rem; font-weight: 700; color: var(--ok); background: #e3f3e8; border-radius: 99px; padding: 1px 7px; white-space: nowrap; }
.pp-foot { margin-top: 30px; }
@media (max-width: 560px) { .pp-head { flex-direction: column; align-items: flex-start; } .pp-row { flex-direction: column; gap: 0; } }
@media (max-width: 560px) { .qp-page.pp { width: auto; margin: 0; padding: 24px 16px; } }
.pf-tiles .stat-tile b { font-size: 1.35rem; line-height: 1.25; overflow-wrap: anywhere; }
.pf-bal td:first-child { min-width: 150px; }
/* staff directory, approvals, history, as-of (staff.js / profile.js) */
.pf-crumb { gap: 10px; margin: -6px 0 12px; }
.pf-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pf-title .page-title { flex: 1; }
.pf-asof { display: flex; align-items: center; gap: 8px; margin: 0 0 22px; font-weight: 600; color: var(--muted); }
.pf-asof input[type=date] { width: auto; padding: .45em .7em; }
.pf-asof-bar { display: flex; align-items: center; gap: 12px; background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.pf-asof-bar .grow { color: var(--ink); }
.pf-hrnote { margin: -12px 0 16px; }
.pf-hr { font-size: .7rem; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 99px; padding: 2px 8px; }
.pf-row.ro { cursor: default; }
.pf-row.ro:hover { background: none; }
.pf-dec { color: var(--ok) !important; }
.pf-decide { display: flex; gap: 6px; flex: none; }
.pf-photo.ro { cursor: default; }
.pf-hist > div { border-top: 1px solid var(--line); padding: 12px 0; }
.pf-hist > div:first-child { border-top: 0; }
.pf-hist-h { margin-bottom: 6px; }
.pf-diff { border-collapse: collapse; margin-top: 4px; font-size: .92rem; }
.pf-diff td { padding: 3px 10px 3px 0; vertical-align: top; }
.pf-diff td:first-child { color: var(--muted); min-width: 140px; }
.staff-tabs { margin-bottom: 18px; }
.staff-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.staff-bar .search { flex: 1 1 320px; }
.staff-bar select { width: auto; min-width: 170px; }
.staff-who { display: flex; align-items: center; gap: 10px; }
.staff-who img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.staff-who small { display: block; color: var(--muted); }
.staff-pages { margin-top: 10px; }
.ap-list .ap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ap a { text-decoration: none; }
.ap-what { margin: 4px 0; }
.ap-acts { display: flex; gap: 8px; }
.os-admin { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.small.bad, p.bad { color: var(--bad); }
@media (max-width: 860px) { .staff-t th:nth-child(n+3), .staff-t td:nth-child(n+3) { display: none; } }

/* ---------- people profile, v2 (profile.js) ---------- */
.pp2 { --pp-bg: #edf1f6; --pp-blue: #2563eb; --pp-line: #dfe5ee; margin: -6px 0 0; }
.pp2-loading { padding: 40px 0; }
.pp2-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 0 16px; border-bottom: 1px solid var(--pp-line); }
.pp2-top h1 { font-size: 1.7rem; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.pp2-top .btn.small { font-weight: 600; }
.pp2-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; background: var(--pp-bg); border-radius: 0 0 var(--radius-lg) var(--radius-lg); min-height: 70vh; }
.pp2-side { background: #fff; border-right: 1px solid var(--pp-line); align-self: stretch; }
.pp2-id { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 4px; }
.pp2-photo-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pp2-photo { width: 116px; height: 116px; border-radius: 50%; cursor: pointer; margin: 0; flex: none; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--pp-line); overflow: hidden; }
.pp2-photo img, .pp2-photo > span { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; background: #dbe7fb; color: var(--pp-blue); font-size: 2.3rem; font-weight: 800; }
.pp2-photo:not(.ro):hover { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--pp-blue); }
.pp2-photo.ro { cursor: default; }
.pp2-all { background: var(--pp-blue); border-color: var(--pp-blue); border-radius: 10px; }
.pp2-all:hover { background: #1d4fd0; }
.pp2-id h2 { font-size: 1.55rem; font-weight: 800; margin: 2px 0 2px; display: flex; align-items: center; gap: 6px; letter-spacing: -0.02em; }
.pp2-card-btn { border: 0; background: none; color: var(--pp-blue); cursor: pointer; padding: 2px; display: inline-grid; }
.pp2-sub { color: var(--muted); }
.pp2-mgr { color: var(--muted); margin-top: 10px; }
.pp2-mgr span { margin-right: 4px; }
.pp2-id .badge { align-self: flex-start; margin-top: 6px; }
.pp2-done { height: 5px; background: #e6ebf2; border-radius: 99px; margin: 14px 0 3px; overflow: hidden; }
.pp2-done span { display: block; height: 100%; background: var(--ok); }
.pp2-nav { display: flex; flex-direction: column; padding: 6px 0 20px; border-top: 1px solid var(--pp-line); }
.pp2-nav a { display: flex; align-items: center; gap: 14px; padding: 15px 22px; text-decoration: none; font-weight: 700; font-size: 1.04rem; color: var(--ink); border-left: 3px solid transparent; }
.pp2-nav a svg { color: #5b6b82; flex: none; }
.pp2-nav a:hover { background: #f5f8fc; }
.pp2-nav a.active { background: #e8f0fd; color: var(--pp-blue); border-left-color: var(--pp-blue); }
.pp2-nav a.active svg { color: var(--pp-blue); }
.pp2-main { padding: 26px 30px 40px; min-width: 0; }
.pp2-h { font-size: 2.1rem; font-weight: 800; margin: 0 0 20px; letter-spacing: -0.02em; color: #2a2f38; }
.pp2-note { color: var(--muted); font-size: .9rem; margin: -8px 0 16px; }
.pp2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.pp2-card { background: #fff; border-radius: 18px; box-shadow: 0 1px 2px rgba(20, 40, 80, .06), 0 4px 18px rgba(20, 40, 80, .06); display: flex; flex-direction: column; min-height: 280px; min-width: 0; }
.pp2-card.wide { grid-column: 1 / -1; min-height: 0; }
.pp2-card-h { display: flex; align-items: center; gap: 8px; padding: 20px 24px 8px; }
.pp2-card-h h3 { font-size: 1.12rem; font-weight: 800; margin: 0; }
.pp2-card-h h3 .muted { font-weight: 500; }
.pp2-card-b { padding: 6px 24px 10px; flex: 1; }
.pp2-card-f { padding: 4px 24px 18px; }
.pp2-card-f .pf-link, .pp2-card .pf-link { color: var(--pp-blue); font-weight: 500; text-decoration: none; margin: 0; font-size: 1rem; }
.pp2-ic { border: 0; background: none; color: var(--pp-blue); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.pp2-ic:hover { background: #e8f0fd; }
.pp2-dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.pp2-dl dt { color: #6a7484; font-size: .95rem; }
.pp2-dl dd { margin: 2px 0 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.pp2-dl a { color: var(--pp-blue); text-decoration: none; }
.pp2-card .pf-more { display: none !important; }
.pp2-card.open .pf-more { display: block !important; }
.pp2-card.open .pp2-row.pf-more { display: flex !important; }
.pp2-rows { margin: 0 -24px; }
.pp2-row { display: flex; align-items: center; gap: 14px; padding: 13px 24px; border-top: 1px solid #edf0f4; cursor: pointer; }
.pp2-row:first-child { border-top: 0; }
.pp2-row:not(.ro):hover { background: #f6f9fd; }
.pp2-row.ro { cursor: default; }
.pp2-row b { display: block; font-weight: 700; overflow-wrap: anywhere; }
.pp2-row small { display: block; color: #6a7484; font-size: .92rem; margin-top: 2px; overflow-wrap: anywhere; }
.pp2-row > svg { color: #8a94a3; flex: none; }
.pp2-when { color: #6a7484; font-size: .9rem; white-space: nowrap; }
.pp2-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.tile-blue { background: #dcebfd; color: #1d5fd6; } .tile-violet { background: #e9e2fd; color: #6d3fe0; } .tile-green { background: #dcf3e6; color: #1f7a4a; } .tile-rose { background: #fde4e4; color: #c23b3b; }
.pp2-link, .pp2-link a { color: var(--pp-blue) !important; }
.pp2-primary { color: #c2620a; font-weight: 600; font-size: .95rem; }
.pp2-person { margin-bottom: 14px; }
.pp2-person-l { color: #6a7484; display: block; margin-bottom: 6px; }
.pp2-person-r { display: flex; align-items: center; gap: 14px; }
.pp2-person-r small { display: block; color: #6a7484; }
.pp2-person-r small a { color: var(--pp-blue); text-decoration: none; }
.pp2-avatar { width: 56px; height: 56px; border-radius: 50%; background: #dcebfd; color: #1d5fd6; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; flex: none; }
.pp2-empty { text-align: center; padding: 14px 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pp2-art { width: 150px; height: 84px; margin-bottom: 8px; }
.pp2-empty b { font-size: 1.15rem; font-weight: 800; }
.pp2-empty span { color: #4b5563; }
.pp2-empty .btn { margin-top: 10px; }
.pp2-state { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.pp2-state.ok { color: var(--ok); } .pp2-state.warn { color: #c2620a; } .pp2-state.bad { color: var(--bad); } .pp2-state.info { color: var(--pp-blue); }
.pp2-tag { font-size: .8rem; font-weight: 700; border: 1px solid #b9c3d1; border-radius: 99px; padding: 2px 9px; white-space: nowrap; color: #3b4452; }
.pp2-bal { font-weight: 600; white-space: nowrap; } .pp2-bal.bad { color: var(--bad); }
.pp2-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.pp2-tiles > div { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(20, 40, 80, .06); }
.pp2-tiles b { display: block; font-size: 1.35rem; font-weight: 800; overflow-wrap: anywhere; }
.pp2-tiles span { color: #6a7484; font-size: .9rem; }
.pp2-comp { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; padding: 8px 0 12px; }
.pp2-comp-tot { border-top: 1px dashed var(--pp-line); padding-top: 8px; color: #4b5563; }
.pp2-quick { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; min-width: 240px; }
.pp2-quick img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.pp2-quick a { color: var(--pp-blue); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.pp2-pop input[type=date] { width: 100%; }
.bad { color: var(--bad); } .warn { color: #c2620a; }
.ts-status { font-weight: 700; text-decoration: none; }
.ts-status.s-open, a.ts-status { color: var(--pp-blue, #2563eb); } .ts-status.s-submitted { color: #c2620a; } .ts-status.s-approved { color: var(--ok); } .ts-status.s-rejected { color: var(--bad); }
@media (max-width: 1150px) { .pp2-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .pp2-body { grid-template-columns: 1fr; }
  .pp2-side { border-right: 0; border-bottom: 1px solid var(--pp-line); }
  .pp2-nav { flex-direction: row; overflow-x: auto; padding: 0; }
  .pp2-nav a { white-space: nowrap; padding: 12px 14px; border-left: 0; border-bottom: 3px solid transparent; font-size: .95rem; }
  .pp2-nav a.active { border-bottom-color: var(--pp-blue); }
  .pp2-main { padding: 18px 14px 30px; }
  .pp2-h { font-size: 1.6rem; }
}

/* ---------- time sheet (timesheet.js) ---------- */
.tsx { --pp-blue: #2563eb; --pp-line: #dfe5ee; }
.tsx-crumb { margin: -6px 0 6px -10px; }
.tsx-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 0; background: #edf1f6; border-radius: var(--radius-lg); overflow: hidden; align-items: stretch; }
.tsx-main { min-width: 0; display: flex; flex-direction: column; }
.tsx-head { display: flex; align-items: center; gap: 6px; padding: 22px 26px 6px; background: #fff; flex-wrap: wrap; }
.tsx-head h1 { font-size: 1.65rem; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.tsx-arrow { border: 0; background: none; color: var(--pp-blue); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; text-decoration: none; }
.tsx-arrow:hover { background: #e8f0fd; }
.tsx-head .pf-link { color: var(--pp-blue); text-decoration: none; font-weight: 600; margin: 0 0 0 14px; }
.tsx-cal { position: relative; cursor: pointer; }
.tsx-cal input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tsx-kpis { display: flex; gap: 46px; flex-wrap: wrap; padding: 14px 26px 18px; background: #fff; }
.tsx-kpis span { display: block; font-weight: 700; font-size: 1.02rem; }
.tsx-kpis b { font-weight: 400; font-size: 1.05rem; }
.tsx-kpis b b { font-weight: 700; }
.tsx-kpis .ts-status { font-size: 1.45rem; font-weight: 700; }
.tsx-kpis small { display: block; color: var(--muted); font-size: .84rem; }
.tsx-tabs { background: #fff; padding: 0 26px; margin: 0; border-bottom: 1px solid var(--pp-line); }
.tsx-card { background: #fff; border-radius: 16px; margin: 22px 26px 0; padding: 6px 14px; box-shadow: 0 1px 2px rgba(20, 40, 80, .06); }
.tsx-t { width: 100%; border-collapse: collapse; }
.tsx-t th { text-align: left; font-weight: 700; background: #f3f5f8; padding: 13px 14px; font-size: .95rem; }
.tsx-t td { padding: 13px 14px; border-top: 1px solid #edf0f4; vertical-align: middle; }
.tsx-t .r { text-align: right; white-space: nowrap; }
.tsx-t td .r svg, .tsx-t td.r svg { vertical-align: -4px; color: #5b6b82; }
.tsx-t tbody tr[data-day] { cursor: pointer; }
.tsx-t tbody tr[data-day]:hover { background: #f6f9fd; }
.tsx-t tr.sel { background: #e8f0fd !important; box-shadow: inset -3px 0 0 var(--pp-blue); }
.tsx-t tr.off td:first-child b { color: #6a7484; }
.tsx-t td:first-child b { display: block; color: #3b4452; }
.tsx-t td:first-child span { color: #3b4452; }
.tsx-t tr.tot td { font-weight: 700; }
.tsx-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tsx-sum { padding: 18px 22px; }
.tsx-sum h3 { margin: 6px 0 10px; }
.tsx-mini { margin: 20px 0 10px; }
.tsx-mini > div { background: #f3f5f8; box-shadow: none; }
.tsx-mini b { font-size: 1.05rem; }
.tsx-reg { padding: 8px 0; border-top: 1px solid #edf0f4; font-size: .95rem; }
.tsx-foot { position: sticky; bottom: 0; margin: 22px 0 0; display: flex; align-items: center; gap: 10px; padding: 14px 26px; background: #fff; border-top: 1px solid var(--pp-line); margin-top: auto; flex-wrap: wrap; }
.tsx-foot .btn.accent { background: var(--pp-blue); border-color: var(--pp-blue); border-radius: 10px; }
.tsx-day { background: #fff; border-left: 1px solid var(--pp-line); padding: 22px 22px 26px; min-width: 0; }
.tsx-day-h { display: flex; align-items: flex-start; gap: 4px; margin-bottom: 18px; }
.tsx-day-h h2 { font-size: 1.35rem; font-weight: 800; margin: 2px 0 0; flex: 1; letter-spacing: -0.01em; }
.tsx-day .pp2-dl { margin-bottom: 18px; }
.tsx-wt { background: #f6f8fb; border-radius: 16px; padding: 14px; }
.tsx-wt-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1.08rem; }
.tsx-wt-h svg { color: #3b4452; }
.tsx-none { margin: 4px 2px; }
.tsx-entry { background: #fff; border-radius: 12px; margin-bottom: 10px; border: 1px solid #e3e8ef; overflow: hidden; }
.tsx-entry.replaced { opacity: .6; }
.tsx-entry.replaced .tsx-range { text-decoration: line-through; }
.tsx-entry-h { display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; }
.tsx-chev { width: 28px; height: 28px; border: 1.5px solid var(--pp-blue); border-radius: 8px; color: var(--pp-blue); display: grid; place-items: center; transition: transform .15s; flex: none; }
.tsx-entry.open .tsx-chev { transform: rotate(90deg); }
.tsx-range { font-weight: 700; white-space: nowrap; }
.tsx-src { font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 2px 8px; }
.tsx-src.bio { background: #dcebfd; color: #1d5fd6; } .tsx-src.man { background: #eef0f3; color: #4b5563; } .tsx-src.reg { background: #fff1dc; color: #b45309; }
.tsx-entry-b { display: none; padding: 4px 16px 16px 50px; border-top: 1px solid #edf0f4; }
.tsx-entry.open .tsx-entry-b { display: block; }
.tsx-entry-b .pp2-dl { gap: 8px; margin: 10px 0 12px; }
.tsx-form { background: #fff; border-radius: 12px; border: 1.5px solid var(--pp-blue); padding: 14px 16px 4px; }
.tsx-form h4 { margin: 0 0 12px; }
.tsx-form input[type=time] { width: 100%; font: inherit; padding: .62em .8em; border: 1px solid var(--line); border-radius: 12px; }
.tsx-dur { background: #f3f5f8; border-radius: 12px; padding: .62em .8em; }
.tsx-form-f { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 0 12px; }
.tsx-form-f .btn.accent { background: var(--pp-blue); border-color: var(--pp-blue); }
.ap-h { font-size: 1.15rem; margin: 18px 0 10px; }
.bio-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bio-ways > div { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.bio-ways p { margin: 6px 0 10px; }
.bio-key code { display: block; overflow-wrap: anywhere; font-size: .8rem; padding: 8px; }
@media (max-width: 1150px) { .bio-ways { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .tsx-wrap { grid-template-columns: 1fr; } .tsx-day { border-left: 0; border-top: 1px solid var(--pp-line); } }
@media (max-width: 640px) {
  .tsx-head, .tsx-kpis, .tsx-tabs { padding-left: 14px; padding-right: 14px; }
  .tsx-head h1 { font-size: 1.25rem; }
  .tsx-kpis { gap: 14px 26px; }
  .tsx-card { margin: 14px 10px 0; padding: 4px 4px; }
  .tsx-t th:nth-child(4), .tsx-t td:nth-child(4) { display: none; }
  .tsx-t th, .tsx-t td { padding: 10px 8px; }
  .tsx-foot { padding: 12px 14px; }
}
.pp2 .btn.pp2-all { background: var(--pp-blue); border-color: var(--pp-blue); color: #fff; }
.pp2-link a, a.pp2-link { text-decoration: none; }
.tsx-entry-h .tsx-range { display: block; margin-top: 2px; }
.tsx-t td:first-child .tsx-tags span.pp2-state.ok { color: var(--ok); } .tsx-t td:first-child .tsx-tags span.pp2-state.warn { color: #c2620a; }
.tsx-t td:first-child .tsx-tags span.pp2-state.bad { color: var(--bad); } .tsx-t td:first-child .tsx-tags span.pp2-state.info { color: var(--pp-blue); }
.tsx-t td:first-child .tsx-tags span { font-size: .82rem; }
.tsx-kpis { gap: 18px 36px; }
@media (max-width: 640px) {
  .tsx-t th:nth-child(5), .tsx-t td:nth-child(5) { display: none; }
  .tsx-kpis { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ---------- IQAC (iqac.js) ---------- */
.iq-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.iq-tabs { margin-bottom: 20px; overflow-x: auto; }
.mtabs a { padding: 14px 0; font-size: 1.05rem; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.mtabs a.active { color: var(--ink); border-color: var(--accent); }
.iq-subtabs { margin: -8px 0 18px; gap: 24px; }
.iq-subtabs a { font-size: .95rem; padding: 10px 0; }
.iq-st { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.iq-st.s-draft { background: var(--surface); color: var(--muted); } .iq-st.s-submitted { background: var(--warn-bg); color: var(--warn); }
.iq-st.s-verified { background: #e3f3e8; color: var(--ok); } .iq-st.s-returned { background: #fbe1dd; color: var(--bad); }
.iq-month { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.iq-months { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 10px; }
.iq-months a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.iq-months a:hover { background: var(--surface-2); }
.iq-months a.active { background: var(--accent-soft); color: var(--accent); }
.iq-rep-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.iq-rep-h h2 { margin: 0; font-size: 1.5rem; }
.iq-note { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; background: var(--surface-2); }
.bad-bg { background: #fbe1dd; color: #7a2018; } .ok-bg { background: #e3f3e8; color: #1d5c37; } .warn-bg { background: var(--warn-bg); color: #6b4309; }
.iq-tiles { margin-bottom: 16px; }
.iq-tiles > div { border: 1px solid var(--line); box-shadow: none; }
.iq-t td, .iq-t th { vertical-align: top; }
.iq-t .iq-sub td { font-size: .85rem; color: var(--muted); border-top: 0; padding-top: 0; }
.iq-co { display: inline-block; margin: 0 6px 4px 0; font-size: .85rem; white-space: nowrap; }
.iq-lv { display: inline-block; min-width: 30px; text-align: center; border-radius: 6px; padding: 1px 6px; }
.iq-lv.l3 { background: #dcf3e6; color: #1f7a4a; } .iq-lv.l2 { background: #e5edfb; color: #1d5fd6; } .iq-lv.l1 { background: var(--warn-bg); color: var(--warn); } .iq-lv.l0 { background: #fbe1dd; color: var(--bad); }
.iq-list > div { padding: 7px 0; border-top: 1px solid var(--line); }
.iq-list > div:first-child { border-top: 0; }
.iq-ach { display: flex; align-items: center; gap: 10px; }
.iq-ach small { display: block; color: var(--muted); }
.iq-tag { font-size: .72rem; font-weight: 700; background: var(--surface); border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.iq-scroll { overflow-x: auto; }
.iq-grid td, .iq-grid th { text-align: center; white-space: nowrap; }
.iq-grid td:first-child, .iq-grid th:first-child { text-align: left; }
.iq-cell { display: inline-flex; flex-direction: column; align-items: center; min-width: 54px; padding: 4px 6px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.iq-cell small { font-weight: 500; font-size: .72rem; }
.iq-cell.c0 { background: #fbe1dd; color: var(--bad); } .iq-cell.c1 { background: var(--warn-bg); color: var(--warn); } .iq-cell.c2 { background: #e5edfb; color: #1d5fd6; } .iq-cell.c3 { background: #dcf3e6; color: #1f7a4a; }
.iq-dept h3 { margin: 22px 0 10px; }
.iq-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
.iq-courses a { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-decoration: none; }
.iq-courses a:hover { border-color: var(--accent); }
.iq-courses a.mine { border-color: var(--accent); background: var(--accent-soft); }
.iq-courses small { display: block; color: var(--muted); margin-top: 2px; }
.iq-mx th, .iq-mx td { text-align: center; white-space: nowrap; }
.iq-mx td:first-child, .iq-mx th:first-child { text-align: left; white-space: normal; min-width: 160px; }
.iq-mx tr.tot td { font-weight: 700; background: var(--surface-2); }
.iq-cotext { max-width: 340px; }
.iq-map { width: 58px; padding: .35em .3em; }
.iq-in { width: 70px; padding: .35em .5em; text-align: center; }
.iq-outs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.iq-out { display: flex; gap: 6px; align-items: flex-start; }
.iq-out textarea { flex: 1; min-height: 40px; }
.iq-rules { grid-template-columns: 1fr 1fr; }
.iq-rbar { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-bottom: 16px; }
.iq-rbar label { margin: 0; }
.iq-rbar select { width: auto; }
.iq-reports { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.iq-cat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px; position: sticky; top: 10px; max-height: calc(100vh - 40px); overflow: auto; }
.iq-cat-h { font-weight: 800; font-size: .8rem; letter-spacing: .06em; color: var(--muted); padding: 12px 10px 4px; }
.iq-cat a { padding: 8px 10px; border-radius: 10px; text-decoration: none; font-size: .9rem; line-height: 1.3; }
.iq-cat a:hover { background: var(--surface-2); }
.iq-cat a.active { background: var(--accent-soft); color: var(--accent); }
.iq-metric { display: block; font-size: .72rem; font-weight: 800; color: var(--accent); }
.iq-metric.big { display: inline-block; font-size: .8rem; background: var(--accent-soft); border-radius: 99px; padding: 3px 10px; }
.iq-rt th { white-space: normal; min-width: 110px; font-size: .82rem; vertical-align: bottom; }
.iq-rt td { font-size: .88rem; vertical-align: top; }
.iq-link select { width: 100%; }
.pf-file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp2-proof { color: var(--muted) !important; }
.ok { color: var(--ok); }
@media (max-width: 900px) { .iq-month, .iq-reports { grid-template-columns: 1fr; } .iq-months { position: static; flex-direction: row; overflow-x: auto; } .iq-months a { flex: none; } .iq-cat { position: static; max-height: none; } .iq-rules { grid-template-columns: 1fr; } }
.iq-ay { width: auto !important; min-width: 120px; }

/* ---------- roles at login, semester files (login.js, iqac.js, semfile.html) ---------- */
.role-pick { display: flex; flex-direction: column; gap: 10px; }
.role-btn { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 16px; cursor: pointer; font: inherit; }
.role-btn:hover, .role-btn.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.role-btn b { display: block; font-size: 1.05rem; }
.role-btn span { color: var(--muted); font-size: .9rem; }
.sf-card { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 10px; text-decoration: none; background: #fff; }
.sf-card:hover { border-color: var(--accent); }
.sf-card small { display: block; color: var(--muted); margin-top: 3px; }
.sf-card-r { text-align: right; min-width: 150px; }
.sf-bar { display: inline-block; width: 140px; height: 6px; background: var(--surface); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.sf-bar i { display: block; height: 100%; background: var(--ok); }
.sf-head .sf-prog { margin-top: 6px; }
.sf-item.is-miss { border-left: 4px solid var(--bad); }
.sf-item.is-ok { border-left: 4px solid var(--ok); }
.sf-item-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.sf-item-h h3 { margin: 0; }
.sf-n { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.sf-ok { white-space: nowrap; font-weight: 700; font-size: .9rem; }
.sf-auto { margin: 4px 0 10px; }
.sf-in { display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 12px; }
.sf-files { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.sf-files span { display: inline-flex; align-items: center; gap: 2px; }
.sf-files a { color: var(--accent); text-decoration: none; }
.sf-t { font-size: .9rem; }
.sf-t th { font-size: .82rem; }
.sf-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 0 0 10px; }
.sf-dl dt { color: var(--muted); font-size: .82rem; }
.sf-dl dd { margin: 0; }
.sf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sf-h4 { margin: 12px 0 4px; font-size: .95rem; }
.sf-none { color: var(--muted); font-size: .9rem; margin: 4px 0; }
.sf-na { color: var(--muted); font-style: italic; }
.sf-text { white-space: normal; margin: 6px 0; }
.sf-chip { display: inline-block; font-size: .78rem; font-weight: 600; border-radius: 99px; padding: 3px 10px; margin: 2px 4px 2px 0; text-decoration: none; background: var(--surface); color: var(--muted); }
.sf-chip.s-submitted { background: var(--warn-bg); color: var(--warn); } .sf-chip.s-verified { background: #e3f3e8; color: var(--ok); } .sf-chip.s-returned { background: #fbe1dd; color: var(--bad); }
.iq-vswitch { margin: -6px 0 16px; display: flex; gap: 8px; }
.iq-vswitch a { text-decoration: none; font-size: .92rem; padding: .45em 1em; }
.sm-row { padding: 6px 0; border-top: 1px solid var(--line); gap: 10px; }
.sfp-cover { text-align: center; padding: 40px 0 30px; border-bottom: 2px solid var(--ink); margin-bottom: 10px; }
.sfp-cover h1 { font-size: 1.8rem; margin: 8px 0; }
.sfp-kind { letter-spacing: .14em; font-weight: 800; color: var(--muted); font-size: .85rem; }
.sfp-status { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.sfp-toc li { margin: 2px 0; }
.sfp-sec { break-inside: auto; }
@media print { .sfp-sec { break-before: page; } .sfp-sec:first-of-type { break-before: auto; } }
@media (max-width: 760px) { .sf-dl, .sf-two { grid-template-columns: 1fr; } .sf-card { flex-direction: column; align-items: flex-start; } .sf-card-r { text-align: left; } }
.sf-group { font-size: 1.15rem; margin: 26px 0 10px; }
.sf-plan input, .sf-plan select { padding: .35em .5em; font-size: .88rem; min-width: 0; }
.sf-plan td { padding: 4px; }
.sf-plan input[type=date] { width: 140px; }
.sfp-sign td { height: 34px; }
.sfp-toc td:first-child { width: 70px; font-weight: 700; }
.home-tasks { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border-radius: var(--radius-lg); padding: 12px 16px; margin: -6px 0 22px; }
.home-tasks > b { margin-right: 6px; }
.home-tasks .ht { display: flex; flex-direction: column; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.home-tasks .ht small { color: var(--muted); }
.home-tasks .ht.due { border-color: var(--warn); } .home-tasks .ht.due small { color: var(--warn); }
.home-tasks .ht.ok small { color: var(--ok); }
.role-switch { display: flex; align-items: center; gap: 8px; width: calc(100% - 8px); margin: 0 4px 12px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 8px 12px; cursor: pointer; font: inherit; text-align: left; }
.role-switch small { display: block; color: var(--muted); font-size: .72rem; }
.role-switch b { flex: 1; font-size: .92rem; display: block; }
.role-switch:hover { border-color: var(--accent); }
.nav-toggle { background: none; border: 0; cursor: pointer; text-align: left; width: 100%; font: inherit; }
.role-switch { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px; }
.role-switch small { grid-column: 1; }
.role-switch b { grid-column: 1; font-size: .86rem; line-height: 1.25; }
.role-switch span { grid-column: 2; grid-row: 1 / 3; }
.sf-slot { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.sf-slot a { color: var(--accent); text-decoration: none; }
.sf-slot.is-ok a.ok { color: var(--ok); }
.sf-slot span { display: inline-flex; align-items: center; gap: 2px; }
.sf-slotup { margin: 0; padding: .25em .7em; font-size: .8rem; }
.sf-slots td { vertical-align: top; }
.sfp-photo { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 8px auto; display: block; }

/* ---------- IQAC documents (iqac.js, iqacdoc.html) ---------- */
.doc-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 14px; }
.doc-head { margin: 4px 0 10px; }
.doc-title { font-size: 1.7rem; font-weight: 700; border: 0 !important; padding: 4px 0 !important; background: transparent !important; width: 100%; margin: 0 0 8px; }
.doc-title:focus { outline: none !important; border-bottom: 2px solid var(--accent) !important; }
.doc-meta { gap: 8px; flex-wrap: wrap; }
.doc-meta select, .doc-meta input { width: auto; padding: .4em .6em; font-size: .9rem; }
.doc-toolbar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin-bottom: 10px; }
.doc-tb { border: 0; background: none; border-radius: 8px; padding: 6px 9px; cursor: pointer; font: inherit; font-size: .9rem; }
.doc-tb:hover { background: var(--surface); }
.doc-tb.accent { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.doc-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.doc-paper { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px; }
.doc-ed { background: #fff; max-width: 860px; margin: 0 auto; min-height: 60vh; padding: 48px 56px; box-shadow: 0 2px 14px rgba(0,0,0,.08); line-height: 1.55; overflow-wrap: anywhere; }
.doc-ed:focus { outline: none; }
.doc-ed h1 { font-size: 1.6rem; } .doc-ed h2 { font-size: 1.25rem; margin-top: 1.2em; } .doc-ed h3 { font-size: 1.05rem; margin-top: 1em; }
.doc-ed table { border-collapse: collapse; width: 100%; margin: 8px 0 12px; font-size: .92rem; }
.doc-ed td, .doc-ed th { border: 1px solid #999; padding: 5px 8px; vertical-align: top; min-width: 40px; }
.doc-ed th { background: #f2f2f2; text-align: left; }
.doc-ed a { color: var(--accent); }
.doc-vv { min-height: 0; margin-top: 12px; padding: 20px; box-shadow: none; border: 1px solid var(--line); max-height: 50vh; overflow: auto; }
.doc-print { box-shadow: none; padding: 0; min-height: 0; max-width: none; }
@media (max-width: 760px) { .doc-ed { padding: 24px 18px; } .doc-paper { padding: 8px; } }

/* ---------- exam-mode proctoring (proctor.js) ---------- */
.pr-gate { position: fixed; inset: 0; z-index: 400; background: #1e1c19; display: grid; place-items: center; padding: 20px; }
.pr-gate .box { background: #fff; border-radius: 24px; padding: 30px 26px; max-width: 460px; text-align: center; }
.pr-gate .box .ico { font-size: 3rem; line-height: 1.2; }
.pr-gate .box p { color: #5c574f; line-height: 1.5; margin: 10px 0 20px; }
.pr-watermark { position: fixed; inset: 0; z-index: 250; pointer-events: none; background-repeat: repeat; }
body.pr-protect { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.pr-protect input, body.pr-protect textarea, body.pr-protect [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
body.pr-protect img { -webkit-user-drag: none; pointer-events: none; }
body.pr-protect.pr-blur > *:not(.pr-gate):not(.lock-overlay):not(.pr-watermark) { filter: blur(14px); }
@media print { body.pr-protect > * { display: none !important; } body.pr-protect::after { content: 'Printing is turned off during this exam.'; display: block; padding: 40px; font: 20px system-ui, sans-serif; } }

/* ---------- whiteboards list (boards.js) ---------- */
.wb-hero { background: linear-gradient(135deg, #eef3ff, #f4fbf4); }
.wb-starts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.wb-start { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 10px; cursor: pointer; font: inherit; color: var(--ink); width: 150px; }
.wb-start:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.wb-start b { font-size: .85rem; }
.wb-start-sw { width: 100%; aspect-ratio: 16 / 9; border-radius: 9px; border: 1px solid rgba(0,0,0,.1); display: block; }
.bg-grid { background-image: linear-gradient(#d9e2ef 1px, transparent 1px), linear-gradient(90deg, #d9e2ef 1px, transparent 1px); background-size: 10px 10px; }
.bg-lined { background-image: repeating-linear-gradient(transparent 0 9px, #cfe0f3 9px 10px); }
.bg-dotted { background-image: radial-gradient(#c3c7cf 1px, transparent 1.3px); background-size: 9px 9px; }
.wb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.wb-card { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; cursor: pointer; }
.wb-card:hover { box-shadow: var(--shadow); }
.wb-card-pv { aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); position: relative; padding: 10px; box-sizing: border-box; }
.wb-card .meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 12px 14px; }
.wb-card h3 { margin: 0 0 2px; font-size: 1rem; }

/* ---------- login: institution picker ---------- */
.inst-pick { width: 100%; max-width: 420px; margin: 40px 0 0; }
.inst-pick:not([hidden]) ~ .auth-box { margin-top: 24px; }
.inst-pick > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.inst-chosen { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; background: var(--surface-2); }
.inst-chosen b { display: block; line-height: 1.25; }
.inst-chosen small, .inst-results small { display: block; color: var(--muted); font-size: .8rem; }
.inst-badge { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 .85rem var(--font); flex: none; letter-spacing: .02em; }
.inst-search { position: relative; }
.inst-search input { width: 100%; box-sizing: border-box; }
.inst-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 20; padding: 4px; max-height: 320px; overflow: auto; }
.inst-results button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 8px; border-radius: 10px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.inst-results button:hover { background: var(--surface); }
.inst-results .inst-badge { width: 34px; height: 34px; border-radius: 10px; font-size: .75rem; }
.exec-link a { color: var(--muted); font-size: .85rem; }

/* ---------- executive console (exec.html) ---------- */
.ex-body { background: var(--surface-2); min-height: 100vh; margin: 0; }
.ex-top { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ex-top .grow, .ex-inst-head .grow, .ex-user .grow, .inst-chosen .grow { flex: 1; min-width: 0; }
.ex-tag { background: #1e1c19; color: #fff; border-radius: 99px; padding: 4px 12px; font-size: .78rem; font-weight: 600; }
.ex-main { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.ex-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ex-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.ex-stats div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.ex-stats b { display: block; font-size: 1.7rem; }
.ex-stats span { color: var(--muted); font-size: .85rem; }
.ex-list { display: grid; gap: 12px; }
.ex-inst { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.ex-inst.open { box-shadow: var(--shadow); }
.ex-inst-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; flex-wrap: wrap; }
.ex-inst-head h3 { margin: 0; font-size: 1.05rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-inst-head small { color: var(--muted); }
.ex-num { text-align: right; min-width: 84px; }
.ex-num b { display: block; font-size: 1.05rem; }
.ex-num b span { color: var(--muted); font-weight: 500; font-size: .85rem; }
.ex-num small { color: var(--muted); font-size: .75rem; }
.ex-caret { color: var(--muted); width: 16px; }
.ex-inst-body { border-top: 1px solid var(--line); padding: 16px; background: var(--surface-2); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ex-grid .card { margin: 0; }
.ex-grid h4 { margin: 0 0 10px; }
.ex-grid code, .ex-secret code { background: var(--surface); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
.ex-code { font-size: 1.05rem; letter-spacing: .08em; font-weight: 700; }
.ex-chip { font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 2px 9px; }
.ex-chip.on { background: #e4efe4; color: #24633a; }
.ex-chip.off { background: #fbe8e5; color: #b0352d; }
.ex-users { display: grid; gap: 8px; }
.ex-user { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; flex-wrap: wrap; }
.ex-user.off { opacity: .7; }
.ex-user small { display: block; color: var(--muted); font-size: .8rem; }
.ex-user select { width: auto; }
.ex-roles { display: flex; gap: 10px; flex-wrap: wrap; }
.ex-role { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.ex-role input { width: auto; margin: 0; }
.ex-secret { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 12px; }
.ex-secret code { font-size: 1.2rem; flex: 1; }
@media (max-width: 640px) { .ex-num { min-width: 0; text-align: left; } .ex-top { padding: 12px 16px; } }
.sidebar .inst-name { flex: none; font-size: .8rem; font-weight: 600; color: var(--muted); margin: -10px 0 16px 4px; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.cb-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.cb-inline input { width: auto; margin: 0; }
.nt-list { display: grid; gap: 12px; max-width: 860px; }
.nt-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; background: #fff; }
.nt-card.pinned { border-color: #c9c6ff; background: #fbfaff; }
.nt-card.expired { opacity: .6; }
.nt-card h3 { margin: 10px 0 6px; }
.nt-card p { margin: 0 0 8px; line-height: 1.5; }

/* ---------- student portal (student.html) ---------- */
.sp-body { margin: 0; background: var(--surface-2); min-height: 100vh; }
.sp-top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.sp-top .grow, .sp-row .grow, .sp-exam .grow, .sp-marks .grow { flex: 1; min-width: 0; }
.sp-inst { color: var(--muted); font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sp-me { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent); font: 700 .85rem var(--font); cursor: pointer; flex: none; }
.sp-tabs { display: flex; gap: 4px; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 63px; z-index: 19; scrollbar-width: none; }
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tabs button { border: 0; background: transparent; font: 600 .9rem var(--font); color: var(--muted); padding: 8px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.sp-tabs button.on { background: var(--ink); color: #fff; }
.sp-main { max-width: 900px; margin: 0 auto; padding: 20px 16px 60px; box-sizing: border-box; }
.sp-h1 { font-size: 1.6rem; margin: 4px 0 14px; }
.sp-h2 { font-size: 1.1rem; margin: 26px 0 10px; }
.sp-alert { background: #fff3dc; border: 1px solid #f0d39a; color: #7a4d06; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.sp-alert a { color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.sp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.sp-card { display: flex; align-items: center; gap: 14px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; cursor: pointer; font: inherit; color: var(--ink); }
.sp-card:hover { box-shadow: var(--shadow); }
.sp-card b { display: block; }
.sp-card span { color: var(--muted); font-size: .85rem; }
.sp-big { font-size: 1.35rem; font-weight: 800; min-width: 74px; text-align: center; color: var(--accent); }
.sp-ring { width: 84px; height: 84px; flex: none; }
.sp-ring circle { fill: none; stroke-width: 9; }
.sp-ring .bg { stroke: var(--surface-3); }
.sp-ring .fg { stroke: var(--muted); stroke-linecap: round; }
.sp-ring.ok .fg { stroke: var(--ok); } .sp-ring.warn .fg { stroke: #e0a02a; } .sp-ring.bad .fg { stroke: var(--bad); }
.sp-ring .big { font: 800 20px var(--font); fill: var(--ink); } .sp-ring .small { font: 600 9px var(--font); fill: var(--muted); }
.sp-sec, .sp-notice, .sp-exam { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.sp-sec h3, .sp-notice h3, .sp-exam h3 { margin: 0 0 4px; font-size: 1.05rem; }
.sp-row { display: flex; align-items: center; gap: 12px; }
.sp-pct { font-size: 1.6rem; font-weight: 800; }
.sp-pct.ok, .ok-t { color: var(--ok); } .sp-pct.warn { color: #b7791f; } .sp-pct.bad, .bad-t { color: var(--bad); }
.sp-bar { position: relative; height: 8px; background: var(--surface-3); border-radius: 99px; margin: 10px 0 6px; }
.sp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--accent); }
.sp-bar i.ok { background: var(--ok); } .sp-bar i.warn { background: #e0a02a; } .sp-bar i.bad { background: var(--bad); }
.sp-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; }
.sp-advice { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: .92rem; }
.sp-days { display: grid; gap: 4px; margin-top: 8px; }
.sp-days div { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: .88rem; }
.sp-days div.a b { color: var(--bad); } .sp-days div.p b { color: var(--ok); }
.sp-grade { text-align: center; background: var(--accent-soft); border-radius: 14px; padding: 6px 14px; }
.sp-grade b { display: block; font-size: 1.4rem; color: var(--accent); } .sp-grade span { font-size: .8rem; color: var(--muted); }
.sp-marks > div { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.sp-marks b { display: block; } .sp-marks .sp-bar { margin: 6px 0 0; height: 6px; }
.sp-score { font-size: 1.2rem; font-weight: 800; white-space: nowrap; } .sp-score span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.sp-exam { display: flex; gap: 14px; }
.sp-exam.sp-up { border-left: 4px solid var(--accent); }
.sp-date { width: 56px; flex: none; text-align: center; background: var(--surface-2); border-radius: 12px; padding: 8px 0; align-self: flex-start; }
.sp-date b { display: block; font-size: 1.4rem; line-height: 1.1; } .sp-date span { font-size: .78rem; color: var(--muted); text-transform: uppercase; }
.sp-meta { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.sp-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.sp-pill { background: var(--surface); border-radius: 99px; padding: 4px 12px; font-weight: 700; font-size: .88rem; }
.sp-pill.ok { background: #e4efe4; color: #24633a; } .sp-pill.bad { background: #fbe8e5; color: #b0352d; }
.sp-instr summary { cursor: pointer; font-size: .88rem; color: var(--accent); margin-top: 8px; }
.sp-notice.pinned { border-color: #c9c6ff; background: #fbfaff; }
.sp-notice p { margin: 6px 0 0; line-height: 1.5; }
.sp-files { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.sp-class { border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 3px; }
.sp-class span { color: var(--muted); font-size: .85rem; }
.sp-mats { display: grid; gap: 8px; margin-top: 8px; }
.sp-mats a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.sp-mats small { color: var(--muted); }
.sp-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 10px; }
.sp-dl dt { color: var(--muted); } .sp-dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.sp-form { display: grid; gap: 10px; max-width: 360px; }
.sp-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.sp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sp-table th, .sp-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sp-table td:last-child { white-space: nowrap; }
@media (max-width: 520px) { .sp-days div { grid-template-columns: 1fr auto; } .sp-days div .small { display: none; } .sp-top { padding: 10px 14px; } .sp-tabs { top: 59px; } }

/* ---------- sign in (login.html) ---------- */
.li-body { margin: 0; background: #fff; min-height: 100vh; color: #22252a; }
.li-top { display: flex; align-items: center; padding: 26px 40px; }
.li-top .grow { flex: 1; }
.li-top .logo { font-size: 1.55rem; }
.li-help-btn { border: 0; background: transparent; font: 500 1.05rem var(--font); color: #22252a; cursor: pointer; padding: 8px 4px; }
.li-help-btn:hover { text-decoration: underline; }
.li-main { display: flex; justify-content: center; padding: 30px 20px 60px; }
.li-box { width: 100%; max-width: 560px; }
.li-box h1 { font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.1rem); letter-spacing: -.01em; margin: 30px 0 30px; color: #22252a; }
.li-sub { margin: -18px 0 24px; color: #5b6068; }
.li-lead { color: #4a4f57; margin: -10px 0 22px; line-height: 1.5; }
.li-field { margin-bottom: 22px; }
.li-field > label, .li-label { display: block; font-size: 1.05rem; font-weight: 500; margin-bottom: 10px; color: #22252a; }
.li-box input[type=text], .li-box input[type=email], .li-box input[type=password], .li-select select {
  width: 100%; box-sizing: border-box; height: 54px; padding: 0 16px; border: 1px solid #8c9199; border-radius: 2px; background: #fff;
  font: 400 1.02rem var(--font); color: #22252a; box-shadow: none; }
.li-box input::placeholder { color: #8a8f97; }
.li-box input:focus, .li-select select:focus { outline: 2px solid #3a6ea5; outline-offset: 0; border-color: #3a6ea5; }
.li-select { position: relative; }
.li-select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.li-select::after { content: ''; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; border-right: 1.6px solid #22252a; border-bottom: 1.6px solid #22252a; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.li-hint { font-size: .92rem; color: #5b6068; margin: 10px 0 0; line-height: 1.45; }
.li-pw { display: flex; gap: 10px; }
.li-pw input { flex: 1; min-width: 0; }
.li-pw button { flex: none; width: 76px; height: 54px; border: 1px solid #8c9199; border-radius: 2px; background: #fff; font: 500 1rem var(--font); color: #22252a; cursor: pointer; }
.li-pw button:hover { background: #f4f5f7; }
.li-forgot { text-align: right; margin: -8px 0 26px; }
.li-box a { color: #3a6ea5; text-decoration: none; cursor: pointer; }
.li-box a:hover { text-decoration: underline; }
.li-submit { width: 100%; height: 58px; border: 0; border-radius: 2px; background: #3a6ea5; color: #fff; font: 700 1.15rem var(--font); cursor: pointer; margin-top: 6px; }
.li-submit:hover { background: #2f5d8f; }
.li-submit:disabled { opacity: .7; cursor: default; }
.li-switch { text-align: center; color: #4a4f57; margin: 24px 0 0; font-size: 1.02rem; }
.li-switch a { font-weight: 700; text-decoration: underline; }
.li-error { background: #fdecea; border: 1px solid #f3c1bb; color: #a12d24; padding: 12px 14px; border-radius: 2px; margin-bottom: 20px; font-size: .95rem; line-height: 1.45; }
.li-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.li-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #8c9199; border-radius: 2px; overflow: hidden; }
.li-seg button { height: 48px; border: 0; background: #fff; font: 500 1rem var(--font); color: #22252a; cursor: pointer; }
.li-seg button + button { border-left: 1px solid #8c9199; }
.li-seg button.on { background: #3a6ea5; color: #fff; }
.li-foot { margin-top: 46px; padding-top: 18px; border-top: 1px solid #e3e5e8; font-size: .88rem; color: #6a6f77; line-height: 1.7; text-align: center; }
.li-box .role-pick { display: grid; gap: 10px; }
.li-help { position: fixed; inset: 0; background: rgba(20,22,26,.4); display: flex; justify-content: flex-end; z-index: 50; }
.li-help-card { background: #fff; width: min(420px, 100%); height: 100%; overflow: auto; padding: 26px; box-sizing: border-box; box-shadow: -10px 0 40px rgba(0,0,0,.15); }
.li-help-card h3 { margin: 22px 0 6px; font-size: 1rem; }
.li-help-card p { margin: 0; color: #4a4f57; line-height: 1.55; }
@media (max-width: 600px) {
  .li-top { padding: 18px 18px; }
  .li-main { padding: 6px 18px 40px; }
  .li-box h1 { margin: 16px 0 22px; }
  .li-two { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- course allocation (allocation.js) ---------- */
.al-filters { gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 14px; }
.al-filters .search { flex: 1; min-width: 200px; }
.al-table td { vertical-align: top; }
.al-actions { white-space: nowrap; text-align: right; }
.al-actions .btn + .btn { margin-left: 4px; }
.al-upload { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.al-upload .drop { display: flex; flex-direction: column; justify-content: center; gap: 6px; border: 2px dashed var(--line); border-radius: 16px; padding: 18px; cursor: pointer; text-align: center; background: var(--surface-2); }
.al-upload .drop:hover { border-color: var(--accent); }
.al-upload .drop span { color: var(--muted); font-size: .85rem; }
.al-upload textarea { width: 100%; box-sizing: border-box; }
.warn-box a { cursor: pointer; text-decoration: underline; }
@media (max-width: 700px) { .al-upload { grid-template-columns: 1fr; } }
.ex-chip.warn { background: #fff3dc; color: #8a5a00; }
.ex-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; }
.ex-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ex-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ex-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ex-table tr:last-child td { border-bottom: 0; }
.ex-table tbody tr[data-open] { cursor: pointer; }
.ex-table tbody tr[data-open]:hover { background: var(--surface-2); }
.ex-table tr.off { opacity: .6; }
.ex-table small, .ex-name small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.ex-name { display: flex; align-items: center; gap: 12px; }
.ex-use { min-width: 110px; }
.ex-use span { color: var(--muted); font-size: .85rem; }
.ex-use i { display: block; height: 6px; border-radius: 99px; margin-top: 6px; background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-3) var(--p)); }
.ex-use i.near { background: linear-gradient(90deg, #e0a02a var(--p), var(--surface-3) var(--p)); }
.ex-use i.full { background: linear-gradient(90deg, var(--bad) var(--p), var(--surface-3) var(--p)); }
.ex-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 18px; overflow-x: auto; }
.ex-tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.ex-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.ex-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.ex-grid2 .card { margin: 0; }
.ex-grid2 h3 { margin: 0 0 12px; }
.ex-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ex-feat { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; }
.ex-feat input { width: auto; margin-top: 3px; }
.ex-feat small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font: 600 .85rem var(--font); cursor: pointer; color: var(--ink); }
.ex-chip-btn span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.ex-chip-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ex-chip-btn.on span { color: #ddd; }
.ex-person { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ex-person.off { opacity: .65; }
.ex-person-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ex-person-top small { display: block; color: var(--muted); font-size: .8rem; }
.ex-person-top select, .ex-person-actions select { padding: 6px 8px; font-size: .85rem; }
.ex-roles-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ex-role-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 3px 6px 3px 10px; font-size: .82rem; font-weight: 600; }
.ex-role-tag.pending { background: #fff3dc; color: #8a5a00; }
.ex-role-tag button { border: 0; background: transparent; cursor: pointer; color: inherit; font-size: .8rem; padding: 0 4px; }
.ex-person-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ex-person-actions .grow { flex: 1; }
.ex-danger { border-color: #f3c1bb !important; }
.ex-danger h3 { color: var(--bad); }
.btn.danger { color: var(--bad); border-color: #f3c1bb; }
