:root {
  --bg: #eef3f8;
  --bg-2: rgba(21, 101, 160, 0.07);
  --card: rgba(255, 255, 255, 0.90);
  --card-border: rgba(21, 101, 160, 0.20);
  --ink: #0d2b45;
  --muted: #5a7184;
  --accent: #1668a7;
  --accent-2: #0c4a6e;
  --accent-3: #1ba1b3;
  --good: #16a085;
  --warn: #e08e0b;
  --err: #d8434f;
  --radius: 20px;
  --shadow: 0 24px 60px -28px rgba(12, 74, 110, 0.35);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* floating background orbs */
.bg-orbs { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.30; }
.orb-a { width: 360px; height: 360px; background: #8fb8d6; top: -80px; left: -60px; animation: float 18s ease-in-out infinite; }
.orb-b { width: 300px; height: 300px; background: #6aa3c4; bottom: -100px; right: -40px; animation: float 22s ease-in-out infinite reverse; }
.orb-c { width: 240px; height: 240px; background: #7fd0d9; top: 40%; right: 20%; animation: float 26s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(40px) translateX(-30px); } }

/* topbar */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; }
.brand-mark { color: var(--accent-2); font-size: 20px; filter: drop-shadow(0 0 8px var(--accent-2)); }
.lang-toggle { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 999px; padding: 4px; }
.lang-btn { background: transparent; border: 0; color: var(--muted); font-weight: 700; padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: .2s; }
.lang-btn.active { background: var(--accent); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-link { color: var(--accent); font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
/* Reviewers missed the teacher entry twice when it only lived in the footer. */
.topbar-cta { text-decoration: none; white-space: nowrap; color: var(--accent); border-color: var(--accent);
  background: rgba(22, 104, 167, .10); font-weight: 700; }
.topbar-cta:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.topbar-link:hover { text-decoration: underline; }

/* layout */
.app { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 20px 50px; }
.footer { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: 12.5px; padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.footer-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }

/* card */
.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 32px;
  animation: rise .45s cubic-bezier(.2,.8,.2,1);
}
.card.narrow { max-width: 460px; margin: 0 auto; }
.card.center { text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: none; } }

h1 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; }
h2 { font-size: 22px; margin: 0 0 18px; }
h3 { margin: 0 0 12px; }
.hero-title { font-size: 34px; color: var(--accent); }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 18px; }
.kicker { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: var(--accent-3); font-weight: 700; margin: 0 0 10px; }

/* welcome */
.desc { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 14px; padding: 8px 18px; margin-bottom: 20px; }
.desc p { margin: 14px 0; font-size: 14.5px; color: #324a5e; }
.desc .hook { color: var(--accent-3); font-weight: 600; }
.desc .privacy { font-size: 13px; color: #324a5e; background: rgba(27,161,179,.09); border: 1px solid rgba(27,161,179,.30); border-radius: 10px; padding: 10px 14px; }
.desc .privacy a { color: var(--accent-3); font-weight: 600; }
.consent { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 14px;
  padding: 16px 18px 8px; margin-bottom: 18px; }
.consent-title { margin: 0 0 12px; font-weight: 700; font-size: 14.5px; }
.consent-minor { margin: 4px 0 10px; font-size: 12.5px; color: var(--muted); }
.consent-minor a { color: var(--accent-3); font-weight: 600; }
.ack { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14.5px; margin-bottom: 12px;
  border-radius: 10px; padding: 6px 8px; margin-left: -8px; margin-right: -8px; transition: background .15s, box-shadow .15s; }
.ack:hover { background: rgba(22, 104, 167, .06); }
.ack.missing { background: rgba(216, 67, 79, .09); box-shadow: inset 0 0 0 1px rgba(216, 67, 79, .35); }
.ack input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }

.divider { display: flex; align-items: center; text-align: center; color: var(--muted); margin: 26px 0 16px; font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--card-border); }
.divider span { padding: 0 12px; }
.reconnect { display: flex; gap: 10px; }
.reconnect input { flex: 1; letter-spacing: 3px; text-transform: uppercase; font-weight: 700; text-align: center; }

/* buttons */
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 12px 20px; cursor: pointer; transition: transform .12s, box-shadow .2s, opacity .2s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 12px 28px -12px var(--accent); }
.btn.primary:hover { background: var(--accent-2); box-shadow: 0 16px 34px -12px var(--accent-2); }
.btn.primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: var(--bg-2); color: var(--ink); border: 1px solid var(--card-border); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.big { width: 100%; padding: 15px; font-size: 16px; margin-top: 8px; }

