:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f9faf7;
  --ink: #27313c;
  --muted: #687584;
  --line: #dde3e9;
  --brand: #e4473d;
  --brand-dark: #b8322b;
  --green: #2f8c67;
  --blue: #3477b8;
  --amber: #b7791f;
  --shadow: 0 14px 36px rgba(31, 42, 55, 0.1);
}

* {
  box-sizing: border-box;
}

[data-admin-only][hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

svg {
  display: block;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 360px) auto;
  gap: 22px;
  align-items: center;
  min-height: 68px;
  padding: 0 32px;
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 8px 22px rgba(119, 31, 25, 0.2);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  font-weight: 800;
}

.brand-text {
  display: grid;
  line-height: 1;
}

.brand-text strong {
  font-size: 19px;
}

.brand-text span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-weight: 600;
}

.main-nav a {
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.86);
}

.main-nav a:hover {
  color: #ffffff;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
}

.search-box button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: rgba(255, 255, 255, 0.82);
  border: 0;
  background: transparent;
}

.search-box svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.ghost-button,
.primary-button,
.icon-button,
.segmented button,
.login-modal button {
  border: 0;
}

.ghost-button {
  height: 38px;
  padding: 0 18px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.page-grid {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.guide-layout {
  grid-template-columns: 280px minmax(0, 1fr) 292px;
  align-items: start;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.side-panel,
.rail-panel,
.lesson-panel,
.stats-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(31, 42, 55, 0.03);
}

.side-panel,
.rail-panel {
  padding: 18px;
}

.course-card {
  color: #ffffff;
  border-color: rgba(228, 71, 61, 0.2);
  background:
    linear-gradient(90deg, rgba(146, 28, 24, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #e4473d 0%, #f07268 44%, #fff7f6 100%);
  box-shadow: var(--shadow);
  text-shadow: 0 1px 2px rgba(119, 31, 25, 0.24);
}

.course-card h2 {
  margin: 8px 0;
  font-size: 22px;
  line-height: 1.25;
}

.course-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.course-kicker {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.course-meta span {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title-row h2 {
  margin: 0;
  font-size: 16px;
}

.panel-title-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #eef2f5;
}

.segmented button {
  height: 34px;
  color: var(--muted);
  border-radius: 6px;
  background: transparent;
  font-weight: 700;
}

.segmented button.active {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(31, 42, 55, 0.08);
}

.route-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: route;
}

.route-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 54px;
  padding: 12px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: var(--surface-soft);
}

.route-list li::before {
  counter-increment: route;
  content: counter(route);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  border-radius: 8px;
  background: var(--green);
  font-weight: 800;
}

.route-list strong {
  display: block;
  font-size: 14px;
}

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

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

.lesson-item {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 10px;
  color: var(--ink);
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.lesson-item:hover,
.lesson-item.active {
  border-color: rgba(228, 71, 61, 0.42);
  background: #fff8f7;
}

.lesson-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #c9d1d9;
  border-radius: 50%;
}

.lesson-item.done .lesson-dot {
  border-color: var(--green);
  background: var(--green);
}

.lesson-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

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

.lesson-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.content-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.course-hero {
  display: block;
  min-height: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 245, 244, 0.9), rgba(255, 255, 255, 0.86)),
    #ffffff;
  box-shadow: 0 1px 0 rgba(31, 42, 55, 0.03);
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-heading p {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.course-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 30px;
  line-height: 1.22;
  letter-spacing: 0;
}

.course-hero p {
  max-width: 680px;
}

#course-description {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.course-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.course-badges span {
  padding: 5px 10px;
  color: var(--brand-dark);
  border: 1px solid rgba(228, 71, 61, 0.18);
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  color: #ffffff;
  border-radius: 8px;
  background: var(--brand);
  font-weight: 800;
}

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

.primary-button svg,
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.icon-button:hover {
  color: var(--brand-dark);
  border-color: rgba(228, 71, 61, 0.42);
}

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

.stats-grid article {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 14px;
}

.stats-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stats-grid strong {
  font-size: 24px;
  line-height: 1;
}

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

.lesson-panel {
  min-width: 0;
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.done-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

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

.lesson-body {
  display: grid;
  gap: 20px;
  padding-top: 22px;
}

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

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

.knowledge-links a {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid #e7ebef;
  border-radius: 8px;
  background: #ffffff;
}

.knowledge-links a:hover {
  border-color: rgba(228, 71, 61, 0.42);
  background: #fff8f7;
}

.knowledge-links span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-links strong {
  font-size: 15px;
}

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

.focus-card {
  min-height: 128px;
  padding: 16px;
  border: 1px solid #e7ebef;
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.focus-card span {
  color: var(--muted);
  font-size: 14px;
}

.code-panel {
  overflow: hidden;
  border-radius: 7px;
  background: #292929;
}

.code-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 18px 0 20px;
  color: #ffffff;
  background: #333333;
}

.code-panel-head strong {
  font-size: 14px;
  font-weight: 800;
}

.code-copy-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: #2383ff;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.code-copy-button::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-shadow: 4px -4px 0 -2px #333333, 4px -4px 0 0 currentColor;
}

.code-sample {
  overflow-x: auto;
  margin: 0;
  padding: 14px 0 16px;
  color: #f1f5f9;
  background: #292929;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.65;
  tab-size: 2;
}

.code-sample code {
  display: grid;
  min-width: 100%;
}

.code-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 23px;
  padding-right: 18px;
}

.code-line-no {
  color: #8c8c8c;
  text-align: right;
  user-select: none;
}

.code-line-text {
  min-width: 0;
  padding-left: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-token.keyword {
  color: #6dd3ff;
}

.code-token.directive {
  color: #c792ea;
}

.code-token.number {
  color: #ff6ac1;
}

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

.task-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e7ebef;
  border-radius: 8px;
}

.task-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.right-rail {
  display: grid;
  gap: 14px;
  align-content: start;
}

.page-rail {
  position: sticky;
  top: 88px;
}

.practice-list,
.resource-list {
  display: grid;
  gap: 10px;
}

.practice-item,
.resource-item {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e7ebef;
  border-radius: 8px;
  background: #ffffff;
}

.practice-item strong,
.resource-item strong {
  font-size: 14px;
}

.practice-item span,
.resource-item span {
  color: var(--muted);
  font-size: 12px;
}

.practice-item[data-kind="模拟"] {
  border-left: 4px solid var(--brand);
}

.practice-item[data-kind="模板"] {
  border-left: 4px solid var(--blue);
}

.practice-item[data-kind="基础"] {
  border-left: 4px solid var(--green);
}

.practice-item[data-kind="真题"] {
  border-left: 4px solid var(--amber);
}

.float-tools {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 15;
  display: grid;
  gap: 10px;
}

