:root {
  --bg: #060a08;
  --surface: #0d1410;
  --surface-soft: #131d17;
  --ink: #f0f5ef;
  --muted: #8e9b92;
  --line: #26332b;
  --line-strong: #405247;
  --red: #c9ff45;
  --red-soft: rgba(201, 255, 69, 0.12);
  --blue: #8cdbf0;
  --blue-soft: rgba(140, 219, 240, 0.12);
  --green: #c9ff45;
  --green-soft: rgba(201, 255, 69, 0.12);
  --amber: #f2cf63;
  --amber-soft: rgba(242, 207, 99, 0.12);
  --purple: #bd9cff;
  --success: #7bd7aa;
  --success-soft: rgba(123, 215, 170, 0.12);
  --danger: #ff8d84;
  --danger-soft: rgba(255, 141, 132, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  --sidebar-width: 260px;
}


* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(33, 107, 156, 0.25);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 24px 18px 18px;
  color: #f7f9fa;
  background: #20272d;
  border-right: 1px solid #303941;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 24px;
  border-bottom: 1px solid #39434b;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--red);
  border-radius: 6px;
  font-size: 20px;
  font-weight: 800;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
}

.brand-meta {
  margin-top: 2px;
  color: #aeb9c1;
  font-size: 12px;
}

.main-nav {
  display: grid;
  gap: 6px;
  margin-top: 22px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: #c8d0d6;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover {
  color: #fff;
  background: #303941;
}

.nav-item.is-active {
  color: #fff;
  background: #3a3132;
  box-shadow: inset 3px 0 0 var(--red);
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 18px 6px 0;
  color: #aeb9c1;
  border-top: 1px solid #39434b;
  font-size: 12px;
}

.sidebar-foot p {
  margin: 10px 0 0;
}

.version-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #e9eef1;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #59c88b;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(89, 200, 139, 0.13);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 14px 30px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
}

.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  margin-left: auto;
}

.mobile-menu {
  display: none !important;
}

#appMain {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px 30px 60px;
}

.primary-button,
.secondary-button,
.text-button,
.filter-chip,
.quiz-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red);
  font-weight: 700;
}

.primary-button:hover {
  background: #ad302e;
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  font-weight: 700;
}

.secondary-button:hover {
  border-color: var(--blue);
}

.primary-button svg,
.secondary-button svg,
.text-button svg {
  width: 16px;
  height: 16px;
}

.text-button {
  min-height: 34px;
  padding: 0 8px;
  color: var(--blue);
  background: transparent;
  border: 0;
  font-weight: 700;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.overview-head {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
}

.overview-intro {
  padding-right: 32px;
  border-right: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-intro h2 {
  max-width: 760px;
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
}

.overview-intro > p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.progress-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.progress-label strong {
  color: var(--ink);
  font-size: 22px;
}

.progress-track {
  height: 9px;
  margin: 10px 0 14px;
  overflow: hidden;
  background: #dfe5e9;
  border-radius: 999px;
}

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

.progress-detail {
  color: var(--muted);
  font-size: 13px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 26px 0 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.stat-cell {
  min-height: 92px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.stat-cell:last-child {
  border-right: 0;
}

.stat-cell strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.stat-cell span {
  color: var(--muted);
  font-size: 12px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 16px;
}

.section-heading:first-child {
  margin-top: 0;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.section-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.learning-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.path-step {
  position: relative;
  min-height: 150px;
  padding: 20px;
  background: var(--surface);
}

.path-step:hover {
  background: #fbfcfd;
}

.path-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.path-step h3 {
  margin: 12px 0 5px;
  font-size: 16px;
}

.path-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.path-step small {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: var(--blue);
  font-weight: 700;
}

.focus-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.focus-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
}

.focus-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 6px;
}

.focus-icon svg {
  width: 22px;
  height: 22px;
}

.focus-item h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.focus-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
  flex: 1 1 280px;
  min-width: 220px;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field input,
.toolbar select {
  width: 100%;
  height: 40px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.search-field input {
  padding: 0 12px 0 38px;
}

.toolbar select {
  width: auto;
  min-width: 150px;
  padding: 0 34px 0 11px;
}

.segmented-control {
  display: inline-flex;
  height: 40px;
  padding: 3px;
  background: #e7ecef;
  border-radius: 6px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  color: var(--muted);
}

.filter-chip.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(24, 32, 40, 0.12);
  font-weight: 700;
}

.hero-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

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

.hero-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.hero-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(24, 32, 40, 0.08);
  transform: translateY(-2px);
}

.hero-card:focus-visible {
  outline: 3px solid rgba(33, 107, 156, 0.25);
  outline-offset: 2px;
}

.hero-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #d9e0e4;
}

.hero-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.12);
}

.hero-card-media picture,
.hero-detail-image picture {
  display: block;
  width: 100%;
  height: 100%;
}

.skin-caption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 1;
  overflow: hidden;
  color: #f3f7f2;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  white-space: nowrap;
}

.lane-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 3px 7px;
  color: #fff;
  background: rgba(24, 32, 40, 0.86);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.lane-badge.standard {
  background: rgba(35, 122, 87, 0.9);
}

.lane-badge.situational {
  background: rgba(155, 100, 24, 0.92);
}

.hero-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.hero-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hero-card-title h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.difficulty {
  color: #aab4bb;
  white-space: nowrap;
  font-size: 12px;
}

.difficulty .filled {
  color: var(--red);
}

.hero-core {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  padding: 3px 7px;
  color: #4c5963;
  background: var(--surface-soft);
  border-radius: 4px;
  font-size: 11px;
}

.empty-state {
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}

.module-list {
  display: grid;
  gap: 18px;
}

.module-section {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.module-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.module-index {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 6px;
  font-weight: 800;
}

.module-head h2 {
  margin: 0;
  font-size: 17px;
}

.module-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.module-progress {
  min-width: 110px;
  color: var(--muted);
  text-align: right;
  font-size: 12px;
}

.module-progress strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.lesson-table {
  width: 100%;
  border-collapse: collapse;
}

.lesson-table th,
.lesson-table td {
  padding: 13px 20px;
  border-bottom: 1px solid #edf1f3;
  text-align: left;
  vertical-align: middle;
}

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

.lesson-table th {
  color: var(--muted);
  background: #fafbfc;
  font-size: 11px;
  font-weight: 700;
}

.lesson-title {
  font-weight: 700;
}

.lesson-objective {
  color: var(--muted);
  font-size: 12px;
}

.lesson-type {
  display: inline-block;
  min-width: 62px;
  padding: 3px 7px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
}

.lesson-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.lesson-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.training-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.65fr);
  gap: 24px;
}

