/* ===== Nataliz EDU - design system ===== */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --purple: #7c3aed;
  --ink: #0f172a;
  --slate: #475569;
  --muted: #64748b;
  --bg: #f6f8fc;
  --card: #ffffff;
  --line: #e6ebf3;
  --amber: #f59e0b;
  --green: #16a34a;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 60px rgba(37, 99, 235, .18);
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16.5px;
  line-height: 1.65;
  letter-spacing: -0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; line-height: 1.2; margin: 0 0 .45em; font-weight: 800; letter-spacing: -0.018em; color: var(--ink); }
h1 { letter-spacing: -0.025em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1140px, 92vw); margin: 0 auto; }
.muted { color: var(--muted); }
em { font-style: italic; color: var(--purple); }

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: .95rem;
  padding: .65rem 1.2rem; transition: transform .12s ease, box-shadow .2s ease, background .2s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-outline { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.btn-outline:hover { background: #eff5ff; }
.btn-ghost { background: transparent; color: var(--slate); }
.btn-ghost:hover { background: #eef2f8; }
.btn-login { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }

.pill {
  display: inline-block; background: #eef2ff; color: var(--blue-dark);
  font-weight: 800; font-size: .78rem; letter-spacing: .02em;
  padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}

/* ===== header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  background: url('/img/logo.svg') center / contain no-repeat;
  border-radius: 22%;
  box-shadow: var(--shadow-sm);
  /* the literal "N" in the markup is now decorative - hide it */
  font-size: 0; color: transparent; line-height: 0;
  flex: 0 0 auto;
}
.brand-mark.small { width: 30px; height: 30px; }
.brand-text { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 1.25rem; }
.brand-accent { color: var(--blue); }
.main-nav { display: flex; gap: 1.3rem; margin-left: .5rem; }
.main-nav a { color: var(--slate); font-weight: 700; }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: .8rem; }
.link-muted { color: var(--slate); font-weight: 700; }
.inline-form { display: inline; margin: 0; }

/* account avatar + dropdown */
.user-menu { position: relative; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: .02em;
  display: inline-grid; place-items: center; box-shadow: var(--shadow-sm); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.avatar.sm { width: 34px; height: 34px; font-size: .85rem; }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); padding: .6rem; z-index: 60; }
.user-dropdown-head { display: flex; gap: .6rem; align-items: center; padding: .5rem .5rem .7rem; border-bottom: 1px solid var(--line); }
.user-dropdown-id { min-width: 0; }
.user-dropdown-id strong { display: block; font-size: .92rem; }
.user-dropdown-id small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; word-break: normal; }
.user-dropdown-nav { display: grid; padding: .4rem 0; }
.user-dropdown-nav a { padding: .55rem .6rem; border-radius: 10px; color: var(--ink); font-weight: 600; }
.user-dropdown-nav a:hover { background: #f1f5f9; text-decoration: none; }
.user-dropdown-foot { padding: .4rem .5rem .2rem; border-top: 1px solid var(--line); }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .15s; }
.switch-ui::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::before { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px rgba(37,99,235,.3); }

/* settings tabs */
.tabs { display:flex; gap:.4rem; border-bottom:1px solid var(--line); margin:1rem 0 1.4rem; }
.tab-btn { background:none; border:0; border-bottom:3px solid transparent; cursor:pointer; font-family:inherit;
  font-weight:800; font-size:1rem; color:var(--muted); padding:.6rem .9rem; margin-bottom:-1px; }
.tab-btn:hover { color:var(--ink); }
.tab-btn.active { color:var(--blue-dark); border-bottom-color:var(--blue); }
.users-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; flex-wrap:wrap; }
.users-search { flex:1; min-width:220px; border:1.5px solid var(--line); border-radius:12px; padding:.7rem 1rem; font-family:inherit; font-size:1rem; background:#fcfdff; }
.users-search:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 4px rgba(37,99,235,.12); }
.users-count { color:var(--muted); font-weight:700; font-size:.85rem; }
.users-empty { color:var(--muted); padding:1rem; }