.login-modal {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-modal::backdrop {
  background: rgba(23, 31, 39, 0.38);
}

.login-modal form {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 28px;
}

.login-modal h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.auth-note {
  margin: -4px 0 4px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.login-modal label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-modal input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.login-modal input:focus {
  border-color: rgba(228, 71, 61, 0.56);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 8px;
}

.code-row button {
  color: var(--brand-dark);
  border-radius: 8px;
  background: #fff0ee;
  font-weight: 800;
}

.auth-modal {
  width: min(440px, calc(100% - 32px));
}

.auth-dialog {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 28px;
}

.auth-modal form {
  padding: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #eef2f5;
}

.auth-tabs button {
  height: 36px;
  color: var(--muted);
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-weight: 800;
}

.auth-tabs button.active {
  color: #0d5dde;
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(31, 42, 55, 0.08);
}

.auth-pane {
  display: grid;
  gap: 16px;
}

.auth-pane[hidden] {
  display: none;
}

.admin-modal {
  position: relative;
  width: min(1040px, calc(100% - 36px));
  max-height: min(820px, calc(100vh - 36px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-modal::backdrop {
  background: rgba(23, 31, 39, 0.4);
}

.admin-modal > form {
  padding: 0;
}

.admin-shell {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.admin-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 54px;
}

.admin-head p {
  margin: 0 0 4px;
  color: #0d5dde;
  font-size: 13px;
  font-weight: 800;
}

.admin-head h2 {
  margin: 0;
  color: #111827;
  font-size: 26px;
  line-height: 1.2;
}

.ghost-admin-button {
  min-height: 38px;
  padding: 0 14px;
  color: #314154;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 800;
}

.ghost-admin-button:hover {
  color: #0d5dde;
  border-color: rgba(31, 125, 243, 0.36);
  background: #f7fbff;
}

.admin-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  min-height: 560px;
}

.admin-list-panel,
.admin-form {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-list-panel {
  overflow: hidden;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.admin-list-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-lesson-list {
  display: grid;
  gap: 8px;
  max-height: 510px;
  overflow: auto;
  padding: 12px;
}

.admin-lesson-item {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.admin-lesson-item.active button:first-child {
  border-color: rgba(31, 125, 243, 0.4);
  background: #f5f9ff;
}

.admin-lesson-item button:first-child {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 8px 10px 8px calc(10px + var(--admin-indent, 0px));
  color: inherit;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.admin-lesson-item span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 32px;
  color: #0d5dde;
  border-radius: 8px;
  background: #eef6ff;
  font-size: 12px;
  font-weight: 900;
}

.admin-lesson-item strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-lesson-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.danger-text-button {
  padding: 6px 8px;
  color: #d9363e;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.danger-text-button:hover {
  background: #fff1f0;
}

.danger-admin-button {
  min-height: 38px;
  padding: 0 14px;
  color: #d9363e;
  border: 1px solid rgba(217, 54, 62, 0.28);
  border-radius: 8px;
  background: #fff7f6;
  font-weight: 800;
}

.danger-admin-button:hover {
  border-color: rgba(217, 54, 62, 0.48);
  background: #fff1f0;
}

.admin-form {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.admin-form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-form-section + .admin-form-section {
  border-top: 1px solid var(--line);
}

.admin-form-section h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.admin-form-tip {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.admin-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
}

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

.admin-form input,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
}

.admin-form input {
  height: 42px;
  padding: 0 12px;
}

.admin-form textarea {
  resize: vertical;
  min-height: 92px;
  padding: 10px 12px;
  line-height: 1.6;
}

.markdown-editor-section textarea {
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.markdown-preview-panel {
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.markdown-preview-panel h1,
.markdown-preview-panel h2,
.markdown-preview-panel h3 {
  margin: 16px 0 10px;
}

.markdown-preview-panel p {
  margin: 8px 0;
}

.markdown-preview-panel pre {
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #1f2937;
  color: #f9fafb;
}

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

.image-manager-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.image-manager-thumb {
  display: grid;
  place-items: center;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fbff;
}

.image-manager-thumb img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.image-manager-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.image-manager-meta strong,
.image-manager-meta code {
  overflow-wrap: anywhere;
}

.image-manager-meta code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef3f8;
  color: #314154;
  font-size: 12px;
}

@media (max-width: 720px) {
  .image-manager-card {
    grid-template-columns: 1fr;
  }
}

.admin-form input:focus,
.admin-form textarea:focus {
  border-color: rgba(31, 125, 243, 0.5);
  box-shadow: 0 0 0 3px rgba(31, 125, 243, 0.08);
}

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

.full {
  width: 100%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 30;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  color: #ffffff;
  border-radius: 8px;
  background: rgba(31, 42, 55, 0.94);
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: 0.18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.detail-page {
  display: grid;
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 800;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(31, 42, 55, 0.03);
  padding: 26px;
}

.content-card h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row span {
  padding: 6px 10px;
  color: var(--brand-dark);
  border-radius: 999px;
  background: #fff0ee;
  font-size: 12px;
  font-weight: 800;
}

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

.article-body {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
}

.article-body section {
  display: grid;
  gap: 8px;
}

.article-body h2 {
  margin: 0;
  font-size: 20px;
}

.article-body p {
  margin: 0;
  color: var(--muted);
}

.article-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.knowledge-figure {
  margin: 0;
  padding: 16px;
  border: 1px solid #e7ebef;
  border-radius: 8px;
  background: var(--surface-soft);
}

.knowledge-figure img {
  display: block;
  width: min(100%, 620px);
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
}

.knowledge-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.search-results {
  display: grid;
  gap: 12px;
}

.result-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.result-card:hover {
  border-color: rgba(228, 71, 61, 0.42);
  background: #fff8f7;
}

.result-card span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.result-card strong {
  font-size: 20px;
}

.result-card p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  border: 1px dashed #cfd7df;
  border-radius: 8px;
  background: #ffffff;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .main-nav {
    display: none;
  }

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

  .sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: static;
  }

  .page-rail {
    position: static;
  }

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

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

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 16px;
  }

  .search-box {
    grid-column: 1 / -1;
    order: 3;
  }

  .page-grid {
    padding: 16px;
  }

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

  .course-hero {
    padding: 22px;
  }

  .course-hero h1 {
    font-size: 32px;
  }

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

  .knowledge-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  .brand-text span {
    display: none;
  }

  .ghost-button {
    padding: 0 12px;
  }

  .course-hero h1 {
    font-size: 28px;
  }

  .stats-grid,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .lesson-panel {
    padding: 18px;
  }

  .detail-page {
    padding: 16px;
  }

  .content-card {
    padding: 20px;
  }

  .content-card h1 {
    font-size: 30px;
  }

  .float-tools {
    right: 14px;
    bottom: 14px;
  }
}

@media print {
  .topbar,
  .sidebar,
  .float-tools,
  .hero-actions,
  .right-rail,
  .done-check {
    display: none;
  }

  body {
    background: #ffffff;
  }

  .page-grid,
  .workspace,
  .course-hero {
    display: block;
    padding: 0;
  }

  .course-hero,
  .lesson-panel,
  .stats-grid article {
    box-shadow: none;
  }
}

/* Exam-style homepage inspired by the reference guide layout. */
.exam-shell {
  min-height: 100vh;
  background: #ffffff;
}

.exam-topbar {
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  min-height: 70px;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  color: #17202a;
  background: #f7f8fb;
  box-shadow: 0 1px 0 #e7ebf0;
}

.exam-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  min-width: 0;
  font-size: 20px;
  line-height: 1;
  color: #111827;
}

.exam-brand strong {
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.exam-brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe86d 0%, #ffc43d 100%);
  box-shadow:
    inset 0 -2px 0 rgba(157, 94, 0, 0.18),
    0 0 0 2px rgba(255, 255, 255, 0.86);
}

.exam-brand-mark::before,
.exam-brand-mark::after {
  content: "";
  position: absolute;
  display: block;
}

.exam-brand-mark::before {
  top: 7px;
  left: 6px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #172033;
  box-shadow: 8px 0 0 #172033;
}

.exam-brand-mark::after {
  left: 6px;
  bottom: 6px;
  width: 12px;
  height: 6px;
  border-bottom: 2px solid #172033;
  border-radius: 0 0 12px 12px;
}

.exam-tabs {
  display: inline-flex;
  align-items: stretch;
  justify-self: center;
  gap: 34px;
  height: 70px;
}

.exam-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #202b38;
  font-size: 14px;
  font-weight: 700;
}

.exam-tabs a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: #1d78ff;
  transform: translateX(-50%);
}

.exam-user {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 16px;
  color: #263241;
}

.exam-avatar {
  width: 31px;
  height: 31px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 35%, #ffffff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 86%, #ffffff 0 34%, transparent 35%),
    #d9dee5;
}

.exam-divider {
  width: 1px;
  height: 18px;
  background: #d9dee7;
}

.exam-user button {
  padding: 0;
  color: #263241;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.session-label {
  max-width: 110px;
  overflow: hidden;
  color: #667386;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-user .admin-entry {
  min-height: 30px;
  padding: 0 12px;
  color: #0d5dde;
  border: 1px solid rgba(31, 125, 243, 0.28);
  border-radius: 999px;
  background: #eef6ff;
}

.first-round-page {
  background: #f6f8fb;
}

.first-round-page .exam-tabs {
  gap: 30px;
}

.first-round-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 0 72px;
}

.first-round-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 32px;
  align-items: center;
  margin-bottom: 24px;
  padding: 24px 26px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #ffffff;
}

.first-round-eyebrow {
  margin: 0 0 8px;
  color: #1674ff;
  font-size: 13px;
  font-weight: 800;
}

.first-round-hero h1 {
  margin: 0 0 10px;
  color: #10213a;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

.first-round-hero p {
  max-width: 760px;
  margin: 0;
  color: #4c5d75;
  font-size: 15px;
  line-height: 1.75;
}

.first-round-hero aside {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 18px 14px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #f7fbff;
}

.first-round-hero aside strong {
  color: #1674ff;
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
}

.first-round-hero aside span {
  color: #52647a;
  font-size: 13px;
  font-weight: 700;
}

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

.first-round-category {
  min-width: 0;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #ffffff;
}

.first-round-category-wide {
  grid-row: span 2;
}

.first-round-category > header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #edf2f7;
}