.quiz-panel {
  min-height: 460px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.quiz-panel h2 {
  margin: 22px 0 8px;
  font-size: 22px;
  line-height: 1.35;
}

.quiz-context {
  margin: 0 0 22px;
  color: var(--muted);
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  justify-content: flex-start;
  min-height: 48px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line-strong);
  text-align: left;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.quiz-option.is-correct {
  color: var(--green);
  background: var(--green-soft);
  border-color: #78b79a;
}

.quiz-option.is-wrong {
  color: var(--red);
  background: var(--red-soft);
  border-color: #d89b98;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-feedback {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border-left: 3px solid var(--blue);
}

.quiz-feedback strong {
  display: block;
  margin-bottom: 3px;
}

.quiz-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.training-aside {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.training-aside h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.score-display {
  margin: 18px 0 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.score-display strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.score-display span {
  color: var(--muted);
  font-size: 12px;
}

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

.principle-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.principle-list span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.version-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.version-summary > div {
  min-height: 110px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.version-summary > div:last-child {
  border-right: 0;
}

.version-summary span {
  color: var(--muted);
  font-size: 12px;
}

.version-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.version-timeline {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.version-entry {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.version-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.version-entry h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.version-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.review-status {
  align-self: start;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.review-status.verified {
  color: var(--green);
  background: var(--green-soft);
}

.review-status.pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.schema-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.schema-item {
  min-height: 86px;
  padding: 15px 18px;
  background: #fff;
}

.schema-item code {
  color: var(--purple);
  font-weight: 700;
}

.schema-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 20, 24, 0.62);
}

.modal-backdrop[hidden] {
  display: none;
}

.hero-modal {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: sticky;
  top: 14px;
  z-index: 4;
  margin: 14px 14px -58px auto;
}

.hero-detail-head {
  display: grid;
  grid-template-columns: minmax(320px, 42%) minmax(0, 1fr);
  min-height: 260px;
  border-bottom: 1px solid var(--line);
}

.hero-detail-image {
  min-height: 260px;
  overflow: hidden;
  background: #d9e0e4;
}

.hero-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-detail-intro {
  padding: 30px 68px 24px 28px;
}

.hero-detail-intro h2 {
  margin: 0;
  font-size: 28px;
}

.hero-detail-intro > p {
  margin: 10px 0 16px;
  color: var(--muted);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta strong {
  color: var(--ink);
}

.hero-detail-body {
  padding: 26px 28px 34px;
}

.detail-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section:first-child {
  padding-top: 0;
}

.detail-section:last-child {
  border-bottom: 0;
}

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

.detail-section-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.detail-section-head h3 {
  margin-bottom: 4px;
}

.detail-section-head p,
.detail-section-head > span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.detail-section-head > span {
  flex: 0 0 auto;
}

.strength-detail-section .strength-curve {
  max-width: 760px;
}

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

.detail-block {
  min-height: 120px;
  padding: 15px;
  background: var(--surface-soft);
  border-radius: 6px;
}

.detail-block h4 {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
}

.detail-block p {
  margin: 0;
  color: #4e5a64;
  font-size: 13px;
}

.compact-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: #4e5a64;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.source-link svg {
  width: 15px;
  height: 15px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  max-width: min(360px, calc(100vw - 48px));
  padding: 11px 14px;
  color: #fff;
  background: #20272d;
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.strategy-hero-strip {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 230px;
  gap: 20px;
  align-items: center;
  padding: 0 0 24px;
}

.strategy-hero-strip > img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  object-position: center 24%;
  border-radius: 6px;
}

.strategy-hero-strip h2 {
  margin: 0;
  font-size: 25px;
}

.strategy-hero-strip p:not(.eyebrow) {
  max-width: 850px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.skin-inline {
  display: block;
  margin-top: 3px;
  color: var(--red);
  font-size: 10px;
}

.strategy-progress-panel {
  min-width: 0;
}

.strategy-progress-panel > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.strategy-progress-panel strong {
  color: var(--ink);
  font-size: 20px;
}

.strategy-progress-track {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  background: #dce3e6;
  border-radius: 999px;
}

.strategy-progress-track span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 180ms ease;
}

.strategy-grid-surface {
  position: relative;
  width: calc(100% + 60px);
  height: clamp(520px, 62vh, 700px);
  margin-left: -30px;
  overflow: hidden;
  background: #edf1f2;
}

.strategy-grid-stage {
  width: 100%;
  height: 100%;
  touch-action: none;
}

.strategy-grid-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.grid-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.grid-loading svg {
  animation: grid-loading-spin 1s linear infinite;
}

.strategy-grid-stage[data-grid-mode="compatibility"] {
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 76px;
  touch-action: pan-y;
}

.grid-compatibility-note {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 6px 18px;
  color: var(--muted);
  background: rgba(6, 13, 9, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 11px;
}

.grid-compatibility-note small {
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  font-size: 11px;
  text-align: right;
}

.fallback-route-map {
  position: relative;
  min-height: 100%;
  background-image:
    linear-gradient(rgba(127, 224, 202, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 224, 202, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

.fallback-route-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.fallback-route-line {
  stroke: rgba(127, 224, 202, 0.13);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.fallback-route-line.is-available {
  stroke: var(--section-accent-2, var(--amber));
  stroke-width: 2;
  opacity: 0.72;
}

.fallback-route-line.is-selected {
  stroke: var(--section-accent, var(--green));
  stroke-width: 2.4;
  opacity: 0.9;
}

.fallback-route-time {
  position: absolute;
  left: 12px;
  z-index: 2;
  width: 50px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  transform: translateY(-50%);
}

.fallback-route-node {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #c7d2cb;
  background: radial-gradient(circle at 34% 28%, #586b60 0%, #243129 42%, #0b120e 74%);
  border: 1px solid #4a5a50;
  border-radius: 50%;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.fallback-route-node:disabled {
  cursor: default;
  opacity: 0.3;
}

.fallback-route-node.is-available {
  color: #071008;
  background: radial-gradient(circle at 34% 28%, #fbffe6 0%, var(--section-accent-2) 34%, #66713a 78%);
  border-color: var(--section-accent-2);
}

.fallback-route-node.is-selected {
  color: #071008;
  background: radial-gradient(circle at 34% 28%, #ecfff9 0%, var(--section-accent) 34%, #2e6b5c 78%);
  border-color: var(--section-accent);
}

.fallback-route-node.is-focused,
.fallback-route-node:focus-visible {
  outline: 3px solid rgba(239, 200, 111, 0.52);
  outline-offset: 3px;
}

@keyframes grid-loading-spin {
  to { transform: rotate(360deg); }
}

.strategy-grid-toolbar {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 6px 8px 6px 14px;
  color: #f6f8f9;
  background: rgba(28, 35, 40, 0.9);
  border-radius: 6px;
  pointer-events: none;
}

.strategy-grid-toolbar > div {
  display: flex;
  gap: 7px;
}

.strategy-grid-toolbar .icon-button {
  pointer-events: auto;
}

.icon-button.dark {
  color: #f6f8f9;
  background: #364149;
  border-color: #4c5962;
}

.icon-button.dark:hover {
  background: #44515a;
}

.strategy-detail-band {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--line);
}

.strategy-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 12px;
}

.strategy-detail-meta > strong {
  color: var(--ink);
  font-size: 16px;
}

.phase-chip {
  padding: 3px 7px;
  color: #fff;
  background: #53646d;
  border-radius: 4px;
  font-weight: 700;
}

.phase-chip.loadout,
.phase-chip.decision,
.phase-chip.fight { background: #a44843; }
.phase-chip.lane,
.phase-chip.economy { background: #347658; }
.phase-chip.information,
.phase-chip.objective { background: #90631f; }
.phase-chip.rotation,
.phase-chip.tower { background: #3b6d78; }
.phase-chip.endgame { background: #52566d; }

.strategy-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(180px, 1fr));
  gap: 22px;
}

.strategy-detail-grid h2,
.strategy-detail-grid h3,
.strategy-detail-grid p {
  margin: 0;
}

.strategy-detail-grid h2 {
  font-size: 22px;
}

.strategy-detail-grid h3 {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 12px;
}

.strategy-detail-grid p {
  color: #4e5a64;
  font-size: 13px;
}

.strategy-detail-grid .strategy-action {
  margin-top: 7px;
  color: var(--ink);
  font-size: 14px;
}

.strategy-decisions {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.strategy-decision-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.strategy-decision-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.strategy-choice {
  min-height: 88px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.strategy-choice:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.strategy-choice.is-selected {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 3px 0 0 var(--green);
}

.strategy-choice:disabled {
  opacity: 0.55;
  cursor: default;
}

.strategy-choice strong,
.strategy-choice span {
  display: block;
}

.strategy-choice span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.strategy-choice-result,
.strategy-node-state {
  margin-top: 12px;
  padding: 11px 13px;
  color: #43545e;
  background: var(--surface-soft);
  border-radius: 6px;
  font-size: 12px;
}

.strategy-choice-result {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.strategy-choice-result svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--green);
}

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

.specialist-card {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.specialist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.specialist-head h3 {
  margin: 0;
  font-size: 17px;
}

.specialist-head div > span {
  color: var(--muted);
  font-size: 11px;
}

.specialist-card p {
  margin: 12px 0 0;
  color: #4e5a64;
  font-size: 12px;
}

.specialist-card .source-link {
  margin-top: 14px;
  font-size: 12px;
}

.platform-research-list {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.platform-research-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 11px 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.platform-research-row:last-child {
  border-bottom: 0;
}

.platform-research-row:hover {
  background: #fafbfc;
}

.platform-research-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.lab-layout,
.observer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.lab-primary,
.observer-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  gap: 24px;
}

.tool-panel,
.side-tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tool-panel {
  min-width: 0;
  padding: 24px;
}

.side-tool {
  padding: 19px;
}

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

.tool-panel-head.compact {
  margin-bottom: 14px;
}

.tool-panel-head h2,
.side-tool h2 {
  margin: 0;
  font-size: 18px;
}

.tool-panel-head p,
.side-tool > p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

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

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

.form-grid label,
.stacked-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.form-grid label > span,
.stacked-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.stacked-field input,
.stacked-field select,
.stacked-field textarea,
.package-tool textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.form-grid input,
.form-grid select,
.stacked-field input,
.stacked-field select {
  height: 40px;
  padding: 0 10px;
}

.form-grid textarea,
.stacked-field textarea,
.package-tool textarea {
  padding: 9px 10px;
  resize: vertical;
}

.form-grid input[readonly] {
  color: var(--green);
  background: var(--green-soft);
  font-weight: 800;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.special-model {
  min-width: 0;
  margin: 22px 0 0;
  padding: 18px;
  background: #f9fbfc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.special-model[hidden] {
  display: none;
}

.special-model legend {
  padding: 0 8px;
  font-weight: 800;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.check-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.field-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tool-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.split-actions {
  justify-content: space-between;
}

.result-placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 34px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  text-align: center;
}

.result-placeholder > svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.result-placeholder h3,
.result-placeholder p {
  margin: 8px 0 0;
}

.result-callout {
  padding: 24px;
  background: var(--green-soft);
  border: 1px solid #a9cfbb;
  border-radius: 6px;
}

.result-callout.is-pending {
  background: var(--amber-soft);
  border-color: #dcc28c;
}

.result-callout h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.result-callout p:not(.eyebrow) {
  margin: 8px 0 0;
  color: #46544e;
}

.result-sequence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.result-sequence span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(35, 122, 87, 0.2);
  border-radius: 6px;
  text-align: center;
  font-weight: 800;
}

.result-sequence svg {
  width: 18px;
  height: 18px;
  justify-self: center;
}

.risk-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  color: #7c4310;
  background: var(--amber-soft);
  border-radius: 6px;
  font-size: 12px;
}

.risk-banner svg,
.calculation-notes svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.plan-table-wrap,
.evidence-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.plan-table,
.evidence-table {
  width: 100%;
  border-collapse: collapse;
}

.plan-table th,
.plan-table td,
.evidence-table th,
.evidence-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f3;
  text-align: left;
  vertical-align: top;
}

.plan-table tr:last-child td,
.evidence-table tr:last-child td {
  border-bottom: 0;
}

.plan-table th,
.evidence-table th {
  color: var(--muted);
  background: #fafbfc;
  font-size: 11px;
  white-space: nowrap;
}

.evidence-table td {
  min-width: 126px;
  font-size: 12px;
}

.evidence-table td:first-child,
.evidence-table td:nth-child(2) {
  min-width: 210px;
}

.evidence-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.evidence-table a {
  color: var(--blue);
  font-weight: 700;
}

.calculation-notes {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--blue-soft);
  border-radius: 6px;
}

.calculation-notes p {
  display: flex;
  gap: 8px;
  margin: 4px 0;
  color: #405462;
  font-size: 12px;
}

.lab-aside {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.stacked-field + .stacked-field {
  margin-top: 12px;
}

.rune-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.rune-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 56px;
  gap: 9px;
  align-items: center;
  min-height: 50px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.rune-row:last-child {
  border-bottom: 0;
}

.rune-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.rune-row input {
  width: 56px;
  height: 36px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  text-align: center;
}

.rune-swatch {
  width: 8px;
  height: 34px;
  border-radius: 3px;
}

.rune-swatch.red {
  background: #c94c47;
}

.rune-swatch.green {
  background: #3c8a63;
}

.rune-swatch.blue {
  background: #3b78a5;
}

.rune-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rune-summary div {
  min-height: 62px;
  padding: 9px 10px;
  background: #f9fbfc;
}

.rune-summary span,
.rune-summary strong {
  display: block;
}

.rune-summary span {
  color: var(--muted);
  font-size: 10px;
}

.rune-summary strong {
  color: var(--green);
  font-size: 16px;
}

.calibration-card ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #4e5a64;
  font-size: 12px;
}

.link-button {
  color: var(--ink);
  text-decoration: none;
}

.creator-video-list {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.creator-video-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.creator-video-row:last-child {
  border-bottom: 0;
}

.creator-video-row:hover {
  background: #fafbfc;
}

.creator-video-row small {
  display: block;
  color: var(--muted);
}

.observer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.file-button input {
  display: none;
}

.source-name {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #101418;
  border: 1px solid #283039;
  border-radius: 6px;
}

.video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-timecode {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 66px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(10, 14, 17, 0.8);
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.capture-routing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.capture-routing span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 10px;
  background: #f9fbfc;
  color: #4e5a64;
  font-size: 11px;
}

.capture-routing svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.pending-frame-preview {
  position: relative;
  width: min(260px, 100%);
  margin-top: 12px;
}

.pending-frame-preview img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pending-frame-preview .icon-button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
}

.full-button {
  width: 100%;
}

.package-tool textarea {
  margin-top: 12px;
  color: #33424d;
  background: #f9fbfc;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
}

.package-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

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

.empty-state.compact {
  padding: 30px 20px;
}

.review-mark {
  display: grid;
  grid-template-columns: 72px 128px minmax(0, 1fr) 38px;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.timestamp-button {
  min-height: 36px;
  padding: 0 8px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 0;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  cursor: pointer;
}

.review-mark > img,
.mark-frame-placeholder {
  width: 128px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-soft);
  border-radius: 5px;
}

.mark-frame-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.review-mark-body {
  min-width: 0;
}

.review-mark-body h3 {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.review-mark-body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.review-mark-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.severity {
  padding: 1px 5px;
  border-radius: 4px;
}

.severity.high {
  color: var(--red);
  background: var(--red-soft);
}

.severity.medium {
  color: var(--amber);
  background: var(--amber-soft);
}

.severity.low {
  color: var(--green);
  background: var(--green-soft);
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .learning-path {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-layout,
  .observer-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

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

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

  .strategy-detail-main {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1400px) {
  .numeric-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .mobile-menu {
    display: grid !important;
  }

  .overview-head,
  .training-layout,
  .lab-layout,
  .observer-layout {
    grid-template-columns: 1fr;
  }

  .lab-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-intro {
    padding-right: 0;
    padding-bottom: 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .training-aside {
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .capture-routing {
    grid-template-columns: 1fr;
  }

  .strategy-hero-strip {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .strategy-hero-strip > img {
    width: 96px;
    height: 96px;
  }

  .strategy-progress-panel {
    grid-column: 2;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-cell:nth-child(2) {
    border-right: 0;
  }

  .stat-cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .hero-detail-head {
    grid-template-columns: 170px 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 72px;
    padding: 11px 16px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .topbar p,
  .topbar-actions {
    display: none;
  }

  #appMain {
    padding: 20px 16px 44px;
  }

  .overview-intro h2 {
    font-size: 25px;
  }

  .stat-strip,
  .focus-band,
  .version-summary,
  .schema-table {
    grid-template-columns: 1fr;
  }

  .stat-cell,
  .version-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-cell:last-child,
  .version-summary > div:last-child {
    border-bottom: 0;
  }

  .learning-path,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: grid;
    grid-template-columns: 124px 1fr;
    min-height: 142px;
  }

  .hero-card-media {
    height: 100%;
    aspect-ratio: auto;
  }

  .toolbar select,
  .segmented-control {
    width: 100%;
  }

  .numeric-form-grid,
  .review-form-grid,
  .lab-aside,
  .rune-summary {
    grid-template-columns: 1fr;
  }

  .tool-panel,
  .side-tool {
    padding: 16px;
  }

  .observer-actions,
  .split-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .source-name {
    width: 100%;
    margin-left: 0;
  }

  .result-callout h2 {
    font-size: 18px;
  }

  .result-sequence {
    grid-template-columns: 1fr;
  }

  .result-sequence svg {
    transform: rotate(90deg);
  }

  .review-mark {
    grid-template-columns: 64px minmax(0, 1fr) 38px;
  }

  .review-mark > img,
  .mark-frame-placeholder {
    display: none;
  }

  .strategy-hero-strip {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 13px;
  }

  .strategy-hero-strip > img {
    width: 78px;
    height: 78px;
  }

  .strategy-hero-strip h2 {
    font-size: 19px;
  }

  .strategy-hero-strip p:not(.eyebrow) {
    grid-column: 1 / -1;
  }

  .strategy-progress-panel {
    grid-column: 1 / -1;
  }

  .strategy-grid-surface {
    width: calc(100% + 32px);
    height: 520px;
    margin-left: -16px;
  }

  .strategy-grid-toolbar {
    right: 10px;
    bottom: 10px;
    left: 10px;
    flex-wrap: wrap;
  }

  .strategy-grid-toolbar > span {
    flex: 1 1 190px;
  }

  .strategy-detail-grid,
  .strategy-choice-grid,
  .specialist-grid {
    grid-template-columns: 1fr;
  }

  .strategy-decision-head,
  .platform-research-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented-control > button {
    flex: 1;
  }

  .hero-count {
    width: 100%;
    margin-left: 0;
  }

  .module-head {
    grid-template-columns: 40px 1fr;
  }

  .module-progress {
    grid-column: 2;
    text-align: left;
  }

  .lesson-table thead,
  .lesson-table .lesson-type-cell {
    display: none;
  }

  .lesson-table td {
    padding: 12px 14px;
  }

  .lesson-table td:last-child {
    width: 88px;
  }

  .version-entry {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .review-status {
    justify-self: start;
  }

  .modal-backdrop {
    padding: 0;
  }

  .hero-modal {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .hero-detail-head {
    grid-template-columns: 1fr;
  }

  .hero-detail-image {
    height: 220px;
  }

  .hero-detail-intro {
    padding: 22px 58px 22px 20px;
  }

  .hero-detail-body {
    padding: 22px 20px 32px;
  }

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

/* Matchup lab and phase-strength curves */
.curve-label {
  color: var(--red);
  font-size: 10px;
  white-space: nowrap;
}

.strength-curve {
  width: 100%;
  min-width: 180px;
  color: var(--muted);
}

.strength-curve.is-compact {
  min-width: 0;
  margin: 2px 0 8px;
}

.strength-curve svg {
  display: block;
  width: 100%;
  height: 96px;
  overflow: visible;
}

.strength-curve.is-compact svg {
  height: 66px;
}

.strength-baseline {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.strength-objective-line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.strength-area {
  pointer-events: none;
}

.strength-confidence-band {
  fill: var(--section-accent, var(--red));
  fill-opacity: 0.09;
  pointer-events: none;
}

.strength-line {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.strength-model-line.is-reference {
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
  opacity: 0.54;
}

.strength-sampled-line {
  stroke-width: 2.7;
}

.strength-sample-point {
  fill: var(--ink);
  stroke: var(--section-accent, var(--red));
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.strength-window {
  stroke: var(--bg);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.strength-window.is-model {
  fill: var(--section-accent-2, var(--blue));
}

.strength-window.is-statistical {
  fill: var(--section-accent, var(--red));
}

.strength-axis-label {
  fill: var(--muted);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
}

.strength-curve-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  color: var(--muted);
  font-size: 10px;
}

.strength-curve-meta strong {
  color: var(--ink);
  font-weight: 500;
}

.strength-curve-meta small {
  flex: 1 0 100%;
  font-size: 10px;
}

.curve-empty {
  color: var(--muted);
  font-size: 11px;
}

.matchup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.matchup-head h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 500;
}

.matchup-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.matchup-source {
  padding-top: 12px;
  border-top: 1px solid var(--red);
}

.matchup-source span,
.matchup-source small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.matchup-source strong {
  display: block;
  margin: 4px 0;
  color: var(--red);
  font-size: 24px;
  font-weight: 500;
}

.matchup-controls {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(150px, 220px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.matchup-controls.is-support {
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
}

.matchup-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.matchup-select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: #09100c;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.matchup-relation-tabs {
  justify-self: stretch;
  width: 100%;
}

.matchup-selected {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 116px;
  margin-bottom: 28px;
  padding: 16px 18px;
  background: rgba(13, 20, 16, 0.72);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.matchup-selected-hero {
  display: grid;
  grid-template-columns: 54px minmax(90px, auto) minmax(120px, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 1 1 0;
}

.matchup-selected-hero img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.matchup-selected-hero span,
.matchup-selected-hero strong {
  display: block;
}

.matchup-selected-hero span {
  color: var(--muted);
  font-size: 10px;
}

.matchup-selected-hero strong {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 500;
}

.matchup-selected-hero .strength-curve {
  justify-self: end;
}

.matchup-duel-stat {
  display: grid;
  min-width: 142px;
  padding: 10px 18px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.matchup-duel-stat span,
.matchup-duel-stat small {
  color: var(--muted);
  font-size: 10px;
}

.matchup-duel-stat strong {
  margin: 2px 0;
  color: var(--red);
  font-size: 24px;
  font-weight: 500;
}

.matchup-results {
  padding-bottom: 18px;
}

.matchup-results .section-heading {
  margin-bottom: 12px;
}

.matchup-results .section-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.matchup-results .section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.matchup-table-wrap {
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.matchup-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.matchup-table th,
.matchup-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

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

.matchup-table th {
  color: var(--muted);
  background: #09100c;
  font-size: 10px;
  font-weight: 500;
}

.matchup-table td {
  color: var(--ink);
  font-size: 12px;
}

.matchup-table th:nth-child(1),
.matchup-table td:nth-child(1) {
  width: 30%;
}

.matchup-table th:nth-child(2),
.matchup-table td:nth-child(2) {
  width: 20%;
}

.matchup-table th:nth-child(3),
.matchup-table td:nth-child(3) {
  width: 19%;
}

.matchup-table th:nth-child(4),
.matchup-table td:nth-child(4) {
  width: 17%;
}

.matchup-table th:nth-child(5),
.matchup-table td:nth-child(5) {
  width: 14%;
}

.matchup-target {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.matchup-target img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
}

.matchup-target strong {
  font-weight: 500;
}

.relation-value {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.relation-value.positive {
  color: var(--red);
}

.relation-value.negative {
  color: var(--amber);
}

.relation-value.neutral {
  color: var(--muted);
}

.relation-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.matchup-empty {
  padding: 38px 18px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.matchup-footnote {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 900px) {
  .matchup-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .matchup-relation-tabs {
    grid-column: 1 / -1;
  }

  .matchup-controls.is-support {
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .matchup-head h2 {
    font-size: 26px;
  }

  .matchup-controls {
    grid-template-columns: 1fr;
  }

  .matchup-controls.is-support {
    grid-template-columns: 1fr;
  }

  .matchup-relation-tabs {
    grid-column: auto;
  }

  .matchup-selected {
    align-items: stretch;
    flex-direction: column;
  }

  .matchup-selected-hero {
    grid-template-columns: 46px minmax(90px, auto) minmax(0, 1fr);
  }

  .matchup-selected-hero img {
    width: 46px;
    height: 46px;
  }

  .matchup-selected-hero .strength-curve {
    min-width: 100px;
  }

  .matchup-duel-stat {
    align-self: center;
    width: min(100%, 240px);
    border-right: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .matchup-table th,
  .matchup-table td {
    padding: 10px 8px;
    font-size: 11px;
  }

  .matchup-table th:nth-child(2),
  .matchup-table td:nth-child(2) {
    display: none;
  }

  .matchup-table th:nth-child(1),
  .matchup-table td:nth-child(1) {
    width: 38%;
  }

  .matchup-table th:nth-child(3),
  .matchup-table td:nth-child(3) {
    width: 25%;
  }

  .matchup-table th:nth-child(4),
  .matchup-table td:nth-child(4) {
    width: 21%;
  }

  .matchup-table th:nth-child(5),
  .matchup-table td:nth-child(5) {
    width: 16%;
  }
}

/* Neon portfolio-inspired product shell */
html {
  color-scheme: dark;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(201, 255, 69, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 255, 69, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline-color: rgba(201, 255, 69, 0.48);
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: 72px;
  padding: 10px 24px;
  color: var(--ink);
  background: rgba(6, 10, 8, 0.94);
  border: 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand-block {
  flex: 0 0 auto;
  gap: 10px;
  padding: 0;
  border: 0;
}

.brand-mark {
  width: 48px;
  height: 30px;
  color: #071008;
  background: var(--red);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.brand-name {
  font-size: 13px;
  font-weight: 800;
}

.brand-meta {
  color: var(--muted);
  font-size: 9px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 4px;
  background: #0a100c;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav-item {
  width: auto;
  min-height: 34px;
  padding: 0 11px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.nav-item svg {
  display: none;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-item.is-active {
  color: #071008;
  background: var(--red);
  box-shadow: none;
}

.sidebar-foot {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.sidebar-foot p {
  display: none;
}

.version-pill {
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
}

.status-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(201, 255, 69, 0.12);
}

.workspace {
  min-width: 0;
}

.topbar {
  top: 72px;
  min-height: 70px;
  padding: 12px 30px;
  background: rgba(6, 10, 8, 0.9);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}

body[data-view="dashboard"] .topbar {
  display: none;
}

.topbar h1 {
  font-size: 18px;
  font-weight: 600;
}

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

#appMain {
  width: min(1520px, 100%);
  padding: 22px 30px 80px;
}

body[data-view="dashboard"] #appMain {
  padding-top: 0;
}

.primary-button,
.secondary-button,
.text-button,
.filter-chip,
.quiz-option,
.icon-button {
  border-radius: 5px;
}

.primary-button {
  color: #071008;
  background: var(--red);
  border-color: var(--red);
}

.primary-button:hover {
  color: #071008;
  background: #d9ff78;
}

.secondary-button,
.icon-button {
  color: var(--ink);
  background: rgba(13, 20, 16, 0.86);
  border-color: var(--line-strong);
}

.secondary-button:hover,
.icon-button:hover {
  color: var(--red);
  background: var(--surface-soft);
  border-color: var(--red);
}

.text-button,
.source-link,
.evidence-table a {
  color: var(--red);
}

.academy-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.5fr);
  gap: 34px;
  align-items: end;
  min-height: 510px;
  padding: 64px 42px 38px;
  overflow: hidden;
  background-color: #07100b;
  background-image: var(--hero-image);
  background-position: right center;
  background-repeat: no-repeat;
  background-size: min(56%, 760px) auto;
  border-bottom: 1px solid rgba(201, 255, 69, 0.42);
}

.academy-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(4, 8, 6, 0.58);
  pointer-events: none;
}

.academy-hero-copy,
.academy-hero-status {
  position: relative;
  z-index: 1;
}

.academy-hero-copy {
  max-width: 840px;
}

.eyebrow {
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
}

.academy-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: 64px;
  font-weight: 500;
  line-height: 0.98;
}

.academy-hero h2 span {
  color: var(--red);
}

.academy-hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 22px 0 0;
  color: #c0cbc3;
  font-size: 15px;
}

.academy-hero-status {
  align-self: end;
  padding: 18px 0 4px;
  border-top: 1px solid rgba(201, 255, 69, 0.44);
}

.academy-hero-status > span,
.academy-hero-status > small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.academy-hero-status > strong {
  display: block;
  margin: 6px 0 12px;
  color: var(--red);
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
}

.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 0;
}

.progress-fill {
  background: var(--red);
  border-radius: 0;
}

.terminal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 58px;
  border-bottom: 1px solid var(--line);
}

.terminal-stats > div {
  min-height: 112px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.terminal-stats > div:last-child {
  border-right: 0;
}

.terminal-stats span,
.terminal-stats small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.terminal-stats strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--red);
  font-size: 32px;
  font-weight: 500;
}

.command-section {
  margin-bottom: 62px;
}

.command-heading {
  align-items: end;
  margin-bottom: 18px;
}

.command-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.command-bento {
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: 208px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.command-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
  padding: 22px;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.command-tile::before,
.command-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.command-tile::before {
  background-image: var(--tile-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.command-tile::after {
  background: rgba(5, 9, 7, 0.66);
  opacity: 0;
}

.command-tile--image::before,
.command-tile--image::after {
  opacity: 1;
}

.command-tile:hover {
  color: #071008;
  background: var(--red);
  border-color: var(--red);
}

.command-tile--image:hover {
  color: var(--ink);
  border-color: var(--red);
}

.command-tile--image:hover::before {
  transform: scale(1.025);
}

.command-tile--image:hover::after {
  background: rgba(5, 9, 7, 0.48);
}

.command-tile > * {
  position: relative;
  z-index: 1;
}

.command-tile--wide {
  grid-column: span 2;
}

.command-tile--tall {
  grid-row: span 2;
}

.command-index {
  position: absolute;
  top: 18px;
  left: 22px;
  color: var(--muted);
  font-size: 9px;
}

.command-tile:hover .command-index {
  color: currentColor;
  opacity: 0.7;
}

.command-tile strong {
  max-width: 420px;
  font-size: 21px;
  font-weight: 500;
}

.command-tile small {
  max-width: 440px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.command-tile--image small {
  color: #bdc8c0;
}

.command-tile:hover small {
  color: currentColor;
  opacity: 0.78;
}

.command-tile > svg {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 20px;
  height: 20px;
  color: var(--red);
}

.command-tile:hover > svg {
  color: currentColor;
}

.command-value {
  position: absolute;
  right: 22px;
  bottom: 16px;
  color: var(--red);
  font-size: 42px;
  line-height: 1;
}

.section-heading h2 {
  color: var(--ink);
  font-size: 21px;
  font-weight: 500;
}

.section-heading p,
.section-heading > span {
  color: var(--muted);
}

.learning-path {
  gap: 0;
  background: transparent;
  border-color: var(--line);
}

.path-step {
  min-height: 166px;
  background: rgba(13, 20, 16, 0.88);
  border-right: 1px solid var(--line);
}

.path-step:nth-child(3n) {
  border-right: 0;
}

.path-step:hover {
  background: var(--surface-soft);
}

.path-number {
  color: #071008;
  background: var(--red);
  border-radius: 4px;
}

.path-step p,
.path-step small {
  color: var(--muted);
}

.toolbar,
.module-section,
.quiz-panel,
.version-summary,
.schema-item,
.hero-modal,
.strategy-choice,
.specialist-card,
.platform-research-list,
.tool-panel,
.side-tool,
.result-placeholder,
.plan-table-wrap,
.evidence-table-wrap,
.creator-video-list,
.review-mark,
.hero-card {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.search-field input,
.toolbar select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.stacked-field input,
.stacked-field select,
.stacked-field textarea,
.package-tool textarea,
.quiz-option {
  color: var(--ink);
  background: #09100c;
  border-color: var(--line-strong);
}

.segmented-control {
  background: #09100c;
  border: 1px solid var(--line);
}

.filter-chip.is-active {
  color: #071008;
  background: var(--red);
  box-shadow: none;
}

.lesson-table th,
.plan-table th,
.evidence-table th {
  background: #09100c;
}

.lesson-table th,
.lesson-table td,
.plan-table th,
.plan-table td,
.evidence-table th,
.evidence-table td {
  border-bottom-color: var(--line);
}

.quiz-option:hover:not(:disabled),
.strategy-choice:hover:not(:disabled) {
  border-color: var(--red);
  background: var(--red-soft);
}

.strategy-choice.is-selected {
  border-color: var(--red);
  background: var(--red-soft);
  box-shadow: inset 3px 0 0 var(--red);
}

.strategy-choice-result,
.strategy-node-state,
.special-model {
  color: #b9c5bd;
  background: var(--surface-soft);
  border-color: var(--line);
}

.specialist-card p,
.result-callout,
.hero-card p,
.hero-detail-body p {
  color: var(--muted);
}

.platform-research-row,
.creator-video-row {
  color: var(--ink);
}

.platform-research-row:hover,
.creator-video-row:hover {
  background: var(--surface-soft);
}

.research-finding-row:hover {
  background: var(--surface);
}

.research-finding-row a {
  color: var(--red);
}

.research-policy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.research-policy > div {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.research-policy > div:last-child {
  border-right: 0;
}

.research-policy span {
  display: block;
  color: var(--red);
  font-size: 10px;
}

.research-policy strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  font-weight: 500;
}

.research-policy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.strategy-progress-track {
  background: var(--line);
  border-radius: 0;
}

.strategy-progress-track span {
  background: var(--red);
  border-radius: 0;
}

.strategy-grid-surface {
  background: #06100b;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strategy-grid-toolbar {
  color: var(--ink);
  background: rgba(6, 13, 9, 0.9);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
}

.review-status.verified {
  color: #071008;
  background: var(--red);
}

.review-status.pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.toast {
  color: #071008;
  background: var(--red);
  border-color: var(--red);
}

@media (max-width: 1180px) {
  .nav-item {
    padding: 0 8px;
    font-size: 11px;
  }

  .version-pill {
    font-size: 10px;
  }

  .command-bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(310px, 88vw);
    height: 100dvh;
    padding: 22px 18px 18px;
    transform: translateX(-100%);
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu {
    display: grid !important;
  }

  .brand-block {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav {
    display: grid;
    gap: 5px;
    width: 100%;
    margin: 20px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .nav-item {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 5px;
    font-size: 13px;
  }

  .nav-item svg {
    display: block;
  }

  .sidebar-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .topbar,
  body[data-view="dashboard"] .topbar {
    top: 0;
    display: flex;
  }

  body[data-view="dashboard"] .topbar > div:not(.topbar-actions) {
    display: none;
  }

  body[data-view="dashboard"] .topbar {
    min-height: 58px;
  }

  #appMain,
  body[data-view="dashboard"] #appMain {
    padding-top: 0;
  }

  .academy-hero {
    grid-template-columns: 1fr;
    min-height: 560px;
    padding: 56px 28px 30px;
    background-position: center;
    background-size: cover;
  }

  .academy-hero h2 {
    font-size: 48px;
  }

  .academy-hero-status {
    align-self: end;
  }

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

  .command-tile--tall {
    grid-row: span 1;
  }
}

@media (max-width: 680px) {
  #appMain {
    padding-right: 16px;
    padding-bottom: 52px;
    padding-left: 16px;
  }

  body[data-view="dashboard"] #appMain {
    padding-right: 0;
    padding-left: 0;
  }

  .academy-hero {
    min-height: 500px;
    padding: 44px 20px 24px;
  }

  .academy-hero h2 {
    font-size: 40px;
  }

  .academy-hero-copy > p:not(.eyebrow) {
    font-size: 13px;
  }

  .academy-hero .quick-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .terminal-stats {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 42px;
  }

  .terminal-stats > div:nth-child(2) {
    border-right: 0;
  }

  .terminal-stats > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .command-section,
  body[data-view="dashboard"] #appMain > section:last-child {
    padding-right: 16px;
    padding-left: 16px;
  }

  .command-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-bento {
    grid-auto-rows: 188px;
    grid-template-columns: 1fr;
  }

  .command-tile--wide {
    grid-column: span 1;
  }

  .command-value {
    font-size: 30px;
  }

  .learning-path {
    grid-template-columns: 1fr;
  }

  .path-step,
  .path-step:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .path-step:last-child {
    border-bottom: 0;
  }

  .research-policy {
    grid-template-columns: 1fr;
  }

  .research-policy > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .research-policy > div:last-child {
    border-bottom: 0;
  }
}

/* High-resolution media and explicit grid load state */
.hero-card-media img,
.hero-detail-image img,
.strategy-hero-strip > img,
.matchup-selected-hero img,
.pending-frame-preview img,
.review-mark > img {
  image-rendering: auto;
  filter: saturate(1.025) contrast(1.035);
}

.hero-card-media img {
  transform: none;
}

@media (min-width: 901px) {
  .academy-hero {
    background-size: min(68%, 960px) auto;
  }
}

@media (max-width: 900px) {
  .academy-hero {
    background-position: center;
    background-size: cover;
  }
}

.grid-load-error {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 28px;
  color: var(--ink);
  text-align: center;
}

.grid-load-error svg {
  width: 28px;
  height: 28px;
  color: var(--amber);
}

.grid-load-error span {
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
}

/* Section palettes: restrained contrast pairs on a shared dark system */
body[data-view="dashboard"] {
  --section-accent: #c6ff4a;
  --section-accent-2: #74dfc8;
  --section-soft: rgba(198, 255, 74, 0.08);
  --section-soft-2: rgba(116, 223, 200, 0.08);
  --section-grid: rgba(198, 255, 74, 0.024);
}

body[data-view="curriculum"] {
  --section-accent: #ff8f7d;
  --section-accent-2: #8ed8ff;
  --section-soft: rgba(255, 143, 125, 0.08);
  --section-soft-2: rgba(142, 216, 255, 0.08);
  --section-grid: rgba(255, 143, 125, 0.022);
}

body[data-view="heroes"] {
  --section-accent: #bfff4f;
  --section-accent-2: #aa9cf2;
  --section-soft: rgba(191, 255, 79, 0.075);
  --section-soft-2: rgba(170, 156, 242, 0.075);
  --section-grid: rgba(170, 156, 242, 0.022);
}

body[data-view="matchups"] {
  --section-accent: #ff799d;
  --section-accent-2: #6fe2dc;
  --section-soft: rgba(255, 121, 157, 0.075);
  --section-soft-2: rgba(111, 226, 220, 0.075);
  --section-grid: rgba(255, 121, 157, 0.022);
}

body[data-view="training"] {
  --section-accent: #ffd16f;
  --section-accent-2: #bba3ff;
  --section-soft: rgba(255, 209, 111, 0.08);
  --section-soft-2: rgba(187, 163, 255, 0.08);
  --section-grid: rgba(255, 209, 111, 0.022);
}

body[data-view="strategyGrid"] {
  --section-accent: #7fe0ca;
  --section-accent-2: #efc86f;
  --section-soft: rgba(127, 224, 202, 0.075);
  --section-soft-2: rgba(239, 200, 111, 0.075);
  --section-grid: rgba(127, 224, 202, 0.022);
}

body[data-view="numbers"] {
  --section-accent: #ff9b67;
  --section-accent-2: #7eb8ff;
  --section-soft: rgba(255, 155, 103, 0.08);
  --section-soft-2: rgba(126, 184, 255, 0.08);
  --section-grid: rgba(126, 184, 255, 0.022);
}

body[data-view="observer"] {
  --section-accent: #c0a4ff;
  --section-accent-2: #ffae8b;
  --section-soft: rgba(192, 164, 255, 0.075);
  --section-soft-2: rgba(255, 174, 139, 0.075);
  --section-grid: rgba(255, 174, 139, 0.022);
}

body[data-view="versions"] {
  --section-accent: #7fe0ac;
  --section-accent-2: #f1ca6c;
  --section-soft: rgba(127, 224, 172, 0.075);
  --section-soft-2: rgba(241, 202, 108, 0.075);
  --section-grid: rgba(127, 224, 172, 0.022);
}

body[data-view] {
  --red: var(--section-accent);
  --red-soft: var(--section-soft);
  --blue: var(--section-accent-2);
  --blue-soft: var(--section-soft-2);
  --green: var(--section-accent);
  --green-soft: var(--section-soft);
  background-image:
    linear-gradient(var(--section-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--section-grid) 1px, transparent 1px),
    linear-gradient(118deg, var(--section-soft), transparent 34%, var(--section-soft-2));
  background-size: 32px 32px, 32px 32px, 100% 100%;
}

body[data-view] .topbar {
  background-color: rgba(6, 10, 8, 0.92);
  background-image: linear-gradient(105deg, var(--section-soft), transparent 38%, var(--section-soft-2));
}

body[data-view] .primary-button {
  color: #071008;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
  border-color: transparent;
}

body[data-view] .brand-mark {
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
}

body[data-view] .primary-button:hover {
  color: #071008;
  background: linear-gradient(135deg, var(--section-accent-2), var(--section-accent));
}

body[data-view] .toolbar,
body[data-view] .module-section,
body[data-view] .quiz-panel,
body[data-view] .version-summary,
body[data-view] .schema-item,
body[data-view] .hero-modal,
body[data-view] .specialist-card,
body[data-view] .tool-panel,
body[data-view] .side-tool,
body[data-view] .result-placeholder,
body[data-view] .plan-table-wrap,
body[data-view] .evidence-table-wrap,
body[data-view] .creator-video-list,
body[data-view] .hero-card,
body[data-view] .matchup-selected,
body[data-view] .matchup-table-wrap {
  background-color: var(--surface);
  background-image: linear-gradient(138deg, var(--section-soft), transparent 42%, var(--section-soft-2));
}

body[data-view] .lesson-table th,
body[data-view] .plan-table th,
body[data-view] .evidence-table th,
body[data-view] .matchup-table th {
  background-image: linear-gradient(90deg, var(--section-soft), #09100c 72%);
}

body[data-view] .section-heading {
  position: relative;
  padding-bottom: 12px;
}

body[data-view] .section-heading::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--section-accent), var(--section-accent-2), transparent 76%);
  opacity: 0.48;
}

.command-tile {
  --tile-accent: #c6ff4a;
  --tile-accent-2: #74dfc8;
  --tile-soft: rgba(198, 255, 74, 0.09);
  --tile-soft-2: rgba(116, 223, 200, 0.08);
  background-image: linear-gradient(140deg, var(--tile-soft), transparent 44%, var(--tile-soft-2));
}

.command-tile:nth-child(2),
.command-tile:nth-child(6) {
  --tile-accent: #78ded0;
  --tile-accent-2: #d0f36f;
  --tile-soft: rgba(120, 222, 208, 0.09);
  --tile-soft-2: rgba(208, 243, 111, 0.08);
}

.command-tile:nth-child(3),
.command-tile:nth-child(7) {
  --tile-accent: #ff8e82;
  --tile-accent-2: #83cfff;
  --tile-soft: rgba(255, 142, 130, 0.09);
  --tile-soft-2: rgba(131, 207, 255, 0.08);
}

.command-tile:nth-child(4) {
  --tile-accent: #ffad75;
  --tile-accent-2: #91b7ff;
  --tile-soft: rgba(255, 173, 117, 0.09);
  --tile-soft-2: rgba(145, 183, 255, 0.08);
}

.command-tile:nth-child(5) {
  --tile-accent: #bda5ff;
  --tile-accent-2: #ffad8b;
  --tile-soft: rgba(189, 165, 255, 0.09);
  --tile-soft-2: rgba(255, 173, 139, 0.08);
}

.command-tile:hover {
  color: var(--ink);
  background-color: var(--surface-soft);
  background-image: linear-gradient(135deg, var(--tile-soft), var(--surface) 52%, var(--tile-soft-2));
  border-color: var(--tile-accent);
}

.command-tile > svg,
.command-value {
  color: var(--tile-accent);
}

.command-tile--image::after {
  background: linear-gradient(180deg, rgba(5, 9, 7, 0.16), rgba(5, 9, 7, 0.88) 68%, var(--tile-soft));
}

.command-tile--image:hover::after {
  background: linear-gradient(180deg, rgba(5, 9, 7, 0.08), rgba(5, 9, 7, 0.76) 62%, var(--tile-soft-2));
}

.hero-card:nth-child(4n + 2) {
  --section-accent: #77ded0;
  --section-accent-2: #c9ef73;
  --section-soft: rgba(119, 222, 208, 0.07);
  --section-soft-2: rgba(201, 239, 115, 0.07);
}

.hero-card:nth-child(4n + 3) {
  --section-accent: #ff947e;
  --section-accent-2: #8fc9ff;
  --section-soft: rgba(255, 148, 126, 0.07);
  --section-soft-2: rgba(143, 201, 255, 0.07);
}

.hero-card:nth-child(4n + 4) {
  --section-accent: #f3c86d;
  --section-accent-2: #b9a3ff;
  --section-soft: rgba(243, 200, 109, 0.07);
  --section-soft-2: rgba(185, 163, 255, 0.07);
}

.hero-card:hover {
  border-color: var(--section-accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.academy-hero::before {
  background:
    linear-gradient(90deg, rgba(4, 8, 6, 0.92) 0%, rgba(4, 8, 6, 0.68) 48%, rgba(4, 8, 6, 0.18) 100%),
    linear-gradient(145deg, var(--section-soft), transparent 46%, var(--section-soft-2));
}

.academy-hero {
  border-bottom-color: var(--section-accent);
}

/* Keep section identity separate from success/error meaning. */
.quiz-option.is-correct {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(123, 215, 170, 0.5);
}

.quiz-option.is-wrong {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(255, 141, 132, 0.5);
}

.review-status.verified {
  color: #071008;
  background: linear-gradient(135deg, #91e4b9, var(--success));
}

.severity.high,
.relation-value.negative {
  color: var(--danger);
}

.severity.high {
  background: var(--danger-soft);
}

.severity.low,
.relation-value.positive {
  color: var(--success);
}

.severity.low {
  background: var(--success-soft);
}

/* Carry each view's color pair through compact navigation and progress cues. */
body[data-view] .nav-item.is-active,
body[data-view] .filter-chip.is-active,
body[data-view] .path-number {
  color: #071008;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
}

body[data-view] .progress-fill,
body[data-view] .strategy-progress-track span {
  background: linear-gradient(90deg, var(--section-accent), var(--section-accent-2));
}

body[data-view] .status-dot {
  background: var(--section-accent);
  box-shadow: 0 0 0 3px var(--section-soft);
}

/* Structured course layer */
.course-track-band {
  margin: 0 -30px 28px;
  padding: 24px 30px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--section-accent, var(--green)) 12%, transparent), transparent 44%),
    linear-gradient(300deg, color-mix(in srgb, var(--section-accent-2, var(--amber)) 10%, transparent), transparent 48%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.course-track-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.course-track-head h2,
.lesson-detail-head h2,
.hero-course-section h3 {
  margin: 4px 0 7px;
}

.course-track-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.course-track-tabs {
  flex: 0 0 auto;
}

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

.course-clinic {
  min-width: 0;
  padding: 16px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.course-clinic > span,
.lesson-tier > span,
.lesson-outcome > span,
.lesson-audience-focus span,
.hero-course-phases > div > span {
  color: var(--section-accent, var(--green));
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.course-clinic h3 {
  margin: 7px 0;
  font-size: 15px;
}

.course-clinic p,
.course-clinic small {
  display: block;
  margin: 0;
  color: var(--muted);
}

.course-clinic small {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.lesson-open-button {
  white-space: nowrap;
}

.lesson-modal {
  width: min(1120px, calc(100vw - 32px));
}

.lesson-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 34px 42px 24px;
  border-bottom: 1px solid var(--line);
}

.lesson-detail-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.lesson-tier {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  text-align: right;
}

.lesson-outcome {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 42px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--section-accent, var(--green)) 13%, transparent), transparent 68%);
  border-bottom: 1px solid var(--line);
}

.lesson-audience-focus {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  padding: 18px 42px;
  border-bottom: 1px solid var(--line);
}

.lesson-audience-focus div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lesson-audience-focus p {
  margin: 0;
  color: var(--muted);
}

.lesson-segment-brief {
  display: grid;
  gap: 6px;
}

.lesson-segment-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.lesson-segment-actions div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lesson-segment-actions small {
  color: var(--muted);
  font-size: 11px;
}

.lesson-segment-actions strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.lesson-course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0 42px;
}

.lesson-course-grid > section {
  min-width: 0;
  padding: 24px 24px 24px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-course-grid > section:nth-child(even) {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.lesson-course-grid > section.is-wide {
  grid-column: 1 / -1;
  padding-right: 0;
  padding-left: 0;
  border-left: 0;
}

.lesson-course-grid h3,
.lesson-evidence h3,
.hero-course-section h4 {
  margin: 0 0 12px;
}

.lesson-course-grid small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.lesson-modal .compact-list li,
.hero-course-section .compact-list li,
.lesson-course-grid > section > p {
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
}

.decision-step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.decision-step-list li {
  min-width: 0;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.decision-step-list li > span,
.timing-window-list b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  color: var(--panel);
  background: var(--section-accent, var(--green));
  border-radius: 50%;
}

.decision-step-list p {
  margin: 0;
}

.lesson-deep-dive {
  padding: 34px 42px 38px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--section-accent, var(--green)) 8%, transparent), transparent 42%),
    linear-gradient(315deg, color-mix(in srgb, var(--section-accent-2, var(--amber)) 7%, transparent), transparent 46%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lesson-deep-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.lesson-deep-head span,
.lesson-deep-section-head span,
.lesson-stage-pass span,
.lesson-checkpoint p span,
.lesson-error-row p span {
  color: var(--section-accent, var(--green));
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.lesson-deep-head h3,
.lesson-deep-section-head h4 {
  margin: 5px 0 7px;
}

.lesson-deep-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.lesson-quick-rule {
  padding: 14px 0 14px 18px;
  color: color-mix(in srgb, var(--ink) 88%, var(--section-accent-2, var(--amber)));
  border-left: 3px solid var(--section-accent-2, var(--amber));
  line-height: 1.65;
}

.lesson-stage-grid {
  border-top: 1px solid var(--line);
}

.lesson-stage {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-stage-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--panel);
  background: linear-gradient(135deg, var(--section-accent, var(--green)), var(--section-accent-2, var(--amber)));
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.lesson-stage-body {
  min-width: 0;
}

.lesson-stage-body h4 {
  margin: 0 0 5px;
  font-size: 17px;
}

.lesson-stage-body > p {
  margin: 0 0 12px;
  color: var(--muted);
}

.lesson-stage-body ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.lesson-stage-pass {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
}

.lesson-stage-pass strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.6;
}

.lesson-deep-section {
  padding-top: 30px;
}

.lesson-deep-section-head {
  margin-bottom: 14px;
}

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

.lesson-checkpoint {
  min-width: 0;
  padding: 15px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.lesson-checkpoint > strong {
  display: block;
  min-height: 42px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}

.lesson-checkpoint p,
.lesson-error-row p {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  margin: 10px 0 0;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  line-height: 1.6;
}

.lesson-checkpoint p:last-child span,
.lesson-error-row p:first-of-type span {
  color: var(--section-accent-2, var(--amber));
}

.lesson-error-grid {
  border-top: 1px solid var(--line);
}

.lesson-error-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.55fr) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-error-row p {
  grid-template-columns: 38px minmax(0, 1fr);
  margin: 0;
}

.lesson-version-notes {
  margin-top: 28px;
  padding: 18px;
  background: color-mix(in srgb, var(--section-accent-2, var(--amber)) 7%, transparent);
  border-left: 3px solid var(--section-accent-2, var(--amber));
}

.lesson-version-notes > strong {
  display: block;
  margin-bottom: 8px;
}

.lesson-evidence {
  padding: 24px 42px 38px;
}

.lesson-completion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 42px 28px;
  background: color-mix(in srgb, var(--section-accent, var(--green)) 9%, transparent);
  border-top: 1px solid var(--line);
}

.lesson-completion p {
  margin: 4px 0 0;
  color: var(--muted);
}

.course-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  color: inherit;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.course-source-row span:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.course-source-row small {
  color: var(--muted);
}

.review-status.research {
  color: var(--section-accent-2, var(--amber));
  background: color-mix(in srgb, var(--section-accent-2, var(--amber)) 10%, transparent);
}

.hero-course-section {
  padding-top: 28px;
  border-top: 2px solid color-mix(in srgb, var(--section-accent, var(--green)) 48%, var(--line));
}

.hero-model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-model-grid > div {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.hero-model-grid > div:first-child {
  padding-left: 0;
}

.hero-model-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.hero-model-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--section-accent, var(--green));
  font-size: 11px;
  font-weight: 700;
}

.hero-model-grid p {
  margin: 0;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  overflow-wrap: anywhere;
}

.hero-audience-plan {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.hero-audience-plan > div {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.hero-audience-plan > div:first-child {
  padding-left: 0;
}

.hero-audience-plan > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.hero-audience-plan span {
  color: var(--section-accent-2, var(--amber));
  font-size: 11px;
  font-weight: 700;
}

.hero-audience-plan p,
.hero-audience-plan strong {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.hero-audience-plan p {
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
}

.hero-course-two-column,
.hero-course-phases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.hero-course-two-column > div,
.hero-course-phases > div {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero-course-phases {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-course-phases > div > span {
  display: block;
  margin-bottom: 10px;
}

.timing-window-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.timing-window-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: color-mix(in srgb, var(--section-accent, var(--green)) 8%, transparent);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.timing-window-list b {
  width: 20px;
  height: 20px;
  margin: 0;
  font-size: 10px;
}

.hero-linked-lessons {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-linked-lessons .detail-section-head {
  margin-bottom: 14px;
}

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

.hero-linked-lesson {
  display: flex;
  min-width: 0;
  min-height: 126px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--section-accent, var(--green)) 9%, transparent), transparent 58%),
    color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
}

.hero-linked-lesson:hover {
  border-color: color-mix(in srgb, var(--section-accent, var(--green)) 56%, var(--line));
  filter: brightness(1.08);
  transform: translateY(-3px) scale(1.045);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), 0 0 0 2px color-mix(in srgb, var(--section-accent, var(--green)) 22%, transparent);
}

.hero-linked-lesson:active {
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.065);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.3), 0 0 0 3px color-mix(in srgb, var(--section-accent, var(--green)) 26%, transparent);
}

.hero-linked-lesson > span {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hero-linked-lesson strong,
.hero-linked-lesson small {
  overflow-wrap: anywhere;
}

.hero-linked-lesson small {
  color: var(--muted);
  line-height: 1.6;
}

.hero-linked-lesson i {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--section-accent-2, var(--amber));
}

.hero-course-evidence {
  margin-top: 26px;
}

.training-diagnostic-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0;
}

.training-diagnostic-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 11px 12px;
  border-top: 1px solid var(--line);
}

.training-diagnostic-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.quiz-feedback p {
  margin: 5px 0;
}

.quiz-feedback small {
  display: block;
  color: var(--muted);
}

.quiz-decision-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.quiz-decision-chain span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 9px;
  background: color-mix(in srgb, var(--section-accent, var(--green)) 8%, transparent);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.quiz-decision-chain b {
  color: var(--section-accent, var(--green));
}

.quiz-coach-summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--section-accent-2, var(--amber));
  background: color-mix(in srgb, var(--section-accent-2, var(--amber)) 8%, transparent);
}

@media (max-width: 900px) {
  .course-track-band {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .course-track-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .lesson-detail-head {
    grid-template-columns: 1fr;
  }

  .lesson-tier {
    align-items: flex-start;
    text-align: left;
  }

  .course-clinic-grid,
  .training-diagnostic-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-audience-plan {
    grid-template-columns: 1fr;
  }

  .hero-audience-plan > div,
  .hero-audience-plan > div:first-child,
  .hero-audience-plan > div:last-child {
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .hero-audience-plan > div:first-child {
    border-top: 0;
  }

  .hero-model-grid > div:nth-child(2) {
    padding-right: 0;
    border-right: 0;
  }

  .hero-model-grid > div:nth-child(3) {
    padding-left: 0;
  }

  .hero-model-grid > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .decision-step-list,
  .quiz-decision-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-deep-head {
    grid-template-columns: 1fr;
  }

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

  .lesson-error-row {
    grid-template-columns: minmax(150px, 0.65fr) minmax(0, 1fr);
  }

  .lesson-error-row p:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  [data-reset-progress] {
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  [data-reset-progress] span {
    display: none;
  }

  .course-track-band {
    margin-right: -16px;
    margin-left: -16px;
    padding: 20px 16px;
  }

  .course-track-tabs {
    width: 100%;
  }

  .course-track-tabs .filter-chip {
    flex: 1 1 auto;
  }

  .course-clinic-grid,
  .lesson-course-grid,
  .lesson-audience-focus,
  .hero-linked-lesson-grid,
  .hero-model-grid,
  .hero-course-two-column,
  .hero-course-phases,
  .training-diagnostic-list,
  .decision-step-list,
  .quiz-decision-chain {
    grid-template-columns: 1fr;
  }

  .lesson-segment-actions {
    grid-template-columns: 1fr;
  }

  .hero-model-grid > div,
  .hero-model-grid > div:first-child,
  .hero-model-grid > div:nth-child(2),
  .hero-model-grid > div:nth-child(3),
  .hero-model-grid > div:last-child {
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .hero-model-grid > div:first-child {
    border-top: 0;
  }

  .lesson-detail-head,
  .lesson-outcome,
  .lesson-audience-focus,
  .lesson-deep-dive,
  .lesson-evidence,
  .lesson-completion {
    padding-right: 20px;
    padding-left: 20px;
  }

  .lesson-outcome {
    grid-template-columns: 1fr;
  }

  .lesson-course-grid {
    padding: 0 20px;
  }

  .lesson-modal {
    width: 100%;
  }

  .lesson-course-grid > section,
  .lesson-course-grid > section:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }

  .lesson-checkpoint-grid,
  .lesson-error-row {
    grid-template-columns: 1fr;
  }

  .lesson-error-row p:last-child {
    grid-column: auto;
  }

  .lesson-stage {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-stage-number {
    width: 36px;
    height: 36px;
  }

  .lesson-stage-pass {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .course-source-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .lesson-completion {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .text-button,
  .filter-chip {
    min-height: 44px;
  }

  .icon-button,
  .strategy-grid-toolbar .icon-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .hero-modal {
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .brand-meta,
  .relation-note {
    font-size: 11px;
  }
}

/* Battle history diagnosis */
body[data-view="battleDiagnosis"] {
  --section-accent: #82e3c2;
  --section-accent-2: #ff9d86;
  --section-soft: rgba(130, 227, 194, 0.075);
  --section-soft-2: rgba(255, 157, 134, 0.075);
  --section-grid: rgba(130, 227, 194, 0.022);
}

.battle-lookup-head,
.battle-summary,
.battle-layout,
.battle-diagnostic-columns {
  display: grid;
  min-width: 0;
}

.battle-lookup-head {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 30px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.battle-lookup-head h2,
.battle-player-card h2 {
  margin: 4px 0 8px;
}

.battle-lookup-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.battle-provider-status {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 14px 0 2px 18px;
  border-left: 1px solid var(--line);
}

.battle-provider-status strong,
.battle-provider-status small {
  display: block;
}

.battle-provider-status small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.battle-provider-dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  background: var(--muted);
  border-radius: 50%;
}

.battle-provider-dot.is-ready {
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.battle-provider-dot.is-offline {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 208, 111, 0.1);
}

.battle-provider-dot.is-checking {
  animation: battle-pulse 1.2s ease-in-out infinite;
}

@keyframes battle-pulse {
  50% { opacity: 0.35; }
}

@keyframes battle-spin {
  to { transform: rotate(360deg); }
}

.battle-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 26px;
}

.battle-query-panel {
  border-top: 2px solid var(--section-accent);
}

.battle-query-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(180px, 0.55fr);
  gap: 14px;
}

.battle-consent {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.battle-consent input {
  width: 16px;
  height: 16px;
  accent-color: var(--section-accent);
}

.battle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.battle-file-button {
  position: relative;
  cursor: pointer;
}

.battle-source-options {
  display: grid;
  align-content: start;
  gap: 0;
  border-top: 2px solid var(--section-accent-2);
}

.battle-source-options > div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.battle-source-options > div > span {
  grid-row: 1 / span 2;
  color: var(--section-accent-2);
  font: 700 11px/1.2 var(--mono);
}

.battle-source-options small {
  color: var(--muted);
  line-height: 1.5;
}

.battle-source-options > button {
  margin-top: 16px;
}

.battle-query-error,
.battle-loading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 141, 132, 0.34);
  background: var(--danger-soft);
}

.battle-query-error svg {
  flex: 0 0 auto;
  width: 20px;
  color: var(--danger);
}

.battle-query-error p,
.battle-import-note {
  margin: 4px 0 0;
  color: var(--muted);
}

.battle-loading {
  justify-content: center;
  margin: 0 0 24px;
  border-color: var(--line);
  background: var(--surface);
}

.battle-loading span {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--section-accent);
  border-radius: 50%;
  animation: battle-spin 0.9s linear infinite;
}

.battle-loading small {
  color: var(--muted);
}

.battle-empty {
  min-height: 250px;
}

.battle-empty svg {
  width: 30px;
  height: 30px;
  color: var(--section-accent);
}

.battle-summary {
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  margin: 32px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.battle-player-card,
.battle-trend-panel {
  min-width: 0;
  padding: 24px;
}

.battle-player-card {
  background: linear-gradient(135deg, var(--section-soft), transparent 72%);
  border-right: 1px solid var(--line);
}

.battle-player-meta,
.battle-hero-pool,
.hero-build-items,
.hero-combo-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.battle-player-meta span,
.battle-hero-pool span,
.hero-build-items span,
.hero-combo-sequence span {
  padding: 5px 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--section-accent) 7%, transparent);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
}

.battle-sample-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 9px;
  align-items: baseline;
  margin-top: 22px;
}

.battle-sample-line strong {
  grid-row: 1 / span 2;
  color: var(--section-accent);
  font: 700 34px/1 var(--mono);
}

.battle-sample-line small {
  color: var(--muted);
}

.battle-trend-panel .detail-section-head {
  margin-bottom: 12px;
}

.battle-trend-panel .detail-section-head > span {
  color: var(--section-accent);
  font: 700 22px/1 var(--mono);
}

.battle-trend {
  display: block;
  width: 100%;
  min-height: 108px;
}

.battle-trend-guide {
  stroke: var(--line);
  stroke-dasharray: 3 4;
}

.battle-trend-line {
  fill: none;
  stroke: color-mix(in srgb, var(--section-accent) 64%, var(--section-accent-2));
  stroke-width: 2;
}

.battle-trend-point {
  stroke: var(--surface);
  stroke-width: 2;
}

.battle-trend-point.is-win { fill: var(--success); }
.battle-trend-point.is-loss { fill: var(--danger); }

.battle-trend-label {
  fill: var(--muted);
  font-size: 8px;
}

.battle-trend-empty {
  display: grid;
  min-height: 108px;
  place-items: center;
  color: var(--muted);
}

.battle-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 38px;
  border-bottom: 1px solid var(--line);
}

.battle-metric-grid > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.battle-metric-grid > div:nth-child(4n) { border-right: 0; }

.battle-metric-grid span,
.battle-source-card span,
.battle-training-task span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.battle-metric-grid strong {
  color: var(--section-accent);
  font: 700 22px/1.1 var(--mono);
}

.battle-metric-grid small {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.battle-result-section {
  margin-top: 34px;
}

.battle-diagnostic-list {
  border-top: 1px solid var(--line);
}

.battle-diagnostic-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.battle-diagnostic-item.is-high {
  border-left: 3px solid var(--danger);
  padding-left: 18px;
}

.battle-diagnostic-item.is-medium {
  border-left: 3px solid var(--amber);
  padding-left: 18px;
}

.battle-diagnostic-item.is-positive {
  border-left: 3px solid var(--success);
  padding-left: 18px;
}

.battle-diagnostic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.battle-diagnostic-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.battle-diagnostic-head h3,
.battle-diagnostic-columns h4 {
  margin: 0;
}

.battle-confidence {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
}

.battle-confidence.is-high { color: var(--success); }
.battle-confidence.is-medium { color: var(--amber); }

.severity.info,
.severity.positive {
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

.severity.info {
  color: var(--blue);
  background: var(--blue-soft);
}

.severity.positive {
  color: var(--success);
  background: var(--success-soft);
}

.battle-observation {
  max-width: 900px;
  margin: 10px 0 18px;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
}

.battle-diagnostic-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.battle-training-task {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin-top: 16px;
  padding: 13px 0 0;
  border-top: 1px solid var(--line);
}

.battle-training-task svg {
  width: 20px;
  color: var(--section-accent-2);
}

.battle-training-task strong,
.battle-training-task span {
  display: block;
}

.battle-training-task strong {
  margin-top: 4px;
  line-height: 1.6;
}

.battle-hero-pool {
  margin: 16px 0;
}

.battle-hero-pool span {
  display: flex;
  gap: 5px;
}

.battle-hero-pool strong {
  color: var(--ink);
}

.battle-match-table td:first-child strong,
.battle-match-table td:first-child small {
  display: block;
}

.battle-match-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.battle-match-table {
  min-width: 720px;
  table-layout: auto;
}

.battle-source-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 34px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.battle-source-card > div {
  display: grid;
  gap: 4px;
  padding-right: 20px;
}

.battle-source-card > div + div {
  padding-right: 0;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.battle-source-card small {
  color: var(--muted);
}

.battle-source-card > ul {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

/* Hero-specific long-form course */
.hero-special-course {
  margin-top: 22px;
  padding-top: 28px;
  background: transparent;
  border-top: 1px solid color-mix(in srgb, var(--section-accent) 42%, var(--line));
  border-bottom: 0;
}

.hero-skill-kit,
.hero-priority-list,
.hero-combo-list,
.hero-swap-chain {
  border-top: 1px solid var(--line);
}

.hero-skill-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.hero-skill-index {
  color: var(--section-accent);
  font: 700 14px/1 var(--mono);
}

.hero-skill-copy h4,
.hero-priority-row h4,
.hero-combo-row h4,
.hero-build-main h4,
.hero-build-variants h4,
.hero-swap-branches h4 {
  margin: 0 0 8px;
}

.hero-skill-copy > p,
.hero-priority-row p,
.hero-combo-row p,
.hero-build-main p,
.hero-build-variants p,
.hero-swap-branches p {
  margin: 0 0 9px;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}

.hero-skill-limits {
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.hero-skill-limits > span,
.hero-build-main > div > span,
.hero-build-checks > span {
  color: var(--section-accent-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-priority-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.hero-priority-row > span,
.hero-swap-chain > div > span {
  color: var(--section-accent);
  font: 700 12px/1.4 var(--mono);
}

.hero-priority-row small {
  display: block;
  color: var(--muted);
}

.hero-combo-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.hero-combo-sequence span {
  position: relative;
  color: var(--ink);
}

.hero-combo-sequence span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -7px;
  width: 5px;
  height: 1px;
  content: "";
  background: var(--section-accent);
}

.hero-exit-band {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  margin-top: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-exit-band > div {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.hero-exit-band svg {
  width: 20px;
  color: var(--section-accent-2);
}

.hero-exit-band h4 {
  margin: 2px 0 0;
}

.hero-build-main {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 20px 28px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-build-main > small,
.hero-build-main > .hero-build-items {
  grid-column: 1 / -1;
}

.hero-build-main > small,
.hero-build-variants small {
  color: var(--muted);
  line-height: 1.55;
}

.hero-build-variants,
.hero-swap-branches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.hero-build-variants > div,
.hero-swap-branches > div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.hero-build-variants > div:first-child,
.hero-swap-branches > div:first-child { padding-left: 0; }
.hero-build-variants > div:last-child,
.hero-swap-branches > div:last-child { padding-right: 0; border-right: 0; }

.hero-build-checks {
  display: grid;
  grid-template-columns: 130px repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-build-checks > span,
.hero-build-checks > p {
  margin: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.hero-build-checks > span { padding-left: 0; }
.hero-build-checks > p:last-child { padding-right: 0; border-right: 0; }

.hero-build-checks b {
  display: block;
  margin-bottom: 5px;
  color: var(--section-accent);
}

.hero-swap-chain > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.hero-swap-chain p {
  margin: 0;
}

.hero-swap-notes {
  margin-top: 18px;
}

@media (max-width: 1000px) {
  .battle-lookup-head,
  .battle-layout,
  .battle-summary {
    grid-template-columns: 1fr;
  }

  .battle-provider-status,
  .battle-player-card {
    padding-left: 0;
    border-left: 0;
    border-right: 0;
  }

  .battle-trend-panel {
    border-top: 1px solid var(--line);
  }

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

  .battle-metric-grid > div:nth-child(4n) { border-right: 1px solid var(--line); }
  .battle-metric-grid > div:nth-child(2n) { border-right: 0; }

  .hero-skill-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .hero-skill-limits {
    grid-column: 2;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero-combo-row,
  .hero-build-main {
    grid-template-columns: 1fr;
  }

  .hero-build-main > small,
  .hero-build-main > .hero-build-items {
    grid-column: auto;
  }

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

  .hero-build-checks > span {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .battle-query-grid,
  .battle-diagnostic-columns,
  .battle-source-card,
  .hero-exit-band,
  .hero-build-variants,
  .hero-swap-branches {
    grid-template-columns: 1fr;
  }

  .battle-actions > .primary-button,
  .battle-actions > .secondary-button,
  .battle-actions > .battle-file-button {
    flex: 1 1 100%;
    justify-content: center;
  }

  .battle-metric-grid {
    grid-template-columns: 1fr;
  }

  .battle-metric-grid > div,
  .battle-metric-grid > div:nth-child(2n),
  .battle-metric-grid > div:nth-child(4n) {
    border-right: 0;
  }

  .battle-match-table th:nth-child(n),
  .battle-match-table td:nth-child(n) {
    display: table-cell;
    width: auto;
  }

  .battle-player-card,
  .battle-trend-panel {
    padding: 20px 0;
  }

  .battle-diagnostic-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .battle-source-card > div,
  .battle-source-card > div + div {
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero-skill-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
  }

  .hero-priority-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .hero-exit-band {
    gap: 12px;
  }

  .hero-build-variants > div,
  .hero-swap-branches > div,
  .hero-build-variants > div:first-child,
  .hero-swap-branches > div:first-child,
  .hero-build-variants > div:last-child,
  .hero-swap-branches > div:last-child {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-build-checks {
    grid-template-columns: 1fr;
  }

  .hero-build-checks > span,
  .hero-build-checks > p,
  .hero-build-checks > p:last-child {
    padding: 13px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Visual system v4: restrained contrast, semantic color, and page-specific surfaces */
:root {
  --bg: #0a1012;
  --surface: #11191c;
  --surface-soft: #172226;
  --surface-raised: #1d2a2f;
  --panel: var(--surface-soft);
  --ink: #edf3f0;
  --muted: #98a7a5;
  --line: #29383d;
  --line-strong: #40535a;
  --action: #d5aa70;
  --info: #7fb5c6;
  --success: #78c09d;
  --success-soft: rgba(120, 192, 157, 0.13);
  --warning: #d3b26f;
  --danger: #d9827e;
  --danger-soft: rgba(217, 130, 126, 0.13);
  --focus: #d9bd78;
  --red: var(--danger);
  --red-soft: var(--danger-soft);
  --blue: var(--info);
  --blue-soft: rgba(127, 181, 198, 0.13);
  --green: var(--success);
  --green-soft: var(--success-soft);
  --amber: var(--warning);
  --amber-soft: rgba(211, 178, 111, 0.13);
  --purple: #aa9bc5;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

body[data-view="dashboard"] {
  --section-accent: #d5ab6f;
  --section-accent-2: #80c0b0;
  --section-soft: rgba(213, 171, 111, 0.09);
  --section-soft-2: rgba(128, 192, 176, 0.08);
  --section-grid: rgba(128, 192, 176, 0.028);
}

body[data-view="curriculum"] {
  --section-accent: #d98f86;
  --section-accent-2: #80b5c7;
  --section-soft: rgba(217, 143, 134, 0.1);
  --section-soft-2: rgba(128, 181, 199, 0.08);
  --section-grid: rgba(128, 181, 199, 0.026);
}

body[data-view="heroes"] {
  --section-accent: #b7c979;
  --section-accent-2: #a99bc7;
  --section-soft: rgba(183, 201, 121, 0.09);
  --section-soft-2: rgba(169, 155, 199, 0.08);
  --section-grid: rgba(183, 201, 121, 0.024);
}

body[data-view="matchups"] {
  --section-accent: #d58ea4;
  --section-accent-2: #71c1bb;
  --section-soft: rgba(213, 142, 164, 0.1);
  --section-soft-2: rgba(113, 193, 187, 0.08);
  --section-grid: rgba(213, 142, 164, 0.024);
}

body[data-view="battleDiagnosis"] {
  --section-accent: #83bea8;
  --section-accent-2: #d79a7f;
  --section-soft: rgba(131, 190, 168, 0.1);
  --section-soft-2: rgba(215, 154, 127, 0.08);
  --section-grid: rgba(131, 190, 168, 0.024);
}

body[data-view="training"] {
  --section-accent: #d5b36e;
  --section-accent-2: #9f93c3;
  --section-soft: rgba(213, 179, 110, 0.1);
  --section-soft-2: rgba(159, 147, 195, 0.08);
  --section-grid: rgba(213, 179, 110, 0.024);
}

body[data-view="strategyGrid"] {
  --section-accent: #73bdb2;
  --section-accent-2: #d5af6c;
  --section-soft: rgba(115, 189, 178, 0.1);
  --section-soft-2: rgba(213, 175, 108, 0.08);
  --section-grid: rgba(115, 189, 178, 0.024);
}

body[data-view="numbers"] {
  --section-accent: #d3946e;
  --section-accent-2: #7eaabd;
  --section-soft: rgba(211, 148, 110, 0.1);
  --section-soft-2: rgba(126, 170, 189, 0.08);
  --section-grid: rgba(211, 148, 110, 0.024);
}

body[data-view="observer"] {
  --section-accent: #aa9bc4;
  --section-accent-2: #d09a7e;
  --section-soft: rgba(170, 155, 196, 0.1);
  --section-soft-2: rgba(208, 154, 126, 0.08);
  --section-grid: rgba(170, 155, 196, 0.024);
}

body[data-view="versions"] {
  --section-accent: #88b59d;
  --section-accent-2: #c9aa68;
  --section-soft: rgba(136, 181, 157, 0.1);
  --section-soft-2: rgba(201, 170, 104, 0.08);
  --section-grid: rgba(136, 181, 157, 0.024);
}

body[data-view] {
  --red: var(--danger);
  --red-soft: var(--danger-soft);
  --blue: var(--info);
  --blue-soft: rgba(127, 181, 198, 0.13);
  --green: var(--success);
  --green-soft: var(--success-soft);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--section-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--section-grid) 1px, transparent 1px),
    linear-gradient(122deg, var(--section-soft), transparent 30%, var(--section-soft-2));
  background-size: 48px 48px, 48px 48px, auto;
}

body[data-view] .sidebar {
  height: 76px;
  padding: 12px 24px;
  background: rgba(8, 14, 16, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
}

body[data-view] .brand-mark {
  color: #111718;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
}

body[data-view] .main-nav {
  gap: 3px;
  padding: 5px;
  background: rgba(14, 22, 25, 0.9);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body[data-view] .nav-item {
  min-height: 36px;
  padding: 0 12px;
  color: #9eacaa;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

body[data-view] .nav-item:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

body[data-view] .nav-item.is-active {
  color: #13191a;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
  box-shadow: 0 5px 18px color-mix(in srgb, var(--section-accent) 16%, transparent);
}

body[data-view] .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

body[data-view] .topbar {
  top: 76px;
  min-height: 76px;
  padding: 15px 30px 14px 34px;
  background:
    linear-gradient(100deg, var(--section-soft), transparent 43%, var(--section-soft-2)),
    rgba(10, 16, 18, 0.94);
  border-bottom-color: var(--line);
}

body[data-view] .topbar::before {
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 20px;
  width: 3px;
  content: "";
  background: linear-gradient(180deg, var(--section-accent), var(--section-accent-2));
}

body[data-view] .topbar h1 {
  font-size: 19px;
  font-weight: 700;
}

body[data-view] #appMain {
  width: min(1580px, 100%);
  padding: 26px 30px 84px;
}

body[data-view] .primary-button {
  color: #13191a;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
  border-color: color-mix(in srgb, var(--section-accent) 68%, var(--section-accent-2));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--section-accent) 12%, transparent);
}

body[data-view] .primary-button:hover {
  color: #13191a;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

body[data-view] .secondary-button,
body[data-view] .icon-button {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

body[data-view] .secondary-button:hover,
body[data-view] .icon-button:hover {
  color: var(--section-accent);
  background: var(--surface-soft);
  border-color: color-mix(in srgb, var(--section-accent) 58%, var(--line));
}

body[data-view] .text-button,
body[data-view] .source-link,
body[data-view] .evidence-table a {
  color: var(--section-accent);
}

body[data-view] .toolbar,
body[data-view] .module-section,
body[data-view] .quiz-panel,
body[data-view] .version-summary,
body[data-view] .schema-item,
body[data-view] .hero-modal,
body[data-view] .specialist-card,
body[data-view] .tool-panel,
body[data-view] .side-tool,
body[data-view] .result-placeholder,
body[data-view] .plan-table-wrap,
body[data-view] .evidence-table-wrap,
body[data-view] .creator-video-list,
body[data-view] .review-mark,
body[data-view] .hero-card,
body[data-view] .matchup-selected,
body[data-view] .matchup-table-wrap,
body[data-view] .battle-source-options {
  color: var(--ink);
  background-color: var(--surface);
  background-image: none;
  border-color: var(--line);
}

body[data-view] .toolbar,
body[data-view] .tool-panel,
body[data-view] .side-tool,
body[data-view] .quiz-panel,
body[data-view] .matchup-selected,
body[data-view] .matchup-table-wrap,
body[data-view] .version-summary {
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
}

body[data-view] input,
body[data-view] select,
body[data-view] textarea,
body[data-view] .quiz-option {
  color: var(--ink);
  background: #0c1417;
  border-color: var(--line-strong);
}

body[data-view] input::placeholder,
body[data-view] textarea::placeholder {
  color: #6f807f;
}

body[data-view] .segmented-control {
  background: #0c1417;
  border-color: var(--line);
}

body[data-view] .filter-chip.is-active {
  color: #13191a;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
}

body[data-view] .section-heading {
  position: relative;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

body[data-view] .section-heading::after {
  width: min(220px, 42%);
  height: 2px;
  background: linear-gradient(90deg, var(--section-accent), var(--section-accent-2), transparent);
}

body[data-view] .review-status.verified {
  color: #0d1713;
  background: var(--success);
}

body[data-view] .review-status.pending {
  color: #18150d;
  background: var(--warning);
}

body[data-view] .review-status.research {
  color: var(--section-accent-2);
  background: color-mix(in srgb, var(--section-accent-2) 12%, transparent);
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  padding: 0;
  background: rgba(3, 7, 8, 0.72);
  border: 0;
  backdrop-filter: blur(4px);
}

.mobile-nav-backdrop[hidden] {
  display: none;
}

/* Dashboard: preserve the strong first screen, but reveal the art. */
body[data-view="dashboard"] #appMain {
  padding-top: 0;
}

.academy-hero {
  min-height: 520px;
  background-color: #0b1214;
  border-bottom-color: color-mix(in srgb, var(--section-accent) 58%, transparent);
}

.academy-hero::before {
  background:
    linear-gradient(90deg, rgba(6, 11, 13, 0.98) 0%, rgba(6, 11, 13, 0.88) 29%, rgba(6, 11, 13, 0.36) 64%, rgba(6, 11, 13, 0.1) 100%),
    linear-gradient(150deg, var(--section-soft), transparent 54%, var(--section-soft-2));
}

.academy-hero h2 span,
.academy-hero-status > strong,
.terminal-stats strong,
.command-value {
  color: var(--section-accent);
}

.command-tile {
  background: var(--surface);
  border-color: var(--line);
}

.command-tile::after {
  background: linear-gradient(180deg, rgba(8, 14, 16, 0.08), rgba(8, 14, 16, 0.78) 66%, rgba(8, 14, 16, 0.92));
}

.command-tile--image:hover::after {
  background: linear-gradient(180deg, rgba(8, 14, 16, 0.02), rgba(8, 14, 16, 0.62) 66%, rgba(8, 14, 16, 0.82));
}

.command-tile:hover {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--section-accent);
}

.command-tile:hover small {
  color: var(--muted);
  opacity: 1;
}

/* Curriculum: compact module boards instead of six long data tables. */
.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.module-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.module-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 104px;
  gap: 14px;
  align-items: start;
  padding: 20px;
  background:
    linear-gradient(125deg, var(--section-soft), transparent 58%, var(--section-soft-2)),
    var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.module-index {
  width: 42px;
  height: 42px;
  color: #151a1b;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
  border-radius: 6px;
}

.module-head h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.module-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.module-progress {
  display: grid;
  gap: 4px;
  text-align: right;
}

.module-progress strong {
  color: var(--section-accent);
  font-size: 23px;
}

.module-progress > span {
  color: var(--muted);
  font-size: 10px;
}

.module-progress [role="progressbar"] {
  height: 3px;
  margin-top: 4px;
  overflow: hidden;
  background: var(--line);
}

.module-progress [role="progressbar"] span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--section-accent), var(--section-accent-2));
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 18px 18px;
}

.lesson-row {
  min-width: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-row:nth-child(odd) {
  padding-right: 16px;
}

.lesson-row:nth-child(even) {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.lesson-row.is-complete {
  background: linear-gradient(90deg, color-mix(in srgb, var(--success) 7%, transparent), transparent 70%);
}

.lesson-row-open {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  gap: 10px;
  width: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.lesson-row-open:hover strong {
  color: var(--section-accent);
}

.lesson-row-open > svg {
  width: 16px;
  color: var(--section-accent-2);
}

.lesson-sequence {
  color: var(--section-accent);
  font: 700 11px/1.5 var(--mono);
}

.lesson-row-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lesson-row-copy strong,
.lesson-row-copy small {
  overflow-wrap: anywhere;
}

.lesson-row-copy small {
  color: var(--muted);
  line-height: 1.5;
}

.lesson-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 0 40px;
}

.lesson-type {
  color: var(--section-accent-2);
  background: color-mix(in srgb, var(--section-accent-2) 9%, transparent);
  border-color: color-mix(in srgb, var(--section-accent-2) 28%, var(--line));
}

.lesson-check span {
  color: var(--muted);
}

/* Heroes: stable color identity, larger art, and readable cards. */
.hero-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hero-card {
  --card-accent: var(--section-accent);
  --card-accent-2: var(--section-accent-2);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 2px solid var(--card-accent);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.hero-card[data-tone="mint"] { --card-accent: #7fc1aa; --card-accent-2: #d0ad74; }
.hero-card[data-tone="coral"] { --card-accent: #d88f83; --card-accent-2: #78b8c3; }
.hero-card[data-tone="iris"] { --card-accent: #a99ac6; --card-accent-2: #c5b06f; }
.hero-card[data-tone="gold"] { --card-accent: #c9ae70; --card-accent-2: #7cb4a8; }
.hero-card[data-tone="cyan"] { --card-accent: #77b7c5; --card-accent-2: #cc8fa2; }

.hero-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 55%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.hero-card-media {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 22%, #172226), color-mix(in srgb, var(--card-accent-2) 18%, #11191c));
}

.hero-detail-image {
  position: relative;
}

.hero-card-media::before,
.hero-detail-image::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  content: attr(data-hero-name);
  color: color-mix(in srgb, var(--ink) 46%, transparent);
  font-size: 32px;
  font-weight: 800;
}

.hero-card-media img,
.hero-detail-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-media img.is-missing-art,
.hero-detail-image img.is-missing-art {
  opacity: 0;
}

.hero-card-body {
  padding: 17px 18px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card-accent) 4%, transparent), transparent 34%);
}

.hero-card-title h3 {
  font-size: 18px;
}

.curve-label {
  color: var(--card-accent);
}

.hero-card .strength-line {
  stroke: var(--card-accent);
}

.hero-card .strength-area {
  fill: color-mix(in srgb, var(--card-accent) 16%, transparent);
}

.lane-badge.standard {
  color: #101915;
  background: var(--success);
}

.lane-badge.situational {
  color: #19150d;
  background: var(--warning);
}

/* Matchups: make the comparison axis and result column scannable. */
.matchup-head {
  padding: 24px;
  background:
    linear-gradient(120deg, var(--section-soft), transparent 62%, var(--section-soft-2)),
    var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--section-accent);
  border-radius: 8px;
}

.matchup-controls {
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.matchup-selected {
  border-radius: 8px;
  border-top: 2px solid var(--section-accent-2);
}

.matchup-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.matchup-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: #0d1619;
}

.matchup-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

.matchup-table tbody tr:hover {
  background: color-mix(in srgb, var(--section-accent-2) 6%, transparent);
}

.matchup-target img {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--section-accent-2) 42%, var(--line));
}

.relation-value.positive { color: var(--success); }
.relation-value.negative { color: var(--danger); }

/* Training: a focused decision workbench rather than an empty bordered canvas. */
.training-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 20px;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.quiz-panel {
  min-height: 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--section-accent);
  border-radius: 8px;
}

.quiz-progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.quiz-progress-head strong {
  color: var(--section-accent);
}

.quiz-progress-track {
  height: 4px;
  margin-bottom: 24px;
  overflow: hidden;
  background: var(--line);
}

.quiz-progress-track > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--section-accent), var(--section-accent-2));
}

.quiz-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  min-height: 56px;
  align-items: center;
  padding: 13px 16px;
  border-radius: 6px;
}

.quiz-option strong {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #171a18;
  background: var(--section-accent);
  border-radius: 50%;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--section-accent);
  background: color-mix(in srgb, var(--section-accent) 7%, #0c1417);
}

.training-aside {
  position: sticky;
  top: 172px;
  align-self: start;
  padding: 24px;
  background:
    linear-gradient(145deg, var(--section-soft-2), transparent 54%),
    var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--section-accent-2);
  border-radius: 8px;
}

.quiz-review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.quiz-review-links > span {
  color: var(--muted);
  font-size: 11px;
}

/* Number lab: separate inputs, live result, and evidence without white blocks. */
.lab-layout,
.observer-layout {
  gap: 24px;
  align-items: start;
}

.tool-panel,
.side-tool {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-panel {
  padding: 26px;
  border-top: 3px solid var(--section-accent);
}

.side-tool {
  padding: 22px;
  border-top: 3px solid var(--section-accent-2);
}

.special-model {
  background: color-mix(in srgb, var(--section-accent-2) 5%, var(--surface-soft));
  border-color: var(--line);
  border-radius: 7px;
}

.rune-row {
  border-bottom-color: var(--line);
}

.rune-row input {
  background: var(--surface-raised);
}

.rune-summary {
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rune-summary > div {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.rune-summary strong {
  color: var(--section-accent);
}

.result-placeholder {
  min-height: 220px;
  background:
    linear-gradient(135deg, var(--section-soft), transparent 62%),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.012) 18px 19px),
    var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.evidence-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Observer: purposeful empty state and balanced capture controls. */
.observer-source-panel {
  border-top-color: var(--section-accent);
}

.video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--section-accent) 7%, transparent), color-mix(in srgb, var(--section-accent-2) 6%, transparent)),
    repeating-linear-gradient(135deg, #0b1215 0 18px, #0d1518 18px 36px);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.video-stage-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 9px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.video-stage-placeholder svg {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  color: var(--section-accent);
}

.video-stage-placeholder strong {
  color: var(--ink);
  font-size: 16px;
}

.video-stage.has-source .video-stage-placeholder {
  display: none;
}

.capture-routing {
  overflow: hidden;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.capture-routing span {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.observer-aside {
  position: sticky;
  top: 172px;
}

.package-tool textarea {
  background: #0c1417;
}

/* Versions: timeline rhythm and a clearer schema reference. */
.version-summary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.version-summary > div {
  min-height: 116px;
  padding: 22px;
  background: linear-gradient(145deg, var(--section-soft), transparent 74%);
  border-top: 3px solid var(--section-accent);
}

.version-summary > div:nth-child(2) {
  background: linear-gradient(145deg, var(--section-soft-2), transparent 74%);
  border-top-color: var(--section-accent-2);
}

.version-summary > div:nth-child(3) {
  border-top-color: var(--warning);
}

.version-timeline {
  margin-top: 28px;
  border-top: 0;
  border-left: 1px solid var(--line-strong);
}

.version-entry {
  position: relative;
  margin-left: 18px;
  padding: 18px 0 18px 20px;
}

.version-entry::before {
  position: absolute;
  top: 24px;
  left: -23px;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--section-accent);
  border: 3px solid var(--bg);
  border-radius: 50%;
}

.schema-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.schema-item {
  background: var(--surface);
}

.schema-item:nth-child(4n + 2),
.schema-item:nth-child(4n + 3) {
  background: color-mix(in srgb, var(--section-accent-2) 4%, var(--surface));
}

.schema-item code {
  color: var(--section-accent-2);
}

.creator-video-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.creator-video-row:hover {
  background: color-mix(in srgb, var(--section-accent) 5%, var(--surface));
}

/* Strategy grid: real 3D first, controls outside the canvas, accessible choices. */
.strategy-grid-surface {
  height: auto;
  overflow: hidden;
  background: #0b1214;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.strategy-grid-stage {
  height: clamp(520px, 62vh, 700px);
  min-height: 0;
  background:
    linear-gradient(rgba(115, 189, 178, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 189, 178, 0.022) 1px, transparent 1px),
    #0b1214;
  background-size: 48px 48px;
}

.strategy-grid-toolbar {
  position: static;
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  backdrop-filter: none;
  pointer-events: auto;
}

.strategy-grid-toolbar > * {
  pointer-events: auto;
}

.strategy-grid-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.strategy-mode-control .filter-chip {
  min-height: 38px;
}

.strategy-route-choices {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
}

.strategy-route-choices > div:first-child {
  display: grid;
  gap: 3px;
}

.strategy-route-choices span {
  color: var(--muted);
  font-size: 10px;
}

.strategy-route-choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.strategy-route-choice {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--ink);
  background: #0c1417;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
}

.strategy-route-choice:hover,
.strategy-route-choice:focus-visible {
  color: #121818;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
  border-color: transparent;
}

.strategy-route-choice svg {
  width: 16px;
}

/* Modal polish and semantic focus. */
.modal-backdrop {
  background: rgba(3, 7, 8, 0.76);
  backdrop-filter: blur(6px);
}

.hero-modal {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.modal-close {
  background: rgba(12, 20, 23, 0.9);
  backdrop-filter: blur(8px);
}

.lesson-deep-dive {
  background:
    linear-gradient(135deg, var(--section-soft), transparent 46%, var(--section-soft-2)),
    var(--surface-soft);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 58%, transparent);
  outline-offset: 2px;
}

@media (max-width: 1280px) {
  .module-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1080px) {
  body.menu-open {
    overflow: hidden;
  }

  body[data-view] .sidebar {
    height: 100dvh;
    padding: 22px 18px 18px;
    background: rgba(10, 16, 18, 0.98);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.42);
  }

  body[data-view] .main-nav {
    display: grid;
    margin-top: 22px;
    padding: 4px;
    border-radius: 8px;
  }

  body[data-view] .nav-item {
    width: 100%;
    justify-content: flex-start;
    border-radius: 6px;
  }

  body[data-view] .nav-item svg {
    display: block;
  }

  body[data-view] .topbar {
    top: 0;
  }

  .training-layout {
    grid-template-columns: 1fr;
  }

  .training-aside,
  .observer-aside {
    position: static;
  }

  .strategy-grid-stage {
    height: 560px;
    min-height: 0;
  }
}

@media (max-width: 680px) {
  body[data-view="dashboard"] .topbar {
    display: flex;
  }

  body[data-view] .topbar {
    min-height: 66px;
    padding: 10px 14px 10px 62px;
  }

  body[data-view] .topbar::before {
    left: 52px;
  }

  .topbar > div:not(.topbar-actions) {
    display: block;
    min-width: 0;
  }

  .topbar h1 {
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar p,
  .topbar-actions {
    display: none;
  }

  .mobile-menu {
    position: absolute;
    left: 12px;
  }

  body[data-view] #appMain {
    padding: 16px 14px 64px;
  }

  body[data-view="dashboard"] #appMain {
    padding-top: 0;
  }

  .academy-hero {
    min-height: 650px;
    padding: 42px 18px 26px;
    background-position: 62% center;
    background-size: cover;
  }

  .academy-hero::before {
    background:
      linear-gradient(180deg, rgba(7, 12, 14, 0.56) 0%, rgba(7, 12, 14, 0.76) 50%, rgba(7, 12, 14, 0.96) 100%),
      linear-gradient(145deg, var(--section-soft), transparent 58%, var(--section-soft-2));
  }

  .academy-hero h2 {
    font-size: 42px;
  }

  .module-head {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 17px;
  }

  .module-progress {
    grid-column: 1 / -1;
    grid-template-columns: auto auto minmax(80px, 1fr);
    align-items: center;
    text-align: left;
  }

  .module-progress [role="progressbar"] {
    margin: 0;
  }

  .lesson-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
  }

  .lesson-row:nth-child(odd),
  .lesson-row:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .hero-card-media {
    min-height: 210px;
  }

  .hero-card-body {
    padding: 14px;
  }

  .hero-card-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-core {
    -webkit-line-clamp: 3;
  }

  .training-layout,
  .quiz-panel {
    min-height: 0;
  }

  .quiz-panel,
  .training-aside,
  .tool-panel,
  .side-tool {
    padding: 20px;
  }

  .quiz-panel h2 {
    font-size: 22px;
  }

  .strategy-grid-stage {
    height: 500px;
    min-height: 0;
  }

  .strategy-grid-toolbar,
  .strategy-route-choices {
    align-items: stretch;
    flex-direction: column;
  }

  .strategy-grid-actions {
    justify-content: space-between;
  }

  .strategy-route-choice-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strategy-route-choice {
    justify-content: center;
  }

  .matchup-head,
  .matchup-controls {
    padding: 18px;
  }

  .video-stage {
    min-height: 260px;
    aspect-ratio: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Visual QA v4.1: make the contrast system visible in the content layer. */
body[data-view="curriculum"] .course-track-band {
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--section-accent) 18%, var(--surface)) 0%, transparent 48%),
    linear-gradient(290deg, color-mix(in srgb, var(--section-accent-2) 14%, var(--surface)) 0%, transparent 58%);
  border-top: 2px solid color-mix(in srgb, var(--section-accent) 72%, var(--line));
}

body[data-view="curriculum"] .module-section:nth-child(odd) {
  background: linear-gradient(135deg, color-mix(in srgb, var(--section-accent) 5%, transparent), transparent 48%), var(--surface);
}

body[data-view="curriculum"] .module-section:nth-child(even) {
  background: linear-gradient(135deg, color-mix(in srgb, var(--section-accent-2) 5%, transparent), transparent 48%), var(--surface);
}

body[data-view="heroes"] .toolbar {
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--section-accent) 13%, var(--surface)), transparent 48%),
    linear-gradient(280deg, color-mix(in srgb, var(--section-accent-2) 10%, var(--surface)), var(--surface));
  border-top: 2px solid color-mix(in srgb, var(--section-accent) 68%, var(--line));
}

body[data-view="heroes"] .hero-card {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--card-accent) 7%, transparent), transparent 44%),
    var(--surface);
}

body[data-view="matchups"] .matchup-controls,
body[data-view="battleDiagnosis"] .battle-query-panel,
body[data-view="training"] .quiz-panel,
body[data-view="numbers"] .tool-panel,
body[data-view="observer"] .observer-source-panel,
body[data-view="versions"] .version-summary {
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--section-accent) 10%, transparent), transparent 48%),
    linear-gradient(300deg, color-mix(in srgb, var(--section-accent-2) 8%, transparent), transparent 60%),
    var(--surface);
}

body[data-view="matchups"] .matchup-table-wrap,
body[data-view="battleDiagnosis"] .battle-source-options,
body[data-view="training"] .training-aside,
body[data-view="numbers"] .side-tool,
body[data-view="observer"] .package-tool,
body[data-view="versions"] .creator-video-list {
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--section-accent-2) 6%, transparent), transparent 50%),
    var(--surface);
}

body[data-view="strategyGrid"] .strategy-hero-strip {
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--section-accent) 14%, var(--surface)), transparent 52%),
    linear-gradient(290deg, color-mix(in srgb, var(--section-accent-2) 10%, var(--surface)), var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--section-accent) 38%, var(--line));
}

body[data-view] .section-heading h2,
body[data-view] .tool-panel-head h2,
body[data-view] .matchup-head h1,
body[data-view] .battle-lookup-head h2 {
  text-shadow: 0 1px 18px color-mix(in srgb, var(--section-accent) 13%, transparent);
}

body[data-view] .eyebrow,
body[data-view] .curve-label,
body[data-view] .lesson-type,
body[data-view] .skin-caption {
  color: color-mix(in srgb, var(--section-accent) 82%, var(--ink));
}

body[data-view] .muted,
body[data-view] .hero-card-body small,
body[data-view] .platform-research-row small,
body[data-view] .creator-video-row small,
body[data-view] .course-source-row small {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
}

/* Hero art: use the portrait on narrow cards and make a missing asset intentional. */
body[data-view] .hero-card-media picture {
  position: absolute;
  inset: 0;
  z-index: 1;
}

body[data-view] .hero-card-media picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

body[data-view] .hero-card-media::after,
body[data-view] .hero-detail-image::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    radial-gradient(circle at 76% 18%, color-mix(in srgb, var(--card-accent, var(--section-accent)) 28%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--card-accent, var(--section-accent)) 22%, transparent), transparent 55%, color-mix(in srgb, var(--card-accent-2, var(--section-accent-2)) 16%, transparent));
  pointer-events: none;
}

body[data-view] .hero-card-media img.is-missing-art,
body[data-view] .hero-detail-image img.is-missing-art {
  opacity: 0;
}

body[data-view] .hero-card-media::before,
body[data-view] .hero-detail-image::before {
  z-index: 0;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  letter-spacing: 0.02em;
  text-shadow: 0 4px 24px color-mix(in srgb, var(--card-accent, var(--section-accent)) 36%, transparent);
}

/* Native details keeps the long curriculum scannable on a tablet or phone. */
details.module-section > summary {
  list-style: none;
  cursor: pointer;
}

details.module-section > summary::-webkit-details-marker {
  display: none;
}

details.module-section:not([open]) .lesson-grid {
  display: none;
}

.module-head {
  position: relative;
  padding-right: 148px;
}

.module-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: var(--section-accent-2);
  border: 1px solid color-mix(in srgb, var(--section-accent-2) 34%, var(--line));
  border-radius: 5px;
  font-size: 11px;
}

.module-toggle svg {
  width: 14px;
  transition: transform 160ms ease;
}

details.module-section[open] .module-toggle svg {
  transform: rotate(180deg);
}

/* Touch targets stay usable when the controls wrap. */
body[data-view] .strategy-mode-control .filter-chip,
body[data-view] .strategy-grid-actions .icon-button,
body[data-view] .strategy-route-choice,
body[data-view] .lesson-row-open,
body[data-view] .lesson-check {
  min-height: 44px;
}

body[data-view="numbers"] .tool-actions {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  justify-content: flex-end;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 7px;
  backdrop-filter: blur(10px);
}

.training-domain-map {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.training-domain-map-head,
.training-domain-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 30px;
  gap: 8px;
  align-items: center;
}

.training-domain-map-head {
  color: var(--muted);
  font-size: 11px;
}

.training-domain-map-head span:last-child,
.training-domain-row small {
  color: var(--muted);
  text-align: right;
}

.training-domain-row {
  color: var(--ink);
  font-size: 12px;
}

.training-domain-row > span:nth-child(2) {
  height: 5px;
  overflow: hidden;
  background: var(--line);
  border-radius: 999px;
}

.training-domain-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--section-accent), var(--section-accent-2));
  border-radius: inherit;
}

@media (max-width: 1080px) {
  body[data-view="observer"] .observer-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-view="observer"] .observer-primary,
  body[data-view="observer"] .observer-layout > .lab-aside {
    display: contents;
  }

  body[data-view="observer"] .observer-source-panel { order: 1; }
  body[data-view="observer"] .observer-layout > .lab-aside > .side-tool:first-child { order: 2; }
  body[data-view="observer"] .mark-composer { order: 3; }
  body[data-view="observer"] .observer-layout > .lab-aside > .package-tool { order: 4; }
}

@media (max-width: 680px) {
  .course-track-band {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .module-head {
    grid-template-columns: 40px minmax(0, 1fr);
    padding-right: 17px;
  }

  .module-toggle {
    top: 14px;
    right: 12px;
    min-height: 40px;
    padding: 0 8px;
  }

  .module-toggle span {
    display: none;
  }

  body[data-view="heroes"] .hero-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  body[data-view="heroes"] .hero-card-media picture img {
    object-position: center;
  }

  body[data-view="strategyGrid"] .strategy-grid-surface {
    width: calc(100% + 28px);
    margin-left: -14px;
  }

  body[data-view="numbers"] .tool-actions {
    position: static;
    margin-top: 12px;
    background: transparent;
    border: 0;
    backdrop-filter: none;
  }
}

/* Strength curves: precise minute inspection and a readable mobile card plot. */
.strength-chart-frame {
  position: relative;
  min-width: 0;
}

.strength-curve.is-interactive {
  max-width: none;
}

.strength-curve.is-interactive svg {
  height: 138px;
  cursor: ew-resize;
  touch-action: pan-y;
}

.strength-hit-area {
  fill: transparent;
  pointer-events: all;
}

.strength-selection line {
  stroke: color-mix(in srgb, var(--section-accent-2) 78%, var(--ink));
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.strength-selection circle {
  fill: var(--section-accent-2);
  stroke: var(--surface);
  stroke-width: 3;
  filter: drop-shadow(0 2px 5px color-mix(in srgb, var(--section-accent-2) 42%, transparent));
  vector-effect: non-scaling-stroke;
}

.strength-curve-readout {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr);
  gap: 10px 20px;
  align-items: center;
  margin-top: 4px;
  padding: 12px 14px;
  color: var(--ink);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--section-accent) 9%, transparent), transparent 48%),
    color-mix(in srgb, var(--surface-soft) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--section-accent) 24%, var(--line));
  border-radius: 7px;
}

.strength-readout-minute,
.strength-readout-rate {
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.strength-readout-minute strong,
.strength-readout-rate strong {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.strength-readout-minute small,
.strength-readout-rate small,
.strength-readout-detail {
  color: var(--muted);
  font-size: 11px;
}

.strength-readout-rate {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.strength-readout-detail {
  line-height: 1.55;
}

.strength-curve-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 16px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.strength-curve-control strong {
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.strength-scrubber {
  grid-column: 1 / -1;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.strength-scrubber::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--section-accent), var(--section-accent-2));
  border-radius: 999px;
}

.strength-scrubber::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  appearance: none;
  background: var(--surface);
  border: 3px solid var(--section-accent-2);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.strength-scrubber::-moz-range-track {
  height: 4px;
  background: linear-gradient(90deg, var(--section-accent), var(--section-accent-2));
  border: 0;
  border-radius: 999px;
}

.strength-scrubber::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--surface);
  border: 3px solid var(--section-accent-2);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.strength-detail-section .strength-curve {
  max-width: none;
}

.hero-strength-mobile-summary {
  display: none;
}

@media (max-width: 680px) {
  body[data-view="heroes"] .hero-card {
    display: grid;
    grid-template-areas:
      "media title"
      "media core"
      "media tags"
      "curve curve";
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 12px;
  }

  body[data-view="heroes"] .hero-card-media {
    grid-area: media;
    width: 100%;
    height: 164px;
    min-height: 164px;
    aspect-ratio: auto;
    border-radius: 6px;
  }

  body[data-view="heroes"] .hero-card-body {
    display: contents;
  }

  body[data-view="heroes"] .hero-card-title {
    grid-area: title;
    align-self: end;
    flex-direction: column;
    align-items: flex-start;
  }

  body[data-view="heroes"] .hero-core {
    grid-area: core;
    align-self: start;
    margin: 0;
    -webkit-line-clamp: 3;
  }

  body[data-view="heroes"] .tag-row {
    grid-area: tags;
    align-self: start;
    margin-top: 0;
  }

  body[data-view="heroes"] .hero-card .strength-curve.is-compact {
    display: none;
  }

  body[data-view="heroes"] .hero-strength-mobile-summary {
    display: grid;
    grid-area: curve;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    width: 100%;
    margin-top: 2px;
    padding-top: 9px;
    text-align: left;
    border-top: 1px solid color-mix(in srgb, var(--card-accent) 26%, var(--line));
  }

  body[data-view="heroes"] .hero-strength-mobile-summary span,
  body[data-view="heroes"] .hero-strength-mobile-summary small {
    color: var(--muted);
    font-size: 10px;
  }

  body[data-view="heroes"] .hero-strength-mobile-summary strong {
    color: var(--card-accent);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }

  body[data-view="heroes"] .hero-strength-mobile-summary small {
    grid-column: 1 / -1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .strength-curve.is-interactive svg {
    height: 124px;
  }

  .strength-curve-readout {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .strength-readout-rate {
    padding-left: 12px;
  }

  .strength-readout-detail {
    grid-column: 1 / -1;
  }
}

@media (max-width: 380px) {
  body[data-view="heroes"] .hero-card {
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 8px 10px;
  }

  body[data-view="heroes"] .hero-card-media {
    height: 154px;
    min-height: 154px;
  }
}

/* Plugin QA: resilient matchup avatars and a compact, scannable version center. */
.matchup-target-avatar {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  overflow: hidden;
  place-items: center;
  color: var(--ink);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--section-accent) 20%, transparent), color-mix(in srgb, var(--section-accent-2) 14%, var(--surface-soft))),
    var(--surface-soft);
  border: 1px solid color-mix(in srgb, var(--section-accent-2) 42%, var(--line));
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.matchup-target-avatar::after {
  content: attr(data-avatar-label);
}

.matchup-target-avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: inherit;
}

.matchup-target-avatar img.is-missing-art,
.matchup-target-avatar.is-missing-image img {
  display: none;
}

.matchup-target strong {
  overflow-wrap: normal;
  word-break: keep-all;
}

.matchup-table .review-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
}

.creator-research-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
}

