/* ==========================================================================
   Chiron design system
   ========================================================================== */
:root {
  --bg: #f6f6f9; --surface: #ffffff; --surface-2: #f1f1f6; --line: #e5e5ee; --line-2: #d6d6e2;
  --ink: #15161e; --ink-2: #4a4c5c; --muted: #7a7c8c;
  --primary: #4f46e5; --primary-ink: #ffffff; --primary-soft: #eceafd; --primary-2: #4338ca;
  --ok: #15803d; --ok-soft: #e5f6ea; --warn: #b45309; --warn-soft: #fdf1df; --bad: #c2410c; --bad-soft: #fde9e1; --info: #0369a1; --info-soft: #e2f1fa; --violet: #6d28d9; --violet-soft: #efe8fd;
  --c-maths: #4f46e5; --c-physics: #0284c7; --c-chemistry: #d97706; --c-biology: #16a34a; --c-further: #9333ea;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(20,20,40,.04), 0 4px 16px rgba(20,20,40,.05); --shadow-lg: 0 20px 60px rgba(20,20,40,.18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --serif: 'Fraunces', Georgia, serif; --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1016; --surface: #171821; --surface-2: #1e1f2a; --line: #2a2b38; --line-2: #383a4a; --ink: #ececf3; --ink-2: #b8b9c8; --muted: #8c8ea0;
  --primary: #8b84ff; --primary-ink: #0f1016; --primary-soft: #26244a; --primary-2: #a5a0ff;
  --ok: #4ade80; --ok-soft: #13291c; --warn: #fbbf24; --warn-soft: #2e2512; --bad: #fb923c; --bad-soft: #301b12; --info: #38bdf8; --info-soft: #0f2633; --violet: #c4a5ff; --violet-soft: #251a3d;
  --c-maths: #8b84ff; --c-physics: #38bdf8; --c-chemistry: #fbbf24; --c-biology: #4ade80; --c-further: #d8a5ff;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 20px 60px rgba(0,0,0,.5); color-scheme: dark; } }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 700; } h2 { font-size: 1.3rem; font-weight: 650; } h3 { font-size: 1.02rem; font-weight: 650; } h4 { font-size: .92rem; font-weight: 650; margin-top: 1em; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .xs { font-size: .76rem; } .mono { font-family: var(--mono); }
.center { text-align: center; } .right { text-align: right; } .nowrap { white-space: nowrap; } .hidden { display: none !important; }
.m0 { margin: 0; } .mt { margin-top: 14px; } .mt-sm { margin-top: 6px; } .mt-lg { margin-top: 26px; } .mb { margin-bottom: 14px; } .mb-lg { margin-bottom: 28px; } .py { padding: 4px 0; } .pad { padding: 10px 12px; }
.row { display: flex; align-items: center; } .row.gap, .gap { gap: 10px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .center-x { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.pre { white-space: pre-wrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); } .bad-text { color: var(--bad); }
.big { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: var(--radius-sm); border: 1px solid transparent; font: 600 .875rem var(--font); cursor: pointer; background: var(--surface-2); color: var(--ink); transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--primary-ink); } .btn.primary:hover { background: var(--primary-2); }
.btn.ghost { background: var(--surface); border-color: var(--line-2); } .btn.ghost:hover { border-color: var(--muted); }
.btn.danger, .btn.ghost.danger { color: var(--bad); } .btn.danger:not(.ghost) { background: var(--bad-soft); }
.btn.sm { height: 32px; padding: 0 11px; font-size: .82rem; } .btn.xs { height: 26px; padding: 0 9px; font-size: .76rem; border-radius: 7px; } .btn.lg { height: 46px; padding: 0 22px; font-size: .95rem; }
.btn.block { width: 100%; } .btn:disabled { opacity: .6; cursor: wait; }
.btn .ic { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; position: relative; font-size: 1.2rem; }
.icon-btn:hover { background: var(--surface-2); }
label { display: flex; flex-direction: column; gap: 5px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea { font: inherit; font-size: .92rem; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
fieldset { border: 0; padding: 0; margin: 0; } legend { font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.check-grid .check { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; }
.check-grid .check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- chips, badges ---------- */
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); text-transform: capitalize; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); } .chip.info { background: var(--info-soft); color: var(--info); } .chip.violet { background: var(--violet-soft); color: var(--violet); } .chip.muted { background: var(--surface-2); color: var(--muted); }
.subj { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 7px; font-size: .74rem; font-weight: 600; }
.subj-maths { --c: var(--c-maths); } .subj-physics { --c: var(--c-physics); } .subj-chemistry { --c: var(--c-chemistry); } .subj-biology { --c: var(--c-biology); } .subj-further { --c: var(--c-further); }
.subj { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.subj-border-maths { border-top: 3px solid var(--c-maths) !important; } .subj-border-physics { border-top: 3px solid var(--c-physics) !important; } .subj-border-chemistry { border-top: 3px solid var(--c-chemistry) !important; } .subj-border-biology { border-top: 3px solid var(--c-biology) !important; } .subj-border-further { border-top: 3px solid var(--c-further) !important; }
.bc-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-size: 1.3rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); flex: none; }
.bc-ic.inline { width: 36px; height: 36px; font-size: 1.1rem; vertical-align: middle; margin-right: 6px; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: var(--primary-ink); font-size: .7rem; display: grid; place-items: center; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); font-size: .72rem; color: var(--ink-2); }
.count.bad { background: var(--bad-soft); color: var(--bad); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: .78rem; font-weight: 700; color: #fff; flex: none; background: linear-gradient(135deg, #6366f1, #8b5cf6); letter-spacing: .02em; }
.avatar.xs { width: 24px; height: 24px; font-size: .62rem; } .avatar.sm { width: 30px; height: 30px; font-size: .7rem; } .avatar.lg { width: 48px; height: 48px; font-size: 1rem; } .avatar.xl { width: 72px; height: 72px; font-size: 1.4rem; }
.av-1 { background: linear-gradient(135deg, #0ea5e9, #6366f1); } .av-2 { background: linear-gradient(135deg, #8b5cf6, #ec4899); } .av-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); } .av-4 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.stars { display: inline-flex; align-items: center; gap: 3px; color: #f59e0b; font-weight: 700; font-size: .85rem; } .stars .ic { width: 14px; height: 14px; fill: #f59e0b; }
.verified { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #fff; vertical-align: middle; } .verified .ic { width: 12px; height: 12px; stroke-width: 3; }
.price { font-weight: 700; font-size: 1.05rem; } .price small { font-weight: 500; color: var(--muted); font-size: .75rem; } .price.big { font-size: 1.7rem; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; flex: 1; min-width: 50px; } .bar span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s; }

/* ---------- cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); color: inherit; display: block; min-width: 0; }
.card.flush { padding: 0; overflow-x: auto; }
a.card { transition: border-color .15s, transform .15s, box-shadow .15s; } a.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,20,40,.08); }
.card.attention { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.grid2, .grid3 { display: grid; gap: 16px; } .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid2.tight, .grid3.tight { gap: 12px; }
.cols-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-label { font-size: .78rem; color: var(--muted); font-weight: 600; } .stat-value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; } .stat-sub { font-size: .76rem; color: var(--muted); }
.stat.bad .stat-value { color: var(--bad); } .stat.warn .stat-value { color: var(--warn); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; } .page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.h-sec { font-size: 1rem; margin: 22px 0 12px; color: var(--ink-2); }
.back { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; } .back:hover { color: var(--ink); }
.empty { text-align: center; padding: 50px 20px; } .empty-ic { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: .9rem; flex-wrap: wrap; }
.banner.info { background: var(--info-soft); color: var(--ink); } .banner.info > .ic { color: var(--info); }
.banner.warn { background: var(--warn-soft); } .banner.warn > .ic { color: var(--warn); } .banner.bad { background: var(--bad-soft); } .banner.bad > .ic { color: var(--bad); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 13px; font-weight: 600; font-size: .88rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--primary); }
.seg { display: inline-flex; background: var(--surface-2); padding: 4px; border-radius: 11px; gap: 3px; width: 100%; } .seg.left { width: auto; flex-wrap: wrap; }
.seg a, .seg-opt { flex: 1; text-align: center; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: .86rem; color: var(--ink-2); cursor: pointer; flex-direction: row; justify-content: center; align-items: center; gap: 6px; display: flex; }
.seg a.on, .seg-opt:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg-opt input { display: none; }
.filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; } .filters select { width: auto; min-width: 160px; }
.search { position: relative; flex: 1; min-width: 220px; } .search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); } .search input { padding-left: 36px; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; } .table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; } .table tr:last-child td { border-bottom: 0; } .table td a.btn { margin-left: 4px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .88rem; } .meta dt { color: var(--muted); font-weight: 600; } .meta dd { margin: 0; }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; z-index: 40; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; color: var(--ink); padding: 4px 8px 18px; letter-spacing: -.02em; }
.brand.center { justify-content: center; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), #a855f7); color: #fff; font-family: var(--serif); font-size: 1.05rem; font-weight: 700; }
.role-tag { font-size: .66rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); text-transform: uppercase; letter-spacing: .05em; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--ink-2); font-weight: 550; font-size: .9rem; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); } .nav-item.active { background: var(--primary-soft); color: var(--primary); } .nav-item .ic { width: 19px; height: 19px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; } .me-name { font-weight: 650; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30; }
.pill-id { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; font-family: var(--mono); padding: 5px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); } .pill-id .ic { width: 14px; height: 14px; color: var(--primary); }
.bell .dot { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .64rem; display: grid; place-items: center; }
.content { padding: 28px; max-width: 1240px; width: 100%; margin: 0 auto; }
.only-mobile { display: none; }
.scrim { display: none; }

/* ---------- public site ---------- */
.public { min-height: 100vh; }
.pub-nav { display: flex; align-items: center; gap: 24px; padding: 14px 40px; position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pub-nav .brand { padding: 0; } .pub-links { display: flex; gap: 22px; flex: 1; } .pub-links a { color: var(--ink-2); font-weight: 550; font-size: .9rem; } .pub-links a:hover { color: var(--ink); } .pub-cta { display: flex; gap: 8px; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; padding: 70px 40px 60px; max-width: 1240px; margin: 0 auto; }
.eyebrow { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: 5px 11px; border-radius: 99px; margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 600; line-height: 1.06; letter-spacing: -.025em; margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: var(--primary); }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 560px; margin-bottom: 26px; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; } .hero-stats b { display: block; font-size: 1.45rem; letter-spacing: -.02em; } .hero-stats span { font-size: .8rem; color: var(--muted); }
.hero-visual { position: relative; height: 430px; }
.mock-card { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 7px; width: 300px; font-size: .9rem; }
.mock-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.m1 { top: 10px; left: 0; transform: rotate(-2deg); } .m2 { top: 120px; right: 0; width: 330px; } .m3 { bottom: 0; left: 30px; transform: rotate(1.5deg); }
.mock-video { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .mock-video span { aspect-ratio: 4/3; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, #312e81, #6d28d9); } .mock-video span + span { background: linear-gradient(135deg, #075985, #0d9488); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: pulse 1.6s infinite; vertical-align: middle; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.section { padding: 60px 40px; max-width: 1240px; margin: 0 auto; } .section.alt { max-width: none; background: var(--surface); border-block: 1px solid var(--line); } .section.alt > * { max-width: 1160px; margin-left: auto; margin-right: auto; }
.section.narrow-top { padding-top: 32px; } .section.narrow { max-width: 760px; padding-top: 32px; }
.section h2 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; letter-spacing: -.02em; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); } .f-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 26px; }
.board-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.price-card { position: relative; padding: 26px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--primary); background: var(--surface); box-shadow: var(--shadow-lg); }
.price-card ul { padding-left: 18px; color: var(--ink-2); flex: 1; } .price-card .big small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.ribbon { position: absolute; top: -12px; right: 20px; background: var(--primary); color: var(--primary-ink); font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.pub-foot { padding: 30px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tutor-card { display: flex; flex-direction: column; gap: 12px; } .tc-top { display: flex; gap: 14px; align-items: center; } .tc-top h3 { margin: 0; }
.tc-subjects { display: flex; flex-wrap: wrap; gap: 6px; } .tc-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.group-card h3 { margin: 10px 0 4px; }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; } .profile-main { display: flex; flex-direction: column; gap: 18px; }
.sticky { position: sticky; top: 84px; }
.checklist { list-style: none; padding: 0; } .checklist li { display: flex; gap: 10px; padding: 5px 0; } .checklist .ic { color: var(--ok); }
.vetting { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--primary-soft); margin-top: 10px; } .vetting > .ic { color: var(--primary); width: 22px; height: 22px; }
.review { padding: 12px 0; border-bottom: 1px solid var(--line); } .review:last-child { border: 0; } .review p { margin: 6px 0 4px; }
.auth { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-family: var(--serif); font-weight: 600; margin: 0; }
.demo-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ---------- dashboard bits ---------- */
.hero-card { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding: 22px; background: linear-gradient(120deg, var(--surface), var(--primary-soft)); flex-wrap: wrap; }
.hero-card.live { border-color: var(--primary); } .hero-card h2 { margin: 4px 0; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .row-item:last-child { border-bottom: 0; }
.row-title { font-weight: 600; font-size: .92rem; }
.date-badge { width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--surface-2); padding: 4px 0; } .date-badge span { display: block; font-size: .64rem; font-weight: 700; text-transform: uppercase; color: var(--bad); } .date-badge b { font-size: 1.1rem; }
.task-card { display: flex; align-items: center; gap: 14px; padding: 13px 15px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--primary)); border-radius: var(--radius-sm); color: inherit; transition: border-color .15s, box-shadow .15s; }
.task-card:hover { box-shadow: var(--shadow); border-color: var(--line-2); border-left-color: var(--c); }
.subj-strip-maths { --c: var(--c-maths); } .subj-strip-physics { --c: var(--c-physics); } .subj-strip-chemistry { --c: var(--c-chemistry); } .subj-strip-biology { --c: var(--c-biology); } .subj-strip-further { --c: var(--c-further); }
.task-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); flex: none; }
.task-title { font-weight: 650; font-size: .93rem; margin: 1px 0; } .score { font-weight: 700; font-size: 1.05rem; }
.quick-subjects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.subj-tile { display: flex; flex-direction: column; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--ink); } .subj-tile span { font-size: 1.3rem; color: var(--c); font-weight: 700; } .subj-tile small { color: var(--muted); }
.student-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.student-chip { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: inherit; } .student-chip:hover { border-color: var(--line-2); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); } .mini-stats b { display: block; font-size: .95rem; } .mini-stats span { font-size: .72rem; color: var(--muted); }
.proposal { padding: 12px 0; border-bottom: 1px solid var(--line); } .proposal:last-child { border: 0; padding-bottom: 0; }
.note-bubble { margin-top: 6px; padding: 8px 11px; background: var(--surface-2); border-radius: 10px; font-size: .84rem; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; flex: none; }
.ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); } .ring b { position: relative; font-size: 1.5rem; }
.ring.sm { width: 64px; height: 64px; margin: 0; } .ring.sm::before { inset: 6px; } .ring.sm b { font-size: .9rem; }