/* per-user cards with per-course blocks */
.users-list { display:grid; gap:1rem; }
.user-card { background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm); padding:1.1rem 1.2rem; }
.user-card-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; padding-bottom:.9rem; border-bottom:1px solid var(--line); margin-bottom:.9rem; }
.user-card-actions { display:flex; align-items:center; gap:.6rem; }
.course-blocks { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:1rem; }
.course-block { border:1px solid var(--line); border-radius:14px; padding:1rem 1.1rem; background:#fff; box-shadow:var(--shadow-sm); transition:opacity .15s, border-color .15s; }
.course-block.is-off { opacity:.62; background:#fafbfc; }
.course-block-top { display:flex; align-items:center; justify-content:space-between; gap:.8rem; }
.course-name { font-weight:700; font-size:1.04rem; }
.course-prefs { display:flex; flex-direction:column; gap:.7rem; margin-top:.85rem; padding-top:.85rem; border-top:1px solid var(--line); }
.course-prefs[hidden] { display:none; }
.pref-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.pref-text { display:flex; flex-direction:column; gap:.1rem; min-width:0; }
.pref-label { font-size:.9rem; font-weight:600; color:var(--slate); }
.pref-note { font-size:.76rem; color:var(--muted); line-height:1.35; font-weight:400; }
.pref-row .switch { flex:0 0 auto; }
.pref-row.is-locked { opacity:.55; }
.pref-locked { font-size:.82rem; color:var(--muted); font-style:italic; margin:.7rem 0 0; }
.switch input:disabled + .switch-ui { opacity:.45; cursor:not-allowed; }

/* organizations */
.org-create { display:flex; gap:.6rem; margin:0 0 1.2rem; flex-wrap:wrap; }
.org-create .users-search { flex:1; min-width:220px; }
.org-list { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px,1fr)); gap:1rem; }
.org-card { display:flex; align-items:center; justify-content:space-between; gap:1rem; background:#fff;
  border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow-sm); padding:1.1rem 1.2rem; color:var(--ink); }