.creator-research-heading .link-button {
  min-width: max-content;
  white-space: nowrap;
}

.creator-video-row > span:first-child {
  min-width: 0;
}

.creator-video-more summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  color: var(--ink);
  background: color-mix(in srgb, var(--section-accent-2) 5%, var(--surface));
  cursor: pointer;
  list-style: none;
}

.creator-video-more summary::-webkit-details-marker {
  display: none;
}

.creator-video-more summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.creator-video-more summary strong {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.creator-video-more summary svg {
  transition: transform 160ms ease;
}

.creator-video-more[open] summary svg {
  transform: rotate(180deg);
}

.creator-video-more-list {
  border-top: 1px solid var(--line);
}

.creator-video-more-list .creator-video-row:last-child {
  border-bottom: 0;
}

@media (max-width: 680px) {
  .matchup-table th:nth-child(1),
  .matchup-table td:nth-child(1) {
    width: 34%;
  }

  .matchup-table th:nth-child(3),
  .matchup-table td:nth-child(3) {
    width: 23%;
  }

  .matchup-table th:nth-child(4),
  .matchup-table td:nth-child(4) {
    width: 19%;
  }

  .matchup-table th:nth-child(5),
  .matchup-table td:nth-child(5) {
    width: 24%;
  }

  .matchup-target-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .matchup-selected-hero {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .matchup-selected-hero .strength-curve {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  body[data-view="versions"] .schema-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-view="versions"] .schema-item {
    min-height: 0;
    padding: 12px;
  }

  .creator-research-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .creator-research-heading .link-button {
    justify-self: start;
  }

  .creator-video-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
  }
}

@media (max-width: 350px) {
  body[data-view="versions"] .schema-table {
    grid-template-columns: 1fr;
  }
}

/* Battle lookup: keep unavailable direct lookup quiet and let each panel size to its content. */
.battle-layout {
  align-items: start;
}

.battle-query-panel {
  width: 100%;
  align-self: start;
}

.battle-actions button:disabled {
  cursor: not-allowed;
  filter: none;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

body[data-view] .battle-actions button:disabled:hover {
  color: var(--muted);
  background: var(--surface);
  border-color: var(--line-strong);
  filter: none;
  transform: none;
}

.evidence-cell-content {
  min-width: 0;
}

/* Number evidence becomes labeled record cards instead of a clipped table on phones. */
@media (max-width: 680px) {
  body[data-view="numbers"] .evidence-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  body[data-view="numbers"] .evidence-table,
  body[data-view="numbers"] .evidence-table tbody {
    display: block;
    width: 100%;
  }

  body[data-view="numbers"] .evidence-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body[data-view="numbers"] .evidence-table tbody {
    display: grid;
    gap: 12px;
  }

  body[data-view="numbers"] .evidence-table tr {
    display: grid;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 2px solid color-mix(in srgb, var(--section-accent) 72%, var(--line));
    border-radius: 7px;
  }

  body[data-view="numbers"] .evidence-table td,
  body[data-view="numbers"] .evidence-table td:first-child,
  body[data-view="numbers"] .evidence-table td:nth-child(2) {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

  body[data-view="numbers"] .evidence-table td::before {
    align-self: start;
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
  }

  body[data-view="numbers"] .evidence-table td:last-child {
    border-bottom: 0;
  }

  body[data-view="numbers"] .evidence-cell-content {
    grid-column: 2;
  }

  body[data-view="numbers"] .evidence-cell-content .review-status {
    justify-self: start;
  }
}

/* Tactile feedback for visibly block-shaped controls. Icon-only buttons and table rows stay still. */
:where(
  .tactile-control,
  .nav-item,
  .primary-button,
  .secondary-button,
  .filter-chip,
  .quiz-option,
  .strategy-choice,
  .strategy-route-choice,
  .command-tile,
  .hero-card,
  .lesson-row-open,
  .battle-file-button
) {
  position: relative;
  z-index: 0;
  transform-origin: center;
  transition:
    transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 170ms ease,
    border-color 170ms ease,
    background-color 170ms ease,
    filter 170ms ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  :where(
    .tactile-control,
    .nav-item,
    .primary-button,
    .secondary-button,
    .filter-chip,
    .quiz-option,
    .strategy-choice,
    .strategy-route-choice,
    .lesson-row-open,
    .battle-file-button
  ):not(:disabled):hover,
  :where(
    .tactile-control,
    .nav-item,
    .primary-button,
    .secondary-button,
    .filter-chip,
    .quiz-option,
    .strategy-choice,
    .strategy-route-choice,
    .lesson-row-open,
    .battle-file-button
  ):not(:disabled):focus-visible {
    z-index: 4;
    filter: brightness(1.08);
    transform: translateY(-2px) scale(1.055);
    box-shadow:
      0 16px 30px rgba(0, 0, 0, 0.28),
      0 0 0 2px color-mix(in srgb, var(--section-accent, var(--red)) 24%, transparent);
  }

  :where(.command-tile, .hero-card):not(:disabled):hover,
  :where(.command-tile, .hero-card):not(:disabled):focus-visible {
    z-index: 4;
    filter: brightness(1.08);
    transform: translateY(-4px) scale(1.035);
    box-shadow:
      0 22px 42px rgba(0, 0, 0, 0.34),
      0 0 0 2px color-mix(in srgb, var(--section-accent, var(--red)) 28%, transparent);
  }
}

:where(
  .tactile-control,
  .nav-item,
  .primary-button,
  .secondary-button,
  .filter-chip,
  .quiz-option,
  .strategy-choice,
  .strategy-route-choice,
  .command-tile,
  .hero-card,
  .lesson-row-open,
  .battle-file-button
):not(:disabled):active {
  z-index: 5;
  filter: brightness(1.13);
  transform: translateY(-2px) scale(1.065);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.3),
    0 0 0 3px color-mix(in srgb, var(--section-accent, var(--red)) 26%, transparent),
    inset 0 1px 5px rgba(255, 255, 255, 0.08);
  transition-duration: 70ms;
}

:where(
  .tactile-control,
  .nav-item,
  .primary-button,
  .secondary-button,
  .filter-chip,
  .quiz-option,
  .strategy-choice,
  .strategy-route-choice,
  .command-tile,
  .hero-card,
  .lesson-row-open,
  .battle-file-button
):disabled {
  will-change: auto;
}

.course-source-row,
.platform-research-row {
  position: relative;
  z-index: 0;
  transform-origin: center;
  transition:
    transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 170ms ease,
    border-color 170ms ease,
    background-color 170ms ease,
    filter 170ms ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .course-source-row:hover,
  .course-source-row:focus-visible,
  .platform-research-row:hover,
  .platform-research-row:focus-visible {
    z-index: 4;
    filter: brightness(1.08);
    transform: translateY(-2px) scale(1.055);
    box-shadow:
      0 16px 30px rgba(0, 0, 0, 0.28),
      0 0 0 2px color-mix(in srgb, var(--section-accent, var(--red)) 24%, transparent);
  }
}

.course-source-row:active,
.platform-research-row:active {
  z-index: 5;
  filter: brightness(1.13);
  transform: translateY(-2px) scale(1.065);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.3),
    0 0 0 3px color-mix(in srgb, var(--section-accent, var(--red)) 26%, transparent);
  transition-duration: 70ms;
}

/* Original vector heads stay close to the native pointer footprint. */
.chibi-pointer,
.chibi-touch-feedback {
  --chibi-portrait: url("assets/chibi/sunquan-head.svg");
  --chibi-accent: #f3c86d;
  width: 22px;
  aspect-ratio: 1;
  overflow: visible;
  background-color: transparent;
  background-image: var(--chibi-portrait);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.62));
  pointer-events: none;
}