/* inputs */
input, select { font: inherit; color: var(--ink); background: rgba(255, 255, 255, 0.75); border: 1px solid var(--card-border); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,104,167,.18); }
input::placeholder { color: var(--muted); }
select option { background: #fff; color: var(--ink); }

/* form */
.form { display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--muted); }
.field span { font-weight: 600; }

.err { color: var(--err); font-size: 14px; margin: 4px 0 0; }

/* student: arriving through a teacher's class link */
.class-banner { font-size: 14px; color: #1d4f2e; background: rgba(22, 160, 133, .10);
  border: 1px solid rgba(22, 160, 133, .35); border-radius: 12px; padding: 11px 15px; margin: 0 0 18px; }
.class-banner.bad { color: #8a5a10; background: rgba(224, 142, 11, .12); border-color: rgba(224, 142, 11, .38); }

/* ---------------------------------------------------------- teacher area */
.teacher-app { max-width: 880px; }
.btn.small { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn.ghost.danger { color: var(--err); border-color: rgba(216, 67, 79, .35); }
.btn.ghost.danger:hover { border-color: var(--err); }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.center-text { text-align: center; }
.switch-line { margin-top: 16px; }
.back { display: inline-block; margin-bottom: 10px; font-size: 14px; }
.block-link { display: block; margin: 16px auto 0; font-size: 14px; }
.ok-note { color: #117a88; background: rgba(27,161,179,.12); border: 1px solid rgba(27,161,179,.32); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 14px 0 0; }
.warn-note { color: #8a5a10; background: rgba(224,142,11,.12); border: 1px solid rgba(224,142,11,.38); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 14px 0 0; }
.card.narrow .big-emoji { font-size: 56px; margin-bottom: 6px; }

.tbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--card-border); }
.tbar-who { display: flex; flex-direction: column; font-size: 14px; }
.tbar-who .muted { font-size: 12.5px; }

.tabs { display: flex; gap: 6px; background: var(--bg-2); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 5px; margin-bottom: 20px; }
.tab { flex: 1; background: transparent; border: 0; font: inherit; font-weight: 700; color: var(--muted);
  padding: 10px; border-radius: 9px; cursor: pointer; transition: .15s; }
.tab.on { background: var(--accent); color: #fff; }
.tab:not(.on):hover { color: var(--accent); }

/* searchable establishment picker */
.combo { max-height: 260px; overflow-y: auto; border: 1px solid var(--card-border); border-radius: 12px;
  background: rgba(255,255,255,.75); margin-top: 8px; }
.combo:empty { display: none; }
.combo-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: none;
  border: 0; border-bottom: 1px solid var(--card-border); padding: 10px 14px; font: inherit; cursor: pointer; color: var(--ink); }
.combo-item:last-child { border-bottom: 0; }
.combo-item:hover { background: rgba(22, 104, 167, .09); }
.combo-item .muted { font-size: 12.5px; }
.combo-empty { margin: 0; padding: 12px 14px; font-size: 13.5px; color: var(--muted); }
.picked { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(22,104,167,.09);
  border: 1px solid var(--accent); border-radius: 12px; padding: 11px 14px; }
.picked-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); }
.picked .btn { margin-left: auto; }

.captcha-field .captcha-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha-img { line-height: 0; border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; }
.captcha-img svg { display: block; }

/* class list */
.new-class { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 16px; padding: 18px; margin-bottom: 24px; }
.new-class h3 { font-size: 15px; margin: 0; }
.class-list { display: flex; flex-direction: column; gap: 12px; }
.class-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--card-border); border-radius: 16px; padding: 16px 18px; background: var(--bg-2);
  transition: border-color .15s, transform .15s; }
.class-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.class-card h3 { font-size: 17px; margin: 0 0 2px; }
.class-card .muted { font-size: 13px; }
.class-nums { display: flex; gap: 8px; margin: 10px 0 0; }
.pill.alt { color: var(--accent); background: rgba(22,104,167,.12); border-color: rgba(22,104,167,.30); }
.class-actions { display: flex; gap: 8px; }

/* class link */
.link-box { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 16px; padding: 16px 18px; margin: 18px 0 22px; }
.link-box h3 { font-size: 15px; margin: 0 0 10px; }
.link-row { display: flex; gap: 10px; margin-bottom: 8px; }
.link-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.link-row .btn { flex: 0 0 auto; white-space: nowrap; }

/* KPI tiles + persona distribution */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.kpi { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--bg-2);
  border: 1px solid var(--card-border); border-radius: 16px; padding: 16px 10px; }
