:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #66737f;
  --line: #d9e1e7;
  --surface: #ffffff;
  --surface-quiet: #f3f7f8;
  --blue: #2364aa;
  --blue-dark: #164a82;
  --green: #2f8f6b;
  --gold: #b87918;
  --red: #b33f3f;
  --shadow: 0 18px 55px rgba(24, 42, 58, 0.12);
  --dashboard-width: 1260px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(35, 100, 170, 0.08), transparent 340px),
    var(--surface-quiet);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 18px;
  max-width: var(--dashboard-width);
  margin: 0 auto;
  padding: 28px 24px 14px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.top-nav a,
.hub-link,
.session-code-box a {
  color: inherit;
  text-decoration: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-bottom: 2px solid transparent;
  color: var(--blue-dark);
  font-weight: 800;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a.is-active {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.account-menu {
  position: relative;
  margin-left: 0;
  order: 99;
}

.global-language-switch {
  margin-left: auto;
  order: 98;
  position: relative;
}

.global-language-switch summary,
.account-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-bottom: 2px solid transparent;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.global-language-switch summary::-webkit-details-marker,
.account-menu summary::-webkit-details-marker {
  display: none;
}

.global-language-switch summary::after,
.account-menu summary::after {
  content: "⌄";
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.global-language-switch[open] summary,
.global-language-switch summary:hover,
.global-language-switch summary:focus-visible,
.account-menu[open] summary,
.account-menu summary:hover,
.account-menu summary:focus-visible {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.account-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  min-width: 220px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow);
}

.account-menu-panel strong,
.account-menu-panel span {
  display: block;
}

.account-menu-panel span {
  color: var(--muted);
  font-size: 0.86rem;
}

.account-menu-panel a,
.account-menu-panel button {
  display: flex;
  min-height: 34px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 0 10px;
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.account-menu-panel button {
  color: var(--red);
  text-align: left;
}

.language-menu-panel {
  min-width: 150px;
}

.language-menu-panel button {
  color: var(--blue-dark);
}

.language-menu-panel button.is-active {
  background: rgba(35, 100, 170, 0.1);
  color: var(--blue);
}

.app-header h1,
.panel h2,
.mission h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
}

.app-header h1 {
  width: 100%;
  max-width: none;
  font-size: clamp(1.8rem, 2.7vw, 3.1rem);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.student-panel .eyebrow,
.mission-panel .eyebrow,
.student-panel .message .speaker,
.student-panel .teacher-board-header span,
.student-panel .board-steps span,
.student-panel .board-result span,
.student-panel .activity-card > span,
.student-panel .material-card > div:first-child span {
  letter-spacing: 0;
  text-transform: none;
}

.status-pill,
.timer {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.35fr) minmax(260px, 0.8fr);
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px 32px;
}

.not-found-shell {
  max-width: var(--dashboard-width);
  margin: 0 auto;
  padding: 64px 24px;
}

.not-found-panel {
  max-width: 720px;
  border-left: 5px solid var(--blue);
  padding: 8px 0 8px 28px;
}

.not-found-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 2.6vw, 3rem);
  line-height: 1.12;
}

.not-found-panel p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.not-found-code {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

.primary-link {
  background: var(--blue);
  color: white;
}

.secondary-link {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--blue-dark);
}

.hub-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.hub-shell.single-card {
  grid-template-columns: minmax(260px, 460px);
  justify-content: start;
  max-width: var(--dashboard-width);
}

.hub-link {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}

.hub-link strong {
  font-size: 2rem;
  line-height: 1.05;
}

.hub-link span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  max-width: var(--dashboard-width);
  margin: 0 auto;
  padding: 12px 24px 32px;
}

.dashboard-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 22px;
}

.student-room-shell {
  max-width: var(--dashboard-width);
  margin: 0 auto;
  padding: 12px 24px 32px;
}

.student-login-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px;
}

.student-lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: start;
  gap: 22px;
}

.progress-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: 22px;
  max-width: var(--dashboard-width);
  margin: 0 auto;
  padding: 12px 24px 32px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(300px, 1.1fr);
  align-items: start;
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 24px 32px;
}

.admin-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
  max-width: var(--dashboard-width);
  margin: 0 auto;
  padding: 12px 24px 32px;
}