.chibi-pointer::before,
.chibi-touch-feedback::before {
  content: none;
}

.chibi-pointer--sunquan,
[data-chibi-avatar="sunquan"] {
  --chibi-portrait: url("assets/chibi/sunquan-head.svg");
  --chibi-accent: #f3c86d;
}

.chibi-pointer--gongsunli,
[data-chibi-avatar="gongsunli"] {
  --chibi-portrait: url("assets/chibi/gongsunli-lihenyan-head.svg");
  --chibi-accent: #ff9fc8;
}

.chibi-pointer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: none;
  opacity: 0;
  transform: translate3d(var(--chibi-x, -120px), var(--chibi-y, -120px), 0) translate(-2px, -2px) scale(0.82);
  transition: opacity 120ms ease, transform 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.chibi-pointer::after {
  content: none;
}

.chibi-pointer.is-visible {
  opacity: 1;
  transform: translate3d(var(--chibi-x, -120px), var(--chibi-y, -120px), 0) translate(-2px, -2px) scale(1);
}

.chibi-pointer.is-switching {
  animation: chibi-avatar-swap 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chibi-avatar-swap {
  0% {
    transform: translate3d(var(--chibi-x, -120px), var(--chibi-y, -120px), 0) translate(-2px, -2px) scale(0.72) rotate(-8deg);
  }
  58% {
    transform: translate3d(var(--chibi-x, -120px), var(--chibi-y, -120px), 0) translate(-2px, -2px) scale(1.12) rotate(4deg);
  }
  100% {
    transform: translate3d(var(--chibi-x, -120px), var(--chibi-y, -120px), 0) translate(-2px, -2px) scale(1) rotate(0);
  }
}

.chibi-touch-feedback {
  position: fixed;
  top: var(--chibi-y, 50%);
  left: var(--chibi-x, 50%);
  z-index: 1001;
  width: 22px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5) rotate(-7deg);
  animation: chibi-touch-pop 520ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.chibi-touch-feedback::after {
  content: none;
}

@keyframes chibi-touch-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-7deg);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -58%) scale(1.12) rotate(3deg);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -66%) scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -82%) scale(0.88) rotate(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .chibi-pointer {
    display: block;
  }
}