/* ---------- subjects & quiz ---------- */
.subj-card h3 { margin: 0; }
.topic-list { display: flex; flex-direction: column; } .topic { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .topic:last-child { border: 0; }
.topic-n { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--muted); flex: none; }
.formulae { padding-left: 18px; margin: 0 0 8px; font-family: var(--mono); font-size: .84rem; } .formulae li { padding: 4px 0; }
.paper-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.paper-line { display: flex; align-items: center; gap: 4px; font-size: .84rem; padding: 2px 0; } .paper-line.done span:first-child { color: var(--muted); } .paper-line .icon-btn { width: 28px; height: 28px; } .paper-line .ic { width: 15px; height: 15px; }
.ext-link { display: flex; flex-direction: column; padding: 9px 30px 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); position: relative; } .ext-link:last-child { border: 0; } .ext-link .ic { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 15px; }
.quiz-wrap { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.quiz-card { padding: 28px; } .quiz-q { font-size: 1.3rem; font-weight: 650; margin-bottom: 20px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font: 500 .98rem var(--font); color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s; }
.option:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.opt-l { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: .82rem; flex: none; }
.option.correct { border-color: var(--ok); background: var(--ok-soft); } .option.correct .opt-l { background: var(--ok); color: #fff; }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); } .option.wrong .opt-l { background: var(--bad); color: #fff; }
.option.dim { opacity: .55; } .option:disabled { cursor: default; }
.explain { margin: 18px 0 14px; padding: 13px 15px; border-radius: 12px; font-size: .92rem; } .explain.ok { background: var(--ok-soft); } .explain.bad { background: var(--bad-soft); }
.quiz-result { padding: 34px; } .review-q { padding: 12px 0; border-bottom: 1px solid var(--line); } .review-q:last-child { border: 0; }

/* ---------- tasks ---------- */
.timer-box { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 14px; border-radius: 12px; background: var(--surface-2); flex-wrap: wrap; }
.files { display: flex; flex-wrap: wrap; gap: 8px; } .file-pill { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: .82rem; }
.file-thumb img { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.grade-card { background: linear-gradient(120deg, var(--surface), var(--ok-soft)); }
.assign-form[data-type="past-paper"] .only-task, .assign-form[data-type="quiz"] .only-task, .assign-form[data-type="quiz"] .only-past-paper, .assign-form[data-type="task"] .only-past-paper, .assign-form[data-type="quiz"] .no-quiz { display: none; }
.eval-line { padding: 8px 0; border-top: 1px solid var(--line); } .eval-line p { margin: 4px 0 0; }
.chart { width: 100%; height: auto; display: block; } .chart .grid { stroke: var(--line); } .chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; } .chart .pt { stroke: var(--surface); stroke-width: 2; }
.c-maths { stroke: var(--c-maths); fill: var(--c-maths); background: var(--c-maths); } .c-physics { stroke: var(--c-physics); fill: var(--c-physics); background: var(--c-physics); } .c-chemistry { stroke: var(--c-chemistry); fill: var(--c-chemistry); background: var(--c-chemistry); } .c-biology { stroke: var(--c-biology); fill: var(--c-biology); background: var(--c-biology); } .c-further { stroke: var(--c-further); fill: var(--c-further); background: var(--c-further); }
.chart .ln.c-maths, .chart .ln.c-physics, .chart .ln.c-chemistry, .chart .ln.c-biology, .chart .ln.c-further { fill: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-2); margin-bottom: 6px; } .legend span { display: flex; align-items: center; gap: 6px; } .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-empty { padding: 40px 0; text-align: center; }
.summary-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: inherit; } .summary-row:last-child { border: 0; } .summary-row > .ic { color: var(--primary); }