.kpi-num { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.kpi-num small { font-size: 15px; font-weight: 700; color: var(--muted); }
.kpi-lab { font-size: 12px; color: var(--muted); text-align: center; }

.personas { margin: 22px 0 8px; }
.personas h3 { font-size: 16px; margin: 0 0 12px; }
.persona-row { display: grid; grid-template-columns: 200px 1fr 34px; gap: 10px; align-items: center;
  margin-bottom: 9px; font-size: 13.5px; }
.persona-row.zero { opacity: .45; }
.persona-cell { font-weight: 600; }
.persona-bar { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.persona-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s; }
.persona-num { font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); font-weight: 700; }
.privacy-note { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--card-border); }

/* about-you sub-questions (lycée: filière / niveau / spécialités / série) */
.choiceset { border: 1px solid var(--card-border); background: var(--bg-2); border-radius: 14px; padding: 6px 16px 16px; margin: 0; }
.choiceset legend { font-size: 14px; font-weight: 600; color: var(--muted); padding: 0 8px; }
.choiceset .count { font-size: 12.5px; font-weight: 600; color: var(--accent); margin: 0 0 10px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices.inline { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14.5px; color: var(--ink);
  background: rgba(255, 255, 255, .70); border: 1.5px solid var(--card-border); border-radius: 12px; padding: 10px 13px;
  transition: border-color .15s, background .15s, opacity .15s; }
.choices.inline .choice { flex: 1 1 120px; justify-content: center; text-align: center; font-weight: 600; }
.choice:hover { border-color: var(--accent); }
.choice.on { border-color: var(--accent); background: rgba(22, 104, 167, .10); }
.choice.off { opacity: .45; cursor: not-allowed; }
.choice.off:hover { border-color: var(--card-border); }
.choice input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--accent); cursor: inherit; }
.choices.inline .choice input { margin-top: 1px; }
.hint { font-size: 13.5px; color: var(--muted); background: var(--bg-2); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 10px 14px; margin: 0; }

/* code reveal */
.code-box {
  font-size: 40px; font-weight: 800; letter-spacing: 10px; text-align: center;
  background: rgba(22,104,167,.10);
  border: 1px dashed var(--accent); border-radius: 16px; padding: 22px; margin: 18px 0;
  color: var(--accent-2); text-shadow: 0 2px 10px rgba(22,104,167,.25);
}
.code-box + .btn { margin-bottom: 10px; }