@media (hover: none), (pointer: coarse) {
  :where(
    .tactile-control,
    .nav-item,
    .primary-button,
    .secondary-button,
    .filter-chip,
    .quiz-option,
    .strategy-choice,
    .strategy-route-choice,
    .command-tile,
    .hero-card,
    .lesson-row-open,
    .battle-file-button
  ) {
    will-change: auto;
  }

  .chibi-touch-feedback {
    width: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-source-row:hover,
  .course-source-row:focus-visible,
  .course-source-row:active,
  .platform-research-row:hover,
  .platform-research-row:focus-visible,
  .platform-research-row:active,
  :where(
    .tactile-control,
    .nav-item,
    .primary-button,
    .secondary-button,
    .filter-chip,
    .quiz-option,
    .strategy-choice,
    .strategy-route-choice,
    .command-tile,
    .hero-card,
    .lesson-row-open,
    .battle-file-button
  ):not(:disabled):hover,
  :where(
    .tactile-control,
    .nav-item,
    .primary-button,
    .secondary-button,
    .filter-chip,
    .quiz-option,
    .strategy-choice,
    .strategy-route-choice,
    .command-tile,
    .hero-card,
    .lesson-row-open,
    .battle-file-button
  ):not(:disabled):focus-visible,
  :where(
    .tactile-control,
    .nav-item,
    .primary-button,
    .secondary-button,
    .filter-chip,
    .quiz-option,
    .strategy-choice,
    .strategy-route-choice,
    .command-tile,
    .hero-card,
    .lesson-row-open,
    .battle-file-button
  ):not(:disabled):active {
    transform: none;
  }

  .chibi-pointer {
    transition: none;
    animation: none;
  }

  .chibi-touch-feedback {
    opacity: 0.9;
    transform: translate(-50%, -50%);
    animation: none;
  }
}

/* Chapter training stays flat: one card layer, with results and controls separated by rules. */
.training-chapter-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 18px 28px;
  min-width: 0;
  margin-bottom: 20px;
  padding: 2px 0 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--section-accent) 24%, var(--line));
}