.first-round-category > header > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  border-radius: 8px;
  background: #1674ff;
  font-size: 16px;
  font-weight: 900;
}

.first-round-category h2 {
  margin: 0 0 6px;
  color: #152233;
  font-size: 20px;
  line-height: 1.35;
}

.first-round-category p {
  margin: 0;
  color: #607184;
  font-size: 14px;
  line-height: 1.65;
}

.first-round-category ol {
  display: grid;
  margin: 0;
  padding: 6px 20px 16px;
  list-style: none;
}

.first-round-category li + li {
  border-top: 1px solid #edf2f7;
}

.first-round-category a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 48px;
  padding: 10px 0;
  color: #243248;
  text-decoration: none;
}

.first-round-category a:hover span {
  color: #1674ff;
}

.first-round-category a span {
  min-width: 0;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

.first-round-category a em {
  padding: 4px 8px;
  color: #52647a;
  border: 1px solid #dbe6f4;
  border-radius: 999px;
  background: #f7f9fc;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.exam-hero {
  position: relative;
  overflow: hidden;
  color: #16345f;
  background: #eef6ff;
}

.exam-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(31, 125, 243, 0.12), rgba(31, 125, 243, 0.05)),
    linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
}

.exam-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 612px;
  gap: 24px;
  align-items: center;
  max-width: 1200px;
  min-height: 86px;
  margin: 0 auto;
  padding: 16px 0 18px;
}

.exam-hero-copy .eyebrow {
  display: none;
}

.exam-hero h1 {
  margin: 0 0 6px;
  color: #10213a;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

.exam-hero #course-description,
.exam-hero-note {
  max-width: 620px;
  margin: 0;
  color: #4b5f7b;
  font-size: 14px;
  font-weight: 650;
}

.exam-hero-note {
  margin-top: 4px;
}

.exam-hero #course-description::before,
.exam-hero-note::before {
  content: "· ";
  font-weight: 900;
}

.exam-progress-cards {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.exam-progress-cards article {
  min-height: 118px;
  padding: 22px 22px 18px;
  color: #111827;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(12, 72, 158, 0.14);
}

.exam-progress-cards span {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 17px;
}

.exam-progress-cards strong {
  display: inline-block;
  min-width: 36px;
  font-size: 48px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

.exam-progress-cards small {
  color: #667386;
  font-size: 18px;
}

.exam-main {
  display: grid;
  grid-template-columns: 320px minmax(0, 880px);
  gap: 40px;
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 0 72px;
  scroll-margin-top: 86px;
}

.exam-knowledge {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 110px);
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #f7f9fc;
  border: 1px solid #e5ecf5;
}

.exam-knowledge header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 49px;
  padding: 0 18px;
  background: #f7f9fc;
}

.exam-knowledge h2 {
  margin: 0;
  color: #1f2937;
  font-size: 20px;
  font-weight: 500;
}

.exam-knowledge header > button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #7b8794;
  border: 0;
  background: transparent;
}

.exam-knowledge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.exam-lesson-list {
  gap: 0;
  overflow: auto;
  padding: 10px 8px 18px 12px;
}

.tree-node {
  display: grid;
  gap: 0;
}

.tree-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
}

.tree-level-2 .tree-row {
  padding-left: 12px;
}

.tree-level-3 .tree-row {
  padding-left: 24px;
}

.tree-toggle,
.tree-toggle-spacer {
  display: grid;
  place-items: center;
  width: 20px;
  height: 34px;
}

.tree-toggle {
  padding: 0;
  border: 0;
  background: transparent;
}

.tree-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #6f7d8e;
  transform: rotate(90deg);
  transition: transform 0.16s ease;
}

.tree-node.collapsed > .tree-row .tree-toggle::before {
  transform: rotate(0deg);
}

.tree-node.collapsed > .tree-children {
  display: none;
}

.exam-lesson-list .tree-lesson-item {
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px 7px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.exam-lesson-list .tree-lesson-item:hover,
.tree-row.ancestor .tree-lesson-item {
  background: #f5f8fc;
}

.exam-lesson-list .tree-lesson-item.active {
  color: #1674ff;
  background: #eaf2ff;
}

.exam-lesson-list .lesson-dot {
  width: 6px;
  height: 6px;
  border: 0;
  background: #cfd6dd;
}

.exam-lesson-list .lesson-item.done .lesson-dot {
  background: #23c377;
}

.exam-lesson-list .lesson-item.active:not(.done) .lesson-dot {
  background: #1e7cff;
}

.exam-lesson-list .lesson-item strong {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-level-2 .lesson-item strong {
  font-size: 14px;
  font-weight: 650;
}

.tree-level-3 .lesson-item strong {
  color: #607184;
  font-size: 13px;
  font-weight: 600;
}

.tree-level-3 .lesson-item.active strong {
  color: #1674ff;
}

.exam-lesson-list .lesson-item span span {
  display: none;
}

.exam-lesson-list .lesson-time {
  display: none;
}

.exam-article {
  min-width: 0;
  color: #152233;
}

.exam-article-progress {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 24px;
  padding: 0 20px;
  border-radius: 6px;
  background: #f5f7fb;
  color: #253449;
  font-size: 15px;
}

.exam-article-progress i {
  width: 98px;
  height: 6px;
  border-radius: 999px;
  background: #1f7df3;
}

.exam-article-progress strong {
  font-size: 15px;
}

.exam-article-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf2f7;
}

.exam-article-head p {
  margin: 0 0 4px;
  color: #53708f;
  font-size: 13px;
  font-weight: 700;
}

.exam-article-head h2 {
  margin: 0;
  color: #31425a;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 750;
}

.exam-article .done-check {
  color: #4b5b6e;
  background: #ffffff;
}

.exam-article-body {
  padding-top: 0;
}

.exam-article-body p {
  color: #233247;
  font-size: 16px;
  line-height: 1.8;
}

.exam-question {
  font-weight: 500;
}

.exam-info-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  min-height: 0;
  padding: 14px 16px;
  border-left: 4px solid #5aa5ff;
  border-radius: 6px;
  background: #f5f9ff;
  color: #28517f;
}

.exam-info-box strong {
  position: relative;
  padding-left: 30px;
  font-size: 17px;
}

.exam-info-box strong::before {
  content: "i";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: #ffffff;
  border-radius: 999px;
  background: #5aa5ff;
  font-size: 12px;
  font-weight: 800;
}

.exam-info-box span {
  color: #38506f;
  line-height: 1.7;
}

.exam-visual-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin: 4px 0 2px;
}

.stack-tower {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  justify-items: center;
  padding: 16px 28px 18px;
  border-radius: 6px;
  background: #fff7f4;
}

.stack-tower span,
.stack-tower em {
  color: #f47c2c;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.stack-tower strong {
  display: grid;
  place-items: center;
  width: 110px;
  height: 48px;
  color: #ffffff;
  border-radius: 2px;
  background: #f47a2a;
  font-size: 24px;
}

.stack-notes {
  min-height: 140px;
  padding: 22px;
  border-radius: 6px;
  background: #eef8ea;
}

.stack-notes h3 {
  margin: 0 0 10px;
  color: #2f6f44;
  font-size: 22px;
}

.stack-notes p {
  margin: 0;
  color: #42614b;
}

.exam-article .knowledge-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exam-article .knowledge-links a {
  border-color: #e4eaf1;
  background: #ffffff;
}

.exam-article .knowledge-links a:hover {
  border-color: rgba(31, 125, 243, 0.36);
  background: #f7fbff;
}

.exam-article .knowledge-links span {
  color: #0d5dde;
}

.exam-article .focus-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exam-article .focus-card {
  min-height: 112px;
  background: #fbfdf8;
}

.exam-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.exam-support-grid .rail-panel {
  padding: 18px;
}

.exam-support-grid .segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exam-method-module {
  margin-top: 32px;
}

.exam-method-title {
  display: flex;
  align-items: start;
  gap: 10px;
  margin: 0 0 16px;
}

.exam-method-title > span {
  width: 4px;
  height: 24px;
  margin-top: 5px;
  border-radius: 999px;
  background: #1674ff;
  flex: 0 0 auto;
}

.exam-method-title h2 {
  margin: 0;
  color: #172033;
  font-size: 24px;
  line-height: 1.3;
}

