@import url('/tokens.css');

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font:
    16px/1.5 'Avenir Next',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #779bff;
  outline-offset: 4px;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button svg {
  flex-shrink: 0;
}
svg {
  display: block;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: -0.055em;
  font-weight: 700;
}
h2 {
  font-size: 1.32rem;
  letter-spacing: -0.035em;
  line-height: 1.35;
}
h3 {
  font-size: 1.13rem;
  letter-spacing: -0.025em;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  font-weight: 700;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 234px;
  background: white;
  border-right: 1px solid var(--line);
  padding: 38px 22px 24px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--lime);
}
.brand-word {
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 1;
}
.brand-caption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 56px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  background: transparent;
  padding: 14px 17px;
  border-radius: 12px;
  color: #788396;
  text-align: left;
  font-size: 0.94rem;
  font-weight: 550;
  transition: 0.18s;
}
.nav-item:hover {
  background: #f5f7fc;
  color: var(--ink);
}
.nav-item.active {
  color: #3f6bce;
  background: #ecf2ff;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 12px 0;
}
.sidebar-note {
  border-top: 1px solid var(--line);
  padding-top: 21px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.sidebar-note strong {
  display: block;
  font-size: 0.875rem;
  color: var(--ink);
  margin: 10px 0 5px;
}
.workspace {
  margin-left: 234px;
}
.topbar {
  height: 97px;
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted);
}
.demo-pill {
  border: 1px solid #dce5d2;
  background: #f3f8ec;
  color: #66794a;
  border-radius: 20px;
  font-size: 0.75rem;
  padding: 5px 11px;
  font-weight: 550;
}
.profile-button {
  border: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  text-align: left;
  padding: 0;
}
.avatar {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 650;
  color: #3b628e;
  background: #dce9f9;
  font-size: 0.95rem;
}
.avatar.admin-avatar {
  background: #e7e0f8;
  color: #746092;
}
.profile-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 650;
}
.profile-role {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1px;
}
.main {
  max-width: 1340px;
  margin: 0 auto;
  padding: 37px 44px 52px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.page-heading p {
  color: var(--muted);
  font-size: 0.94rem;
  margin-top: 8px;
}
.date-badge {
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--muted);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 23px;
}
.hero {
  min-height: 309px;
  border-radius: 22px;
  background: var(--ink);
  color: white;
  padding: 30px 31px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 65%;
}
.hero .eyebrow {
  color: #9daec8;
  font-size: 0.7rem;
}
.hero h2 {
  font-size: clamp(2rem, 2.8vw, 2.7rem);
  letter-spacing: -0.055em;
  line-height: 1.13;
  margin: 15px 0 13px;
  font-weight: 600;
}
.hero h2 span {
  color: var(--lime);
}
.hero-description {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #b7c5da;
  max-width: 320px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.hero-info {
  display: flex;
  gap: 10px;
  color: #99aac5;
  font-size: 0.75rem;
  align-items: center;
}
.hero-art {
  position: absolute;
  width: 61%;
  height: 100%;
  right: -10%;
  top: 0;
  object-fit: contain;
  pointer-events: none;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 45px;
  border: 0;
  border-radius: 11px;
  padding: 12px 19px;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 0.18s,
    transform 0.18s;
}
.button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.button.primary {
  background: var(--lime);
  color: #213a1f;
}
.button.primary:hover {
  background: #e2ffa0;
}
.button.blue {
  background: #527ce0;
  color: white;
}
.button.dark {
  background: var(--ink);
  color: white;
}
.button.soft {
  background: #f0f3f9;
  color: #62738b;
}
.button.outline {
  background: white;
  border: 1px solid var(--line);
}
.button.danger {
  color: #ad5d65;
  background: #fcf0f0;
}
.button.full {
  width: 100%;
}
.icon-button {
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-items: center;
  padding: 10px;
  background: white;
}
.streak-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
}
.streak-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flame-circle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #fff2e5;
  border-radius: 13px;
  color: #df9658;
}
.streak-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
}
.streak-big strong {
  font-size: 3.5rem;
  line-height: 1.15;
  letter-spacing: -0.08em;
  font-weight: 650;
}
.streak-big span {
  color: var(--muted);
  font-size: 0.875rem;
}
.streak-card h3 {
  margin-top: 9px;
}
.streak-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.week {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-top: 23px;
}
.week-day {
  text-align: center;
  flex: 1;
}
.week-day small {
  font-size: 0.75rem;
  color: #9aa4b3;
}
.week-dot {
  width: 24px;
  height: 24px;
  background: #f2f4f8;
  border-radius: 50%;
  margin: 5px auto 0;
  display: grid;
  place-items: center;
  color: #97b25a;
}
.week-dot.done {
  background: #eaf3d5;
}
.week-dot.current {
  border: 1.5px dashed #abc57c;
  background: white;
}
.week-dot svg {
  width: 13px;
  height: 13px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin: 23px 0 31px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  padding: 20px 20px 17px;
  border-radius: 15px;
}
.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 0.8125rem;
  color: #7c899d;
}
.metric-label svg {
  width: 17px;
  height: 17px;
  opacity: 0.8;
}
.metric-number {
  margin: 8px 0 4px;
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.3;
}
.metric-subtitle {
  font-size: 0.75rem;
  color: #99a4b4;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 29px 0 16px;
}
.section-heading p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 5px;
}
.section-heading .text-button {
  margin-bottom: 2px;
}
.text-button {
  background: transparent;
  border: 0;
  padding: 0;
  color: #5d80cf;
  font-size: 0.8125rem;
  font-weight: 550;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.mode-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 23px;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.mode-card:hover {
  border-color: #d2dcef;
  box-shadow: 0 5px 22px #203c6810;
}
.mode-art {
  height: 70px;
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}
.vadim-portrait {
  height: 62px;
  width: 62px;
  border-radius: 20px;
  background: #e6edf9;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 650;
  color: #7187b0;
  transform: rotate(-7deg);
  border: 4px solid white;
  box-shadow: 0 3px 12px #19376012;
}
.mini-orbit {
  width: 48px;
  height: 48px;
  position: absolute;
  left: 53px;
  top: 11px;
  border-radius: 17px;
  background: #eddfd8;
  color: #a17863;
  display: grid;
  place-items: center;
  transform: rotate(8deg);
  border: 4px solid white;
}
.mode-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: #8a96a9;
  border-radius: 6px;
  padding: 3px 7px;
  background: #f5f7fb;
  margin-top: 14px;
}
.mode-card h3 {
  margin: 1px 0 8px;
}
.mode-card p {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
  min-height: 43px;
}
.mode-card .button {
  width: 100%;
  margin-top: 19px;
  min-height: 40px;
  font-size: 0.8125rem;
}
.mode-card:nth-child(1) .button {
  background: #eef2fc;
  color: #6384cb;
}
.mode-card:nth-child(2) .button {
  background: #f1eefa;
  color: #8a71b7;
}
.mode-card:nth-child(3) .button {
  background: #edf5e6;
  color: #7b984e;
}
.duel-symbol {
  display: flex;
  align-items: center;
  gap: 6px;
}
.duel-symbol .anon-head {
  height: 52px;
  width: 47px;
  background: #e4def3;
  border: 3px solid white;
  border-radius: 16px;
  color: #927bba;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
}
.duel-symbol .anon-head:last-child {
  background: #ece7fa;
  transform: rotate(8deg);
}
.practice-orbit {
  width: 57px;
  height: 57px;
  border: 1.5px solid #bfce97;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f2f6e9;
  color: #91a866;
  transform: rotate(-12deg);
}
.lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px;
}
.panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 17px;
  padding: 24px;
}
.topic-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f3f8;
}
.topic-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.topic-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: #eef3fd;
  color: #7c98cb;
  flex-shrink: 0;
}
.topic-main {
  flex: 1;
  min-width: 0;
}
.topic-name {
  font-weight: 600;
  font-size: 0.875rem;
}
.topic-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 3px;
}
.topic-score {
  font-weight: 650;
  font-size: 0.875rem;
  color: #708f4d;
}
.topic-score.weak {
  color: #ce9568;
}
.bar {
  height: 5px;
  background: #f0f3f7;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 7px;
}
.bar span {
  display: block;
  height: 100%;
  background: #a9c777;
  border-radius: inherit;
}
.bar .weak {
  background: #ebbc94;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: white;
  border: 0;
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid #f0f3f8;
}
.history-row:last-child {
  border: 0;
}
.history-row .topic-icon {
  background: #f4f6fa;
  color: #96a4ba;
}
.history-score {
  margin-left: auto;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.history-score small {
  color: #9ca7b7;
  font-weight: 400;
}
.empty {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 20px 0;
}
.goal-card {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 23px;
  border-radius: 16px;
  background: #edf3e5;
  padding: 22px 25px;
  color: #647e47;
}
.goal-card p {
  font-size: 0.8125rem;
  margin-top: 3px;
}
.goal-card .bar {
  max-width: 280px;
  height: 7px;
  background: #dfe8d0;
  margin-top: 12px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
  margin-top: 22px;
}
.topic-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  padding: 24px;
  text-align: left;
}
.topic-card h3 {
  margin: 16px 0 6px;
}
.topic-card p {
  color: var(--muted);
  font-size: 0.8125rem;
}
.topic-card small {
  color: #92a0b5;
  font-size: 0.75rem;
  display: block;
  margin-top: 21px;
}
.duel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.duel-row:last-child {
  border-bottom: 0;
}
.duel-row strong {
  display: block;
  font-size: 0.875rem;
}
.duel-row p {
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: 4px;
}
.duel-score {
  font-size: 1.4rem;
  font-weight: 650;
  white-space: nowrap;
}
.quiz-shell {
  min-height: 100vh;
  padding: 26px;
  background: var(--canvas);
}
.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 940px;
  margin: 0 auto;
}
.quiz-main {
  max-width: 740px;
  margin: 32px auto;
}
.quiz-progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.quiz-progress {
  height: 6px;
  border-radius: 9px;
  background: #e6ebf4;
  margin-bottom: 27px;
  overflow: hidden;
}
.quiz-progress span {
  display: block;
  background: #9ebf68;
  height: 100%;
  border-radius: inherit;
  transition: width 0.3s;
}
.question-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: white;
  padding: 32px;
}
.question-topic {
  display: inline-block;
  font-size: 0.75rem;
  color: #6588ca;
  background: #edf3ff;
  border-radius: 7px;
  padding: 5px 9px;
  margin-bottom: 17px;
}
.question-card h1 {
  font-size: 1.5rem;
  line-height: 1.5;
  letter-spacing: -0.03em;
}
.question-image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 14px;
  margin-top: 22px;
}
.question-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 25px 0 13px;
}
.answer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.answer-option {
  border: 1.5px solid #e7ecf4;
  border-radius: 12px;
  background: white;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  text-align: left;
  min-height: 65px;
  font-size: 0.94rem;
  transition: 0.15s;
}
.answer-letter {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  color: #8a9ab1;
  background: #f3f6fa;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.answer-option:hover:not(:disabled) {
  border-color: #a6bce7;
}
.answer-option.selected {
  border-color: #7395da;
  background: #f3f7ff;
}
.answer-option.selected .answer-letter {
  background: #7695d3;
  color: white;
}
.answer-option.correct {
  border-color: #a7c575;
  background: #f5faec;
  opacity: 1;
}
.answer-option.wrong {
  border-color: #e1aaa2;
  background: #fff7f5;
  opacity: 1;
}
.quiz-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}
.feedback {
  border-radius: 13px;
  margin-top: 22px;
  padding: 20px;
  background: #f1f7e8;
  color: #647c42;
}
.feedback.wrong {
  background: #fff3e9;
  color: #ad7c50;
}
.feedback-title {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  font-size: 0.94rem;
  margin-bottom: 7px;
}
.feedback p {
  font-size: 0.875rem;
  line-height: 1.7;
}
.feedback .correct-line {
  margin-bottom: 6px;
  font-weight: 550;
}
.result-card {
  padding: 40px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  margin-top: 70px;
}
.result-art {
  height: 120px;
  width: 120px;
  border-radius: 38px;
  background: #f0f6df;
  display: grid;
  place-items: center;
  color: #9eb765;
  margin: 0 auto 27px;
  transform: rotate(-7deg);
}
.result-card h1 {
  font-size: 2.15rem;
}
.result-card > p {
  max-width: 400px;
  margin: 13px auto 30px;
  color: var(--muted);
}
.result-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 460px;
  margin: 0 auto 24px;
  gap: 12px;
}
.result-metric {
  background: #f6f8fc;
  border-radius: 13px;
  padding: 18px;
}
.result-metric strong {
  font-size: 2rem;
  font-weight: 650;
  display: block;
}
.result-metric span {
  color: var(--muted);
  font-size: 0.8125rem;
}
.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.daily-stamp {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: #8aa353;
  font-size: 0.875rem;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #10213c55;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 25px;
}
.modal {
  width: 440px;
  max-width: 100%;
  max-height: 92vh;
  overflow: auto;
  background: white;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 24px 100px #14233f22;
}
.modal.wide {
  width: 680px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.profile-choice {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px;
  margin-top: 9px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
}
.profile-choice:hover {
  border-color: #a6bce7;
}
.field {
  display: block;
  margin-bottom: 18px;
  font-size: 0.875rem;
  font-weight: 550;
}
.field > span {
  display: block;
  margin-bottom: 8px;
}
input:not([type='checkbox']):not([type='radio']):not([type='file']),
textarea,
select {
  width: 100%;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  font-size: 0.875rem;
}
textarea {
  resize: vertical;
  min-height: 95px;
}
select {
  appearance: none;
  background: white
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238895ab'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  padding-right: 35px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.option-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}
.option-field input[type='radio'],
.option-field input[type='checkbox'] {
  width: 19px;
  height: 19px;
  accent-color: #7597d9;
}
.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
  margin: 7px 0;
}
.upload-zone {
  border: 1px dashed #cbd6e7;
  border-radius: 11px;
  text-align: center;
  padding: 17px;
  background: #f9fbfe;
  cursor: pointer;
  display: block;
}
.upload-zone svg {
  margin: 0 auto 7px;
  color: #93a6c5;
}
.upload-zone input {
  display: none;
}
.upload-preview {
  max-height: 150px;
  max-width: 100%;
  display: block;
  margin: 0 auto 12px;
  border-radius: 10px;
}
.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.admin-metrics {
  margin-top: 0;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  padding: 15px 21px;
  color: var(--muted);
  background: #fafbfe;
  font-size: 0.75rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 19px 21px;
  font-size: 0.875rem;
  border-bottom: 1px solid #edf1f6;
}
tr:last-child td {
  border: 0;
}
.student-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-weight: 600;
}
.student-cell .avatar {
  width: 34px;
  height: 34px;
  font-size: 0.8125rem;
}
.tag {
  display: inline-block;
  border-radius: 7px;
  padding: 4px 8px;
  background: #f2f5fa;
  color: #7d8ba0;
  font-size: 0.75rem;
}
.tag.orange {
  background: #fff2e4;
  color: #bb8c60;
}
.question-bank-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}
.filter-chip {
  border: 1px solid var(--line);
  padding: 8px 13px;
  border-radius: 9px;
  background: white;
  color: var(--muted);
  font-size: 0.8125rem;
}
.filter-chip.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.bank-question {
  display: flex;
  gap: 19px;
  align-items: center;
  border: 1px solid var(--line);
  background: white;
  padding: 21px 24px;
  border-radius: 15px;
  margin-bottom: 12px;
}
.bank-question .question-info {
  flex: 1;
  min-width: 0;
}
.bank-question h3 {
  font-size: 0.94rem;
  font-weight: 550;
  line-height: 1.6;
  margin: 9px 0;
}
.bank-actions {
  display: flex;
  gap: 8px;
}
.bank-image {
  width: 85px;
  height: 65px;
  border-radius: 8px;
  object-fit: cover;
}
.student-detail-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 27px;
}
.student-detail-top .avatar {
  width: 57px;
  height: 57px;
  font-size: 1.3rem;
}
.activity-chart {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 150px;
  padding-top: 20px;
}
.activity-column {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.activity-column span {
  width: 100%;
  max-width: 42px;
  background: #c1d1ef;
  border-radius: 7px 7px 2px 2px;
  min-height: 5px;
}
.activity-column:last-child span {
  background: #a9c577;
}
.search-field {
  max-width: 240px;
}
.initial-loader {
  height: 100vh;
  display: grid;
  place-items: center;
}
.initial-loader span {
  width: 34px;
  height: 34px;
  border: 3px solid #dde5f1;
  border-top-color: #88a96d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 13px 20px;
  background: var(--ink);
  color: white;
  border-radius: 11px;
  font-size: 0.875rem;
  opacity: 0;
  z-index: 100;
  pointer-events: none;
  transition: 0.2s;
  box-shadow: 0 7px 35px #10213c25;
  max-width: 90vw;
}
#toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
.mobile-brand {
  display: none;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
}
.login-card {
  max-width: 470px;
  width: 100%;
  padding: 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.login-card .brand {
  padding: 0;
  margin-bottom: 32px;
}
.login-card > p {
  margin: 12px 0 23px;
  color: var(--muted);
}
.footer-note {
  margin-top: 30px;
  text-align: center;
  font-size: 0.75rem;
  color: #a1acbc;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1500px) {
  .main {
    padding-top: 42px;
  }
  .hero {
    min-height: 330px;
  }
  .hero h2 {
    font-size: 3rem;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 205px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .workspace {
    margin-left: 205px;
  }
  .main {
    padding: 31px 28px 40px;
  }
  .topbar {
    padding: 0 28px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr 250px;
    gap: 17px;
  }
  .hero {
    padding: 27px;
  }
  .hero-content {
    max-width: 75%;
  }
  .hero-art {
    right: -19%;
    opacity: 0.85;
  }
  .metric {
    padding: 17px 15px;
  }
  .mode-card {
    padding: 20px;
  }
  .metric-subtitle {
    font-size: 0.75rem;
  }
}
@media (max-width: 1000px) {
  .sidebar {
    width: 185px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .workspace {
    margin-left: 185px;
  }
  .brand-word {
    font-size: 1.4rem;
  }
  .brand {
    gap: 8px;
    padding: 0 8px;
  }
  .brand-mark {
    width: 33px;
    height: 33px;
  }
  .brand-caption {
    font-size: 0.75rem;
  }
  .main {
    padding: 27px 23px 35px;
  }
  .topbar {
    padding: 0 23px;
    height: 83px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .streak-card {
    display: none;
  }
  .hero {
    min-height: 320px;
  }
  .hero-content {
    max-width: 65%;
  }
  .hero-art {
    right: -5%;
    width: 62%;
    opacity: 1;
  }
  .hero h2 {
    font-size: 2.6rem;
  }
  .metric-grid {
    gap: 10px;
  }
  .metric-label {
    font-size: 0.75rem;
  }
  .metric-label svg {
    display: none;
  }
  .metric-subtitle {
    display: none;
  }
  .metric-number {
    font-size: 1.8rem;
  }
  .mode-grid {
    gap: 12px;
  }
  .mode-card {
    padding: 17px;
  }
  .mode-card h3 {
    font-size: 1rem;
  }
  .mode-card p {
    font-size: 0.75rem;
  }
  .lower-grid {
    gap: 15px;
  }
  .panel {
    padding: 20px;
  }
  .topic-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .sidebar {
    width: 100%;
    height: calc(73px + env(safe-area-inset-bottom));
    inset: auto 0 0;
    padding: 0 12px env(safe-area-inset-bottom);
    border-right: 0;
    border-top: 1px solid var(--line);
    background: #ffffffed;
    backdrop-filter: blur(15px);
  }
  .sidebar > .brand,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    flex-direction: row;
    justify-content: space-around;
    margin: 0;
    height: 73px;
    gap: 0;
  }
  .nav-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 9px;
    border-radius: 0;
    font-size: 0.75rem;
    flex: 1;
  }
  .nav-item.active {
    background: transparent;
  }
  .nav-item svg {
    width: 21px;
    height: 21px;
  }
  .workspace {
    margin-left: 0;
  }
  .main {
    padding: 27px 20px 105px;
  }
  .topbar {
    height: 78px;
    padding: 0 20px;
    background: white;
  }
  .breadcrumb {
    display: none;
  }
  .mobile-brand {
    display: flex;
  }
  .mobile-brand .brand {
    padding: 0;
  }
  .mobile-brand .brand-caption {
    display: none;
  }
  .mobile-brand .brand-word {
    font-size: 1.5rem;
  }
  .topbar .demo-pill {
    display: none;
  }
  .profile-name {
    font-size: 0.8125rem;
  }
  .profile-role {
    font-size: 0.75rem;
  }
  .profile-button {
    gap: 8px;
  }
  .avatar {
    width: 34px;
    height: 34px;
  }
  h1 {
    font-size: 1.65rem;
  }
  .page-heading {
    align-items: start;
    margin-bottom: 23px;
  }
  .page-heading p {
    font-size: 0.8125rem;
    max-width: 280px;
  }
  .date-badge {
    display: none;
  }
  .hero {
    min-height: 325px;
    padding: 26px 25px;
    border-radius: 20px;
  }
  .hero-content {
    max-width: 78%;
  }
  .hero h2 {
    font-size: 2.4rem;
  }
  .hero .eyebrow {
    font-size: 0.75rem;
  }
  .hero-description {
    max-width: 240px;
    font-size: 0.8125rem;
  }
  .hero-art {
    right: -33%;
    width: 80%;
    opacity: 0.5;
  }
  .hero-actions {
    gap: 12px;
    margin-top: 22px;
  }
  .hero-info {
    font-size: 0.75rem;
  }
  .hero .button {
    padding: 12px 17px;
    font-size: 0.8125rem;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    margin: 17px 0 26px;
  }
  .metric {
    padding: 16px 18px;
    border-radius: 13px;
  }
  .metric-label {
    font-size: 0.75rem;
  }
  .metric-label svg {
    display: block;
    width: 15px;
  }
  .metric-number {
    font-size: 1.8rem;
    margin-top: 6px;
    margin-bottom: 0;
  }
  .metric-subtitle {
    display: block;
    font-size: 0.75rem;
  }
  .mode-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .mode-card {
    padding: 20px;
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 0 14px;
  }
  .mode-art {
    grid-row: span 3;
    height: 70px;
    margin: 0;
    align-self: center;
  }
  .mode-card h3 {
    font-size: 1.05rem;
    margin: 0 0 5px;
  }
  .mode-card p {
    min-height: auto;
    font-size: 0.8125rem;
  }
  .mode-badge {
    display: none;
  }
  .mode-card .button {
    grid-column: 2;
    width: fit-content;
    min-height: 33px;
    padding: 7px 12px;
    font-size: 0.75rem;
    margin-top: 13px;
  }
  .vadim-portrait {
    height: 53px;
    width: 48px;
    font-size: 1.3rem;
    border-radius: 16px;
  }
  .mini-orbit {
    width: 32px;
    height: 32px;
    left: 34px;
    top: 21px;
    border-radius: 11px;
  }
  .mini-orbit svg {
    width: 18px;
  }
  .duel-symbol {
    gap: 0;
  }
  .duel-symbol .anon-head {
    width: 34px;
    height: 43px;
    border-radius: 12px;
  }
  .duel-symbol .anon-head svg {
    width: 21px;
  }
  .practice-orbit {
    width: 50px;
    height: 50px;
  }
  .section-heading {
    margin-top: 26px;
  }
  .section-heading p {
    font-size: 0.8125rem;
  }
  .lower-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .topic-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .topic-card {
    padding: 18px;
  }
  .topic-card p {
    font-size: 0.75rem;
  }
  .topic-card h3 {
    font-size: 0.94rem;
  }
  .topic-card small {
    margin-top: 14px;
    font-size: 0.75rem;
  }
  .goal-card {
    padding: 20px;
    gap: 14px;
  }
  .goal-card > svg {
    width: 28px;
    flex-shrink: 0;
  }
  .goal-card h3 {
    font-size: 0.94rem;
  }
  .goal-card p {
    font-size: 0.75rem;
  }
  .quiz-shell {
    padding: 20px 17px 35px;
  }
  .quiz-top .brand-caption {
    display: none;
  }
  .quiz-main {
    margin-top: 27px;
  }
  .question-card {
    padding: 22px;
    border-radius: 18px;
  }
  .question-card h1 {
    font-size: 1.25rem;
  }
  .question-image {
    max-height: 190px;
  }
  .answer-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .answer-option {
    min-height: 59px;
    font-size: 0.875rem;
    padding: 13px;
  }
  .quiz-footer .button {
    width: 100%;
    min-height: 47px;
  }
  .feedback {
    padding: 17px;
  }
  .feedback p {
    font-size: 0.8125rem;
  }
  .result-card {
    padding: 32px 22px;
    margin-top: 35px;
  }
  .result-card h1 {
    font-size: 1.8rem;
  }
  .result-card > p {
    font-size: 0.875rem;
  }
  .result-art {
    height: 95px;
    width: 95px;
    border-radius: 29px;
  }
  .result-art svg {
    width: 50px;
  }
  .result-actions {
    flex-direction: column;
  }
  .result-metric strong {
    font-size: 1.7rem;
  }
  .modal-backdrop {
    padding: 15px;
  }
  .modal {
    padding: 23px;
    max-height: 94vh;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .bank-question {
    padding: 18px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .bank-image {
    display: none;
  }
  .bank-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .bank-question h3 {
    font-size: 0.875rem;
  }
  .question-bank-toolbar {
    gap: 7px;
  }
  .filter-chip {
    padding: 7px 10px;
    font-size: 0.75rem;
  }
  .admin-heading {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-heading .button {
    width: fit-content;
  }
  .search-field {
    max-width: 160px;
  }
  td,
  th {
    padding-left: 15px;
    padding-right: 15px;
  }
  .section-heading .search-field {
    display: none;
  }
  #toast {
    bottom: 95px;
    width: max-content;
    max-width: calc(100vw - 30px);
    text-align: center;
  }
  .quiz-shell ~ #toast {
    bottom: 25px;
  }
  .footer-note {
    font-size: 0.75rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Phone interactions take priority over the desktop dashboard density. */
.question-card h1,
.bank-question h3,
.feedback p {
  overflow-wrap: anywhere;
  min-width: 0;
}
.option-field > .formula-field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.modal > .modal-header {
  background: white;
}
@media (max-width: 720px) {
  .main {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
  .button,
  .icon-button,
  .formula-open,
  .filter-chip {
    min-height: 44px;
  }
  .icon-button {
    min-width: 44px;
  }
  .profile-button,
  .text-button {
    min-height: 44px;
  }
  input:not([type='checkbox']):not([type='radio']):not([type='file']),
  textarea,
  select {
    font-size: 16px;
  }
  .button,
  .nav-item,
  .topic-name,
  .metric-label,
  .mode-card .button {
    font-size: 0.875rem;
  }
  .nav-item {
    line-height: 1.25;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-art {
    opacity: 0.23;
    right: -43%;
  }
  .hero {
    min-height: 305px;
  }
  .hero h2 {
    font-size: clamp(1.95rem, 8.4vw, 2.6rem);
  }
  .hero-description,
  .page-heading p,
  .mode-card p,
  .section-heading p,
  .feedback p {
    font-size: 0.9375rem;
  }
  .hero-actions {
    gap: 13px;
  }
  .hero-info {
    font-size: 0.75rem;
    flex-wrap: wrap;
  }
  .metric-subtitle,
  .topic-meta,
  .mode-badge {
    font-size: 0.75rem;
  }
  .mode-card .button {
    min-height: 44px;
    padding: 10px 14px;
  }
  .topic-card {
    min-width: 0;
  }
  .topic-card h3 {
    overflow-wrap: anywhere;
  }
  .answer-option {
    min-height: 54px;
    font-size: 1rem;
  }
  .answer-letter {
    width: 31px;
    height: 31px;
  }
  .feedback p {
    line-height: 1.8;
  }
  .modal-backdrop {
    padding: 0;
  }
  .modal.wide {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 0 18px;
    overscroll-behavior: contain;
  }
  .modal.wide .modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 -18px 20px;
    padding: max(15px, env(safe-area-inset-top)) 18px 14px;
    border-bottom: 1px solid var(--line);
  }
  .editor-actions {
    position: sticky;
    bottom: 0;
    margin: 0 -18px;
    padding: 13px 18px max(13px, env(safe-area-inset-bottom));
    background: white;
    z-index: 2;
  }
  .editor-actions .button {
    flex: 1;
  }
  .option-field {
    align-items: flex-start;
    margin-bottom: 16px;
  }
  .option-field > input {
    margin-top: 55px;
    flex-shrink: 0;
  }
  .formula-field-heading {
    font-size: 0.875rem;
  }
  .field-preview {
    font-size: 1rem;
    padding: 12px;
  }
  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .table-wrap table,
  .table-wrap tbody {
    display: block;
    white-space: normal;
  }
  .table-wrap thead {
    display: none;
  }
  .table-wrap tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 12px;
    margin-bottom: 13px;
    padding: 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 15px;
  }
  .table-wrap td {
    display: block;
    border: 0;
    padding: 0;
  }
  .table-wrap td:first-child,
  .table-wrap td:last-child {
    grid-column: 1 / -1;
  }
  .table-wrap td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.8125rem;
    margin-bottom: 4px;
  }
  .table-wrap td:first-child::before {
    display: none;
  }
  .student-cell {
    width: 100%;
    min-height: 44px;
    font-size: 1rem;
  }
  .tag {
    font-size: 0.8125rem;
    padding: 5px 9px;
  }
  .bank-question {
    align-items: flex-start;
  }
  .bank-question h3 {
    font-size: 1rem;
  }
  .bank-actions .icon-button {
    min-width: 48px;
  }
}
@media (max-width: 360px) {
  .profile-role {
    display: none;
  }
  .profile-name {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topic-grid {
    grid-template-columns: 1fr;
  }
  .mode-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 0 10px;
  }
}