.training-chapter-intro > * {
  min-width: 0;
}

.training-chapter-intro :where(h2, h3, p) {
  overflow-wrap: anywhere;
}

.training-chapter-intro :where(h2, h3) {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.training-chapter-intro p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.training-chapter-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.training-chapter-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-areas:
    "index copy"
    "index meta"
    "index result";
  gap: 7px 15px;
  width: 100%;
  min-width: 0;
  min-height: 152px;
  align-content: start;
  padding: 18px;
  overflow: visible;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--section-accent) 7%, transparent), transparent 46%),
    linear-gradient(310deg, color-mix(in srgb, var(--section-accent-2) 5%, transparent), transparent 52%),
    var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid color-mix(in srgb, var(--section-accent) 62%, var(--line));
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transform-origin: center;
  transition:
    transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 170ms ease,
    background-color 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease;
}

.training-chapter-index {
  grid-area: index;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #101718;
  background: linear-gradient(135deg, var(--section-accent), var(--section-accent-2));
  border: 1px solid color-mix(in srgb, var(--section-accent-2) 68%, transparent);
  border-radius: 6px;
  font: 800 13px/1 var(--mono, "Consolas", monospace);
}

.training-chapter-copy {
  grid-area: copy;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.training-chapter-copy :where(h2, h3, strong, p, small) {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.training-chapter-copy :where(h2, h3, strong) {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.training-chapter-copy :where(p, small) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.training-chapter-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  min-width: 0;
  color: color-mix(in srgb, var(--section-accent-2) 72%, var(--muted));
  font-size: 11px;
  line-height: 1.45;
}

.training-chapter-meta > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.training-chapter-meta > * + * {
  padding-left: 9px;
  border-left: 1px solid var(--line-strong);
}

.training-chapter-result {
  grid-area: result;
  min-width: 0;
  margin-top: 5px;
  padding-top: 9px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.training-chapter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-width: 0;
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.training-chapter-toolbar > * {
  min-width: 0;
  max-width: 100%;
}

.training-chapter-step {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  color: var(--muted);
  border-left: 2px solid color-mix(in srgb, var(--section-accent-2) 58%, var(--line));
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.training-chapter-card.is-current {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--section-accent) 13%, transparent), transparent 50%),
    linear-gradient(310deg, color-mix(in srgb, var(--section-accent-2) 9%, transparent), transparent 58%),
    var(--surface);
  border-color: color-mix(in srgb, var(--section-accent) 68%, var(--line));
  box-shadow: inset 3px 0 0 var(--section-accent), 0 14px 30px rgba(0, 0, 0, 0.18);
}

.training-chapter-card.is-complete {
  border-top-color: color-mix(in srgb, var(--success) 72%, var(--section-accent-2));
}

.training-chapter-card.is-complete .training-chapter-index {
  color: #0b1711;
  background: linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 62%, var(--section-accent-2)));
  border-color: color-mix(in srgb, var(--success) 58%, transparent);
}

