:root {
  --page-bg: #f3f5fb;
  --page-ink: #16203f;
  --muted-ink: #5e6787;
  --line: rgba(22, 32, 63, 0.1);
  --line-strong: rgba(22, 32, 63, 0.18);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --accent: #3556d8;
  --accent-2: #6b46ff;
  --success: #17804f;
  --warning: #c88411;
  --danger: #bf3f4d;
  --shadow-lg: 0 24px 60px rgba(28, 37, 74, 0.12);
  --shadow-md: 0 18px 34px rgba(28, 37, 74, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--page-ink);
  background:
    radial-gradient(circle at top left, rgba(103, 78, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(49, 117, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #eef2fb 0%, #f7f8fc 56%, #eef3fb 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: 0;
}

.platform-page {
  width: min(1460px, calc(100vw - 32px));
  margin: 18px auto 28px;
}

.platform-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(135deg, rgba(13, 27, 69, 0.94), rgba(34, 57, 118, 0.92));
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  color: #f8f9ff;
}

.platform-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.platform-brand-mark {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.platform-brand-mark img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.platform-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.platform-brand-copy strong {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.platform-brand-copy span {
  color: rgba(248, 249, 255, 0.78);
  font-size: 0.95rem;
}

.platform-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.top-link {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 600;
}

.top-link-secondary {
  background: rgba(255, 255, 255, 0.06);
}

.platform-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.platform-sidebar,
.platform-main {
  min-width: 0;
}

.platform-sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card,
.platform-hero,
.platform-view,
.toolbar-row {
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.sidebar-card {
  padding: 20px;
}

.sidebar-card-compact {
  padding: 18px 20px;
}

.sidebar-kicker,
.hero-eyebrow,
.section-kicker,
.eyebrow-inline {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff8d3a;
}

.sidebar-card h1,
.platform-hero h2,
.section-title,
.card-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.sidebar-card h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.sidebar-text,
.hero-text,
.copy-muted,
.muted-small {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.65;
}

.role-switcher {
  display: grid;
  gap: 10px;
}

.role-pill,
.nav-pill,
.ghost-button,
.primary-button,
.secondary-button,
.option-button,
.mini-pill {
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.role-pill,
.nav-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--page-ink);
  text-align: left;
}

.role-pill:hover,
.nav-pill:hover,
.ghost-button:hover,
.secondary-button:hover,
.option-button:hover {
  transform: translateY(-1px);
  border-color: rgba(53, 86, 216, 0.2);
}

.role-pill.is-active,
.nav-pill.is-active {
  background: linear-gradient(135deg, #3656d8, #624cff);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(53, 86, 216, 0.26);
}

.role-pill strong,
.nav-pill strong,
.mini-stat-value,
.numeric-chip,
.score-big {
  font-size: 1.02rem;
  font-weight: 800;
}

.role-pill span,
.nav-pill span,
.mini-stat-label,
.inline-label {
  color: inherit;
  opacity: 0.74;
  font-size: 0.88rem;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.platform-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.platform-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  padding: 26px;
}

.platform-hero h2 {
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  margin-bottom: 14px;
}

.hero-panel {
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(21, 39, 98, 0.96), rgba(70, 93, 180, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -50px -70px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel-kicker {
  margin: 0 0 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.68);
}

.hero-panel h3 {
  margin: 0 0 14px;
  font-size: 1.85rem;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.03em;
}

.hero-panel-meta {
  display: grid;
  gap: 10px;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-meta-row span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.status-card,
.panel-card,
.data-card,
.report-card,
.assessment-card,
.well-card,
.timeline-card,
.metric-tile {
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow-md);
}

.status-card {
  padding: 20px;
}

.status-label {
  margin: 0 0 8px;
  font-size: 0.83rem;
  color: var(--muted-ink);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.status-value {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.status-note {
  margin: 8px 0 0;
  color: var(--muted-ink);
  font-size: 0.92rem;
  line-height: 1.5;
}

.toolbar-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
}

.student-picker-shell {
  display: grid;
  gap: 8px;
  min-width: min(360px, 100%);
}

.student-picker-shell label,
.field-shell label,
.form-grid label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted-ink);
}

.student-picker-shell select,
.field-shell input,
.field-shell select,
.field-shell textarea,
.slider-shell input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.98);
  color: var(--page-ink);
}

.field-shell textarea {
  min-height: 120px;
  resize: vertical;
}

.toolbar-note {
  text-align: right;
  color: var(--muted-ink);
  line-height: 1.55;
  max-width: 520px;
}

.platform-view {
  padding: 22px;
}

.section-stack,
.content-grid,
.two-col-grid,
.three-col-grid,
.card-grid,
.results-grid,
.form-grid,
.compact-grid,
.metric-grid {
  display: grid;
  gap: 16px;
}

.content-grid {
  grid-template-columns: 1.3fr 0.9fr;
}

.two-col-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col-grid,
.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.results-grid,
.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel-card,
.data-card,
.report-card,
.assessment-card,
.well-card,
.timeline-card,
.metric-tile {
  padding: 20px;
}

.section-title {
  font-size: clamp(1.65rem, 2.2vw, 2.7rem);
  margin-bottom: 8px;
}

.section-subtitle {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.65;
}

.action-row,
.button-row,
.pill-row,
.tag-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.primary-button,
.secondary-button,
.ghost-button,
.option-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, #3556d8, #6b46ff);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(53, 86, 216, 0.28);
}

.primary-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid rgba(53, 86, 216, 0.18);
  background: rgba(53, 86, 216, 0.08);
  color: var(--accent);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--page-ink);
}