/* ---------- calendar ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); } .cal-head h3 { margin: 0; min-width: 150px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 8px; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: background .12s; }
.cal-day:nth-child(7n) { border-right: 0; } .cal-day:hover { background: var(--surface-2); } .cal-day.out { background: color-mix(in srgb, var(--surface-2) 50%, transparent); } .cal-day.out .cal-n { color: var(--muted); opacity: .6; }
.cal-n { font-size: .8rem; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; } .cal-day.today .cal-n { background: var(--primary); color: var(--primary-ink); }
.cal-pill { text-align: left; border: 0; border-radius: 6px; padding: 3px 6px; font: 600 .72rem var(--font); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-confirmed { background: var(--ok-soft); color: var(--ok); } .st-proposed { background: var(--warn-soft); color: var(--warn); border: 1px dashed var(--warn) !important; } .st-completed { background: var(--surface-2); color: var(--muted); }
.cal-pill.grp { box-shadow: inset 3px 0 0 var(--violet); }
.cal-legend { display: flex; gap: 16px; padding: 10px 14px; font-size: .76rem; color: var(--muted); } .cal-legend span { display: flex; gap: 6px; align-items: center; } .cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.timeline { list-style: none; padding: 0 0 0 16px; border-left: 2px solid var(--line); margin: 0; font-size: .86rem; } .timeline li { padding: 4px 0 10px; position: relative; } .timeline li::before { content: ''; position: absolute; left: -22px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }

/* ---------- session room ---------- */
.room { display: flex; flex-direction: column; gap: 12px; }
.room-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.room-clock { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; color: var(--muted); font-weight: 600; } .room-clock b { font-size: 1.3rem; color: var(--ink); }
.room-clock.pre .live-dot { background: var(--muted); animation: none; } .room-clock.warn { background: var(--warn-soft); border-color: var(--warn); } .room-clock.warn b { color: var(--warn); } .room-clock.over { background: var(--bad-soft); border-color: var(--bad); } .room-clock.over b { color: var(--bad); }
.room-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.stage-wrap { display: flex; flex-direction: column; gap: 12px; }
.stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; background: #0d0e14; border-radius: var(--radius); padding: 10px; min-height: 380px; }
.stage-iframe { width: 100%; height: 520px; border: 0; border-radius: var(--radius); background: #0d0e14; }
.tile { position: relative; border-radius: 12px; overflow: hidden; background: #1b1c26; aspect-ratio: 16/10; display: grid; place-items: center; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: none; position: absolute; inset: 0; } .tile.has-video video { display: block; } .tile.has-video .tile-ph { display: none; }
.tile.local video { transform: scaleX(-1); }
.tile-ph { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #c7c8d6; text-align: center; padding: 10px; } .tile-ph .muted { color: #9a9cb0; }
.tile-name { position: absolute; left: 10px; bottom: 10px; font-size: .78rem; font-weight: 600; color: #fff; background: rgba(0,0,0,.5); padding: 3px 9px; border-radius: 7px; }
.tile.joined { outline: 2px solid #22c55e; outline-offset: -2px; }
.controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 600 .72rem var(--font); cursor: pointer; }
.ctl:hover { border-color: var(--line-2); } .ctl.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); } .ctl.off { background: var(--bad-soft); color: var(--bad); } .ctl.end { background: #dc2626; color: #fff; border-color: #dc2626; }
.side-panel { display: flex; flex-direction: column; height: 100%; min-height: 470px; } .small-tabs { margin: 0; padding: 0 8px; }
.panel { flex: 1; display: flex; flex-direction: column; }
.transcript { flex: 1; overflow-y: auto; padding: 12px 14px; max-height: 420px; font-size: .86rem; } .transcript p { margin: 0 0 8px; } .transcript.static { max-height: 520px; padding: 10px 0 0; }
#board { width: 100%; aspect-ratio: 10/7; background: var(--surface-2); touch-action: none; cursor: crosshair; display: block; }
.notes-area { flex: 1; border: 0; border-radius: 0; min-height: 420px; resize: none; } .notes-area:focus { box-shadow: none; }
.summary-card .lead { font-size: 1rem; margin: 12px 0; }
.ai-badge { display: inline-flex; gap: 6px; align-items: center; font-size: .76rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: linear-gradient(90deg, var(--primary-soft), var(--violet-soft)); color: var(--primary); } .ai-badge .ic { width: 14px; height: 14px; }
.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.sum-block { padding: 12px 14px; border-radius: 12px; } .sum-block h4 { margin: 0 0 6px; } .sum-block ul { margin: 0; padding-left: 18px; font-size: .86rem; }
.sum-block.ok { background: var(--ok-soft); } .sum-block.warn { background: var(--warn-soft); } .sum-block.info { background: var(--info-soft); }
details summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--primary-soft); border-top-color: var(--primary); animation: spin 0.8s linear infinite; margin: 0 auto 16px; } @keyframes spin { to { transform: rotate(360deg); } }

/* ---------- notifications, settings ---------- */
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--ink); } .notif:last-child { border: 0; } .notif .ic { color: var(--muted); margin-top: 2px; }
.notif.unread { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); } .notif.unread .ic { color: var(--primary); }
.toggle { flex-direction: row; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; color: var(--ink); } .toggle input { display: none; }
.tg { width: 40px; height: 23px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; transition: background .15s; } .tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + .tg { background: var(--primary); } .toggle input:checked + .tg::after { transform: translateX(17px); }