.exam-method-title p {
  margin: 4px 0 0;
  color: #6e7a91;
  font-size: 14px;
}

.exam-method-card {
  overflow: hidden;
  border: 1px solid #dfe6f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(42, 66, 105, 0.08);
}

.exam-method-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 12px;
  border-bottom: 1px solid #edf1f6;
}

.exam-method-head strong {
  color: #172033;
  font-size: 17px;
}

.exam-method-head span {
  color: #6e7a91;
  font-size: 13px;
  text-align: right;
}

.exam-method-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 18px 0;
  border-bottom: 1px solid #dfe6f0;
  background: #fbfcfe;
}

.exam-method-tabs button {
  min-height: 44px;
  padding: 0 18px;
  color: #64718a;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
}

.exam-method-tabs button.active {
  color: #1674ff;
  border-bottom-color: #1674ff;
}

.exam-method-panel {
  display: none;
  padding: 22px;
}

.exam-method-panel.active {
  display: block;
}

.exam-method-summary {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 14px;
  margin-bottom: 16px;
}

.exam-method-summary section,
.exam-method-block {
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  background: #ffffff;
}

.exam-method-summary section {
  padding: 16px;
}

.exam-method-summary h3,
.exam-method-block h3 {
  margin: 0 0 8px;
  color: #172033;
  font-size: 15px;
}

.exam-method-summary p {
  margin: 0;
  color: #54627a;
  font-size: 13px;
}

.exam-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.exam-badge.high {
  color: #d84450;
  background: #fff0f1;
}

.exam-badge.medium {
  color: #d17b0d;
  background: #fff5e8;
}

.exam-badge.low {
  color: #2772d5;
  background: #eef7ff;
}

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

.exam-method-block {
  padding: 16px;
}

.exam-method-block h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.exam-method-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 14px;
}

.exam-method-icon.blue {
  color: #2f73ff;
  background: #eef4ff;
}

.exam-method-icon.green {
  color: #21a36a;
  background: #eefaf5;
}

.exam-method-icon.orange {
  color: #e68a17;
  background: #fff6e8;
}

.exam-method-icon.purple {
  color: #7658e8;
  background: #f3f0ff;
}

.exam-method-block ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #526078;
  font-size: 13px;
}

.exam-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exam-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid #e3e9f2;
  border-left: 4px solid #2f73ff;
  border-radius: 10px;
  background: #ffffff;
}

.exam-task.green {
  border-left-color: #21a36a;
}

.exam-task.orange {
  border-left-color: #e68a17;
}

.exam-task.red {
  border-left-color: #e95d63;
}

.exam-task-title {
  margin-bottom: 2px;
  color: #172033;
  font-size: 13px;
  font-weight: 800;
}

.exam-task-meta {
  color: #6e7a91;
  font-size: 12px;
}

.exam-task button {
  min-height: 32px;
  padding: 0 11px;
  color: #1674ff;
  border: 1px solid #a9c5ff;
  border-radius: 7px;
  background: #ffffff;
  font-size: 13px;
}

.exam-method-tip {
  margin-top: 16px;
  padding: 13px 15px;
  color: #385b96;
  border-radius: 10px;
  background: #eef4ff;
  font-size: 13px;
}

.exam-method-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-top: 1px solid #dfe6f0;
  background: #fbfcfe;
}

.exam-method-actions span {
  color: #6e7a91;
  font-size: 13px;
}

.exam-method-actions button {
  min-height: 40px;
  padding: 0 18px;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  background: #1674ff;
  font-weight: 800;
  white-space: nowrap;
}

.knowledge-wireframe {
  display: block;
  max-width: 100%;
  min-width: 0;
}

.lesson-local-tabs {
  position: sticky;
  top: 70px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  margin-bottom: 18px;
  padding: 10px 0 12px;
  border-bottom: 1px solid #e4ebf4;
  background: rgba(255, 255, 255, 0.96);
  max-width: 100%;
  min-width: 0;
}

.lesson-local-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #47627f;
  border: 1px solid #dbe6f4;
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
}

.lesson-local-tabs a:hover,
.lesson-local-tabs a.active {
  color: #1674ff;
  border-color: rgba(22, 116, 255, 0.38);
  background: #eef6ff;
}

.lesson-section {
  display: grid;
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid #edf1f6;
  max-width: 100%;
  min-width: 0;
  scroll-margin-top: 150px;
}

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

.lesson-section h2 {
  margin: 0;
  color: #152233;
  font-size: 20px;
  line-height: 1.35;
}

.knowledge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #6f7b91;
  font-size: 13px;
  font-weight: 700;
}

.lesson-goal-card,
.summary-box {
  border: 1px solid #d8e6ff;
  border-radius: 9px;
  background: #f5f8ff;
}

.lesson-goal-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
}

.lesson-goal-card .goal-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #1674ff;
  border: 2px solid #8fb4ff;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 900;
}

.lesson-goal-card strong {
  display: block;
  margin-bottom: 6px;
}

.lesson-goal-card ul,
.summary-box ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #42506a;
}

.concept-flow {
  display: grid;
  grid-template-columns: 1fr 54px 1fr 54px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 2px;
}

.concept-flow section {
  min-height: 92px;
  padding: 16px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: #ffffff;
}

.concept-flow strong,
.concept-flow span {
  display: block;
}

.concept-flow strong {
  color: #1674ff;
  font-size: 13px;
}

.concept-flow span {
  margin-top: 6px;
  color: #172033;
  font-weight: 800;
}

.concept-flow i {
  position: relative;
  display: block;
  height: 2px;
  background: #8ea0bb;
}

.concept-flow i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  width: 9px;
  height: 9px;
  border-top: 2px solid #8ea0bb;
  border-right: 2px solid #8ea0bb;
  transform: rotate(45deg);
}

.lesson-tip-box {
  min-height: 74px;
}

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

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

.operation-card {
  min-height: 132px;
  padding: 14px 10px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
}

.operation-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  color: #1674ff;
  border: 1px solid #b9c4d6;
  border-radius: 8px;
  background: #f7fbff;
  font-weight: 900;
}

.operation-card strong {
  display: block;
  color: #172033;
  font-size: 14px;
}

.operation-card small {
  display: block;
  margin-top: 5px;
  color: #6f7b91;
  font-size: 12px;
  line-height: 1.55;
}

.example-grid,
.error-grid,
.relation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.example-card,
.relation-card {
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 9px;
  background: #f7faff;
}

.example-card h3,
.relation-card h3 {
  margin: 0 0 8px;
  color: #1674ff;
  font-size: 16px;
}

.example-card p {
  margin: 0;
  color: #53617a;
}

.error-item {
  padding: 11px 12px;
  color: #42506a;
  border: 1px solid #ffd7dc;
  border-radius: 8px;
  background: #fff6f7;
  font-size: 13px;
}

.error-item::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: #ffffff;
  border-radius: 999px;
  background: #ef5a67;
  font-size: 11px;
  font-weight: 900;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 9px;
  color: #51617d;
  border-radius: 999px;
  background: #eef3fb;
  font-size: 12px;
  font-weight: 800;
}

.summary-box {
  padding: 16px 18px;
}

.problem-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #edf1f6;
}

.problem-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1.5fr) minmax(70px, 0.5fr) minmax(70px, 0.45fr) 74px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 0;
  color: #293a52;
  border-bottom: 1px solid #edf1f6;
  font-size: 13px;
}

.problem-thumb {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #1674ff;
  border: 1px solid #c9d3e1;
  border-radius: 6px;
  background: linear-gradient(135deg, #f5f7fa, #e9eef6);
  font-weight: 900;
}

.problem-row strong,
.problem-row em,
.problem-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.problem-row em {
  color: #6f7b91;
  font-style: normal;
}

.problem-row b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  color: #1674ff;
  border: 1px solid #a9c5ff;
  border-radius: 6px;
  background: #ffffff;
  font-size: 12px;
}

.markdown-article {
  color: #243248;
}

.markdown-meta {
  margin-bottom: 14px;
}

.markdown-section h1,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6 {
  margin: 0;
  color: #152233;
  line-height: 1.4;
}

.markdown-section h1 {
  font-size: 28px;
  line-height: 1.25;
}

.markdown-section h3 {
  font-size: 17px;
}

.markdown-section h4 {
  font-size: 15px;
}

.markdown-section p {
  margin: 0;
  color: #42506a;
  line-height: 1.85;
}

.markdown-section ul,
.markdown-section ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: #42506a;
  line-height: 1.75;
}