.ghost-button.is-danger {
  border-color: rgba(191, 63, 77, 0.2);
  color: var(--danger);
}

.option-button {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--page-ink);
}

.option-button.is-correct {
  border-color: rgba(23, 128, 79, 0.26);
  background: rgba(23, 128, 79, 0.1);
  color: var(--success);
}

.option-button.is-wrong {
  border-color: rgba(191, 63, 77, 0.24);
  background: rgba(191, 63, 77, 0.08);
  color: var(--danger);
}

.mini-pill,
.risk-pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.mini-pill,
.tag {
  background: rgba(53, 86, 216, 0.08);
  color: var(--accent);
}

.risk-pill.low {
  background: rgba(23, 128, 79, 0.12);
  color: var(--success);
}

.risk-pill.mild {
  background: rgba(200, 132, 17, 0.12);
  color: var(--warning);
}

.risk-pill.moderate,
.risk-pill.elevated {
  background: rgba(191, 63, 77, 0.12);
  color: var(--danger);
}

.progress-shell {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(22, 32, 63, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3556d8, #6b46ff);
}

.checklist {
  display: grid;
  gap: 12px;
}

.check-row,
.timeline-row,
.table-row,
.mini-stat-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.check-row {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(22, 32, 63, 0.07);
}

.check-index {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(53, 86, 216, 0.1);
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
}

.check-copy strong,
.card-title {
  display: block;
  margin-bottom: 4px;
}

.quiz-panel {
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.96));
  border: 1px solid rgba(22, 32, 63, 0.08);
}

.prompt-title {
  margin: 10px 0 16px;
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.feedback-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(22, 32, 63, 0.08);
  background: rgba(244, 247, 255, 0.9);
  color: var(--muted-ink);
}

.word-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.word-chip {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--page-ink);
}

.word-chip.is-selected {
  border-color: rgba(191, 63, 77, 0.3);
  background: rgba(191, 63, 77, 0.08);
  color: var(--danger);
}

.passage-block {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(22, 32, 63, 0.08);
  line-height: 1.9;
  font-size: 1.02rem;
}

.metrics-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.metrics-table th,
.metrics-table td,
.data-table th,
.data-table td {
  padding: 13px 0;
  border-bottom: 1px solid rgba(22, 32, 63, 0.08);
  text-align: left;
  vertical-align: top;
}

.metrics-table th,
.data-table th {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-ink);
}

.metrics-table tr:last-child td,
.data-table tr:last-child td {
  border-bottom: 0;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bar-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(22, 32, 63, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3556d8, #6b46ff);
}

.notice-box {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(53, 86, 216, 0.08);
  border: 1px solid rgba(53, 86, 216, 0.14);
}

.notice-box.is-warning {
  background: rgba(200, 132, 17, 0.08);
  border-color: rgba(200, 132, 17, 0.16);
}

.notice-box.is-danger {
  background: rgba(191, 63, 77, 0.08);
  border-color: rgba(191, 63, 77, 0.16);
}

.empty-state {
  padding: 28px 24px;
  border-radius: 24px;
  border: 1px dashed rgba(22, 32, 63, 0.2);
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.empty-state p {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.7;
}

.footer-note {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--muted-ink);
}

@media (max-width: 1200px) {
  .platform-shell,
  .content-grid,
  .platform-hero {
    grid-template-columns: 1fr;
  }

  .platform-sidebar {
    position: static;
  }

  .status-grid,
  .results-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-col-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .platform-page {
    width: calc(100vw - 16px);
    margin: 8px auto 18px;
  }

  .platform-topbar,
  .platform-hero,
  .platform-view,
  .toolbar-row,
  .sidebar-card {
    border-radius: 22px;
  }

  .platform-topbar,
  .toolbar-row,
  .table-row,
  .timeline-row,
  .hero-meta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .platform-top-actions {
    width: 100%;
  }

  .top-link {
    flex: 1 1 160px;
    justify-content: center;
    display: inline-flex;
  }

  .status-grid,
  .three-col-grid,
  .card-grid,
  .results-grid,
  .metric-grid,
  .two-col-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .platform-hero {
    padding: 22px;
  }

  .platform-hero h2 {
    font-size: 2.4rem;
  }

  .section-title {
    font-size: 2rem;
  }
}