.org-card:hover { text-decoration:none; box-shadow:var(--shadow-md); transform:translateY(-2px); }
.org-card strong { display:block; font-size:1.05rem; }
.org-card small { display:block; }
.org-manage { color:var(--blue); font-weight:800; }
.member-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.member-controls { display:flex; flex-direction:column; align-items:flex-start; gap:.6rem; }
.member-inline { display:flex; align-items:flex-end; gap:.5rem; flex-wrap:wrap; }
.member-field { display:flex; flex-direction:column; font-size:.75rem; font-weight:700; color:var(--muted); gap:.2rem; }
.member-select { border:1.5px solid var(--line); border-radius:10px; padding:.45rem .6rem; font-family:inherit; font-size:.9rem; background:#fcfdff; }
.member-select:focus { outline:none; border-color:var(--blue); }
.invite-form { display:flex; gap:.7rem; align-items:flex-end; flex-wrap:wrap; }
.invite-form .member-field { flex:1; min-width:160px; }
.invite-form .member-select { width:100%; }

/* users management table */
.users-table { display: grid; gap: .5rem; margin-top: .4rem; }
.users-row { display: grid; grid-template-columns: 2fr .8fr .8fr .8fr .8fr; align-items: center; gap: .6rem;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; box-shadow: var(--shadow-sm); }
.users-head { background: transparent; border: 0; box-shadow: none; font-weight: 800; font-size: .8rem; color: var(--muted); padding-bottom: 0; }
.users-user { display: flex; gap: .6rem; align-items: center; min-width: 0; }
.users-user strong { display: block; font-size: .9rem; }
.users-user small { font-size: .76rem; word-break: break-all; }
.users-toggle { display: flex; }
.btn-sm { padding: .4rem .9rem; font-size: .85rem; }
@media (max-width: 720px) {
  .users-row { grid-template-columns: 1fr 1fr; }
  .users-head { display: none; }
}

/* account avatar menu */
.user-menu { position: relative; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: .02em;
  display: grid; place-items: center; box-shadow: var(--shadow-sm); font-family: inherit; }
.avatar.sm { width: 34px; height: 34px; font-size: .8rem; }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); padding: .6rem; z-index: 60; }
.user-dropdown-head { display: flex; gap: .6rem; align-items: center; padding: .5rem .5rem .7rem; border-bottom: 1px solid var(--line); }
.user-dropdown-id strong { display: block; font-size: .95rem; }
.user-dropdown-id small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; word-break: normal; }
.user-dropdown-nav { display: grid; padding: .4rem 0; }
.user-dropdown-nav a { padding: .55rem .6rem; border-radius: 10px; color: var(--ink); font-weight: 700; }
.user-dropdown-nav a:hover { background: #f1f5f9; text-decoration: none; }
.user-dropdown-foot { border-top: 1px solid var(--line); padding-top: .5rem; }

/* ===== hero ===== */
.hero { padding: 4rem 0 3rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.hero-copy h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.lead { font-size: 1.15rem; color: var(--slate); max-width: 36ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0 1.2rem; }
.hero-trust { list-style: none; padding: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--slate); font-weight: 700; }
.hero-trust li { font-size: .92rem; }

.hero-art { position: relative; min-height: 320px; }
.blob {
  position: absolute; inset: 10% 5%; border-radius: 42% 58% 60% 40% / 50% 45% 55% 50%;
  background: var(--grad); opacity: .14; filter: blur(6px);
}
.card-float {
  position: absolute; background: #fff; border-radius: 16px; padding: 1rem 1.1rem;
  box-shadow: var(--shadow-md); display: grid; gap: .15rem; min-width: 130px;
  animation: float 5s ease-in-out infinite;
}
.card-float .emoji { font-size: 1.6rem; }
.card-float strong { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.card-float small { color: var(--muted); }
.card-math { top: 8%; left: 6%; }
.card-read { top: 44%; right: 4%; animation-delay: .8s; }
.card-trophy { bottom: 4%; left: 22%; animation-delay: 1.6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===== sections ===== */
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); text-align: center; }
.section-title.left { text-align: left; margin-top: 2.5rem; }
.section-sub { text-align: center; color: var(--muted); margin-top: -.4rem; margin-bottom: 2rem; }

.subjects { padding: 3rem 0; }
.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.subject-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease; color: var(--ink);
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; }
.subject-card.math { border-top: 4px solid var(--blue); }
.subject-card.read { border-top: 4px solid var(--purple); }
.subject-card.science { border-top: 4px solid #16a34a; }
.subject-card.social { border-top: 4px solid #ea580c; }
.subject-card.science .subject-link { color: #16a34a; }
.subject-card.social .subject-link { color: #ea580c; }
.subject-emoji { font-size: 2.4rem; }
.subject-card h3 { margin: .5rem 0 .3rem; font-size: 1.4rem; }
.subject-card p { color: var(--slate); margin: 0 0 .8rem; }
.subject-link { font-weight: 800; color: var(--blue); }
.subject-card.read .subject-link { color: var(--purple); }

/* ===== how it works ===== */
.how { padding: 3rem 0; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2rem; }
.step { background: var(--bg); border-radius: var(--radius); padding: 1.6rem; }
.step-num {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: .8rem;
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--slate); margin: 0; }

/* ===== mission ===== */
.mission { padding: 4rem 0; }
.mission-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.mission-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.mission-inner p { color: var(--slate); font-size: 1.1rem; margin-bottom: 1.6rem; }

/* ===== footer ===== */
.site-footer { background: #0b1220; color: #cbd5e1; margin-top: 3rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 2rem; padding: 2.6rem 0 1.4rem; }
.footer-brand { display: flex; gap: .8rem; align-items: center; }
.footer-brand strong { color: #fff; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 1.1rem; }
.footer-brand .muted { color: #94a3b8; margin: 0; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer-cols h4 { color: #fff; font-family: 'Inter', system-ui, sans-serif; font-size: .95rem; margin-bottom: .6rem; }
.footer-cols a { display: block; color: #cbd5e1; padding: .15rem 0; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 1rem 0 1.6rem; }
.footer-bottom .muted { color: #94a3b8; margin: 0; font-size: .88rem; }

/* ===== auth pages ===== */
.auth-body main { display: block; }
.auth-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  width: min(960px, 94vw); margin: 3rem auto; background: #fff;
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.auth-wrap.single { grid-template-columns: 1fr; width: min(520px, 94vw); }
.auth-card { padding: 2.6rem; }
.auth-card code { background: #eef2f8; padding: .1rem .35rem; border-radius: 6px; font-size: .85em; }
.link-btn { background: none; border: 0; color: var(--blue); font-weight: 800; cursor: pointer; font-family: inherit; padding: 0; text-decoration: underline; }
.auth-head { margin-bottom: 1.4rem; }
.auth-head .brand-mark { margin-bottom: .8rem; }
.auth-head h1 { font-size: 1.8rem; }
.auth-form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field span { font-weight: 700; font-size: .9rem; color: var(--slate); }
.field-hint { font-size: .8rem; color: var(--muted); line-height: 1.45; }
.field-hint strong { color: var(--slate); }
.hint-ok { color: var(--green); font-weight: 700; }
.hint-bad { color: #dc2626; font-weight: 700; }
.pw-match-hint { display: block; margin-top: .3rem; }

/* Professional inline success notice (e.g. after a password change) */
.notice {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: 1rem 1.15rem; border-radius: 14px; max-width: 520px;
  margin: 0 0 1.1rem; border: 1px solid transparent;
}
.notice-success {
  background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
  border-color: #bbf7d0; color: #14532d;
  box-shadow: 0 1px 2px rgba(16,185,129,.08);
}
.notice-icon {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green, #16a34a); color: #fff;
}
.notice-body { display: flex; flex-direction: column; gap: .15rem; padding-top: .15rem; }
.notice-body strong { font-size: .98rem; font-weight: 700; }
.notice-body span { font-size: .86rem; color: #15803d; line-height: 1.45; }

/* Exam-preparing loader: brand "N" with a circling dual-ring spinner */
.practice-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 1rem; }
.practice-loading[hidden] { display: none; } /* the display:flex above would otherwise override the [hidden] attribute */
.loader { position: relative; width: 96px; height: 96px; margin-bottom: 1.25rem; }
.loader-ring { position: absolute; inset: 0; }
.loader-ring span { position: absolute; border-radius: 50%; border: 4px solid transparent; }
.loader-ring span:nth-child(1) { inset: 0; border-top-color: var(--loader-accent, #2563eb); animation: loader-spin 1s linear infinite; }
.loader-ring span:nth-child(2) { inset: 10px; border-bottom-color: var(--loader-accent2, #7c3aed); animation: loader-spin 1.5s linear infinite reverse; }
.loader-mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.loader-mark img { width: 52px; height: 52px; display: block; animation: loader-pulse 1.8s ease-in-out infinite; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
@keyframes loader-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(.92); } }
.loader-title { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 700; font-size: 1.2rem; margin: .1rem 0 .25rem; }
.loader-progress { width: 280px; max-width: 78vw; margin: 1.3rem auto 0; }
.loader-progress-track { height: 9px; background: rgba(15,23,42,.08); border-radius: 999px; overflow: hidden; }
.loader-progress-track span {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--loader-accent, #2563eb), var(--loader-accent2, #7c3aed), var(--loader-accent, #2563eb));
  background-size: 200% 100%; animation: loader-flow 1.4s linear infinite;
  box-shadow: 0 0 10px color-mix(in srgb, var(--loader-accent, #2563eb) 45%, transparent);
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
@keyframes loader-flow { to { background-position: -200% 0; } }
.loader-progress-pct { margin-top: .55rem; font-size: .9rem; font-weight: 800; letter-spacing: .02em; color: var(--loader-accent, #2563eb); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .loader-progress-track span { animation: none; } }
.loader-sub { font-size: .9rem; max-width: 360px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { .loader-ring span, .loader-mark { animation-duration: 3s; } }
/* subject accent colors for the loader */
.practice-card.subject-math { --loader-accent: #2563eb; --loader-accent2: #60a5fa; }
.practice-card.subject-reading { --loader-accent: #7c3aed; --loader-accent2: #a78bfa; }
.practice-card.subject-science { --loader-accent: #16a34a; --loader-accent2: #4ade80; }
.practice-card.subject-social { --loader-accent: #ea580c; --loader-accent2: #fb923c; }

/* Exam mode: navigation, selected choice, end-of-exam breakdown */
.exam-nav { display: flex; gap: .75rem; margin-top: 1.1rem; }
.exam-nav[hidden] { display: none; } /* the display:flex above would otherwise override [hidden] */
.exam-nav .btn { flex: 1; }
.choice-option.selected { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px #2563eb; font-weight: 700; }
.result-breakdown { margin: 1.4rem 0 .5rem; text-align: left; }
.breakdown-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 .75rem; }
.breakdown-item { border: 1px solid #e5e7eb; border-left-width: 4px; border-radius: 10px; padding: .7rem .85rem; margin-bottom: .6rem; }
.breakdown-item.ok { border-left-color: var(--green, #16a34a); }
.breakdown-item.bad { border-left-color: #dc2626; }
.bd-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.bd-num { font-weight: 700; color: var(--muted); }
.bd-mark { font-size: .78rem; font-weight: 700; }
.breakdown-item.ok .bd-mark { color: var(--green, #16a34a); }
.breakdown-item.bad .bd-mark { color: #dc2626; }
.bd-prompt { font-weight: 600; margin-bottom: .35rem; line-height: 1.4; }
.bd-ans { font-size: .88rem; line-height: 1.5; }
.bd-label { color: var(--muted); }

/* Org management: group cards + modal */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.group-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: left;
  border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; background: #fff; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .05s; font: inherit; }
.group-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 14px rgba(37,99,235,.1); }
.group-card:active { transform: translateY(1px); }
.group-card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.group-card-body strong { font-size: 1.05rem; }
.group-card-cta { flex: 0 0 auto; font-size: .82rem; font-weight: 700; color: #2563eb; }

body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.modal-card { position: relative; z-index: 1; background: #fff; border-radius: 18px; width: 100%; max-width: 720px;
  max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(15,23,42,.3);
  animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 1.25rem; }
.modal-x { border: none; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 .25rem; }
.modal-x:hover { color: var(--slate); }
.modal-body { padding: 1.5rem; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.5rem;
  padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* Professional form layout inside modals */
.form-grid { display: flex; flex-direction: column; gap: 1.05rem; }
.form-grid .field { display: flex; flex-direction: column; gap: .35rem; }
.form-grid .field > span { font-weight: 600; font-size: .88rem; color: var(--slate); }
.form-grid input, .form-grid select {
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; width: 100%;
}
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
@media (max-width: 520px) { .form-row.two { grid-template-columns: 1fr; } }

.members-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }

/* Press-and-hold reveal eye on password fields */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 2.7rem; }
.pw-eye {
  position: absolute; top: 0; right: 0; height: 100%; width: 2.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer; color: var(--muted); padding: 0;
}
.pw-eye:hover { color: var(--slate); }
.pw-eye.on { color: #2563eb; }
.pw-eye:active { color: #2563eb; }

/* Consistent invalid-field styling across all forms */
input.field-invalid, select.field-invalid, textarea.field-invalid {
  border-color: #dc2626 !important; background: #fff7f7;
}
.field-invalid:focus { outline: none; box-shadow: 0 0 0 3px rgba(220,38,38,.18) !important; }
.field-error { display: block; color: #dc2626; font-size: .8rem; font-weight: 600; margin-top: .3rem; }
.pw-match-list { margin-top: .4rem; }
input.input-ok { border-color: var(--green); }
input.input-bad { border-color: #dc2626; }

/* password strength meter */
.pw-strength { display: flex; align-items: center; gap: .6rem; margin: -.2rem 0 .2rem; }
.pw-strength-bar { flex: 1; height: 8px; background: #e9eef6; border-radius: 999px; overflow: hidden; }
.pw-strength-bar span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .25s ease, background .25s ease; }
.pw-strength-bar span.strength-weak { background: #dc2626; }
.pw-strength-bar span.strength-fair { background: var(--amber); }
.pw-strength-bar span.strength-good { background: #3b82f6; }
.pw-strength-bar span.strength-strong { background: var(--green); }
.pw-strength-label { font-size: .78rem; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.strength-text-weak { color: #dc2626; }
.strength-text-fair { color: #b45309; }
.strength-text-good { color: #2563eb; }
.strength-text-strong { color: var(--green); }

/* live requirements checklist */
.pw-checklist { list-style: none; padding: .8rem 1rem; margin: 0; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: .4rem; }
.pw-checklist li { display: flex; align-items: center; gap: .55rem; font-size: .85rem; color: var(--muted); transition: color .15s; }
.pw-checklist .pw-icon { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 2px solid #cbd5e1; display: inline-grid; place-items: center; font-size: .7rem; line-height: 1; }
.pw-checklist li.pass { color: var(--green); }
.pw-checklist li.pass .pw-icon { border-color: var(--green); background: var(--green); }
/* CSS-drawn checkmark (no glyph) */
.pw-checklist li.pass .pw-icon::before { content: ''; width: 4px; height: 8px; margin-top: -2px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pw-checklist li.fail { color: #dc2626; }
.pw-checklist li.fail .pw-icon { border-color: #dc2626; }
.pw-checklist li.fail .pw-icon::before { content: ''; width: 2px; height: 10px; background: #dc2626; transform: rotate(45deg); box-shadow: -2px 0 0 #dc2626 inset; }
.pw-checklist li.warn { color: #b45309; }
.pw-checklist li.warn .pw-icon { border-color: var(--amber); background: var(--amber); }
.pw-checklist li.warn .pw-icon::before { content: ''; width: 2px; height: 6px; background: #fff; border-radius: 1px; }
.field input, .quiz-input {
  border: 1.5px solid var(--line); border-radius: 12px; padding: .75rem .9rem;
  font-family: inherit; font-size: 1rem; background: #fcfdff; transition: border .15s, box-shadow .15s;
}
.field input:focus, .quiz-input:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.auth-alt { margin-top: 1.2rem; color: var(--slate); text-align: center; }
.auth-aside {
  background: var(--grad); color: #fff; padding: 2.6rem; display: flex; flex-direction: column; justify-content: center;
}
.auth-aside h2 { color: #fff; font-size: 1.7rem; }
.auth-aside ul { list-style: none; padding: 0; display: grid; gap: .8rem; font-weight: 700; font-size: 1.05rem; }

.alert { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }

/* Organization creation form */
.org-create-form { max-width: 480px; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.org-create-form .field { display: flex; flex-direction: column; gap: .35rem; }
.org-create-form .field > label { font-weight: 600; font-size: .9rem; }
.org-create-form input[type="text"] { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.org-create-form input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.url-input { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.url-input:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.url-input input { flex: 1; border: none !important; box-shadow: none !important; min-width: 0; }
.url-suffix { display: flex; align-items: center; padding: 0 .8rem; background: #f1f5f9; color: var(--muted); font-size: .88rem; white-space: nowrap; border-left: 1px solid var(--line); }

/* Account profile form */
.profile-form { display: flex; flex-direction: column; gap: 1rem; }
.profile-form .field { display: flex; flex-direction: column; gap: .35rem; }
.profile-form .field > span { font-weight: 600; font-size: .9rem; }
.profile-form .field-note { font-weight: 400; color: var(--muted); }
.profile-form input { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.profile-form input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.profile-form input.readonly { background: #f1f5f9; color: var(--muted); cursor: not-allowed; }
.profile-row { display: flex; gap: 1rem; }
.profile-row .field { flex: 1; }
@media (max-width: 560px) { .profile-row { flex-direction: column; } }
.form-actions { display: flex; gap: .75rem; align-items: center; }
.form-actions .btn { flex: 0 0 auto; }

/* Impersonation / preview mode */
.dash-head-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.impersonation-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: linear-gradient(180deg, #fffbeb, #fef9c3); border: 1px solid #fde68a;
  border-radius: 14px; padding: .9rem 1.15rem; margin-bottom: 1.3rem; color: #854d0e;
}
.impersonation-banner .imp-text strong { display: block; font-size: .98rem; }
.impersonation-banner .imp-text span { font-size: .86rem; }
button.subject-card { appearance: none; -webkit-appearance: none; border: 1px solid var(--line);
  width: 100%; text-align: left; cursor: pointer; font: inherit; }

/* Per-subject level ratings (segmented control) */
.ratings-group { border: 1px solid var(--line); border-radius: 12px; padding: .25rem 1rem; background: #fcfdff; }
.rating-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.rating-row + .rating-row { border-top: 1px solid var(--line); }
.rating-label { font-weight: 600; font-size: .9rem; }
.segmented { display: inline-flex; background: #eef2f7; border-radius: 10px; padding: 3px; gap: 2px; }
.segmented label { margin: 0; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented span { display: block; padding: .42rem .8rem; border-radius: 8px; font-size: .8rem; font-weight: 600;
  color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.segmented input:checked + span { background: #fff; color: #2563eb; box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37,99,235,.3); }
@media (max-width: 560px) {
  .rating-row { flex-direction: column; align-items: stretch; gap: .5rem; }
  .segmented { width: 100%; }
  .segmented label { flex: 1; }
  .segmented span { text-align: center; }
}

/* ===== onboarding quiz ===== */
.quiz-body main { display: block; }
.quiz-wrap { width: min(720px, 94vw); margin: 2.6rem auto; }
.quiz-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow-md); border: 1px solid var(--line); padding: 2.4rem; }
.quiz-head { text-align: center; margin-bottom: 1.6rem; }
.quiz-head h1 { font-size: 1.9rem; }
.quiz-form { display: grid; gap: 1.6rem; }
.quiz-q { display: grid; gap: .7rem; }
.quiz-label { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: block; text-align: center; padding: .8rem .6rem; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fcfdff; font-weight: 700; color: var(--slate);
  transition: all .15s ease;
}
.choice:hover span { border-color: #c7d2fe; }
.choice input:checked + span {
  border-color: var(--blue); background: #eef4ff; color: var(--blue-dark);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }

/* ===== dashboard ===== */
.dash { padding: 2.6rem 0; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.dash-head h1 { font-size: 2rem; margin-bottom: .1rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; margin-left: .4rem; }
.badge-admin { background: #fef3c7; color: #92400e; }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); display: flex; gap: .8rem; align-items: center;
}
.stat-card.wide { grid-column: span 2; }
.stat-emoji { font-size: 1.8rem; }
.stat-card small { color: var(--muted); display: block; font-weight: 700; }
.stat-card strong { font-size: 1.15rem; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; overflow-wrap: anywhere; min-width: 0; }
.stat-card > div { min-width: 0; }
.stat-min { min-width: 0; }
/* compact value style for long text like emails */
.stat-card strong.stat-value-sm { font-size: .98rem; font-family: 'Inter', system-ui, sans-serif; font-weight: 700; line-height: 1.35; word-break: normal; overflow-wrap: anywhere; }

/* ===== subject pages ===== */
.subject-hero { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, #fff), #fff); padding: 3.2rem 0 2.6rem; border-bottom: 1px solid var(--line); }
.subject-hero h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--accent); }
.topic-section { padding: 2.6rem 0; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.topic-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); border-left: 4px solid var(--accent); }
.topic-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 15%, #fff); color: var(--accent); font-weight: 800; margin-bottom: .5rem; }
.topic-card h3 { font-size: 1.1rem; margin: 0; }

/* ===== math: learning plan ===== */
.review-banner { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap;
  background:#fff7ed; border:1px solid #fed7aa; border-radius:var(--radius); padding:1rem 1.2rem; margin:1rem 0; }
.review-banner strong { display:block; color:#9a3412; }
.skill-path { list-style:none; padding:0; margin:1rem 0 0; display:grid; gap:.7rem; }
.skill-row { display:flex; align-items:center; gap:1rem; background:#fff; border:1px solid var(--line);
  border-radius:var(--radius); padding:1rem 1.1rem; box-shadow:var(--shadow-sm); }
.skill-row.mastered { border-left:4px solid var(--green); }
.skill-row.in-progress { border-left:4px solid var(--blue); }
.skill-row.available { border-left:4px solid var(--line); }
.skill-index { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:10px;
  background:#eef2ff; color:var(--blue-dark); font-weight:800; }
.skill-main { flex:1; min-width:0; }
.skill-top { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.skill-name { font-weight:800; }
.skill-domain { font-size:.75rem; color:var(--muted); background:#f1f5f9; padding:.1rem .5rem; border-radius:999px; }
.skill-status { font-size:.72rem; font-weight:800; margin-left:auto; padding:.1rem .55rem; border-radius:999px; }
.status-mastered { background:#dcfce7; color:#166534; }
.status-in-progress { background:#dbeafe; color:#1e40af; }
.status-available { background:#f1f5f9; color:#64748b; }
.status-failed { background:#fef2f2; color:#b91c1c; }
.skill-row.failed { border-left:4px solid #dc2626; }
.skill-hint.locked { color:#b91c1c; }
.skill-row.failed .skill-hint { color:#b91c1c; }
.skill-locked-note { font-size:.8rem; font-weight:800; color:#b91c1c; white-space:nowrap; }
.subject-card.disabled { opacity:.6; cursor:not-allowed; }
.mastery-bar { height:8px; background:#eef2f6; border-radius:999px; overflow:hidden; margin:.5rem 0 .35rem; }
.mastery-bar span { display:block; height:100%; background:var(--grad); border-radius:999px; }
.skill-meta { font-size:.8rem; }
.skill-hint { font-size:.78rem; color:var(--blue-dark); font-weight:600; margin-top:.3rem; }

/* ===== math: practice session ===== */
.practice-body main { display:block; }
.practice-wrap { width:min(620px,94vw); margin:2.4rem auto; }
.practice-card { position:relative; overflow:hidden; background:#fff; border-radius:24px; box-shadow:var(--shadow-md); border:1px solid var(--line); padding:2.2rem; min-height:340px; }
.practice-watermark { position:absolute; inset:0; pointer-events:none; z-index:6; background-repeat:repeat; }
/* anti-copy: questions are not selectable; only the answer box stays editable */
.practice-card, .practice-card * {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.practice-card .answer-input { -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; }
.practice-state { text-align:center; }
.practice-top { display:flex; justify-content:space-between; font-size:.82rem; color:var(--muted); font-weight:700; }
.practice-skill { color:var(--blue-dark); }
.practice-bar { height:6px; background:#eef2f6; border-radius:999px; overflow:hidden; margin:.6rem 0 1.6rem; }
.practice-bar span { display:block; height:100%; width:0; background:var(--grad); border-radius:999px; transition:width .25s ease; }
.practice-timer { color:var(--muted); font-weight:700; font-variant-numeric:tabular-nums; }
.question-prompt { font-size:2.4rem; margin:1.3rem 0 .35rem; font-family:'Plus Jakarta Sans',system-ui,sans-serif; font-weight:800; letter-spacing:-0.02em; line-height:1.25; white-space:pre-line; }
/* longer/sentence prompts read better at a normal size */
.question-prompt.long { font-size:1.3rem; font-weight:700; line-height:1.5; letter-spacing:0; }
.question-instruction { font-size:.9rem; color:var(--muted); margin:0 0 1.5rem; font-weight:500; }
/* reading prompts (incl. passages) read better smaller and left-aligned */
.subject-reading .question-prompt { font-size:1.2rem; font-weight:600; text-align:left; line-height:1.6; letter-spacing:0; }
.subject-reading .question-instruction { text-align:left; }
.choices-box { display:grid; gap:.6rem; margin-top:.4rem; text-align:left; }
.choices-box[hidden] { display:none; } /* the display:grid above would otherwise override [hidden] */
.choice-option { text-align:left; padding:.85rem 1rem; border:1.5px solid var(--line); border-radius:14px; background:#fcfdff; font-family:inherit; font-size:1.05rem; color:var(--ink); cursor:pointer; transition:border .12s, background .12s; }
.choice-option:hover:not(:disabled) { border-color:#c7d2fe; background:#f5f8ff; }
.choice-option:disabled { cursor:default; }
.choice-option.correct { border-color:var(--green); background:#dcfce7; color:#166534; font-weight:700; }
.choice-option.incorrect { border-color:#dc2626; background:#fef2f2; color:#b91c1c; }
.answer-input { width:100%; border:1.5px solid var(--line); border-radius:14px; padding:.95rem 1rem; font-size:1.35rem;
  text-align:center; font-family:inherit; margin-bottom:.9rem; background:#fcfdff; }
.answer-input:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 4px rgba(37,99,235,.12); }
.hint-btn { background:none; border:0; color:var(--blue); font-weight:700; cursor:pointer; margin-top:.9rem; text-decoration:underline; }
.hint-text { margin-top:.7rem; background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af; padding:.7rem .9rem; border-radius:12px; font-size:.95rem; }
.feedback { margin-top:1.2rem; }
.feedback-line { font-weight:800; font-size:1.15rem; margin-bottom:1rem; }
.feedback-line.ok { color:var(--green); }
.feedback-line.bad { color:#dc2626; }
.result-score { font-size:3.4rem; font-weight:800; font-family:'Plus Jakarta Sans',system-ui,sans-serif; letter-spacing:-0.02em; margin:.6rem 0; }
.result-stats { display:flex; gap:1.4rem; justify-content:center; flex-wrap:wrap; margin:.6rem 0 1rem; }
.result-stat { text-align:center; }
.result-stat small { display:block; color:var(--muted); font-weight:700; font-size:.78rem; }
.result-stat strong { font-size:1.2rem; font-variant-numeric:tabular-nums; }
.result-score.good { color:var(--green); } .result-score.fair { color:var(--amber); } .result-score.weak { color:#dc2626; }
.result-message { color:var(--slate); font-size:1.1rem; }
.result-mastered { background:#dcfce7; color:#166534; border-radius:12px; padding:.7rem 1rem; font-weight:800; margin:1rem 0; }
.result-actions { display:flex; gap:.7rem; justify-content:center; flex-wrap:wrap; margin-top:1.4rem; }

/* ===== review page ===== */
.review-actions { display:flex; gap:.6rem; flex-wrap:wrap; }
.review-card { position:relative; overflow:hidden; -webkit-user-select:none; -moz-user-select:none; user-select:none; }
.review-list { list-style:none; padding:0; margin:1rem 0 0; display:grid; gap:.7rem; }
.review-item { background:#fff; border:1px solid var(--line); border-left:4px solid var(--green); border-radius:14px; padding:1rem 1.1rem; box-shadow:var(--shadow-sm); }
.review-item.bad { border-left-color:#dc2626; }
.review-q { display:flex; gap:.6rem; align-items:flex-start; }
.review-prompt { font-weight:600; white-space:pre-line; }
.review-badge { font-size:.7rem; font-weight:800; padding:.14rem .55rem; border-radius:999px; flex:0 0 auto; margin-top:.1rem; }
.review-badge.ok { background:#dcfce7; color:#166534; }
.review-badge.bad { background:#fef2f2; color:#b91c1c; }
.review-choices { font-size:.82rem; color:var(--muted); margin:.4rem 0 0; }
.review-meta { display:flex; flex-wrap:wrap; gap:1rem; margin-top:.5rem; font-size:.85rem; color:var(--muted); }
.review-meta strong { font-weight:700; }

/* ===== error page ===== */
.error-page { padding: 4rem 0; }
.error-inner { text-align: center; max-width: 460px; margin: 0 auto; }
.big-emoji { font-size: 3.5rem; }

/* ===== responsive ===== */
@media (max-width: 860px) {
  .hero-grid, .auth-wrap, .footer-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .subject-grid, .steps, .dash-grid, .topic-grid, .footer-cols { grid-template-columns: 1fr 1fr; }
  .stat-card.wide { grid-column: span 2; }
  .auth-aside { display: none; }
  .main-nav { display: none; }
}
@media (max-width: 520px) {
  .subject-grid, .steps, .dash-grid, .topic-grid, .footer-cols, .choice-grid { grid-template-columns: 1fr; }
  .stat-card.wide { grid-column: auto; }
}