.single-column-shell {
  grid-template-columns: 1fr;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.teacher-panel,
.student-panel,
.report-panel,
.progress-sidebar,
.progress-panel,
.auth-panel,
.admin-shell > .panel,
.dashboard-column > .panel {
  padding: 22px;
}

.admin-hero-panel {
  grid-column: 1 / -1;
}

.admin-section-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-section-link .secondary-button {
  align-self: flex-start;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.button-row,
.code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-form {
  margin-bottom: 16px;
}

.compact-heading {
  margin-bottom: 12px;
}

.panel h2 {
  font-size: 1.35rem;
}

.stacked-form,
.report-list,
.student-panel {
  display: flex;
  flex-direction: column;
}

.stacked-form {
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 11px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(35, 100, 170, 0.14);
}

.form-grid,
.login-strip {
  display: grid;
  gap: 12px;
}

.form-grid {
  grid-template-columns: 1fr 1fr;
}

.login-strip {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  margin-bottom: 16px;
}

.checkbox-line {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.checkbox-line input {
  width: 18px;
  height: 18px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.primary-button {
  background: var(--blue);
  color: #fff;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.secondary-button {
  background: #e5f0f7;
  color: var(--blue-dark);
}

.ghost-button {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.demo-options {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, auto);
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.demo-options label {
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.demo-options select {
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 750;
}

.demo-brief {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(47, 143, 107, 0.32);
  border-radius: 8px;
  background: rgba(47, 143, 107, 0.07);
}

.demo-brief p {
  margin: 0;
  line-height: 1.45;
}

.demo-step small {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.demo-preview-section {
  margin-top: 22px;
}

.mission {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.mission-panel {
  position: sticky;
  top: 16px;
  padding: 22px;
}

.mission-panel .panel-heading {
  align-items: center;
}

.mission h3 {
  font-size: 1.35rem;
}

.mission p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
}

.progress-area {
  margin-bottom: 16px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eaee;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.checkpoint-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.mission-checkpoints {
  grid-template-columns: 1fr;
}

.activity-section {
  margin: 18px 0 0;
}

.student-panel #practiceSection {
  margin-bottom: 24px;
}

.student-panel #practiceSection + .chat-window {
  margin-top: 8px;
}

.student-panel .activity-section:not(#practiceSection) {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.checkpoint {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.checkpoint strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.checkpoint span {
  color: var(--muted);
  font-size: 0.82rem;
}

.checkpoint.done {
  border-color: rgba(47, 143, 107, 0.45);
  background: rgba(47, 143, 107, 0.08);
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 430px;
  overflow: auto;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.message {
  max-width: min(86%, 720px);
  padding: 12px 13px;
  border-radius: 8px;
  line-height: 1.45;
}

.message.ai {
  align-self: flex-start;
  background: #eaf3f8;
}

.message.student {
  align-self: flex-end;
  background: #eaf6ef;
}

.message .speaker {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spoken-word {
  border-radius: 4px;
  padding: 0 1px;
  transition: background 120ms ease;
}

.spoken-word.is-speaking {
  background: #fff1a8;
  box-shadow: 0 0 0 2px #fff1a8;
}

.teacher-board {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(35, 100, 170, 0.24);
  border-radius: 8px;
  background: #fff;
}

.teacher-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.teacher-board-header span,
.board-steps span,
.board-result span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.teacher-board-header strong {
  font-size: 1.15rem;
}

.board-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.board-steps div,
.board-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.board-steps strong,
.board-result strong {
  display: block;
  margin-top: 5px;
  font-size: 1rem;
}

.decimal-place-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.decimal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px dashed rgba(47, 143, 107, 0.5);
  border-radius: 8px;
  background: rgba(47, 143, 107, 0.1);
  color: var(--green);
  font-weight: 900;
}

.decimal-chip.total {
  border-style: solid;
  background: #fff;
  color: var(--ink);
}

.board-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.board-result.correct {
  border-color: rgba(47, 143, 107, 0.45);
  background: rgba(47, 143, 107, 0.08);
}

.board-result.incorrect {
  border-color: rgba(179, 63, 63, 0.35);
  background: rgba(179, 63, 63, 0.08);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: start;
  gap: 10px;
}

.chat-form textarea {
  min-height: 86px;
}

.speech-status {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.4;
}

.is-listening {
  border-color: rgba(47, 143, 107, 0.6);
  background: rgba(47, 143, 107, 0.1);
  color: var(--green);
}

.report-list {
  gap: 14px;
  margin: 0;
}

.report-list div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.report-list dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.report-list dd {
  margin: 0;
  line-height: 1.45;
}

.compact-report-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.compact-report-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.report-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.report-details summary {
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 850;
}

.compact-evidence {
  margin-top: 10px;
  padding: 12px;
}

.account-list,
.admin-list {
  display: grid;
  gap: 10px;
}

.account-list button,
.admin-list-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.account-list button:hover,
.account-list button:focus-visible {
  border-color: rgba(35, 100, 170, 0.55);
  background: #eef6fb;
}

.account-list strong,
.account-list span,
.admin-list-item strong,
.admin-list-item span {
  display: block;
}

.account-list span,
.admin-list-item span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.ticket-item p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.ticket-list,
.ticket-item {
  gap: 14px;
}

.ticket-item {
  display: grid;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.ticket-controls {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-list-item .material-link {
  margin-top: 10px;
}

.support-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.support-box h3 {
  margin: 0;
  font-size: 1rem;
}

.support-box textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.session-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  margin: 4px 0 14px;
  padding: 20px;
  border: 1px solid rgba(47, 143, 107, 0.35);
  border-radius: 8px;
  background: rgba(47, 143, 107, 0.08);
}

.session-code-box strong {
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}

.session-code-box a {
  color: var(--blue-dark);
  font-weight: 850;
}

.code-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin-bottom: 14px;
}

.is-hidden {
  display: none !important;
}

.code-ticket {
  border: 1px dashed rgba(35, 100, 170, 0.45);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.code-ticket span,
.code-ticket strong {
  display: block;
}

.code-ticket span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.code-ticket strong {
  margin-top: 4px;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

.session-list,
.demo-timeline,
.conversation-list,
.activity-list,
.material-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-timeline,
.session-list,
.activity-list {
  padding-top: 4px;
}

.activity-draft-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-subhead {
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.file-draft-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.file-draft-box .empty-state {
  grid-column: 1 / -1;
  margin: 0;
}

.session-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.session-item {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  text-align: left;
}

.session-item.active {
  border-color: rgba(35, 100, 170, 0.55);
  background: #eef6fb;
}

.session-item strong,
.session-item-main,
.session-item-main span {
  display: block;
}

.session-item-main span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.delete-session-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.delete-session-button:hover {
  background: rgba(179, 63, 63, 0.08);
}

.session-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  border: 1px solid rgba(179, 63, 63, 0.3);
  border-radius: 8px;
  background: #fff7f6;
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.session-delete-button:hover,
.session-delete-button:focus-visible {
  background: rgba(179, 63, 63, 0.1);
  border-color: rgba(179, 63, 63, 0.55);
}

.demo-step,
.conversation-item,
.activity-card,
.material-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 18px;
}

.demo-step > span,
.conversation-item > span,
.activity-card > span {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #e5f0f7;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.material-card {
  grid-template-columns: 1fr auto;
}

.activity-card {
  grid-template-columns: auto 1fr auto;
}

.activity-card > div {
  min-width: 0;
}

.activity-card > .delete-session-button {
  grid-column: 3;
  grid-row: 1;
}

.activity-card > span + div,
.activity-card > span + button + div {
  grid-column: 2;
}

.draft-activity-card {
  grid-template-columns: auto 1fr;
}

.material-card > div:first-child span,
.material-card > div:first-child strong {
  display: block;
}

.material-card > div:first-child span {
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.material-card > div:first-child strong {
  margin-top: 4px;
}

.material-body {
  grid-column: 1 / -1;
}

.material-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.material-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  font-weight: 850;
  text-decoration: none;
}

.demo-step strong {
  display: block;
  margin-bottom: 6px;
}

.activity-card strong {
  display: block;
  margin-bottom: 8px;
}

.activity-card.done {
  border-color: rgba(47, 143, 107, 0.45);
  background: rgba(47, 143, 107, 0.06);
}

.activity-card.needs-review {
  border-color: rgba(184, 121, 24, 0.45);
  background: rgba(184, 121, 24, 0.08);
}

.activity-card ol {
  margin: 10px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.activity-answer {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.exercise-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px;
}

.activity-submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 2px;
}

.activity-submit-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.choice-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  color: var(--ink);
  font-weight: 650;
}

.choice-line input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.activity-feedback {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--blue-dark);
  font-weight: 750;
  line-height: 1.45;
}

.demo-step p,
.conversation-item p,
.activity-card p,
.empty-state {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.demo-timeline > .empty-state {
  padding: 10px 2px 4px;
}

.demo-step p + p,
.conversation-item p + p {
  margin-top: 6px;
}

.architecture-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(184, 121, 24, 0.1);
  color: #5e410e;
}

.architecture-note p:last-child {
  margin: 0;
  line-height: 1.45;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card,
.participant-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 16px;
}

.metric-card span,
.participant-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.65rem;
}

.progress-section {
  margin-top: 18px;
}

.participant-list {
  display: grid;
  gap: 10px;
}

.participant-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(120px, 0.45fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 14px;
}

.participant-card strong {
  display: block;
  margin-bottom: 4px;
}

.mini-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eaee;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.participant-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.participant-stats dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.participant-stats dd {
  margin: 0;
  line-height: 1.35;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .progress-shell,
  .auth-shell,
  .admin-shell,
  .student-lesson-layout {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .participant-card {
    grid-template-columns: 1fr 1fr;
  }

  .participant-stats {
    grid-column: 1 / -1;
  }

  .student-panel {
    grid-column: 1 / -1;
    order: 3;
  }

  .mission-panel {
    position: static;
    order: -1;
  }
}

@media (max-width: 760px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .hub-shell {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .dashboard-shell,
  .student-room-shell,
  .progress-shell,
  .auth-shell,
  .admin-shell {
    padding-inline: 14px;
  }

  .form-grid,
  .login-strip,
  .chat-form,
  .demo-options,
  .exercise-input-row,
  .board-steps,
  .board-results,
  .summary-grid,
  .participant-card,
  .participant-stats,
  .ticket-controls,
  .checkpoint-grid {
    grid-template-columns: 1fr;
  }

  .teacher-panel,
  .student-panel,
  .student-login-panel,
  .mission-panel,
  .report-panel,
  .progress-sidebar,
  .progress-panel,
  .auth-panel,
  .admin-shell > .panel {
    padding: 16px;
  }
}