/* rubric overview */
.rubric-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 22px 0; }
.rubric-card { position: relative; background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 16px; padding: 18px 14px; text-align: center; transition: transform .2s, border-color .2s; }
.rubric-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.rubric-emoji { font-size: 34px; }
.rubric-no { position: absolute; top: 10px; left: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.rubric-card h3 { font-size: 16px; margin: 8px 0 6px; }
.rubric-card p { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; color: #117a88; background: rgba(27,161,179,.12); border: 1px solid rgba(27,161,179,.30); padding: 3px 10px; border-radius: 999px; }

/* rubric intro */
.rubric-intro .big-emoji { font-size: 72px; margin: 6px 0; filter: drop-shadow(0 8px 18px rgba(0,0,0,.4)); animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.now-entering { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: var(--muted); margin: 0; }
.dots { display: flex; gap: 8px; justify-content: center; margin: 18px 0 22px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--card-border); }
.dot.on { background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }

/* question */
.q-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.q-rubric { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-3); }
.q-bar { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.q-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.q-text { line-height: 1.35; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option { display: flex; gap: 14px; align-items: center; text-align: left; background: var(--bg-2); border: 1.5px solid var(--card-border); border-radius: 14px; padding: 14px 16px; cursor: pointer; color: var(--ink); transition: border-color .15s, background .15s, transform .1s; }
.option:hover { border-color: var(--accent); transform: translateX(3px); }
.option.selected { border-color: var(--accent); background: rgba(22,104,167,.10); }
.opt-key { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; background: rgba(22,104,167,.12); color: var(--accent); }
.option.selected .opt-key { background: var(--accent); color: #fff; }
.opt-text { font-size: 15px; }
.q-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.q-section { font-size: 12.5px; color: var(--muted); }

/* result */
.result .persona { text-align: center; margin: 10px 0 18px; }
.persona-emoji { font-size: 92px; line-height: 1; animation: pop .6s cubic-bezier(.2,1.4,.4,1); filter: drop-shadow(0 10px 22px rgba(0,0,0,.5)); }
.persona-name { font-size: 34px; margin: 10px 0 4px; color: var(--accent); }
.persona-tag { color: var(--accent-3); font-weight: 700; margin: 0; }
.persona-desc { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 14px; padding: 18px; font-size: 15.5px; color: #324a5e; }

.scores { margin: 24px 0 8px; }
.score-row { display: grid; grid-template-columns: 150px 1fr 46px 104px; gap: 10px; align-items: center; margin-bottom: 12px; font-size: 13.5px; }
.score-label { font-weight: 600; }
.score-bar { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.score-bar span { display: block; height: 100%; border-radius: 999px; transition: width .5s; }
.score-bar span.high { background: var(--accent-3); }
.score-bar span.low { background: var(--warn); }
.score-num { font-variant-numeric: tabular-nums; color: var(--muted); }
.score-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.score-tag.high { color: #117a88; background: rgba(27,161,179,.14); }
.score-tag.low { color: #b9791a; background: rgba(224,142,11,.16); }
.score-total { margin-top: 14px; font-size: 15px; }

/* result: how the profile was worked out */
.how { margin: 22px 0 8px; background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 14px; padding: 16px 18px; }
.how h3 { font-size: 16px; margin: 0 0 8px; }
.how p { margin: 0 0 8px; font-size: 14px; color: #324a5e; }
.how p:last-child { margin-bottom: 0; }
.how .lv-high { color: #117a88; }
.how .lv-low { color: #b9791a; }
.how-combo { padding-top: 8px; border-top: 1px solid var(--card-border); }

/* result: question-by-question review */
.review { margin: 22px 0 8px; }
.review h3 { font-size: 16px; margin: 0 0 4px; }
.review > .muted { margin: 0 0 12px; }
.review-group { border: 1px solid var(--card-border); border-radius: 14px; background: var(--bg-2); margin-bottom: 10px; overflow: hidden; }
.review-group summary { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; }
.review-group summary::-webkit-details-marker { display: none; }
.review-group summary::after { content: "▾"; color: var(--accent); font-size: 12px; transition: transform .2s; }
.review-group[open] summary::after { transform: rotate(180deg); }
.review-group summary:hover { color: var(--accent); }
.review-group-count { font-weight: 500; font-size: 12.5px; color: var(--muted); margin-left: auto; }
.review-list { list-style: none; margin: 0; padding: 0 16px 8px; }
.review-item { border-top: 1px solid var(--card-border); padding: 13px 0; }
.review-item p { margin: 0; }
.review-q { font-size: 14.5px; font-weight: 600; display: flex; gap: 9px; align-items: baseline; }
.review-mark { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 800; align-self: flex-start; }
.review-item.ok .review-mark { background: rgba(27, 161, 179, .16); color: #117a88; }
.review-item.ko .review-mark { background: rgba(216, 67, 79, .14); color: var(--err); }
.review-a { font-size: 13.5px; color: #324a5e; margin-top: 6px !important; padding-left: 29px; }
.review-a.good { color: #117a88; }
.review-lab { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; margin-right: 6px; }
.review-verdict { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.review-item.ok .review-verdict { color: #117a88; background: rgba(27, 161, 179, .14); }
.review-item.ko .review-verdict { color: var(--err); background: rgba(216, 67, 79, .12); }

.result-foot { text-align: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--card-border); }
.mini-code { font-size: 15px; letter-spacing: 1px; }
.mini-code strong { letter-spacing: 4px; color: var(--accent); }
.muted { color: var(--muted); font-size: 13px; }
.thanks { font-size: 16px; margin-top: 8px; }

/* spinner */
.spinner { width: 38px; height: 38px; margin: 20px auto; border: 4px solid var(--card-border); border-top-color: var(--accent-2); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* responsive */
@media (max-width: 600px) {
  .card { padding: 24px 20px; }
  /* give the brand a full row instead of squeezing it beside the controls */
  .topbar { flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .topbar .brand { flex: 1 0 100%; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .grid2, .rubric-grid { grid-template-columns: 1fr; }
  .reconnect { flex-direction: column; }
  .choices.inline { flex-direction: column; }
  /* stacked: flex-basis would otherwise become a 120px row height */
  .choices.inline .choice { flex: 0 0 auto; justify-content: flex-start; text-align: left; }
  .hero-title { font-size: 27px; }
  .score-row { grid-template-columns: 1fr; gap: 4px; }
  .review-a { padding-left: 0; }
  .kpis { grid-template-columns: 1fr; }
  /* stacked: name and count on one line, the bar spanning underneath, placed
     explicitly, or auto-flow drops the count beside the wrong persona. */
  .persona-row { grid-template-columns: 1fr auto; row-gap: 5px; margin-bottom: 14px; }
  .persona-cell { grid-area: 1 / 1; }
  .persona-num { grid-area: 1 / 2; }
  .persona-bar { grid-area: 2 / 1 / 3 / 3; }
  .class-card, .class-actions, .link-row, .tbar { flex-direction: column; align-items: stretch; }
  .picked .btn { margin-left: 0; }
  .review-verdict { margin-left: 0; }
  .score-bar { order: 3; }
}
