:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #687076;
  --line: #e4e0da;
  --paper: #fffdf8;
  --panel: #ffffff;
  --wash: #f4f1eb;
  --orange: #ff6a1a;
  --orange-dark: #b6400e;
  --green: #087f5b;
  --blue: #175cd3;
  --shadow: 0 18px 50px rgba(28, 25, 23, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: #171717;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 22px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.26);
}

.login-logo {
  width: 150px;
  display: block;
}

.login-card h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: 0;
}

.login-form {
  display: grid;
  gap: 14px;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 18px;
  background: #171717;
  color: #fffdf8;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 4px;
  padding: 0 8px;
}

.brand-logo {
  width: 132px;
  height: auto;
  display: block;
}

.brand-subtitle {
  color: #b9b4aa;
  font-size: 13px;
  font-weight: 700;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #d9d3c8;
  text-decoration: none;
  font-weight: 750;
}

.nav-item:hover,
.nav-item.active {
  background: #2a2927;
  color: #fff;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.chart-card {
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 106, 26, 0.12), rgba(23, 92, 211, 0.08)),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chart-card.wide {
  min-width: 0;
}

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

.chart-heading h3 {
  margin: 3px 0 0;
  font-size: 20px;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
}

.chart-label {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-track {
  position: relative;
  display: block;
  width: 100%;
  min-width: 96px;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e3da;
}

.chart-fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #ffd43b 46%, #16a34a);
  box-shadow: 0 8px 22px rgba(255, 106, 26, 0.28);
}

.chart-value {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.column-chart {
  min-height: 190px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding-top: 8px;
}

.column {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  height: 190px;
}

.column-fill {
  flex: 0 0 auto;
  width: 100%;
  min-height: 10px;
  height: var(--value, 0%);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #ff6a1a, #175cd3);
  box-shadow: 0 14px 30px rgba(23, 92, 211, 0.22);
}

.column span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.donut-wrap {
  display: grid;
  place-items: center;
  min-height: 170px;
}

.donut {
  --passed: 70%;
  width: 154px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel) 0 54%, transparent 55%),
    conic-gradient(#16a34a 0 var(--passed), #ff6a1a var(--passed) 100%);
  box-shadow: 0 18px 42px rgba(8, 127, 91, 0.2);
}

.donut strong {
  font-size: 30px;
}

.donut small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.score-gauge {
  min-height: 170px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.score-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.score-main strong {
  font-size: 56px;
  line-height: 0.95;
}

.score-main span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.gauge-track {
  position: relative;
  height: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e3da;
}

.gauge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef4444, #ff6a1a 38%, #ffd43b 62%, #16a34a);
  box-shadow: 0 12px 30px rgba(255, 106, 26, 0.28);
}

.score-caption {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.mini-stack {
  display: grid;
  gap: 10px;
}

.stack-pill {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.stack-pill strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #171717;
}

.stack-pill span {
  font-weight: 850;
}

.role-switcher,
.system-status {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.role-switcher h2 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  color: #b9b4aa;
  letter-spacing: 0.08em;
}

.role-switcher label {
  margin-top: 10px;
  color: #d9d3c8;
}

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

.role-switcher select {
  width: 100%;
  min-width: 0;
  background: #242321;
  border-color: rgba(255, 255, 255, 0.14);
  color: #fffdf8;
}

.segmented {
  display: grid;
  gap: 6px;
}

.segment {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: transparent;
  color: #fffdf8;
  font-weight: 800;
}

.segment.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #171717;
}