.btn.google { background: var(--surface); border-color: var(--line-2); color: var(--ink); gap: 10px; } .btn.google:hover { border-color: var(--muted); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .78rem; } .or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.res-list { display: flex; flex-direction: column; }
.res-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--ink); border-radius: 8px; } .res-item:last-child { border-bottom: 0; } .res-item:hover { background: var(--surface-2); } .res-item > .ic { color: var(--muted); width: 15px; }
.res-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; } .res-ic .ic { width: 16px; height: 16px; }
.res-view iframe, .res-view video { width: 100%; height: 78vh; border: 0; display: block; background: #000; } .res-view img { max-width: 100%; display: block; margin: 0 auto; }
/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 26px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.plan-card.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); } .plan-card.current { border-color: var(--ok); }
.plan-card h3 { margin: 0; font-size: 1.25rem; } .plan-card .big small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.plan-card .checklist { flex: 1; font-size: .86rem; margin: 6px 0; } .plan-card .checklist li { padding: 3px 0; }
.parent-line { display: flex; align-items: center; gap: 6px; font-size: .8rem; padding: 8px 10px; background: var(--surface-2); border-radius: 9px; } .parent-line .ic { width: 15px; color: var(--primary); }
.ribbon.alt { background: var(--ink); color: var(--bg); }
.upper { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.card.locked { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px dashed var(--primary); background: color-mix(in srgb, var(--primary-soft) 50%, var(--surface)); margin-bottom: 18px; } .card.locked > .ic { color: var(--primary); width: 24px; height: 24px; }
.sm-select { padding: 4px 8px; font-size: .8rem; width: auto; }
@media (max-width: 1080px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }

.interval-seg { width: auto; display: inline-flex; }
/* ---------- sign-up, quiz editor, info pages, cookies ---------- */
.auth-card.wide { max-width: 520px; }
.child-box { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.qe-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.qe-opts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .82rem; margin-top: 4px; }
.cov-row { color: var(--ink); border-radius: 8px; padding: 6px 8px; } .cov-row:hover, .cov-row.on { background: var(--surface-2); }
.mbar.wide { width: 160px; }
.opt-edit { gap: 4px; }
.break { word-break: break-all; }
.legal h1 { font-family: var(--serif); font-weight: 600; } .legal h2 { margin-top: 28px; font-size: 1.15rem; } .legal ul { padding-left: 20px; } .legal li { margin: 4px 0; } .legal p, .legal li { line-height: 1.65; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .84rem; margin: 16px 0; }
.ph { background: #fff3c4; color: #7a4b00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; } .faq summary { font-size: 1rem; } .faq p { margin: 8px 0 0; color: var(--ink-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .86rem; } .foot-links a { color: var(--ink-2); }
.pub-foot > div { max-width: 520px; }
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; max-width: 760px; margin: 0 auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); }
@media (max-width: 560px) { .mbar.wide { width: 80px; } .qe-row { flex-direction: column; } }