.markdown-section li {
  padding-left: 2px;
}

.markdown-section a {
  color: #1674ff;
  font-weight: 800;
  text-decoration: none;
}

.markdown-section a:hover {
  text-decoration: underline;
}

.markdown-section p code,
.markdown-section li code,
.markdown-section td code {
  padding: 2px 6px;
  color: #0f5fd8;
  border: 1px solid #d8e6ff;
  border-radius: 5px;
  background: #f4f8ff;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.92em;
}

.markdown-section blockquote {
  margin: 0;
  padding: 12px 16px;
  color: #38506f;
  border-left: 4px solid #5aa0ff;
  border-radius: 0 6px 6px 0;
  background: #f5f9ff;
}

.markdown-section blockquote p {
  color: inherit;
}

.markdown-section img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid #dfe6f0;
  border-radius: 9px;
  background: #ffffff;
}

.lesson-next-panel {
  display: flex;
  justify-content: center;
  margin: 34px 0 8px;
  padding: 22px 0 6px;
  border-top: 1px solid #dce6f2;
}

.lesson-next-panel.is-last {
  color: #7b8da3;
  font-size: 14px;
}

.lesson-next-button {
  display: inline-grid;
  gap: 5px;
  min-width: min(420px, 100%);
  padding: 18px 28px;
  color: #1769e8;
  text-align: center;
  border: 1px solid #bcd5ff;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.lesson-next-button:hover {
  border-color: #1f7df3;
  box-shadow: 0 12px 26px rgba(31, 125, 243, 0.13);
  transform: translateY(-1px);
}

.lesson-next-button span {
  font-size: 17px;
  font-weight: 760;
}

.lesson-next-button span::after {
  content: " >";
}

.lesson-next-button strong {
  color: #53617a;
  font-size: 13px;
  font-weight: 680;
}

.markdown-visual-figure {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #dfe6f0;
  border-radius: 9px;
  background: #f8fbff;
}

.markdown-visual-figure img {
  width: auto;
  max-width: 100%;
  max-height: 620px;
  object-fit: contain;
  box-shadow: 0 10px 24px rgba(23, 38, 70, 0.08);
}

.markdown-visual-figure figcaption {
  color: #53617a;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.markdown-visual-figure.is-error img {
  display: none;
}

.knowledge-visual-fallback,
.knowledge-visual-inline-fallback {
  display: block;
  padding: 12px 14px;
  color: #41516a;
  border: 1px dashed #b8c8dd;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.65;
}

.knowledge-visual-fallback[hidden],
.knowledge-visual-inline-fallback[hidden],
.markdown-visual-figure:not(.is-error) .knowledge-visual-fallback[data-visual-fallback] {
  display: none;
}

.knowledge-visual-component {
  display: grid;
  gap: 14px;
  max-width: 100%;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #d8e6ff;
  border-radius: 9px;
  background: #f7fbff;
}

.knowledge-visual-component header {
  display: grid;
  gap: 4px;
}

.knowledge-visual-component header strong {
  color: #172033;
  font-size: 16px;
}

.knowledge-visual-component header span {
  color: #53617a;
  font-size: 13px;
  line-height: 1.6;
}

.knowledge-visual-stage {
  min-height: 64px;
}

.knowledge-visual-component.is-mounted .knowledge-visual-fallback {
  display: none;
}

.knowledge-visual-component.is-error .knowledge-visual-stage {
  display: none;
}

.visual-sequence {
  display: grid;
  gap: 12px;
}

.visual-sequence-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
}

.visual-sequence-list li {
  padding: 9px 10px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #ffffff;
}

.visual-sequence-list li.active {
  color: #0f5fd8;
  border-color: #8bbcff;
  background: #eef6ff;
  font-weight: 800;
}

.visual-sequence-status {
  margin: 0;
  color: #53617a;
  font-size: 13px;
}

.visual-sequence-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visual-sequence-controls button {
  min-height: 34px;
  padding: 0 12px;
  color: #1674ff;
  border: 1px solid #a9c5ff;
  border-radius: 7px;
  background: #ffffff;
  font-weight: 800;
}

.visual-sequence-controls button:disabled {
  color: #98a5b8;
  border-color: #d8e0eb;
  background: #f5f7fa;
}

.for-loop-trace {
  display: grid;
  gap: 13px;
  max-width: 100%;
}

.for-loop-trace-code {
  margin: 0;
  overflow-x: auto;
  padding: 13px 14px;
  color: #e8f0ff;
  border-radius: 8px;
  background: #223044;
  font-size: 13px;
  line-height: 1.7;
}

.for-loop-trace-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ebf7;
}

.for-loop-trace-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f80ed, #1674ff);
  transition: width .25s ease;
}

.for-loop-trace-status {
  margin: 0;
  color: #344258;
  font-size: 14px;
  line-height: 1.7;
}

.for-loop-trace-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.for-loop-trace-card {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid #dbe7f6;
  border-radius: 8px;
  background: #ffffff;
}

.for-loop-trace-card span {
  color: #66758c;
  font-size: 12px;
  line-height: 1.4;
}

.for-loop-trace-card strong {
  color: #102033;
  font-size: 15px;
  line-height: 1.55;
  word-break: break-word;
}

.for-loop-trace-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.for-loop-trace-controls button {
  min-height: 36px;
  padding: 0 14px;
  color: #1674ff;
  border: 1px solid #a9c5ff;
  border-radius: 7px;
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.for-loop-trace-controls button:hover:not(:disabled) {
  background: #eef6ff;
}

.for-loop-trace-controls button:disabled {
  color: #98a5b8;
  border-color: #d8e0eb;
  background: #f5f7fa;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .for-loop-trace-grid {
    grid-template-columns: 1fr;
  }

  .for-loop-trace-card {
    min-height: auto;
  }

  .for-loop-trace-controls button {
    flex: 1 1 calc(50% - 8px);
  }
}

.markdown-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #dfe6f0;
  border-radius: 9px;
}

.markdown-section table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 13px;
}

.markdown-section th,
.markdown-section td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
}

.markdown-section th {
  color: #172033;
  background: #f5f8ff;
  font-weight: 900;
}

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

.markdown-details {
  border: 1px solid #d8e6ff;
  border-radius: 9px;
  background: #fbfdff;
}

.markdown-details summary {
  cursor: pointer;
  padding: 13px 15px;
  color: #1674ff;
  font-weight: 900;
}

.markdown-details > div {
  display: grid;
  gap: 12px;
  padding: 0 15px 15px;
}

.markdown-state {
  padding: 16px 18px;
  color: #385b96;
  border: 1px solid #d8e6ff;
  border-radius: 9px;
  background: #f5f8ff;
}

.markdown-error {
  display: grid;
  gap: 6px;
  color: #a33d45;
  border-color: #ffd7dc;
  background: #fff6f7;
}

.markdown-error span {
  color: #6f4a52;
  font-size: 13px;
}

.markdown-exam-card {
  margin-top: 0;
}

.markdown-exam-panel-body {
  display: grid;
  gap: 12px;
  padding: 16px 20px 20px;
}

.markdown-exam-panel-body p,
.markdown-exam-panel-body li {
  color: #42506a;
  line-height: 1.75;
}

@media (max-width: 1280px) {
  .exam-hero-inner,
  .exam-main,
  .first-round-main {
    margin-right: 24px;
    margin-left: 24px;
    padding-right: 0;
    padding-left: 0;
  }

  .exam-topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .exam-main {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
  }
}

@media (max-width: 1060px) {
  .exam-topbar {
    grid-template-columns: 1fr auto;
    gap: 18px;
  }

  .exam-tabs {
    order: 3;
    grid-column: 1 / -1;
    justify-self: start;
    height: 48px;
  }

  .exam-tabs a.active::after {
    bottom: 8px;
  }

  .exam-hero-inner {
    grid-template-columns: 1fr;
  }

  .first-round-hero,
  .first-round-grid {
    grid-template-columns: 1fr;
  }

  .exam-progress-cards {
    max-width: 680px;
  }

  .exam-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .exam-knowledge {
    position: static;
    max-height: 380px;
  }
}