.training-chapter-card.is-complete .training-chapter-result {
  color: color-mix(in srgb, var(--success) 78%, var(--ink));
}

@media (hover: hover) and (pointer: fine) {
  .training-chapter-card:not(.is-locked):not(:disabled):hover,
  .training-chapter-card:not(.is-locked):not(:disabled):focus-visible {
    position: relative;
    z-index: 3;
    filter: brightness(1.08);
    transform: translateY(-3px) scale(1.035);
    border-color: color-mix(in srgb, var(--section-accent) 78%, var(--line));
    box-shadow:
      0 20px 38px rgba(0, 0, 0, 0.3),
      0 0 0 2px color-mix(in srgb, var(--section-accent) 22%, transparent);
  }
}

.training-chapter-card:not(.is-locked):not(:disabled):active {
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.055);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3), 0 0 0 3px color-mix(in srgb, var(--section-accent) 24%, transparent);
  transition-duration: 70ms;
}

.training-chapter-card.is-locked,
.training-chapter-card:disabled,
.training-chapter-card.is-locked:hover,
.training-chapter-card:disabled:hover,
.training-chapter-card.is-locked:focus-visible,
.training-chapter-card:disabled:focus-visible,
.training-chapter-card.is-locked:active,
.training-chapter-card:disabled:active {
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 90%, var(--bg));
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
  filter: saturate(0.38);
  opacity: 0.58;
  transform: none;
}