/* ---------- revision launch ---------- */
.lock { display: inline-flex; color: var(--muted); margin-right: 4px; vertical-align: middle; } .lock .ic { width: 13px; height: 13px; }
.locked-item b { color: var(--muted); }
.founding { font-size: .78rem; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 4px 8px; border-radius: 7px; align-self: flex-start; }
.plan-card.soon { opacity: .85; background: var(--surface-2); }
.dim-row { opacity: .6; }
.ai-cta { display: flex; gap: 12px; align-items: center; background: linear-gradient(120deg, var(--surface), var(--violet-soft)); } .ai-cta > .ic { color: var(--primary); width: 26px; height: 26px; }
.sum-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-result .ring.sm b { font-size: .8rem; }
@media (max-width: 820px) { .sum-grid.two { grid-template-columns: 1fr; } }

/* ---------- parent portal ---------- */
.bar.ok span { background: var(--ok); } .bar.warn span { background: var(--warn); } .bar.bad span { background: var(--bad); }
.alert-list { display: flex; flex-direction: column; gap: 4px; } .alert-list a, .alert-list span { color: var(--ink); }
.subject-rows { display: flex; flex-direction: column; gap: 4px; }
.subject-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .subject-row:last-child { border: 0; } .subject-row .subj { min-width: 150px; }
.mini-task { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: .88rem; } .mini-task:last-child { border: 0; }
.timeline a { color: var(--ink); }
.mini-stats.four { grid-template-columns: repeat(4, 1fr); }
.big-inline { font-size: 1.3rem; margin-left: 4px; color: var(--primary); }
.table.compact td, .table.compact th { padding: 7px 8px; font-size: .82rem; }
.mastery { display: flex; flex-direction: column; } .mastery-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); } .mastery-row:last-child { border: 0; }
.mbar { width: 90px; display: flex; }
.report-subject h4 { margin-top: 0; }
@media (max-width: 560px) { .mini-stats.four { grid-template-columns: repeat(2, 1fr); } .subject-row { flex-wrap: wrap; } .mbar { width: 60px; } }
@media print { .card, .stat { box-shadow: none; break-inside: avoid; } .main { display: block; } }

