/* Ellie K12 — one stylesheet for the site, the tutor, practice and the school dashboard. */

:root {
  --ink: #17223b;
  --ink-soft: #4a5670;
  --ink-faint: #74809a;
  --bg: #f7f8fc;
  --panel: #ffffff;
  --line: #e3e7f1;
  --brand: #3451d1;
  --brand-dark: #263aa0;
  --brand-soft: #eef2ff;
  --accent: #f0a01a;
  --accent-soft: #fff5e2;
  --good: #12805c;
  --good-soft: #e6f6ef;
  --warn: #a45a06;
  --bad: #c0392b;
  --school: #0f766e;
  --school-soft: #e7f6f4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px rgba(23, 34, 59, 0.09);
  --shadow-sm: 0 2px 8px rgba(23, 34, 59, 0.06);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.02em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--ink-faint); font-size: 14px; }
.small { font-size: 13px; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 248, 252, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .spark { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 16px; }
.brand em { color: var(--brand); font-style: normal; }
.brand .k12 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: var(--accent-soft); color: var(--warn); padding: 2px 7px; border-radius: 999px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.site-nav a { color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 820px) { .site-nav a.optional { display: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; padding: 12px 22px;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; text-decoration: none; }
.btn-school { background: var(--school); color: #fff; }
.btn-school:hover { background: #0b5f59; text-decoration: none; }
.btn-accent { background: var(--accent); color: #402a00; }
.btn-accent:hover { background: #dd900d; text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---- hero ---- */
.hero { padding: 68px 0 54px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 48px; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 34px; } }
.eyebrow { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: 47px; line-height: 1.07; margin: 0 0 18px; }
.hero h1 em { color: var(--brand); font-style: normal; }
@media (max-width: 720px) { .hero h1 { font-size: 34px; } }
.hero p.lead { font-size: 19px; color: var(--ink-soft); margin: 0 0 26px; max-width: 580px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 14px; color: var(--ink-faint); font-size: 14px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 22px; letter-spacing: -0.02em; }
.hero-stats span { font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }

.demo {
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow); padding: 18px; max-width: 400px; margin-left: auto;
}
.demo-top { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; font-size: 13px; color: var(--ink-faint); }
.demo-top .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.demo .row { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.bubble { border-radius: 14px; padding: 10px 14px; font-size: 15px; max-width: 86%; }
.bubble.ellie { background: var(--brand-soft); color: var(--ink); border-bottom-left-radius: 4px; }
.bubble.learner { background: var(--brand); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble .fix { display: block; margin-top: 6px; font-size: 13px; color: var(--warn); }
.bubble .step { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.demo .mic-line { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px; }
.mic-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; }

/* ---- sections ---- */
section.band { padding: 58px 0; }
section.band.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2.section-title { font-size: 30px; margin: 0 0 8px; }
p.section-sub { color: var(--ink-soft); font-size: 17px; margin: 0 0 32px; max-width: 720px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card .num { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }

/* ---- subjects ---- */
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .subject-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .subject-grid { grid-template-columns: 1fr; } }
.subject-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.subject-card .icon { font-size: 24px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); margin-bottom: 10px; }
.subject-card h3 { margin: 0 0 4px; font-size: 17px; }
.subject-card p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.subject-card .topics { margin-top: 10px; font-size: 12px; color: var(--ink-faint); }

/* ---- test tracks ---- */
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .tracks { grid-template-columns: 1fr; } }
.track-card { background: linear-gradient(160deg, var(--brand-soft), #fff 70%); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.track-card h3 { margin: 0 0 4px; font-size: 22px; }
.track-card .score { font-size: 13px; color: var(--brand-dark); font-weight: 700; margin-bottom: 12px; }
.track-card ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 14px; }
.track-card li { margin-bottom: 4px; }

/* ---- pricing ---- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); position: relative; }
.plan.student { border-color: var(--brand); box-shadow: var(--shadow); }
.plan.school { border-color: var(--school); }
.plan .tag { position: absolute; top: -12px; left: 26px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.plan.school .tag { background: var(--school); }
.plan h3 { margin: 0 0 4px; font-size: 20px; }
.plan .price { font-size: 38px; font-weight: 800; margin: 6px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--ink-faint); }
.plan ul { list-style: none; margin: 18px 0; padding: 0; }
.plan li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); }
.plan li:first-child { border-top: 0; }
.plan .fine { font-size: 12px; color: var(--ink-faint); margin-top: 12px; }
.compare { width: 100%; border-collapse: collapse; margin-top: 28px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.compare th, .compare td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.compare th { background: var(--brand-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-dark); }
.compare td:last-child, .compare th:last-child { text-align: right; }
.compare tr:last-child td { border-bottom: 0; }

/* ---- forms ---- */
.auth-wrap { max-width: 470px; margin: 46px auto; }
.auth-wrap.wide { max-width: 620px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.notice { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.notice.error { background: #fdecea; color: var(--bad); }
.notice.ok { background: var(--good-soft); color: var(--good); }
.notice.info { background: var(--brand-soft); color: var(--brand-dark); }
.notice.school { background: var(--school-soft); color: var(--school); }
.tabs { display: flex; gap: 6px; background: var(--brand-soft); padding: 4px; border-radius: 999px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 999px; font: inherit; font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.tabs button.active { background: #fff; box-shadow: var(--shadow-sm); }

/* ---- app shell ---- */
.app-shell { display: grid; grid-template-columns: 310px 1fr; min-height: calc(100vh - 64px); }
@media (max-width: 940px) { .app-shell { grid-template-columns: 1fr; } }
.app-side { border-right: 1px solid var(--line); background: #fff; padding: 22px; }
@media (max-width: 940px) { .app-side { border-right: 0; border-bottom: 1px solid var(--line); } }
.app-side h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin: 0 0 10px; }
.app-side .group { margin-bottom: 22px; }
.grade-select, .subject-select, .track-select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--ink); }
.side-note { font-size: 13px; color: var(--ink-faint); margin: 8px 0 0; }
.topic-list { display: flex; flex-direction: column; gap: 5px; }
.topic-list button { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink-soft); font-size: 14px; }
.topic-list button:hover { background: var(--bg); }
.topic-list button.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; }
.mode-tabs button { border: 0; background: transparent; border-radius: 8px; padding: 7px 4px; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.mode-tabs button.active { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }

.app-main { display: flex; flex-direction: column; min-height: 0; }
.chat { flex: 1; overflow-y: auto; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 760px; width: fit-content; border-radius: 16px; padding: 14px 18px; }
.msg.ellie { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }
.msg.learner { background: var(--brand); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.msg .who { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-bottom: 4px; }
.msg .text { font-size: 16px; white-space: pre-wrap; }
.msg .encourage { margin-top: 8px; font-size: 13px; color: var(--good); }
.steps { margin: 12px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 14px; }
.steps li { margin-bottom: 5px; }
.check-card { margin-top: 14px; border: 1px dashed var(--brand); background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.check-card .q { font-weight: 600; margin-bottom: 8px; }
.check-card .reveal { margin-top: 8px; color: var(--ink-soft); }
.corrections { margin-top: 12px; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; }
.corrections h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); }
.corrections .item { font-size: 14px; margin-bottom: 8px; }
.corrections del { color: var(--bad); text-decoration: line-through; }
.corrections ins { color: var(--good); text-decoration: none; font-weight: 700; }
.corrections .why { display: block; color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.words { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.word-chip { background: var(--brand-soft); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--brand-dark); }
.word-chip b { font-weight: 800; }
.thinking { color: var(--ink-faint); font-size: 14px; font-style: italic; }
.composer { border-top: 1px solid var(--line); background: #fff; padding: 16px 26px 22px; }
.composer-row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 52px; max-height: 160px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; font: inherit; }
.composer textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.icon-btn { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 20px; display: grid; place-items: center; }
.icon-btn.mic.recording { background: #fdecea; border-color: var(--bad); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.4); } 50% { box-shadow: 0 0 0 10px rgba(192,57,43,0); } }
.composer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; color: var(--ink-faint); gap: 12px; flex-wrap: wrap; }
.speak-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 6px; }
.status-dot.off { background: var(--ink-faint); }
.badge { display: inline-block; background: var(--good-soft); color: var(--good); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge.warn { background: var(--accent-soft); color: var(--warn); }
.badge.school { background: var(--school-soft); color: var(--school); }

/* ---- practice / diagnostic ---- */
.quiz-wrap { max-width: 820px; margin: 0 auto; padding: 34px 20px 60px; }
.quiz-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.quiz-head .field { margin: 0; min-width: 150px; }
.progress { height: 8px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }
.qmeta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-faint); margin: 10px 0 18px; gap: 12px; }
.question-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.question-card .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 800; }
.question-card .q { font-size: 20px; margin-top: 10px; line-height: 1.5; white-space: pre-wrap; }
.choices { display: grid; gap: 10px; margin-top: 18px; }
.choice { text-align: left; font: inherit; font-size: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; }
.choice:hover { border-color: var(--brand); background: var(--brand-soft); }
.choice .letter { font-weight: 800; color: var(--brand); min-width: 18px; }
.choice.picked { border-color: var(--brand); }
.choice.correct { border-color: var(--good); background: var(--good-soft); }
.choice.wrong { border-color: var(--bad); background: #fdecea; }
.choice[disabled] { cursor: default; }
.feedback { border-radius: 12px; padding: 14px 16px; margin: 18px 0; font-size: 15px; }
.feedback.right { background: var(--good-soft); }
.feedback.wrong { background: var(--accent-soft); }
.feedback b { display: block; font-size: 16px; }
.feedback .why { margin: 8px 0 0; color: var(--ink-soft); }
.feedback .next { margin-top: 12px; }
.dots { display: flex; gap: 8px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.dots i.on { background: var(--brand); }
.dots i.ok { background: var(--good); }
.dots i.no { background: var(--bad); }
.result-grade { font-size: 64px; font-weight: 800; letter-spacing: -0.03em; color: var(--brand); line-height: 1; }
.result-name { font-size: 22px; font-weight: 700; margin: 6px 0 10px; }
.evidence { list-style: none; padding: 0; margin: 20px 0; }
.evidence li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.evidence li:first-child { border-top: 0; }
.evidence .lvl { font-weight: 800; min-width: 74px; }
.evidence .pass { color: var(--good); font-weight: 700; }
.evidence .fail { color: var(--bad); font-weight: 700; }
.summary-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.summary-counts { display: flex; gap: 26px; flex-wrap: wrap; }
.summary-counts > div { display: flex; flex-direction: column; }
.summary-counts b { font-size: 26px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.summary-counts span { font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.mastery-list { display: grid; gap: 8px; margin-top: 16px; }
.mastery-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mastery-row:first-child { border-top: 0; }
.mastery-row .acc { font-weight: 700; }
.mastery-row .acc.low { color: var(--bad); }
.mastery-row .acc.mid { color: var(--warn); }
.mastery-row .acc.high { color: var(--good); }

/* ---- school dashboard ---- */
.school-hero { background: linear-gradient(150deg, var(--school-soft), #fff 75%); border-bottom: 1px solid var(--line); padding: 34px 0; }
.school-hero .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: flex-end; }
.school-hero h1 { margin: 0 0 4px; font-size: 30px; }
.school-hero p { margin: 0; color: var(--ink-soft); }
.code-box { background: #fff; border: 1px dashed var(--school); border-radius: 12px; padding: 10px 16px; text-align: center; }
.code-box span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.code-box b { font-size: 24px; letter-spacing: .12em; color: var(--school); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
@media (max-width: 860px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.stat b { display: block; font-size: 26px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.panel h2 { margin: 0 0 4px; font-size: 19px; }
.panel p.sub { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.roster { width: 100%; border-collapse: collapse; font-size: 14px; }
.roster th, .roster td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.roster th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.roster tr:last-child td { border-bottom: 0; }
.roster .empty { text-align: center; color: var(--ink-faint); padding: 26px 0; }
.request-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.request-row:first-child { border-top: 0; }
.total-line { display: flex; justify-content: space-between; font-weight: 700; padding: 12px 0; border-top: 1px solid var(--line); }

/* ---- small screens ---- */
@media (max-width: 940px) {
  .app-side { max-height: 46vh; overflow-y: auto; }
  .chat { min-height: 38vh; }
}
@media (max-width: 700px) {
  #grade-badge { display: none; }
  .brand .k12 { display: none; }
  .app-side { padding: 16px; }
  .app-side .group { margin-bottom: 14px; }
  .topic-list { max-height: 210px; overflow-y: auto; }
  .composer { padding: 12px 14px 16px; }
  .chat { padding: 18px 14px; }
}
@media (max-width: 430px) {
  .composer-row { gap: 6px; }
  .composer-row .icon-btn { width: 46px; height: 52px; }
  #send { padding: 12px 16px; }
  .composer-foot { gap: 8px; }
  .site-header .wrap { gap: 10px; }
  .site-nav { gap: 10px; }
}

/* ---- misc ---- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--ink-faint); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--brand); cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.stack-sm > * + * { margin-top: 10px; }
