:root {
  --ink: #17312b;
  --muted: #64716c;
  --line: #dfe8e3;
  --brand: #197b62;
  --blue: #216d9c;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --soft: #edf6f1;
  --warn: #fff5df;
  --shadow: 0 14px 36px rgba(35, 50, 43, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #eef4f1;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
}

.app {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.hero {
  min-height: 300px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(8, 33, 29, 0.22), rgba(8, 33, 29, 0.88)),
    url("./assets/harbour-study-hero-1280.jpg") center/cover;
  box-shadow: var(--shadow);
}

.topbar {
  align-self: start;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 62px;
}

.topbar a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(7, 26, 45, 0.42);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  color: #d4efe4;
}

.hero h1,
.section-title h2,
.focus-grid h2 {
  margin: 0;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.02;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lead {
  max-width: 720px;
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.exam-rule,
.summary-grid,
.focus-grid,
.cluster-grid {
  display: grid;
  gap: 12px;
}

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

.exam-rule > *,
.summary-grid > *,
.focus-grid > *,
.cluster-grid > * {
  min-width: 0;
}

article,
.algorithm,
.question-tool,
.study-map,
.mindset-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(35, 50, 43, 0.06);
}

.exam-rule article,
.summary-grid article,
.focus-grid article {
  padding: 14px;
}

.exam-rule span,
.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.exam-rule strong,
.summary-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.exam-rule p,
.summary-grid small,
.cluster-card p,
.focus-grid li,
.algorithm li,
.list-head span {
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.study-map,
.algorithm,
.question-tool,
.mindset-section {
  padding: 16px;
  margin-top: 14px;
}

.section-title {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.mindset-lead {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 8px;
  background: #f8fbf9;
  border: 1px solid var(--line);
}

.mindset-lead strong {
  font-size: 18px;
}

.mindset-lead p,
.mindset-cards p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.mindset-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.mindset-cards article {
  padding: 13px;
  box-shadow: none;
  background: #fff;
}

.mindset-cards span {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.mindset-cards strong {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
}

.section-title .eyebrow {
  color: var(--brand);
}

.section-title h2,
.focus-grid h2 {
  font-size: 22px;
}

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

.cluster-card {
  padding: 13px;
  background: #f8fbf9;
}

.cluster-card strong {
  display: block;
  margin-bottom: 7px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chips span,
.question-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  color: #31554b;
  background: var(--soft);
  font-size: 12px;
  font-weight: 850;
}

.algorithm ol,
.algorithm li,
.focus-grid ul {
  margin-top: 0;
}

.algorithm ol {
  margin-bottom: 0;
  padding-left: 24px;
}

.algorithm li + li,
.focus-grid li + li {
  margin-top: 7px;
}

.focus-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.focus-grid article:first-child {
  border-left: 5px solid var(--blue);
}

.focus-grid article:last-child {
  border-left: 5px solid var(--brand);
}

.hidden {
  display: none !important;
}

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

.start-card {
  min-width: 0;
  min-height: 136px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  display: grid;
  align-content: start;
  gap: 8px;
  cursor: pointer;
}

.start-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.start-card strong {
  font-size: 28px;
}

.start-card small {
  color: var(--muted);
  line-height: 1.45;
}

.practice-panel {
  display: grid;
  gap: 12px;
}

.practice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.practice-top button,
.answer-dock button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.practice-top div {
  display: grid;
  gap: 3px;
  text-align: right;
}

.practice-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

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

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
}

.active-question-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.active-options {
  display: grid;
  gap: 9px;
}

.option-button {
  min-height: 54px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: start;
  line-height: 1.55;
}

.option-button b {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #edf6f1;
  color: var(--brand);
}

.option-button.selected {
  border-color: var(--brand);
  background: #f0faf5;
}

.option-button.correct {
  border-color: #1d8f68;
  background: #e8f7ef;
}

.option-button.wrong {
  border-color: #c75d55;
  background: #fff1ed;
}

.answer-panel {
  padding: 12px;
  border: 1px solid #ead8a7;
  border-radius: 8px;
  background: var(--warn);
  display: grid;
  gap: 8px;
}

.answer-panel strong {
  font-size: 18px;
}

.answer-panel p {
  margin: 0;
  line-height: 1.6;
  white-space: pre-line;
}

.answer-dock {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 10px 0 2px;
  background: linear-gradient(180deg, rgba(238, 244, 241, 0), #eef4f1 30%);
}

.answer-dock .primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

@media (max-width: 760px) {
  .app {
    padding: 10px 10px 28px;
  }

  .hero {
    min-height: 290px;
  }

  .hero h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  .lead {
    font-size: 15px;
    line-height: 1.6;
  }

  .hero h1,
  .lead,
  .exam-rule p,
  .summary-grid small,
  .cluster-card p,
  .focus-grid li,
  .algorithm li {
    word-break: break-all;
  }

  .exam-rule,
  .summary-grid,
  .focus-grid,
  .cluster-grid,
  .mindset-cards {
    grid-template-columns: 1fr;
  }

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

  .start-panel {
    grid-template-columns: 1fr;
  }

  .practice-top {
    align-items: start;
  }

  .active-question-title {
    font-size: 18px;
  }
}