.system-status {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-status strong,
.system-status span {
  display: block;
}

.system-status span {
  color: #b9b4aa;
  font-size: 13px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(8, 127, 91, 0.18);
}

.main {
  min-width: 0;
  padding: 24px clamp(18px, 4vw, 42px) 48px;
}

.topbar,
.section-heading,
.panel-header,
.table-toolbar,
.result-summary,
.seat-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.topbar-logo {
  width: 148px;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

.topbar h1,
.section-heading h2,
.panel h3,
.modal h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.02;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 900;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #171717;
  color: #fffdf8;
  font-weight: 850;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 22px;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.primary-action,
.secondary-action {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.primary-action {
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #171717;
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

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

.metric-card,
.panel,
.table-wrap,
.seat-band,
.result-summary article,
.training-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.metric-label,
.metric-card small,
.result-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metric-card strong {
  font-size: 34px;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
  gap: 16px;
}

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

.two-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  padding: 20px;
}

.panel-header {
  margin-bottom: 16px;
}

.panel h3 {
  font-size: 18px;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f0e1d7;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 850;
}

.pill.success {
  background: #dff6eb;
  color: var(--green);
}

.flow-list,
.check-list {
  margin: 0;
  padding: 0;
}

.flow-list {
  display: grid;
  gap: 14px;
  list-style: none;
}

.flow-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.flow-list li > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.flow-list strong,
.flow-list p {
  margin: 0;
}

.flow-list p {
  margin-top: 3px;
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 9px;
  align-items: center;
  font-weight: 750;
}

.check-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.table-toolbar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.results-filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  min-height: 42px;
  min-width: min(100%, 260px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
}

select[multiple] {
  min-height: 132px;
  padding: 8px 10px;
}

.form-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.checkbox-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

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

textarea {
  min-height: 88px;
  padding-top: 10px;
  resize: vertical;
}

.table-wrap {
  overflow: auto;
}

.compact-table table {
  min-width: 680px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e9f7f1;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.status.warning {
  background: #fff2d8;
  color: #925900;
}

.seat-band {
  padding: 18px;
}

.seat-band strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.seat-progress {
  position: relative;
  width: min(520px, 100%);
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e3da;
}

.seat-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #ffd43b 52%, #16a34a);
  box-shadow: 0 8px 22px rgba(255, 106, 26, 0.28);
}

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

.training-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.training-card .visual {
  min-height: 130px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 106, 26, 0.95), rgba(23, 23, 23, 0.9)),
    linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.18) 49% 51%, transparent 52%);
  position: relative;
  overflow: hidden;
}

.training-card .visual::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
}

.training-card h3,
.training-card p {
  margin: 0;
}

.training-card p {
  color: var(--muted);
}

.package-meta,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.package-meta span:not(.status) {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.link-action,
.text-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: #285f9f;
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  cursor: pointer;
}

.text-action {
  font-size: 13px;
  font-weight: 750;
}

.text-action.danger {
  color: #a33b16;
}

.preview-action {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: #242424;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.preview-frame {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.preview-frame h3,
.preview-frame p {
  margin: 0;
}

.preview-frame h3 {
  margin-top: 12px;
  font-size: 24px;
}

.preview-frame p {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 750;
}

.preview-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.preview-steps span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #151515;
  font-weight: 950;
}

.preview-steps strong,
.preview-steps p {
  margin: 0;
}

.preview-steps p {
  margin-top: 3px;
}

.panel-copy {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.runtime-form {
  display: grid;
  gap: 12px;
}

.upload-slot-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.upload-slot-box .panel-header,
.step-builder .panel-header {
  margin-bottom: 0;
}

.upload-slot-box h3,
.step-builder h3 {
  margin: 0;
  font-size: 16px;
}

.step-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.step-list {
  display: grid;
  gap: 8px;
}

.step-row {
  grid-template-columns: 30px minmax(130px, 0.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.step-row span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.step-row strong {
  color: var(--ink);
}

.step-row input {
  min-width: 0;
}

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

.output-panel pre,
.upload-slot-box pre {
  min-height: 220px;
  max-height: 460px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #171717;
  color: #fffdf8;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.upload-slot-box pre {
  min-height: 110px;
  max-height: 240px;
}

.result-summary {
  justify-content: flex-start;
}

.result-summary article {
  min-width: 170px;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.result-summary strong {
  font-size: 30px;
}

.learner-detail-modal {
  width: min(920px, calc(100vw - 28px));
}

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

.learner-detail-summary article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.learner-detail-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.learner-detail-summary strong {
  font-size: 26px;
}

.detail-section {
  display: grid;
  gap: 10px;
}

.detail-section h3 {
  margin: 0;
  font-size: 17px;
}

.learner-home {
  display: grid;
  gap: 18px;
}

.learner-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 106, 26, 0.15), rgba(23, 92, 211, 0.12)),
    var(--panel);
  box-shadow: var(--shadow);
}

.learner-hero h3,
.learner-hero p {
  margin: 0;
}

.learner-hero h3 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.learner-hero p {
  max-width: 720px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 750;
}

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

.learner-hero-stats article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.learner-hero-stats span,
.learner-module-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.learner-hero-stats strong {
  font-size: 30px;
  line-height: 1;
}

.learner-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.learner-module-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.learner-card-art {
  min-height: 132px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fffdf8;
  background:
    linear-gradient(135deg, rgba(23, 23, 23, 0.92), rgba(255, 106, 26, 0.92)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, 0.12) 14px 15px);
  overflow: hidden;
}