.cred-box { display: grid; gap: 12px; padding: 16px; margin: 16px 0; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.cred-box > div { display: flex; flex-direction: column; gap: 2px; } .big-pw { font-size: 1.35rem; letter-spacing: .06em; color: var(--primary); }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(12,12,22,.45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { position: relative; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-lg); animation: rise .18s; }
.modal h2 { margin: 6px 30px 6px 0; } .modal-x { position: absolute; top: 14px; right: 14px; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(10px); opacity: 0; } }
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(400px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: .88rem; font-weight: 500; box-shadow: var(--shadow-lg); animation: rise .2s; display: flex; gap: 8px; align-items: center; transition: opacity .3s, transform .3s; }
.toast.bad { background: var(--bad); color: #fff; } .toast.info { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); } .toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- practice paper documents (always printed-paper look) ---------- */
.doc { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.doc-page { width: 100%; max-width: 794px; min-height: 1000px; background: #fff; color: #15161e; padding: 56px 60px; border-radius: 4px; box-shadow: var(--shadow-lg); font-size: 14px; position: relative; }
.doc-cover { display: flex; flex-direction: column; gap: 22px; }
.doc-brand { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; padding-bottom: 14px; border-bottom: 3px solid #15161e; }
.doc-draft { font-size: .7rem; font-weight: 800; letter-spacing: .1em; color: #c2410c; border: 2px solid #c2410c; padding: 3px 8px; border-radius: 4px; }
.doc-meta-top { display: flex; justify-content: space-between; font-weight: 600; color: #4a4c5c; }
.doc-title { font-family: var(--serif); font-size: 2.8rem; font-weight: 600; margin: 30px 0 0; letter-spacing: -.02em; }
.doc-sub { font-size: 1.15rem; font-weight: 600; }
.doc-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .doc-boxes > div { border: 1.5px solid #15161e; padding: 12px 14px; font-size: .8rem; color: #4a4c5c; } .doc-boxes b { display: block; font-size: 1.3rem; color: #15161e; margin-top: 4px; }
.doc-fields { display: flex; flex-direction: column; gap: 14px; } .doc-fields > div { display: flex; gap: 12px; align-items: flex-end; font-weight: 600; } .doc-fields span { flex: 1; border-bottom: 1px solid #15161e; height: 22px; }
.doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } .doc-cols ul { padding-left: 18px; margin: 0; line-height: 1.8; } .doc-cols h4 { margin: 0 0 6px; }
.doc-note { padding: 14px; background: #fdf1df; border-radius: 6px; }
.doc-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid #d6d6e2; font-size: .75rem; color: #7a7c8c; }
.doc-q { display: flex; gap: 16px; padding: 14px 0 18px; border-bottom: 1px solid #e5e5ee; }
.doc-qn { width: 30px; height: 30px; flex: none; display: grid; place-items: center; background: #15161e; color: #fff; font-weight: 700; border-radius: 4px; }
.doc-ph { color: #6d28d9; font-style: italic; }
.doc-line { border-bottom: 1px dotted #9a9cb0; height: 26px; }
.doc-total { text-align: right; font-weight: 700; font-size: .82rem; margin-top: 8px; }
.doc-end { text-align: center; font-weight: 800; letter-spacing: .05em; padding-top: 24px; }
.doc-ms { width: 100%; border-collapse: collapse; font-size: .86rem; } .doc-ms th, .doc-ms td { border: 1px solid #15161e; padding: 8px 10px; text-align: left; vertical-align: top; } .doc-ms th { background: #f1f1f6; }
.doc-frame iframe { width: 100%; height: 80vh; border: 0; display: block; }
@media (max-width: 820px) { .doc-page { padding: 28px 20px; min-height: 0; } .doc-cols, .doc-boxes { grid-template-columns: 1fr; } .doc-title { font-size: 2rem; } }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .sidebar, .topbar, .no-print, #toasts, .scrim { display: none !important; }
  .content { padding: 0; max-width: none; }
  .doc { gap: 0; } .doc-page { box-shadow: none; border-radius: 0; max-width: none; min-height: 0; page-break-after: always; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3, .features, .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-layout, .room-body, .profile { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; } .hero-visual { display: none; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; } body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .only-mobile { display: inline-grid; }
  .topbar { padding: 0 16px; } .content { padding: 20px 16px; }
  .cols-2-1, .cols-2, .grid2, .sum-grid { grid-template-columns: 1fr; }
  .pub-links { display: none; } .pub-nav { padding: 12px 16px; justify-content: space-between; } .pub-cta .btn.ghost:not(.login-btn) { display: none; } .pub-cta .btn { padding-left: 12px; padding-right: 12px; }
  .hero { padding: 40px 16px; } .section { padding: 40px 16px; } .pub-foot { padding: 24px 16px; }
  .cal-day { min-height: 64px; padding: 3px; } .cal-pill { font-size: 0; padding: 0; height: 6px; } .cal-dow { font-size: .62rem; padding: 6px 0; }
  .hide-sm { display: none; }
  .page-head h1 { font-size: 1.45rem; }
}
@media (max-width: 560px) {
  .grid3, .features, .pricing, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3.tight { grid-template-columns: 1fr 1fr; }
  .pill-id { display: none; }
  .filters select { flex: 1; min-width: 0; }
  .table td, .table th { padding: 8px 10px; }
}

/* ---------- topic hub, mastery, progress ---------- */
.topic-link { color: inherit; text-decoration: none; border-radius: var(--radius-sm); transition: background .15s; }
.topic-link:hover { background: var(--surface-2); }
.topic-link .mbar { width: 90px; flex: none; }
.mastery-head { display: flex; align-items: center; gap: 10px; }
.tabs-scroll { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
.tabs-scroll a { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.notes { line-height: 1.7; max-width: 72ch; }
.notes h3 { margin: 18px 0 6px; } .notes h4 { margin: 16px 0 4px; } .notes ul { padding-left: 20px; }
.notes code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.keypoint { display: flex; gap: 10px; background: var(--violet-soft); color: var(--ink); border-left: 3px solid var(--violet); padding: 10px 12px; border-radius: 8px; margin: 10px 0; }
.keypoint .ic { color: var(--violet); flex: none; margin-top: 3px; }
.ws-card { border-top: 4px solid var(--line-2); } .ws-l1 { border-top-color: var(--ok); } .ws-l2 { border-top-color: var(--warn); } .ws-l3 { border-top-color: var(--bad); }
.ws-card.done { background: color-mix(in srgb, var(--ok-soft) 50%, var(--surface)); }
.written-q .pre, .pre { white-space: pre-wrap; }
.ms-box, .answer-box { border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; }
.ms-box { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.answer-box { background: var(--surface-2); }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); grid-template-columns: repeat(var(--weeks), 12px); gap: 3px; overflow-x: auto; }
.heatmap i, .hm-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.hm-0 { background: var(--surface-2); } .hm-1 { background: color-mix(in srgb, var(--primary) 30%, var(--surface-2)); } .hm-2 { background: color-mix(in srgb, var(--primary) 55%, var(--surface-2)); } .hm-3 { background: color-mix(in srgb, var(--primary) 78%, var(--surface-2)); } .hm-4 { background: var(--primary); }
.ws-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .65rem; margin-right: 3px; background: var(--surface-2); color: var(--muted); }
.ws-dot.on { background: var(--ok); color: #fff; }
.table-wrap { overflow-x: auto; }
.mastery-table .mbar { width: 110px; display: inline-block; }
a.mastery-row { color: inherit; text-decoration: none; }
.setup-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.setup-row select { max-width: 220px; }
.app-foot { margin-top: 32px; }
@media (max-width: 640px) { .topic-link .mbar { width: 50px; } .setup-row { flex-wrap: wrap; } .setup-row select { max-width: none; } }

/* ---------- guest banner + Google button sizing ---------- */
.guest-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 28px; background: var(--warn-soft); border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); font-size: .9rem; line-height: 1.4; }
.guest-banner > .ic { color: var(--warn); flex: none; }
.guest-banner .grow { flex: 1 1 260px; min-width: 0; }
.guest-banner a { font-weight: 600; text-decoration: underline; }
.guest-banner .btn { flex: none; }
@media (max-width: 640px) { .guest-banner { padding: 10px 16px; } }
.gsi-slot { width: 100%; max-width: 400px; margin-inline: auto; display: flex; justify-content: center; min-height: 44px; }
.auth-card.wide { max-width: 464px; }   /* inner width 400px, the widest Google allows for its button */

/* ---------- spec topic lists ---------- */
.topic-group { margin: 14px 0 4px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.topic-group:first-child { margin-top: 0; }
.topic-n { min-width: 2.4em; text-align: center; font-size: .72rem; }
.spec-outline summary { cursor: pointer; }
.spec-list { margin: 10px 0; padding-left: 20px; display: grid; gap: 4px; font-size: .88rem; color: var(--ink-2); }

.year-bar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.year-bar .seg { flex: none; }
.year-bar > span { flex: 1 1 260px; min-width: 0; }
