:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #667085;
  --line: #d9e1ea;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --warm: #d97706;
  --rose: #be123c;
  --soft-green: #e8f5ef;
  --soft-blue: #edf4ff;
  --soft-yellow: #fff7df;
  --shadow: 0 18px 45px rgba(29, 41, 57, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(232, 245, 239, 0.72), transparent 420px),
    var(--paper);
  color: var(--ink);
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.6;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 225, 234, 0.85);
  background: rgba(251, 252, 248, 0.9);
  backdrop-filter: blur(12px);
}

.brand,
.nav a,
.button,
.link-button {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--ink);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 20px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  color: var(--accent);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(320px, 1.04fr);
  align-items: center;
  min-height: calc(100vh - 72px);
  gap: clamp(28px, 5vw, 72px);
  padding: 42px 0 54px;
}

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

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.25;
}

.hero-text {
  max-width: 540px;
  color: #3d4856;
  font-size: 18px;
}

.hero-actions,
.problem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(29, 41, 57, 0.12);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

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

.button.ghost {
  background: rgba(255, 255, 255, 0.58);
}

.button.small {
  min-height: 38px;
  padding: 0 13px;
  font-size: 14px;
}

.button.success {
  border-color: #b9dfce;
  background: var(--soft-green);
  color: #0b5f35;
}

.button.danger {
  border-color: #ffd0dc;
  background: #fff0f3;
  color: var(--rose);
}

.hero-art {
  margin: 0;
  min-width: 0;
}

.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(217, 225, 234, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: -34px;
}

.stat,
.path-card,
.practice-panel,
.problem-view,
.notes-panel,
.mistake-list,
.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(29, 41, 57, 0.06);
}

.stat {
  padding: 18px;
}

.stat-number {
  display: block;
  color: var(--accent-dark);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 84px 0 8px;
}

.section-head {
  max-width: 690px;
  margin-bottom: 22px;
}

.section-head.compact {
  margin-bottom: 18px;
}

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

.path-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 20px;
}

.path-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft-blue);
  color: #1d4ed8;
  font-size: 22px;
  font-weight: 900;
}

.path-card:nth-child(2) .path-icon {
  background: var(--soft-green);
  color: var(--accent-dark);
}

.path-card:nth-child(3) .path-icon {
  background: var(--soft-yellow);
  color: #92400e;
}

.path-card:nth-child(4) .path-icon {
  background: #fff0f3;
  color: var(--rose);
}

.path-card h3 {
  margin-top: 18px;
  font-size: 22px;
}

.path-card p,
.plan-card p,
.problem-meta {
  color: var(--muted);
}

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

.tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #42526a;
  font-size: 12px;
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 18px;
}

.split.reversed {
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
}

.practice-panel,
.problem-view,
.notes-panel,
.mistake-list {
  padding: 22px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 158px;
  padding: 12px;
}

.problem-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.problem-item {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.problem-item:hover,
.problem-item.active {
  border-color: var(--accent);
  background: #f3fbf8;
}

.problem-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

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

.problem-view {
  position: sticky;
  top: 86px;
  min-height: 430px;
}

.problem-body {
  padding: 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #f7faf9;
  font-size: 18px;
}

.answer-box {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #cfe4dd;
  border-radius: 8px;
  background: #f3fbf8;
}

.answer-box.solution {
  border-color: #fde3b2;
  background: #fff8e8;
}

.mistake-list {
  min-height: 256px;
}

.mistake-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.mistake-card:last-child {
  border-bottom: 0;
}

.mistake-card strong {
  display: block;
}

.mistake-card button {
  margin-top: 8px;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.plan-card {
  padding: 16px;
}

.plan-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-dark);
}

.plan-card p {
  margin-bottom: 0;
  font-size: 14px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 70px auto 0;
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--rose);
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero,
  .split,
  .split.reversed {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

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

  .problem-view {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  main {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    gap: 24px;
    padding-top: 28px;
  }

  h1 {
    font-size: 40px;
  }

  .dashboard,
  .path-grid,
  .filters,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 64px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 22px, 1180px);
  }
}