@media (max-width: 760px) {
  .exam-topbar {
    min-height: 58px;
    margin: 0;
    padding: 0 16px;
  }

  .exam-brand strong {
    font-size: 16px;
  }

  .exam-user {
    gap: 10px;
  }

  .first-round-page .exam-tabs {
    gap: 18px;
  }

  .exam-divider,
  .session-label,
  .exam-user .admin-entry {
    display: none;
  }

  .exam-hero-inner,
  .exam-main,
  .first-round-main {
    margin-right: 16px;
    margin-left: 16px;
  }

  .first-round-main {
    padding-top: 18px;
  }

  .first-round-hero {
    gap: 18px;
    padding: 18px;
  }

  .first-round-hero h1 {
    font-size: 26px;
  }

  .first-round-hero aside {
    justify-items: start;
  }

  .first-round-category > header {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 16px 16px 14px;
  }

  .first-round-category > header > span {
    width: 30px;
    height: 30px;
  }

  .first-round-category ol {
    padding-right: 16px;
    padding-left: 16px;
  }

  .first-round-category a {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .first-round-category a em {
    justify-self: start;
  }

  .exam-hero-inner {
    min-height: 72px;
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .exam-article,
  .exam-article-body,
  .knowledge-wireframe,
  .lesson-section,
  .lesson-local-tabs,
  .markdown-article {
    max-width: 100%;
    min-width: 0;
  }

  .exam-hero h1 {
    font-size: 24px;
  }

  .exam-hero #course-description,
  .exam-hero-note {
    font-size: 13px;
  }

  .exam-progress-cards,
  .exam-support-grid,
  .exam-article .focus-grid,
  .exam-visual-row,
  .concept-flow,
  .operation-grid,
  .example-grid,
  .error-grid,
  .relation-grid {
    grid-template-columns: 1fr;
  }

  .concept-flow i {
    display: none;
  }

  .exam-info-box,
  .lesson-goal-card {
    grid-template-columns: 1fr;
  }

  .exam-progress-cards article {
    min-height: 96px;
    border-radius: 12px;
  }

  .exam-article-progress {
    justify-content: start;
    overflow-x: auto;
  }

  .exam-article-head {
    display: grid;
    margin-bottom: 12px;
  }

  .exam-article-head h2 {
    font-size: 16px;
  }

  .lesson-local-tabs {
    position: static;
    gap: 6px;
    padding-top: 8px;
  }

  .lesson-local-tabs a {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .exam-article .knowledge-links {
    grid-template-columns: 1fr;
  }

  .admin-modal {
    width: calc(100% - 20px);
  }

  .admin-shell {
    padding: 20px 14px;
  }

  .admin-head,
  .admin-grid,
  .admin-form-row {
    grid-template-columns: 1fr;
  }

  .admin-head {
    display: grid;
    padding-right: 44px;
  }

  .exam-method-head,
  .exam-method-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .exam-method-head span {
    text-align: left;
  }

  .exam-method-summary,
  .exam-method-grid {
    grid-template-columns: 1fr;
  }

  .exam-task {
    grid-template-columns: 1fr;
  }
}

/* Dashboard home page. */
.dashboard-page {
  min-width: 320px;
  background: #f8fbff;
  color: #172033;
}

.dashboard-page a {
  text-decoration: none;
}

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

.dashboard-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  height: 100vh;
  padding: 16px 12px;
  border-right: 1px solid #e8edf6;
  background: #ffffff;
  box-shadow: 8px 0 28px rgba(50, 78, 120, 0.04);
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  color: #111827;
  font-weight: 900;
}

.dashboard-brand strong {
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe86d 0%, #ffc43d 100%);
  box-shadow:
    inset 0 -2px 0 rgba(157, 94, 0, 0.18),
    0 0 0 2px rgba(255, 255, 255, 0.86);
}

.dashboard-brand-mark::before,
.dashboard-brand-mark::after {
  content: "";
  position: absolute;
  display: block;
}

.dashboard-brand-mark::before {
  top: 7px;
  left: 6px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #172033;
  box-shadow: 8px 0 0 #172033;
}

.dashboard-brand-mark::after {
  left: 6px;
  bottom: 6px;
  width: 12px;
  height: 6px;
  border-bottom: 2px solid #172033;
  border-radius: 0 0 12px 12px;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  padding-top: 2px;
}

.sidebar-nav a {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  color: #4e5f76;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

.sidebar-nav a span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #74859c;
  font-size: 15px;
}

.sidebar-nav a:hover {
  color: #1269f0;
  background: #f2f7ff;
}

.sidebar-nav a.active {
  color: #ffffff;
  background: #1769f5;
  box-shadow: 0 10px 22px rgba(23, 105, 245, 0.22);
}

.sidebar-nav a.active span {
  color: #ffffff;
}

.sidebar-data-card {
  display: grid;
  gap: 12px;
  padding: 16px 14px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(33, 64, 104, 0.06);
}

.sidebar-data-card h2 {
  margin: 0;
  color: #172033;
  font-size: 15px;
}

.sidebar-data-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.sidebar-data-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-data-card dt,
.sidebar-data-card dd {
  margin: 0;
  color: #718097;
  font-size: 12px;
}

.sidebar-data-card dd {
  color: #1d2a3f;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-workspace {
  min-width: 0;
}

.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 340px) 36px auto;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 0 24px;
  border-bottom: 1px solid #e8edf6;
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(14px);
}

.dashboard-tabs {
  display: flex;
  align-items: center;
  gap: 30px;
  min-width: 0;
}

.dashboard-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  color: #4d5f78;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-tabs a:hover,
.dashboard-tabs a.active {
  color: #1269f0;
}

.dashboard-tabs a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: #1769f5;
  transform: translateX(-50%);
}

.dashboard-search {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  height: 34px;
  border: 1px solid #e2e9f3;
  border-radius: 999px;
  background: #ffffff;
}

.dashboard-search button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #7e8da3;
  border: 0;
  background: transparent;
}

.dashboard-search svg,
.dashboard-icon-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.dashboard-search input {
  min-width: 0;
  height: 32px;
  padding: 0 10px 0 0;
  color: #26364c;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.dashboard-search input::placeholder {
  color: #9aa7ba;
}

.dashboard-icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #33455f;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.dashboard-icon-button:hover {
  color: #1269f0;
  background: #eef5ff;
}

.dashboard-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34455f;
}

.dashboard-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a89ff, #f5a268);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-user strong {
  font-size: 13px;
  white-space: nowrap;
}

.dashboard-main {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px 30px;
}

.dashboard-hero-card {
  grid-column: 1 / span 9;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
  min-height: 202px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 66%, rgba(255, 255, 255, 0.22) 0 78px, transparent 79px),
    linear-gradient(135deg, #2178ff 0%, #1e6df0 50%, #2b91ff 100%);
  box-shadow: 0 14px 32px rgba(31, 111, 238, 0.22);
}

.dashboard-hero-card::before {
  content: "";
  position: absolute;
  inset: -50px 18% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 34px 42px;
  color: #ffffff;
}

.dashboard-hero-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 900;
}

.dashboard-hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.dashboard-primary-button,
.dashboard-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-primary-button {
  color: #ffffff;
  background: #1769f5;
  box-shadow: 0 8px 18px rgba(23, 105, 245, 0.18);
}

.dashboard-primary-button:hover {
  background: #0f58dc;
}

.dashboard-hero-actions .dashboard-primary-button {
  color: #1769f5;
  background: #ffffff;
  box-shadow: none;
}

.dashboard-secondary-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero-art {
  position: relative;
  min-height: 202px;
}