.learner-card-art span {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  font-size: 26px;
  font-weight: 950;
}

.learner-module-card h3,
.learner-module-card p {
  margin: 0;
}

.learner-module-card h3 {
  font-size: 20px;
  line-height: 1.15;
}

.learner-module-card p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.learner-card-top,
.learner-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

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

.progress-track span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #ffd43b 52%, #16a34a);
}

.learner-player-modal {
  width: min(1180px, calc(100vw - 28px));
}

.learner-player-body {
  width: 100%;
  max-width: none;
}

.learner-player-progress {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.learner-player-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
}

.learner-objectives,
.learner-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.learner-objectives {
  padding: 16px;
}

.learner-objectives ul {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.learner-objectives li {
  display: flex;
  gap: 8px;
  align-items: start;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.learner-objectives li::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
}

.learner-step-list {
  display: grid;
  gap: 8px;
}

.learner-step-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.learner-step-item span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wash);
  color: var(--ink);
}

.learner-step-item.active {
  border-color: rgba(255, 106, 26, 0.55);
  background: #fff7ed;
  color: var(--ink);
}

.learner-step-item.done span {
  background: var(--green);
  color: #fff;
}

.learner-stage {
  min-height: 470px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 246, 237, 0.92)),
    var(--panel);
}

.learner-stage h3,
.learner-stage p {
  margin: 0;
}

.learner-stage h3 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.learner-stage p {
  color: var(--muted);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.45;
}

.learner-stage-visual {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.learner-stage-visual strong {
  font-size: clamp(30px, 6vw, 72px);
  line-height: 0.92;
  text-align: center;
}

.learner-stage-visual .choice-stack {
  width: min(520px, 100%);
}

.choice-stack {
  display: grid;
  gap: 10px;
}

.choice-stack button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 850;
}

.choice-stack button.selected,
.choice-stack button:hover {
  border-color: var(--orange);
  background: #fff7ed;
}

.learner-hint {
  padding: 12px;
  border-radius: 8px;
  background: #fff7ed;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.modal {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.26);
}

#package-modal,
.preview-modal {
  width: min(760px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgba(23, 23, 23, 0.42);
}

.modal-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

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

.modal-body input,
.modal-body select {
  width: 100%;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 8px;
  background: #171717;
  color: #fffdf8;
  font-weight: 800;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
}

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

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .brand,
  .system-status {
    flex: 1 1 220px;
  }

  .nav-list {
    order: 3;
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-item {
    justify-content: center;
  }

  .role-switcher {
    flex: 0 1 330px;
  }

  .metric-grid,
  .chart-grid,
  .training-grid,
  .dashboard-grid,
  .runtime-grid,
  .two-column-grid,
  .results-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .sidebar,
  .main {
    padding-inline: 14px;
  }

  .nav-list,
  .metric-grid,
  .chart-grid,
  .training-grid,
  .dashboard-grid,
  .runtime-grid,
  .two-column-grid,
  .upload-slot-grid,
  .results-filter,
  .learner-detail-summary,
  .step-row {
    grid-template-columns: 1fr;
  }

  .nav-item {
    justify-content: flex-start;
  }

  .topbar,
  .section-heading,
  .table-toolbar,
  .seat-band,
  .section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .chart-value {
    text-align: left;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