.training-chapter-card.is-locked .training-chapter-index,
.training-chapter-card:disabled .training-chapter-index {
  color: var(--muted);
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.matchup-context-note {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: 68ch;
  margin: 8px 0 0;
  padding-left: 9px;
  color: var(--muted);
  border-left: 2px solid color-mix(in srgb, var(--section-accent-2) 34%, var(--line));
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.matchup-context-note strong {
  color: color-mix(in srgb, var(--ink) 74%, var(--muted));
  font-size: 11px;
  font-weight: 700;
}

.matchup-context-note small {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 680px) {
  .training-chapter-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .training-chapter-map {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .training-chapter-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px 12px;
    min-height: 0;
    padding: 15px;
  }

  .training-chapter-index {
    width: 42px;
    height: 42px;
  }

  .training-chapter-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .training-chapter-toolbar :where(button, .primary-button, .secondary-button) {
    width: 100%;
    max-width: 100%;
  }

  .matchup-context-note {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .training-chapter-card:not(.is-locked):not(:disabled):hover,
  .training-chapter-card:not(.is-locked):not(:disabled):focus-visible,
  .training-chapter-card:not(.is-locked):not(:disabled):active {
    transform: none;
  }
}

/* Formal off-meta lane courses: repeatable list cards, flat long-form modal sections. */
.special-lane-section {
  min-width: 0;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid color-mix(in srgb, var(--section-accent-2) 30%, var(--line));
}

.special-lane-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 24px;
  min-width: 0;
  margin-bottom: 16px;
}

.special-lane-heading > * {
  min-width: 0;
}

.special-lane-heading :where(h2, h3, p) {
  max-width: 780px;
  overflow-wrap: anywhere;
}

.special-lane-heading :where(h2, h3) {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
}

.special-lane-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.special-lane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.special-lane-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas:
    "portrait copy"
    "portrait status";
  gap: 8px 16px;
  width: 100%;
  min-width: 0;
  min-height: 130px;
  align-content: center;
  align-items: center;
  padding: 16px;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--section-accent) 7%, transparent), transparent 50%),
    linear-gradient(305deg, color-mix(in srgb, var(--section-accent-2) 6%, transparent), transparent 56%),
    var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid color-mix(in srgb, var(--section-accent-2) 58%, var(--line));
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transform-origin: center;
  transition:
    transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease;
}

.special-lane-portrait {
  grid-area: portrait;
  display: block;
  width: 96px;
  min-width: 96px;
  height: 96px;
  overflow: hidden;
  object-fit: cover;
  object-position: center 24%;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--section-accent) 18%, transparent), color-mix(in srgb, var(--section-accent-2) 13%, var(--surface-soft))),
    var(--surface-soft);
  border: 1px solid color-mix(in srgb, var(--section-accent-2) 34%, var(--line));
  border-radius: 6px;
}

.special-lane-portrait :where(img, picture),
picture.special-lane-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: inherit;
}

.special-lane-copy {
  grid-area: copy;
  display: grid;
  gap: 5px;
  min-width: 0;
  align-self: end;
}

.special-lane-copy :where(h3, h4, strong, p, small) {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.special-lane-copy :where(h3, h4, strong) {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.special-lane-copy :where(p, small) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.special-lane-status {
  grid-area: status;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  align-self: start;
  justify-self: start;
  padding-left: 9px;
  color: color-mix(in srgb, var(--section-accent-2) 78%, var(--ink));
  border-left: 2px solid color-mix(in srgb, var(--section-accent-2) 58%, var(--line));
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  .special-lane-card:not(:disabled):hover,
  .special-lane-card:not(:disabled):focus-visible {
    position: relative;
    z-index: 3;
    filter: brightness(1.08);
    transform: translateY(-3px) scale(1.035);
    border-color: color-mix(in srgb, var(--section-accent-2) 76%, var(--line));
    box-shadow:
      0 20px 38px rgba(0, 0, 0, 0.3),
      0 0 0 2px color-mix(in srgb, var(--section-accent) 20%, transparent);
  }
}

.special-lane-card:not(:disabled):active {
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.055);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3), 0 0 0 3px color-mix(in srgb, var(--section-accent-2) 24%, transparent);
  transition-duration: 70ms;
}

.special-lane-card:disabled,
.special-lane-card:disabled:hover,
.special-lane-card:disabled:focus-visible,
.special-lane-card:disabled:active {
  cursor: not-allowed;
  filter: saturate(0.4);
  opacity: 0.58;
  transform: none;
}

.special-course-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.4fr);
  gap: 12px 24px;
  min-width: 0;
  margin-bottom: 0;
  padding: 2px 0 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--section-accent) 36%, var(--line));
}

.special-course-head > * {
  min-width: 0;
  max-width: 100%;
}

.special-course-head > .special-lane-portrait {
  grid-area: auto;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
}

.special-course-head > div {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.special-course-head :where(h2, h3, h4, p, strong, small) {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.special-course-head :where(h2, h3) {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
}

.special-course-head :where(p, small) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.special-course-evidence {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 15px 0 15px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  border-left: 2px solid color-mix(in srgb, var(--section-accent-2) 46%, var(--line));
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.special-course-evidence :where(h3, h4, strong, p, small, li, a) {
  min-width: 0;
  margin-top: 0;
  overflow-wrap: anywhere;
}

.special-course-evidence :where(h3, h4, strong, a) {
  color: color-mix(in srgb, var(--section-accent-2) 76%, var(--ink));
}

.special-course-grid,
.special-course-phase-grid,
.special-course-builds,
.special-course-drills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style-position: inside;
}

.special-course-grid > *,
.special-course-phase-grid > *,
.special-course-builds > *,
.special-course-drills > * {
  min-width: 0;
  margin: 0;
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.special-course-grid > *:nth-child(even),
.special-course-phase-grid > *:nth-child(even),
.special-course-builds > *:nth-child(even),
.special-course-drills > *:nth-child(even) {
  padding-right: 0;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.special-course-block {
  min-width: 0;
  padding: 20px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.special-course-block :where(h3, h4, strong, p, small, li) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.special-course-block :where(h3, h4) {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.special-course-block :where(p, small, li) {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  line-height: 1.6;
}

.special-course-block :where(ul, ol),
.special-course-skill :where(ul, ol),
.special-course-phase-grid :where(ul, ol),
.special-course-builds :where(ul, ol),
.special-course-drills :where(ul, ol) {
  max-width: 100%;
  margin: 8px 0 0;
  padding-left: 20px;
}

.special-course-grid > .special-course-block {
  padding-top: 18px;
  padding-bottom: 18px;
}

.special-course-skill-list {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.special-course-skill {
  display: grid;
  grid-template-columns: minmax(132px, 0.72fr) repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.special-course-skill > * {
  min-width: 0;
}

.special-course-skill > :first-child {
  color: var(--section-accent);
  font: 800 12px/1.5 var(--mono, "Consolas", monospace);
}

.special-course-skill :where(h4, strong, p, small, li) {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.special-course-skill :where(h4, strong) {
  color: var(--ink);
}

.special-course-skill :where(p, small, li) {
  color: var(--muted);
  line-height: 1.55;
}

.special-course-phase-grid > *,
.special-course-builds > *,
.special-course-drills > * {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.special-course-phase-grid :where(h4, strong),
.special-course-builds :where(h4, strong),
.special-course-drills :where(h4, strong) {
  display: block;
  margin: 0 0 7px;
  color: var(--section-accent-2);
  font-size: 13px;
  line-height: 1.45;
}

.special-course-phase-grid :where(p, small, li),
.special-course-builds :where(p, small, li),
.special-course-drills :where(p, small, li) {
  min-width: 0;
  margin-top: 0;
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  line-height: 1.58;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .special-lane-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .special-lane-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 6px 12px;
    min-height: 104px;
    padding: 14px;
  }

  .special-lane-portrait {
    width: 72px;
    min-width: 72px;
    height: 72px;
  }

  .special-lane-copy :where(h3, h4, strong) {
    font-size: 15px;
  }

  .special-course-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-bottom: 16px;
  }

  .special-course-head > .special-lane-portrait {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .special-course-head > div {
    grid-column: 1;
    grid-row: 2;
  }

  .special-course-grid,
  .special-course-phase-grid,
  .special-course-builds,
  .special-course-drills {
    grid-template-columns: minmax(0, 1fr);
  }

  .special-course-grid > *,
  .special-course-phase-grid > *,
  .special-course-builds > *,
  .special-course-drills > *,
  .special-course-grid > *:nth-child(even),
  .special-course-phase-grid > *:nth-child(even),
  .special-course-builds > *:nth-child(even),
  .special-course-drills > *:nth-child(even) {
    padding: 16px 0;
    border-left: 0;
  }

  .special-course-skill {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
    padding: 15px 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  body.has-chibi-pointer,
  body.has-chibi-pointer :where(a, button, [role="button"], summary, label, input[type="file"]) {
    cursor: none !important;
  }

  body.has-chibi-pointer :where(input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea) {
    cursor: text !important;
  }

  body.has-chibi-pointer select {
    cursor: default !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .special-lane-card:not(:disabled):hover,
  .special-lane-card:not(:disabled):focus-visible,
  .special-lane-card:not(:disabled):active {
    transform: none;
  }
}

/* The route begins with four real, sequential nodes before the timed position graph. */
.strategy-prelude {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px 20px 20px;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--section-accent) 10%, transparent), transparent 42%),
    linear-gradient(290deg, color-mix(in srgb, var(--section-accent-2) 8%, transparent), transparent 48%);
  border-bottom: 1px solid color-mix(in srgb, var(--section-accent) 28%, var(--line));
}

.strategy-prelude-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  min-width: 0;
}

.strategy-prelude-head span {
  color: var(--section-accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.strategy-prelude-head strong {
  color: var(--ink);
  font-size: 12px;
}

.strategy-prelude-head small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.strategy-prelude-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 98px));
  justify-content: center;
  gap: clamp(10px, 3vw, 34px);
  min-width: 0;
}

.strategy-prelude-track::before {
  position: absolute;
  top: 50%;
  right: 12.5%;
  left: 12.5%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--section-accent), color-mix(in srgb, var(--section-accent-2) 76%, var(--section-accent)));
  box-shadow: 0 0 14px color-mix(in srgb, var(--section-accent) 34%, transparent);
  opacity: 0.54;
  transform: translateY(-50%);
}

.strategy-prelude-node {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-content: center;
  gap: 2px;
  padding: 10px;
  color: var(--ink);
  background:
    radial-gradient(circle at 34% 25%, color-mix(in srgb, var(--section-accent) 54%, #ffffff), transparent 20%),
    radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--surface) 72%, var(--section-accent)), var(--surface) 72%);
  border: 1px solid color-mix(in srgb, var(--section-accent) 54%, var(--line));
  border-radius: 50%;
  box-shadow: inset -8px -10px 18px rgba(0, 0, 0, 0.28), 0 8px 22px rgba(0, 0, 0, 0.26);
  text-align: center;
  transition: transform 150ms cubic-bezier(0.16, 1, 0.3, 1), filter 150ms ease, box-shadow 150ms ease;
}

.strategy-prelude-node > span,
.strategy-prelude-node > small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.1;
}

.strategy-prelude-node > strong {
  max-width: 8ch;
  color: inherit;
  font-size: 11px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.strategy-prelude-node.is-current {
  color: #071619;
  background:
    radial-gradient(circle at 32% 24%, #ffffff, transparent 20%),
    linear-gradient(145deg, var(--section-accent), color-mix(in srgb, var(--section-accent-2) 58%, var(--section-accent)));
  border-color: color-mix(in srgb, var(--section-accent) 72%, #ffffff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--section-accent) 17%, transparent), 0 14px 30px rgba(0, 0, 0, 0.32);
}

.strategy-prelude-node.is-current :where(span, small) {
  color: color-mix(in srgb, #071619 72%, transparent);
}

.strategy-prelude-node.is-complete {
  border-color: color-mix(in srgb, var(--success) 66%, var(--line));
}

.strategy-prelude-node.is-inspected {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--section-accent-2) 24%, transparent), 0 15px 32px rgba(0, 0, 0, 0.32);
}

.strategy-prelude-node.is-locked,
.strategy-prelude-node:disabled {
  color: var(--muted);
  filter: saturate(0.28);
  opacity: 0.48;
}

.strategy-prelude-node:not(:disabled):hover,
.strategy-prelude-node:not(:disabled):focus-visible {
  z-index: 3;
  filter: brightness(1.1);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--section-accent-2) 22%, transparent), 0 20px 38px rgba(0, 0, 0, 0.34);
}

.strategy-prelude-node:not(:disabled):active {
  z-index: 4;
  filter: brightness(1.14);
  transform: translateY(-3px) scale(1.12);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--section-accent) 28%, transparent), 0 22px 42px rgba(0, 0, 0, 0.36);
}

.course-depth-note {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 14px;
  margin: 4px 0 18px;
  padding: 11px 0;
  color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--section-accent-2) 22%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--section-accent-2) 22%, var(--line));
}

.course-depth-note strong {
  color: var(--section-accent-2);
  font-size: 11px;
}

.course-depth-note p {
  min-width: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  .strategy-prelude {
    padding: 14px 12px 16px;
  }

  .strategy-prelude-track {
    grid-template-columns: repeat(4, minmax(60px, 72px));
    gap: 8px;
  }

  .strategy-prelude-node {
    padding: 7px;
  }

  .strategy-prelude-node > strong {
    font-size: 10px;
  }

  .course-depth-note {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .strategy-prelude-node:not(:disabled):hover,
  .strategy-prelude-node:not(:disabled):focus-visible,
  .strategy-prelude-node:not(:disabled):active,
  .hero-linked-lesson:hover,
  .hero-linked-lesson:active {
    transform: none;
  }
}