.hero-laptop {
  position: absolute;
  right: 38px;
  bottom: 34px;
  width: 178px;
  height: 112px;
  border: 8px solid rgba(43, 93, 210, 0.62);
  border-radius: 8px;
  background: linear-gradient(145deg, #8fc0ff, #3277f4);
  box-shadow: 0 22px 26px rgba(8, 52, 150, 0.24);
  transform: skewX(-6deg) rotate(3deg);
}

.hero-laptop::after {
  content: "";
  position: absolute;
  left: -26px;
  right: -36px;
  bottom: -22px;
  height: 16px;
  border-radius: 999px;
  background: rgba(5, 62, 171, 0.24);
}

.hero-laptop span,
.hero-laptop i {
  position: absolute;
  left: 28px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-laptop span {
  top: 24px;
  width: 98px;
}

.hero-laptop i:nth-of-type(1) {
  top: 46px;
  width: 118px;
}

.hero-laptop i:nth-of-type(2) {
  top: 66px;
  width: 78px;
}

.hero-laptop i:nth-of-type(3) {
  top: 86px;
  width: 126px;
}

.hero-play {
  position: absolute;
  left: 26px;
  top: 66px;
  display: grid;
  place-items: center;
  width: 68px;
  height: 52px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-play svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.hero-code-badge {
  position: absolute;
  top: 36px;
  left: 118px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #ffffff;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 20px rgba(0, 48, 145, 0.18);
  font-weight: 900;
}

.hero-books {
  position: absolute;
  right: 20px;
  bottom: 30px;
  width: 104px;
  height: 54px;
}

.hero-books b {
  position: absolute;
  right: 0;
  width: 98px;
  height: 15px;
  border-radius: 4px;
  box-shadow: 0 6px 10px rgba(0, 40, 110, 0.18);
}

.hero-books b:nth-child(1) {
  top: 0;
  background: #ffefe3;
  transform: rotate(8deg);
}

.hero-books b:nth-child(2) {
  top: 17px;
  background: #ff8e3d;
}

.hero-books b:nth-child(3) {
  top: 34px;
  background: #fff7f0;
  transform: rotate(-3deg);
}

.dashboard-progress-card,
.dashboard-panel,
.module-card,
.dashboard-encourage {
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(33, 64, 104, 0.07);
}

.dashboard-progress-card {
  grid-column: 10 / -1;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 202px;
  padding: 18px 16px;
}

.dashboard-progress-card h2 {
  justify-self: start;
  margin: 0;
  color: #172033;
  font-size: 16px;
}

.progress-ring {
  --progress: 26;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background:
    radial-gradient(circle closest-side, #ffffff 73%, transparent 74%),
    conic-gradient(#1769f5 calc(var(--progress) * 1%), #edf2f8 0);
}

.progress-ring span {
  color: #172033;
  font-size: 25px;
  font-weight: 900;
}

.dashboard-progress-card p {
  margin: 0;
  color: #516278;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-progress-card .dashboard-primary-button {
  width: 100%;
}

.dashboard-section {
  grid-column: 1 / -1;
}

.dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-section-head h2 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}

.dashboard-section-head a {
  color: #1269f0;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-section-head a::after {
  content: ">";
  margin-left: 6px;
}

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

.module-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 118px;
  padding: 16px 14px;
  color: #172033;
}

.module-card:hover {
  border-color: rgba(23, 105, 245, 0.28);
  transform: translateY(-1px);
}

.module-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  border-radius: 8px;
  background: #2d81ff;
  font-size: 16px;
  font-weight: 900;
}

.module-card[data-color="green"] .module-icon {
  background: #38c982;
}

.module-card[data-color="orange"] .module-icon {
  background: #ffb23e;
}

.module-card[data-color="purple"] .module-icon {
  background: #8b62e9;
}

.module-card[data-color="cyan"] .module-icon {
  background: #4294f3;
}

.module-card[data-color="red"] .module-icon {
  background: #ff6170;
}

.module-card strong {
  font-size: 13px;
}

.module-meter {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: #607086;
  font-size: 11px;
  font-weight: 800;
}

.module-card i {
  position: relative;
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.module-card i::after {
  content: "";
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: #1769f5;
}

.module-card[data-color="green"] i::after {
  background: #38c982;
}

.module-card[data-color="orange"] i::after {
  background: #ffb23e;
}

.module-card[data-color="purple"] i::after {
  background: #8b62e9;
}

.module-card[data-color="cyan"] i::after {
  background: #4294f3;
}

.module-card[data-color="red"] i::after {
  background: #ff6170;
}

.dashboard-panel {
  display: grid;
  align-content: start;
  padding: 18px 16px;
}

.recent-panel {
  grid-column: 1 / span 5;
}

.practice-panel {
  grid-column: 6 / -1;
}

.recent-list,
.practice-table {
  display: grid;
  gap: 10px;
}

.recent-row,
.practice-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  color: #293a52;
  font-size: 13px;
}

.recent-row {
  grid-template-columns: 24px minmax(120px, 1fr) minmax(94px, auto) auto;
}

.practice-row {
  grid-template-columns: 24px minmax(100px, 1fr) minmax(68px, auto) auto auto auto;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #ffffff;
  border-radius: 5px;
  font-size: 10px;
}

.row-icon.blue {
  background: #2e7ef7;
}

.row-icon.green {
  background: #31c878;
}

.row-icon.orange {
  background: #ffae32;
}

.row-icon.gray {
  background: #9aa7b8;
}

.recent-row strong,
.practice-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-row em,
.practice-row em {
  overflow: hidden;
  color: #78879b;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-row b,
.practice-row b {
  justify-self: end;
  color: #1269f0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.recent-row b.done {
  color: #20c66c;
}

.recent-row b.muted {
  color: #8c9aae;
}

.tag {
  padding: 2px 6px;
  color: #7b8794;
  border-radius: 5px;
  background: #eef2f6;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.tag.easy {
  color: #18a85c;
  background: #e9f9f0;
}

.tag.middle {
  color: #d48500;
  background: #fff4dc;
}

.practice-row b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 28px;
  border: 1px solid rgba(23, 105, 245, 0.22);
  border-radius: 6px;
  background: #ffffff;
}

.dashboard-encourage {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 22px;
}

.encourage-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a89ff, #f6a058);
  box-shadow: 0 6px 16px rgba(33, 64, 104, 0.14);
  font-weight: 900;
}

.dashboard-encourage h2 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  line-height: 1.35;
}

.dashboard-encourage p {
  margin: 4px 0 0;
  color: #718097;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .dashboard-main {
    max-width: none;
  }

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

  .dashboard-tabs {
    gap: 18px;
  }
}

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

  .dashboard-sidebar {
    position: static;
    grid-template-rows: auto auto;
    height: auto;
    padding: 12px 16px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    overflow-x: auto;
  }

  .sidebar-data-card {
    display: none;
  }

  .dashboard-topbar {
    grid-template-columns: minmax(0, 1fr) 36px auto;
  }

  .dashboard-tabs {
    display: none;
  }

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

  .dashboard-hero-card,
  .dashboard-progress-card,
  .recent-panel,
  .practice-panel {
    grid-column: 1 / -1;
  }

  .dashboard-progress-card {
    grid-template-columns: auto 1fr auto;
    justify-items: start;
    min-height: 120px;
  }

  .dashboard-progress-card h2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-topbar {
    grid-template-columns: 1fr auto;
    padding: 10px 16px;
  }

  .dashboard-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .dashboard-icon-button {
    display: none;
  }

  .dashboard-main {
    padding: 16px;
  }

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

  .dashboard-hero-copy {
    padding: 28px 24px 12px;
  }

  .dashboard-hero-art {
    min-height: 146px;
  }

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

  .recent-row,
  .practice-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .recent-row em,
  .practice-row em,
  .practice-row .tag {
    display: none;
  }

  .dashboard-progress-card,
  .dashboard-encourage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .dashboard-brand strong {
    font-size: 15px;
  }

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

  .dashboard-user strong {
    display: none;
  }

  .dashboard-hero-copy h1 {
    font-size: 30px;
  }

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

.exam-brand-mark,
.dashboard-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fffaf0 url("./assets/ui/site-mascot.png") center / contain no-repeat;
  box-shadow: 0 2px 8px rgba(33, 64, 104, 0.12);
}

.exam-brand-mark::before,
.exam-brand-mark::after,
.dashboard-brand-mark::before,
.dashboard-brand-mark::after {
  display: none;
}

/* Knowledge page reading refresh. */
.exam-shell {
  background: #f5f8fc;
}

.exam-topbar {
  min-height: 64px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 1px 0 #e4ebf3,
    0 10px 28px rgba(31, 47, 71, 0.05);
  backdrop-filter: blur(12px);
}

.exam-brand strong {
  color: #0f1f33;
  font-weight: 850;
}

.exam-tabs {
  height: 64px;
  gap: 30px;
}

.exam-tabs a {
  color: #334155;
  font-weight: 760;
}

.exam-tabs a:hover,
.exam-tabs a.active {
  color: #1769e8;
}

.exam-tabs a.active::after {
  bottom: 12px;
  width: 22px;
  height: 3px;
  background: #2478ff;
}

.exam-hero {
  color: #ffffff;
  border-bottom: 0;
  background: #247cf2;
}

.exam-hero::before {
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.14), transparent 28%),
    radial-gradient(circle at 86% 55%, rgba(13, 84, 205, 0.24), transparent 30%),
    linear-gradient(90deg, #1e7df5 0%, #2a8bf8 48%, #1874ed 100%);
}

.exam-hero-inner {
  grid-template-columns: minmax(0, 1fr);
  min-height: 96px;
  padding: 18px 0 20px;
}

