:root {
  color-scheme: light;
  --ink: #172022;
  --muted: #5d6868;
  --line: #d8e0dd;
  --paper: #f7f8f4;
  --white: #ffffff;
  --teal: #107b75;
  --amber: #c8841d;
  --coral: #cf5f4f;
  --charcoal: #182223;
  --shadow: 0 22px 70px rgba(23, 32, 34, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 36px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  padding: 24px 16px 30px;
  text-align: center;
}

.hero {
  position: relative;
  min-height: 84vh;
  overflow: hidden;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 56px) 64px;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 17, 17, 0.86) 0%, rgba(10, 17, 17, 0.58) 42%, rgba(10, 17, 17, 0.12) 100%),
    linear-gradient(0deg, rgba(10, 17, 17, 0.74) 0%, rgba(10, 17, 17, 0) 34%);
}

.topbar,
.hero-main {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 20px;
  letter-spacing: 0;
}

.hero-actions,
.panel-heading,
.coach-input,
.metric-strip {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 10px;
}

.hero-main {
  width: min(1380px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.75fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: end;
  padding-top: 10vh;
}

.hero-content {
  max-width: 960px;
}

.hero-radar {
  width: 100%;
  align-self: end;
}

.kicker {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(30px, 3.7vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
  max-width: none;
  white-space: nowrap;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.intro {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.7;
}

.primary-action,
.secondary-action,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-action {
  padding: 0 18px;
  background: var(--teal);
  color: var(--white);
  font-weight: 800;
}

.secondary-action {
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-weight: 800;
}

.icon-button {
  width: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 24px;
}

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

.dashboard,
.workspace-grid,
.assessment-lab,
.diagnostic-test {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.dashboard {
  margin-top: -34px;
  position: relative;
  z-index: 2;
}

.account-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.account-panel p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.account-panel > div:first-child {
  grid-column: 1;
  grid-row: 1;
}

.account-form,
.account-actions {
  display: flex;
  gap: 8px;
}

.account-form {
  grid-column: 2;
  grid-row: 1;
}

.account-actions {
  grid-column: 1;
  grid-row: 2;
}

.account-form input,
.account-actions select {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 0 12px;
  color: var(--ink);
}

.account-actions .secondary-action {
  color: var(--ink);
  border-color: var(--line);
  background: #f3f6f2;
  white-space: nowrap;
}

.member-lock {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-height: 42px;
  border: 1px solid rgba(25, 135, 125, 0.32);
  border-radius: 8px;
  background: #eef8f5;
  color: var(--ink);
  padding: 10px 12px;
}

.member-lock strong,
.member-lock span {
  display: block;
}

.member-lock strong {
  font-size: 0.96rem;
}

.member-lock span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.account-history {
  display: grid;
  gap: 8px;
  grid-column: 2;
  grid-row: 2;
}

.account-history article,
.account-history > span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 10px 12px;
}

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

.account-history strong {
  font-size: 13px;
}

.account-history span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.metric-strip article {
  background: var(--white);
  padding: 22px;
}

.metric-strip span,
.module-card p {
  color: var(--muted);
}

.metric-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.workspace-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.workspace-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.workspace-menu button > span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.workspace-menu button strong {
  align-self: end;
  font-size: 14px;
}

.workspace-menu button small {
  align-self: start;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-menu button:hover {
  border-color: #9fb4ad;
  background: #f3f6f2;
  transform: none;
}

.workspace-menu button.active {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
}

.workspace-menu button.active > span {
  color: var(--amber);
}

.workspace-menu button.active small {
  color: #c9d2d0;
}

.workspace-stage,
.workspace-view {
  display: grid;
  gap: 18px;
}

.workspace-stage {
  margin-top: 14px;
}

.diagnosis-actions {
  justify-content: center;
  min-height: 112px;
  border-radius: 6px;
  background:
    linear-gradient(110deg, rgba(16, 123, 117, 0.16), transparent 42%),
    var(--charcoal);
  padding: 20px;
  color: var(--white);
}

.diagnosis-actions .primary-action,
.diagnosis-actions .secondary-action {
  min-width: 180px;
}

.workspace-view > .diagnostic-test {
  width: 100%;
  margin-top: 0;
}

.main-grid,
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.main-grid {
  margin-top: 18px;
}

.dashboard > .diagnosis-panel {
  margin-top: 18px;
}

.dashboard > .diagnostic-test {
  width: 100%;
}

.section-slogan {
  margin: 6px 0 0;
  color: var(--teal);
  font-size: 15px;
  font-weight: 800;
}

.case-learning {
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 18px;
}

.case-learning-intro,
.case-player-head,
.case-player-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.case-learning-intro h3,
.case-player-head h3 {
  margin: 2px 0 4px;
}

.case-learning-intro p:not(.kicker),
.case-learning-preview p,
.case-context-card p,
.case-expert-card p {
  color: var(--muted);
  line-height: 1.65;
}

.case-learning-progress {
  flex: 0 0 auto;
  border-radius: 6px;
  background: #e7f2ef;
  color: var(--teal);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}

.case-learning-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.case-learning-controls label > span,
.case-reflection-label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.case-learning-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 0 34px 0 11px;
  font: inherit;
  font-weight: 700;
}

.case-learning-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.case-learning-preview p {
  margin: 0;
}

.case-learning-preview span,
.case-competencies span {
  border-radius: 4px;
  background: #edf0ee;
  padding: 4px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.case-learning-preview span.complete {
  background: #e7f2ef;
  color: var(--teal);
}

.case-player-head {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -8px -2px 0;
  border-bottom: 1px solid rgba(216, 224, 221, 0.9);
  background: rgba(251, 252, 248, 0.96);
  padding: 8px 2px 12px;
  backdrop-filter: blur(10px);
}

.case-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.case-stepper button {
  min-height: 40px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.case-stepper button:last-child {
  border-right: 0;
}

.case-stepper button.active {
  background: var(--charcoal);
  color: var(--white);
}

.case-stepper button.complete:not(.active) {
  background: #e7f2ef;
  color: var(--teal);
}

.case-player-body {
  min-height: 330px;
  scroll-margin-top: 104px;
  outline: none;
}

.case-facts,
.case-context-grid,
.case-expert-grid {
  display: grid;
  gap: 10px;
}

.case-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.case-facts article,
.case-context-card,
.case-expert-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  padding: 13px;
}

.case-facts span,
.case-facts strong {
  display: block;
}

.case-facts span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

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

.case-context-card h4,
.case-expert-card h4 {
  margin: 0 0 6px;
}

.case-context-card p,
.case-expert-card p {
  margin: 0;
}

.case-own-reflection {
  margin-bottom: 14px;
  border-left: 3px solid var(--amber);
  background: #fff8e9;
  padding: 12px 14px;
}

.case-own-reflection strong {
  display: block;
  margin-bottom: 5px;
  color: #8b5c13;
}

.case-own-reflection p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
}

.case-question {
  margin: 0 0 16px;
  font-size: 19px;
  line-height: 1.55;
}

.case-reflection-label textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 13px;
  font: inherit;
  line-height: 1.65;
}

.case-reflection-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.case-action-list {
  display: grid;
  gap: 9px;
}

.case-action-list label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  padding: 12px;
  line-height: 1.55;
}

.case-action-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.case-gate-note {
  margin: 12px 0 0;
  color: #8b5c13;
  font-size: 12px;
  font-weight: 800;
}

.case-competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.case-self-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.case-self-rating strong {
  margin-right: 4px;
}

.case-self-rating button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
}

