:root {
  --ink: #17202a;
  --muted: #607080;
  --line: #dce4e9;
  --paper: #fbfcfa;
  --soft: #eef6f4;
  --teal: #0f766e;
  --teal-dark: #0b4f49;
  --coral: #e45f45;
  --gold: #c58b2b;
  --green: #287a4d;
  --blue: #246b9f;
  --shadow: 0 18px 45px rgba(21, 35, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(220, 228, 233, 0.8);
  background: rgba(251, 252, 250, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

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

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--teal-dark);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 44px;
  align-items: stretch;
  max-width: 1180px;
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 48px 28px 28px;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 700px;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.advisor-card {
  max-width: 980px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
}

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

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.25);
  outline-offset: 2px;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--teal-dark);
}

.hero__visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 520px;
  padding: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #dfece9;
}

.hero__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.hero-stats div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

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

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

.hero-stats strong {
  margin-top: 5px;
  font-size: 18px;
}

.notice,
.coverage-panel,
.summary-panel,
.planner,
.school-section,
.compare-section,
.guide-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 28px;
}

.notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.notice strong {
  flex: 0 0 auto;
  color: var(--coral);
}

.notice p {
  margin: 0;
  line-height: 1.7;
}

.coverage-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.coverage-panel article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.coverage-panel span,
.coverage-panel strong,
.coverage-panel p {
  display: block;
}

.coverage-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.coverage-panel strong {
  margin-top: 6px;
  font-size: 26px;
}

.coverage-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.summary-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.risk-badge {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: var(--gold);
  font-weight: 800;
}

.risk-badge[data-risk="稳妥"] {
  background: var(--green);
}

.risk-badge[data-risk="偏高"] {
  background: var(--coral);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 36px;
}

.result-column {
  min-width: 0;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading p:not(.eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.card-grid {
  display: grid;
  gap: 12px;
}

.school-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.school-card__top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.school-card__top p,
.note,
.source-line,
.school-card footer {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.category {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  color: white;
  font-weight: 900;
}

.category--rush {
  background: var(--coral);
}

.category--stable {
  background: var(--blue);
}

.category--safe {
  background: var(--green);
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 13px;
}

.metric-row span {
  color: var(--muted);
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--coral);
}

.sparkline {
  display: flex;
  align-items: end;
  gap: 5px;
  min-height: 84px;
  padding: 10px;
  border-radius: 6px;
  background: #f8faf8;
}

.bar {
  flex: 1;
  min-width: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #2b8f84, #8ccfc0);
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f2f0e8;
  color: #755b22;
  font-size: 12px;
  font-weight: 700;
}

.school-card footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.empty-inline {
  color: var(--muted);
  font-size: 13px;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
}

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

.plan-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.rank {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: var(--ink);
  font-weight: 900;
}

.plan-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.warning-box {
  padding: 18px;
  border-radius: 8px;
  color: #3f2a12;
  background: #fff6df;
}

.warning-box ul {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-left: 20px;
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f6f8f7;
  font-size: 13px;
}

td {
  line-height: 1.55;
}

.compare-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.compare-panel {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.compare-names,
.compare-row {
  display: grid;
  grid-template-columns: 160px 1fr 1fr;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.compare-names {
  grid-template-columns: 1fr 1fr;
  padding-left: 172px;
  background: #f6f8f7;
}

.compare-row span {
  color: var(--muted);
  font-weight: 800;
}

.compare-row p {
  margin: 0;
  line-height: 1.55;
}

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

.guide-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.guide-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.rules-list,
.source-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px 18px 18px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  line-height: 1.7;
}

.source-list a {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.source-list a:hover {
  text-decoration: underline;
}

.footer {
  padding: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 22px;
  }

  nav {
    flex-wrap: wrap;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 34px;
  }

  .hero__visual {
    min-height: 420px;
  }

  .form-grid,
  .results-grid,
  .coverage-panel,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 680px) {
  .topbar {
    gap: 14px;
  }

  nav {
    gap: 12px;
    font-size: 13px;
  }

  .hero,
  .notice,
  .coverage-panel,
  .summary-panel,
  .planner,
  .school-section,
  .compare-section,
  .guide-section,
  .results-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .advisor-card {
    padding: 14px;
  }

  .form-grid,
  .results-grid,
  .coverage-panel,
  .guide-grid,
  .compare-controls {
    grid-template-columns: 1fr;
  }

  .summary-panel,
  .notice {
    display: grid;
  }

  .risk-badge {
    width: fit-content;
  }

  .hero__visual {
    min-height: 300px;
  }

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

  .compare-names {
    display: none;
  }

  .compare-row {
    grid-template-columns: 1fr;
  }
}