.exam-hero h1 {
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 29px;
  font-weight: 900;
}

.exam-hero #course-description,
.exam-hero-note {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.7;
}

.exam-hero #course-description::before,
.exam-hero-note::before {
  content: "";
}

.exam-main {
  grid-template-columns: 310px minmax(0, 900px);
  gap: 34px;
  max-width: 1250px;
  padding-top: 28px;
}

.exam-knowledge {
  top: 84px;
  border: 1px solid #dfe8f3;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(28, 45, 76, 0.07);
}

.exam-knowledge header {
  min-height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid #edf2f7;
  background: #ffffff;
}

.exam-knowledge h2 {
  color: #14243a;
  font-size: 19px;
  font-weight: 800;
}

.exam-lesson-list {
  padding: 12px 9px 18px;
}

.tree-row {
  grid-template-columns: 22px minmax(0, 1fr);
}

.tree-toggle,
.tree-toggle-spacer {
  width: 22px;
  height: 34px;
}

.tree-toggle::before {
  border-left-color: #7b8da3;
}

.exam-lesson-list .tree-lesson-item {
  grid-template-columns: 13px minmax(0, 1fr);
  min-height: 38px;
  padding: 8px 11px 8px 4px;
  border-radius: 8px;
}

.exam-lesson-list .tree-lesson-item:hover,
.tree-row.ancestor .tree-lesson-item {
  background: #f4f8fe;
}

.exam-lesson-list .tree-lesson-item.active {
  color: #1769e8;
  background: #eaf2ff;
}

.exam-lesson-list .lesson-dot {
  width: 5px;
  height: 5px;
  background: #c9d3df;
}

.exam-lesson-list .lesson-item strong {
  color: #26384f;
  font-size: 14px;
  font-weight: 720;
}

.tree-level-3 .lesson-item strong {
  color: #5e7086;
  font-size: 13px;
  font-weight: 620;
}

.tree-section-children {
  display: grid;
  gap: 1px;
  margin: 2px 0 8px 36px;
  padding-left: 11px;
  border-left: 1px solid #e2e8f0;
}

.tree-section-link {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  width: 100%;
  min-height: 29px;
  padding: 5px 8px;
  color: #4b5f79;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}

.tree-section-link span {
  width: 4px;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: #c5ceda;
}

.tree-section-link strong {
  min-width: 0;
  color: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 620;
}

.tree-section-level-4 {
  margin-left: 12px;
  color: #667991;
}

.tree-section-link:hover,
.tree-section-link.active {
  color: #1769e8;
  background: #eef4fb;
}

.tree-section-link:hover span,
.tree-section-link.active span {
  background: #2478ff;
}

.raw-directory-section {
  padding-top: 8px;
  border-bottom: 0;
}

.raw-directory-card {
  --directory-color: #2478ff;
  --directory-soft: #eef5ff;
  --directory-action: #1769e8;
  --directory-border: #c9ddff;
  overflow: hidden;
  border: 1px solid #dce7f3;
  border-top: 4px solid var(--directory-color);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(28, 45, 76, 0.08);
}

.raw-directory-card.tone-orange {
  --directory-color: #f58a1f;
  --directory-soft: #fff4e6;
  --directory-action: #bb6900;
  --directory-border: #ffd18f;
}

.raw-directory-card.tone-blue {
  --directory-color: #2478ff;
  --directory-soft: #eef5ff;
  --directory-action: #1769e8;
  --directory-border: #c9ddff;
}

.raw-directory-card.tone-green {
  --directory-color: #168f63;
  --directory-soft: #ecfdf5;
  --directory-action: #08764e;
  --directory-border: #a8e7cf;
}

.raw-directory-card.tone-amber {
  --directory-color: #bf7b16;
  --directory-soft: #fff7e6;
  --directory-action: #a16207;
  --directory-border: #f7d489;
}

.raw-directory-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 22px 22px 14px;
}

.raw-directory-head > span {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: #ffffff;
  border-radius: 12px;
  background: var(--directory-color);
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}

.raw-directory-head h2 {
  margin: 0 0 5px;
  color: #10213a;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
}

.raw-directory-head p {
  margin: 0;
  color: #536985;
  font-size: 14px;
  line-height: 1.65;
}

.raw-directory-list {
  display: grid;
  padding: 12px 22px 22px;
}

.raw-directory-list.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 26px;
}

.raw-directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 10px 0;
  color: #10213a;
  border-top: 1px solid #e8eef5;
  text-decoration: none;
}

.raw-directory-row strong {
  min-width: 0;
  color: inherit;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 820;
}

.raw-directory-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  color: var(--directory-action);
  border: 1px solid var(--directory-border);
  border-radius: 999px;
  background: var(--directory-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.raw-directory-row:hover {
  color: var(--directory-action);
}

.raw-directory-row:hover span {
  color: #ffffff;
  border-color: var(--directory-color);
  background: var(--directory-color);
}

.exam-article {
  padding: 0 0 12px;
  color: #142236;
}

.exam-article-head {
  align-items: center;
  margin-bottom: 22px;
  padding: 0 0 16px;
  border-bottom: 1px solid #dfe7f1;
}

.exam-article-head p {
  margin-bottom: 5px;
  color: #6b7f98;
  font-size: 13px;
}

.exam-article-head h2 {
  color: #10213a;
  font-size: 21px;
  font-weight: 850;
}

.exam-article .done-check {
  min-height: 38px;
  padding: 0 14px;
  border-color: #d7e2ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(26, 45, 76, 0.05);
}

.lesson-local-tabs {
  top: 64px;
  gap: 7px;
  margin-bottom: 22px;
  padding: 10px 0 13px;
  border-bottom-color: #dfe7f1;
  background: rgba(245, 248, 252, 0.92);
  backdrop-filter: blur(10px);
}

.lesson-local-tabs a {
  min-height: 31px;
  padding: 0 11px;
  color: #3f5c7c;
  border-color: #d6e2f0;
  border-radius: 7px;
  background: #ffffff;
  font-size: 13px;
}

.lesson-local-tabs a:hover,
.lesson-local-tabs a.active {
  color: #1769e8;
  border-color: #9fc3ff;
  background: #edf5ff;
}

.lesson-section {
  gap: 16px;
  padding: 25px 0;
  border-bottom-color: #e3eaf2;
}

.lesson-section h2 {
  color: #10213a;
  font-size: 22px;
  font-weight: 880;
}

.markdown-article {
  color: #1f2f46;
}

.markdown-section h1,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6 {
  color: #10213a;
}

.markdown-section h1 {
  font-size: 30px;
}

.markdown-section h3 {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 850;
}

.markdown-section h4 {
  font-size: 16px;
  font-weight: 820;
}

.markdown-section h3[id],
.markdown-section h4[id] {
  scroll-margin-top: 92px;
}

.markdown-section p,
.markdown-section li {
  color: #30445f;
  font-size: 16px;
  line-height: 1.9;
}

.markdown-section ul,
.markdown-section ol {
  gap: 9px;
  color: #30445f;
  line-height: 1.85;
}

.markdown-section p code,
.markdown-section li code,
.markdown-section td code {
  color: #0e63d8;
  border-color: #d5e5ff;
  background: #f2f7ff;
}

.markdown-section blockquote,
.markdown-state {
  border-color: #cfe0ff;
  background: #f3f8ff;
}

.code-panel {
  border: 1px solid #263346;
  border-radius: 9px;
  background: #1f2937;
  box-shadow: 0 12px 28px rgba(15, 30, 50, 0.14);
}

.code-panel-head {
  min-height: 38px;
  color: #dce7f5;
  background: #273449;
}

.code-sample {
  color: #edf5ff;
  background: #1f2937;
  line-height: 1.7;
}

.code-line-no {
  color: #8190a6;
}

.markdown-table-wrap,
.markdown-visual-figure,
.markdown-section img,
.markdown-details {
  border-color: #dce6f2;
  border-radius: 10px;
}

.markdown-section th {
  background: #f3f7ff;
}

@media (max-width: 1060px) {
  .exam-main {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .exam-knowledge {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .exam-topbar {
    min-height: 58px;
  }

  .exam-tabs {
    height: 44px;
  }

  .exam-hero-inner {
    min-height: 82px;
  }

  .exam-hero h1 {
    font-size: 24px;
  }

  .exam-main {
    padding-top: 18px;
  }

  .exam-article-head h2 {
    font-size: 18px;
  }

  .lesson-local-tabs {
    background: transparent;
    backdrop-filter: none;
  }
}