.case-self-rating button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.case-complete-note {
  margin-top: 14px;
  border-left: 3px solid var(--teal);
  background: #e7f2ef;
  padding: 11px 13px;
  color: var(--teal);
  font-weight: 800;
}

.case-player-actions {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.workspace-grid,
.assessment-lab,
.diagnostic-test,
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 34px rgba(23, 32, 34, 0.06);
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading.compact {
  align-items: flex-start;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segmented button {
  border: 0;
  background: #f3f6f2;
  padding: 10px 13px;
  color: var(--muted);
}

.segmented button.active {
  background: var(--charcoal);
  color: var(--white);
}

.module-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

.learning-filters {
  display: grid;
  grid-template-columns: minmax(240px, 420px);
  gap: 12px;
  margin-bottom: 14px;
}

.learning-selection-prompt {
  margin: 14px 0;
  border-left: 3px solid var(--teal);
  background: #f3f6f2;
  padding: 11px 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.learning-filters label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.learning-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 0 34px 0 11px;
  font: inherit;
  font-weight: 700;
}

.dimension-overview {
  margin-bottom: 14px;
  border-top: 1px solid var(--line);
}

.dimension-row {
  display: grid;
  grid-template-columns: minmax(118px, 0.8fr) minmax(100px, 0.7fr) minmax(100px, 1fr) 52px 62px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 7px 4px;
  text-align: left;
}

.dimension-row:hover,
.dimension-row.active {
  background: #f3f6f2;
}

.dimension-row.active {
  box-shadow: inset 3px 0 0 var(--teal);
}

.dimension-name strong,
.dimension-name small {
  display: block;
}

.dimension-name small,
.dimension-scope {
  color: var(--muted);
  font-size: 11px;
}

.dimension-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8e5;
}

.dimension-meter i {
  display: block;
  height: 100%;
  background: var(--teal);
}

.dimension-score {
  text-align: right;
  font-weight: 800;
}

.dimension-status {
  border-radius: 4px;
  background: #edf0ee;
  padding: 4px 6px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.dimension-status.strength {
  background: #e7f2ef;
  color: var(--teal);
}

.dimension-status.weakness {
  background: #fff0ed;
  color: #a44034;
}

.dimension-group {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.dimension-group > summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  list-style-position: inside;
}

.dimension-group > summary > span:first-child {
  color: var(--ink);
  font-size: 15px;
}

.dimension-group > summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.dimension-group > .module-list {
  padding: 2px 0 4px;
}

.library-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.library-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.module-card {
  min-height: 112px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.module-card-title,
.module-progress-meta {
  display: flex;
  align-items: center;
}

.module-card-title {
  justify-content: space-between;
  gap: 10px;
}

.module-card-title h3 {
  margin-bottom: 0;
}

.module-card-title > span {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.module-icon {
  width: 52px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f2ef;
  color: var(--teal);
  font-size: 22px;
}

.module-card p {
  margin-top: 6px;
  margin-bottom: 12px;
  line-height: 1.55;
}

.module-progress-meta {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.module-progress-meta strong {
  margin-left: auto;
  color: var(--ink);
}

.module-result {
  border-radius: 4px;
  background: #edf0ee;
  padding: 2px 5px;
  font-weight: 800;
}

.module-result.strength {
  background: #e7f2ef;
  color: var(--teal);
}

.module-result.weakness {
  background: #fff0ed;
  color: #a44034;
}

.ai-review-count {
  border-radius: 4px;
  background: #fff4df;
  padding: 2px 5px;
  color: #8b5c13;
  font-weight: 800;
}

.expert-request-count {
  border-radius: 4px;
  background: #e9eef5;
  padding: 2px 5px;
  color: #385675;
  font-weight: 800;
}

.module-action {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.progress {
  height: 8px;
  background: #e7ece9;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}

.chapter-practice {
  position: relative;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.chapter-practice-head {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin: -10px -2px 0;
  border-bottom: 1px solid rgba(216, 224, 221, 0.9);
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 2px 12px;
  backdrop-filter: blur(10px);
}

.chapter-practice-head h3 {
  margin-bottom: 0;
}

.chapter-progress {
  height: 8px;
  margin: 0 0 18px;
  overflow: hidden;
  background: #e2e8e5;
}

.chapter-progress span {
  display: block;
  height: 100%;
  background: var(--teal);
  transition: width 180ms ease;
}

.chapter-complete {
  padding: 34px 18px 12px;
  text-align: center;
}

.chapter-question-body {
  scroll-margin-top: 104px;
  outline: none;
}

.complete-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: 28px;
  font-weight: 800;
}

.chapter-complete h3 {
  margin: 4px 0 10px;
  font-size: 24px;
}

.chapter-complete > p:not(.kicker) {
  color: var(--muted);
  line-height: 1.65;
}

.chapter-complete > p strong {
  color: var(--teal);
  font-size: 22px;
}

.chapter-attempt-history {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chapter-attempt-history span {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chapter-attempt-history span.active {
  border-color: #91cbb5;
  background: #e7f2ef;
  color: var(--teal);
}

.chapter-complete .review-actions {
  justify-content: center;
  margin-top: 24px;
}

.chapter-review-submit {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: left;
}

.chapter-review-submit-head,
.chapter-review-submit-actions,
.chapter-status-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chapter-review-submit-head,
.chapter-review-submit-actions {
  justify-content: space-between;
}

.chapter-status-legend {
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chapter-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chapter-status-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid transparent;
  border-radius: 3px;
}

.chapter-status-legend .mastered::before {
  border-color: #79bba4;
  background: #dceee8;
}

.chapter-status-legend .unmastered::before {
  border-color: #deb76c;
  background: #fff0c9;
}

.chapter-status-legend .review::before {
  border-color: #b97869;
  background: #ead8d2;
}

.chapter-review-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.chapter-review-map button {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.chapter-review-map button.mastered {
  border-color: #79bba4;
  background: #dceee8;
  color: #096a58;
}

.chapter-review-map button.unmastered {
  border-color: #deb76c;
  background: #fff0c9;
  color: #805713;
}

.chapter-review-map button.review {
  border-color: #b97869;
  background: #ead8d2;
  color: #743b32;
  box-shadow: inset 0 0 0 1px rgba(116, 59, 50, 0.12);
}

.chapter-review-map button:hover {
  filter: brightness(0.97);
}

.chapter-review-map button:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 2px;
}

.chapter-review-submit-actions > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chapter-question-meta {
  min-height: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chapter-question-title {
  margin: 16px 0;
  min-height: 62px;
  font-size: 19px;
  line-height: 1.6;
}

#chapterCaseText {
  max-height: 220px;
}

.chapter-answer-list {
  display: grid;
  gap: 9px;
  min-height: 243px;
}

.chapter-answer-option {
  display: grid;
  grid-template-columns: 22px 24px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 11px 13px;
  text-align: left;
}

.chapter-answer-option:hover:not(:disabled) {
  border-color: var(--teal);
  background: #f3f6f2;
}

.chapter-answer-option.selected-wrong {
  border-color: #e6b6ad;
  background: #fff0ed;
  color: #8d352a;
}

.chapter-answer-option.correct {
  border-color: #91cbb5;
  background: #e7f2ef;
  color: #096a58;
}

.chapter-answer-option.selected-wrong .choice-control {
  border-color: var(--coral);
  background: var(--coral);
}

.chapter-answer-option.selected-wrong .choice-control::after {
  content: "×";
  position: absolute;
  inset: -4px 0 0;
  color: var(--white);
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.chapter-answer-option.correct .choice-control {
  border-color: var(--teal);
  background: var(--teal);
}

.chapter-answer-option.correct .choice-control::after {
  content: "✓";
  position: absolute;
  inset: -3px 0 0;
  color: var(--white);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.chapter-answer-option:disabled {
  cursor: default;
}

.chapter-analysis-entry {
  margin-top: 12px;
}

.chapter-navigation {
  position: sticky;
  bottom: 12px;
  z-index: 7;
  margin: 16px -10px 0;
  border: 1px solid rgba(216, 224, 221, 0.96);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
  box-shadow: 0 8px 24px rgba(23, 32, 34, 0.1);
  backdrop-filter: blur(10px);
}

.chapter-navigation .secondary-action,
.chapter-navigation .primary-action {
  min-width: 118px;
}

.danger-action {
  margin-right: auto;
  border-color: #e6b6ad;
  color: #a44034;
}

.analysis-review-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid #e4cf9b;
  border-radius: 6px;
  background: #fff8e8;
  padding: 11px 12px;
  color: #74541a;
  font-size: 13px;
  font-weight: 700;
}

.analysis-review-action .secondary-action.active {
  border-color: #b77b1f;
  background: #fff0c9;
  color: #74541a;
}

.option-reasons article.correct-reason {
  border-color: #91cbb5;
  background: #e7f2ef;
}

.option-reasons article.correct-reason .reason-flaw {
  background: var(--teal);
  color: var(--white);
}

.coach-feed {
  min-height: 190px;
  padding: 16px;
  background: #f3f6f2;
  border-radius: 8px;
  line-height: 1.65;
}

.coach-input {
  margin-top: 12px;
  gap: 8px;
}

.coach-input input {
  min-width: 0;
  flex: 1;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.live-dot,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f2ef;
  color: var(--teal);
  font-weight: 800;
  font-size: 13px;
}

.diagnosis-panel .secondary-action {
  color: var(--ink);
  border-color: var(--line);
  background: #f3f6f2;
}

.full-action {
  width: 100%;
  margin-top: 18px;
}

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

.dimension-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 18px;
}

.dimension-label {
  width: max-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e7f2ef;
  color: var(--teal);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dimension-card p {
  color: var(--muted);
  line-height: 1.6;
}

.dimension-scoreline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.dimension-scoreline strong {
  color: var(--ink);
  font-size: 28px;
}

.dimension-outcome {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.score-meter {
  height: 12px;
  background: #e7ece9;
  border-radius: 999px;
  overflow: hidden;
}

.score-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transition: width 180ms ease;
}

.capability-progress-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.capability-progress-head h3,
.capability-progress-head p {
  margin-bottom: 0;
}

.capability-progress-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.capability-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.capability-legend span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.capability-progress {
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
}

.capability-progress-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.35fr) repeat(4, minmax(82px, 1fr)) 104px;
  gap: 12px;
  align-items: center;
  min-height: 94px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.capability-name {
  min-width: 0;
}

.capability-name span,
.capability-name strong,
.capability-name em {
  display: block;
}

.capability-name span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.capability-name strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.capability-name em {
  width: max-content;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.capability-metric {
  min-width: 0;
}

.capability-metric > span,
.capability-metric > strong,
.capability-metric > small {
  display: block;
}

.capability-metric > span,
.capability-metric > small {
  color: var(--muted);
  font-size: 11px;
}

.capability-metric > strong {
  margin: 5px 0 3px;
  font-size: 18px;
}

.capability-metric > div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8e5;
}

.capability-metric > div i {
  display: block;
  height: 100%;
  background: var(--teal);
}

.capability-recommend {
  text-align: right;
}

.capability-recommend button,
.recommend-learning {
  min-height: 34px;
  border: 1px solid #d4a851;
  border-radius: 6px;
  background: #fff4df;
  color: #805713;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.capability-recommend > span,
.recommendation-clear {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.question-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.question-tabs button {
  min-height: 42px;
  border: 0;
  background: #f3f6f2;
  color: var(--muted);
  font-weight: 800;
}

.question-tabs button.active {
  background: var(--charcoal);
  color: var(--white);
}

.scenario {
  margin-bottom: 16px;
  color: var(--ink);
  line-height: 1.65;
  font-weight: 700;
}

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

.choice-group button {
  min-height: 48px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 12px 14px;
}

.choice-group button.correct {
  border-color: var(--teal);
  background: #e7f2ef;
}

.choice-group button.wrong {
  border-color: var(--coral);
  background: #fff0ed;
}

.feedback {
  min-height: 62px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f3f6f2;
  color: var(--muted);
  line-height: 1.55;
}

.test-shell,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 22px;
  box-shadow: 0 10px 34px rgba(23, 32, 34, 0.06);
}

.test-topline,
.question-meta,
.test-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.test-progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7ece9;
  margin: 14px 0 18px;
}

.test-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transition: width 180ms ease;
}

.test-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
}

.question-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-content: start;
}

.question-map button {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f2;
  color: var(--muted);
  font-weight: 800;
}

.question-map button.answered {
  background: #e7f2ef;
  color: var(--teal);
}

.question-map button.active {
  background: var(--charcoal);
  color: var(--white);
}

.question-card {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 20px;
}

.question-meta {
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 14px;
}

.case-details {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #b9d4cc;
  border-left: 4px solid var(--teal);
  border-radius: 0 8px 8px 0;
  background: #eef6f3;
}

.case-details summary {
  min-height: 48px;
  display: list-item;
  padding: 10px 14px;
  color: var(--teal);
  font-weight: 800;
  line-height: 28px;
  cursor: pointer;
}

.case-details[open] summary {
  border-bottom: 1px solid #cde0da;
}

.case-text {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 16px 18px 18px;
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-line;
}

.answer-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.answer-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 13px;
  line-height: 1.55;
}

.answer-option.checked {
  border-color: var(--teal);
  background: #e7f2ef;
}

.question-note {
  min-height: 42px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.test-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.test-actions .secondary-action {
  color: var(--ink);
  border-color: var(--line);
  background: #f3f6f2;
}

.result-panel {
  margin-top: 14px;
}

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

.result-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 16px;
}

.result-grid span {
  color: var(--muted);
}

.result-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.result-section-title {
  margin: 22px 0 8px;
}

.recommendation {
  border-radius: 8px;
  background: #f3f6f2;
  color: var(--ink);
  padding: 14px;
  line-height: 1.6;
}

.review-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.review-entry h3,
.review-entry p {
  margin-bottom: 0;
}

.review-entry p {
  margin-top: 6px;
  color: var(--muted);
}

.answer-review {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

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

.review-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.review-question-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.review-question-map button {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6f2;
  color: var(--muted);
  font-weight: 800;
}

.review-question-map button.correct {
  border-color: #91cbb5;
  background: #e7f2ef;
  color: var(--teal);
}

.review-question-map button.mastered {
  border-color: #4ea984;
  background: #d9eee6;
  color: #096a58;
}

.review-question-map button.missed {
  border-color: #e6b6ad;
  background: #fff0ed;
  color: #a94638;
}

.review-question-map button.active {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
}

.review-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 20px;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.review-card > h3 {
  font-size: 20px;
  line-height: 1.55;
}

.learning-answer-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.learning-answer-head strong,
.learning-answer-head span {
  display: block;
}

.learning-answer-head strong {
  font-size: 16px;
}

.learning-answer-head div > span,
.analysis-entry > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.learning-action-label {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.distribution-list {
  display: grid;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.distribution-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 250px) 70px;
  gap: 14px;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.distribution-row.learning-choice {
  cursor: pointer;
}

.distribution-row.learning-choice:hover:not(:disabled) {
  background: #f3f6f2;
}

.distribution-row.learning-choice:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.distribution-row.learning-choice:disabled {
  cursor: default;
  opacity: 1;
}

.distribution-row.correct {
  color: var(--teal);
}

.distribution-row.selected-wrong {
  color: #a94638;
}

.distribution-option {
  display: grid;
  grid-template-columns: 22px 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  line-height: 1.5;
}

.choice-control {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid #9aaba7;
  border-radius: 50%;
  background: var(--white);
}

.distribution-row.learning-choice:hover:not(:disabled) .choice-control {
  border-color: var(--teal);
}

.distribution-row.selected-wrong .choice-control {
  border-color: var(--coral);
  background: var(--coral);
}

.distribution-row.selected-wrong .choice-control::after {
  content: "×";
  position: absolute;
  inset: -4px 0 0;
  color: var(--white);
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.distribution-row.correct .choice-control {
  border-color: var(--teal);
  background: var(--teal);
}

.distribution-row.correct .choice-control::after {
  content: "✓";
  position: absolute;
  inset: -3px 0 0;
  color: var(--white);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.answer-badge,
.choice-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.answer-badge {
  background: #e7f2ef;
  color: var(--teal);
}

.choice-badge {
  background: #edf0f0;
  color: var(--ink);
}

.distribution-row.selected-wrong .choice-badge {
  background: #fff0ed;
  color: #a94638;
}

.distribution-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e7e4;
}

.distribution-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #7d9995;
}

.distribution-row.correct .distribution-bar span {
  background: var(--teal);
}

.distribution-row.selected-wrong .distribution-bar span {
  background: var(--coral);
}

.distribution-rate {
  text-align: right;
  font-size: 14px;
}

.learning-feedback {
  margin-top: 16px;
  border-left: 4px solid #7d9995;
  background: #f3f6f2;
  padding: 13px 14px;
  color: var(--ink);
  line-height: 1.55;
}

.learning-feedback.wrong {
  border-left-color: var(--coral);
  background: #fff0ed;
  color: #8d352a;
}

.learning-feedback.correct {
  border-left-color: var(--teal);
  background: #e7f2ef;
  color: #096a58;
}

.analysis-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.analysis-entry > span {
  margin-top: 0;
}

.analysis-toggle {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
  flex: 0 0 auto;
}

.analysis-toggle:disabled {
  border-color: #d5ddda;
  background: #edf0ee;
  color: #899491;
  cursor: not-allowed;
}

.review-insight {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  gap: 18px;
  margin-top: 20px;
  background: #f3f6f2;
  padding: 16px;
}

.review-insight h4,
.option-reasons h4 {
  margin: 0 0 8px;
}

.review-insight p,
.option-reasons p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.review-verdict {
  border-left: 4px solid var(--teal);
  padding-left: 12px;
}

.review-verdict.missed {
  border-left-color: var(--coral);
}

.review-verdict strong,
.review-verdict span {
  display: block;
}

.review-verdict span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.chapter-competencies {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.chapter-competencies strong,
.chapter-competencies span {
  display: block;
}

.chapter-competencies strong {
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 13px;
}

.chapter-competencies span {
  color: var(--muted);
  line-height: 1.65;
}

.option-reasons {
  margin-top: 22px;
}

.option-reasons article {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.option-reasons article.your-mistake {
  border-left: 4px solid var(--coral);
  padding-left: 12px;
}

.option-reasons article > strong {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  line-height: 1.5;
}

.option-reasons article > p {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.reason-flaw {
  border-left: 3px solid var(--coral);
  padding-left: 7px;
  color: #a94638;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.6;
  white-space: nowrap;
}

.common-choice-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff0ed;
  color: #a94638;
  padding: 3px 8px;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

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

.review-actions .secondary-action {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.radar-result {
  margin: 16px 0;
}

.radar-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 16px;
}

.hero-radar .radar-card {
  min-height: 330px;
  grid-template-columns: minmax(140px, 0.75fr) minmax(220px, 1fr);
  gap: 10px;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(11, 24, 25, 0.72);
  color: var(--white);
  padding: 18px;
  backdrop-filter: blur(12px);
}

.radar-card strong,
.radar-card span {
  display: block;
}

.radar-card span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.radar-card svg {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
}

.radar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  font-size: 12px;
  font-weight: 800;
}

.radar-legend i {
  width: 18px;
  height: 4px;
  display: inline-block;
  border-radius: 999px;
}

.radar-legend i.personal {
  background: var(--teal);
}

.radar-legend i.norm {
  border-top: 2px dashed var(--amber);
}

.hero-radar .radar-card span {
  color: rgba(255, 255, 255, 0.72);
}

.hero-radar .radar-card strong::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  background: #68d3a5;
  box-shadow: 0 0 0 5px rgba(104, 211, 165, 0.14);
}

.hero-radar .radar-card svg {
  max-width: 310px;
}

.hero-radar .radar-ring,
.hero-radar .radar-axis {
  stroke: rgba(255, 255, 255, 0.24);
}

.hero-radar .radar-label {
  fill: var(--white);
}

.radar-ring {
  fill: none;
  stroke: rgba(23, 32, 34, 0.12);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(23, 32, 34, 0.12);
  stroke-width: 1;
}

.radar-area {
  fill: rgba(16, 123, 117, 0.32);
  stroke: var(--teal);
  stroke-width: 2;
}

.radar-norm-area {
  fill: rgba(200, 132, 29, 0.08);
  stroke: var(--amber);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}

.hero-radar .radar-norm-area {
  fill: rgba(255, 190, 92, 0.08);
  stroke: #ffbe5c;
}

.radar-dot {
  fill: var(--teal);
  stroke: var(--white);
  stroke-width: 2;
}

.radar-label {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.category-scoreboard {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.category-row {
  display: grid;
  grid-template-columns: 170px minmax(140px, 1fr) 210px 76px 104px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
  padding: 14px;
}

.category-row strong,
.category-row span {
  display: block;
}

.category-row div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.category-meter {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7ece9;
}

.category-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--teal));
}

.category-numbers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-numbers span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f3f6f2;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.category-row em {
  width: max-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef6f3;
  color: var(--teal);
  padding: 0 10px;
  font-style: normal;
  font-weight: 800;
  font-size: 13px;
}

.category-row.improve em {
  background: #fff4df;
  color: #8b5c13;
}

.category-row.strong em {
  background: #e7f2ef;
  color: var(--teal);
}

.assessment-lab {
  padding: 28px 0 12px;
}

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

.assessment-head .secondary-action {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

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

.calibration-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
  box-shadow: 0 10px 34px rgba(23, 32, 34, 0.05);
}

.calibration-card p {
  color: var(--muted);
  line-height: 1.6;
}

.stat-row {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 8px;
  align-items: baseline;
  margin-top: auto;
}

.stat-row strong {
  font-size: 30px;
  color: var(--teal);
}

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

.metric-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.metric-tags span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f6f2;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 800;
  font-size: 13px;
}

.blueprint-bars {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.blueprint-bars label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.blueprint-bars label::after {
  content: "";
  height: 10px;
  border-radius: 999px;
  background: #e7ece9;
  grid-row: 2;
  grid-column: 1;
}

.blueprint-bars span {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  grid-row: 2;
  grid-column: 1;
  z-index: 1;
}

.item-table {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.item-table > div {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.8fr 0.7fr;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.item-table > div:first-child {
  border-top: 0;
}

.item-table-head {
  background: #f3f6f2;
  color: var(--muted);
  font-weight: 800;
}

.item-table strong {
  width: max-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fff4df;
  color: #8b5c13;
  padding: 0 10px;
  font-size: 13px;
}

@media (max-width: 880px) {
  h1 {
    white-space: normal;
  }

  .metric-strip,
  .account-panel,
  .main-grid,
  .workspace-grid,
  .assessment-grid,
  .test-body,
  .result-grid,
  .category-row,
  .radar-card,
  .review-layout,
  .review-insight,
  .dual-diagnosis {
    grid-template-columns: 1fr;
  }

  .case-learning-preview,
  .case-facts,
  .case-context-grid,
  .case-expert-grid {
    grid-template-columns: 1fr;
  }

  .category-numbers {
    grid-template-columns: 1fr;
  }

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

  .question-map {
    grid-template-columns: repeat(10, 1fr);
  }

  .item-table > div {
    grid-template-columns: 1fr;
  }

  .assessment-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-entry,
  .review-heading,
  .analysis-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .review-question-map {
    grid-template-columns: repeat(10, 1fr);
  }

  .capability-progress-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .capability-legend {
    justify-content: flex-start;
  }

  .capability-progress-row {
    grid-template-columns: minmax(140px, 1.2fr) repeat(2, minmax(90px, 1fr));
  }

  .capability-name {
    grid-row: span 2;
  }

  .account-form,
  .account-actions {
    flex-direction: column;
  }

  .account-panel > div:first-child,
  .account-form,
  .account-actions,
  .account-history {
    grid-column: 1;
    grid-row: auto;
  }

  .hero {
    min-height: 88vh;
    padding-bottom: 44px;
  }

  .hero-content {
    padding-top: 0;
  }

  .hero-main {
    grid-template-columns: 1fr;
    padding-top: 10vh;
  }

  .hero-radar {
    max-width: 620px;
  }

  .hero-radar .radar-card {
    min-height: 0;
  }

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

  .segmented {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .topbar,
  .hero-actions,
  .coach-input,
  .case-learning-intro,
  .case-learning-controls,
  .case-player-actions,
  .chapter-review-submit-head,
  .chapter-review-submit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .case-learning-controls {
    display: flex;
  }

  .case-learning-controls .primary-action {
    width: 100%;
  }

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

  .case-stepper button:nth-child(2) {
    border-right: 0;
  }

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

  .case-player-head {
    position: static;
    margin-top: 0;
    backdrop-filter: none;
  }

  .chapter-review-map {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .workspace-menu {
    gap: 6px;
  }

  .workspace-menu button {
    min-height: 62px;
    grid-template-columns: 26px minmax(0, 1fr);
    padding: 9px;
  }

  .workspace-menu button small {
    display: none;
  }

  .workspace-menu button strong {
    align-self: center;
    line-height: 1.35;
  }

  .chapter-practice-head {
    position: static;
    margin-top: 0;
    padding-top: 0;
    backdrop-filter: none;
  }

  .chapter-question-body {
    scroll-margin-top: 12px;
  }

  .chapter-question-title,
  .chapter-answer-list {
    min-height: 0;
  }

  .chapter-navigation {
    bottom: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-right: -4px;
    margin-left: -4px;
  }

  .chapter-navigation .primary-action,
  .chapter-navigation .secondary-action {
    min-width: 0;
  }

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

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

  .dimension-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px 10px;
    padding: 10px 4px;
  }

  .dimension-name {
    grid-column: 1;
    grid-row: 1;
  }

  .dimension-scope {
    grid-column: 2;
    grid-row: 1;
  }

  .dimension-score {
    grid-column: 3;
    grid-row: 1;
  }

  .dimension-meter {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .dimension-status {
    grid-column: 3;
    grid-row: 2;
  }

  .dimension-group > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 8px 0;
  }

  .module-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .module-list {
    grid-template-columns: 1fr;
  }

  .module-card .module-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .test-topline,
  .test-actions,
  .review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .review-question-map {
    grid-template-columns: repeat(6, 1fr);
  }

  .capability-progress-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .capability-name {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .capability-recommend {
    grid-column: 1 / -1;
    text-align: left;
  }

  .distribution-row {
    grid-template-columns: 1fr 58px;
  }

  .distribution-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .distribution-rate {
    grid-column: 2;
    grid-row: 1;
  }

  .case-text {
    max-height: 260px;
    padding: 14px;
  }

  .question-map {
    grid-template-columns: repeat(6, 1fr);
  }
}
