:root {
  --bg: #eef4f9;
  --card: #ffffff;
  --line: #d7e4ef;
  --text: #16324f;
  --muted: #647a91;
  --primary: #1266b1;
  --primary-dark: #0e3d6a;
  --hero1: #103e69;
  --hero2: #2d83c8;
  --success: #12a56f;
  --warn: #e4a516;
  --danger: #df4f4f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
.topbar {
  background: #0d365d;
  color: #fff;
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #57b8ff, #1266b1);
  font-weight: 700;
}
.brand-title { font-size: 16px; font-weight: 700; }
.exp-tag {
  border: 1px solid rgba(255,255,255,.35);
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px;
}
.page { max-width: 1180px; margin: 0 auto; padding: 22px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(17,58,94,.04);
}
.hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  background: linear-gradient(135deg, var(--hero1), var(--hero2));
  color: #fff;
}
.hero-text { max-width: 760px; position: relative; z-index: 2; }
.eyebrow { letter-spacing: 1.2px; font-size: 14px; opacity: .9; font-weight: 700; }
.hero-card h1 { margin: 12px 0 16px; font-size: 28px; }
.hero-card p { margin: 0 0 16px; line-height: 1.7; max-width: 700px; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-tags span {
  padding: 8px 12px; border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; font-size: 13px; background: rgba(255,255,255,.08);
}
.hero-ring {
  position: absolute; right: 40px; top: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  border: 28px solid rgba(255,255,255,.08);
}
.notice-card {
  margin-top: 16px; padding: 14px 18px; color: #7b5a1b;
  background: #fff7e6; border-color: #f0d9a3;
}
.steps-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 18px 0;
}
.step-chip {
  background: #f8fbfe; border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px; font-weight: 600; color: var(--text);
}
.step-chip span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px;
  background: #e9f3fb; color: var(--primary); border-radius: 8px; font-size: 13px;
}
.step-chip.active { border-color: #87b5dd; }
.grid { display: grid; gap: 16px; }
.grid-main { grid-template-columns: 1.1fr 1fr; }
.grid-results { grid-template-columns: 1fr 1fr; margin-top: 16px; }
.panel { padding: 18px; }
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 10px;
}
.panel-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-no {
  width: 28px; height: 28px; display: inline-grid; place-items: center;
  border-radius: 8px; background: #e9f3fb; color: var(--primary); font-size: 13px;
}
.ghost-btn, .primary-btn, .secondary-btn, .preset-btn {
  border: 1px solid #b7cfe3; border-radius: 12px; cursor: pointer; font-size: 14px;
  transition: .2s ease;
}
.ghost-btn { background: #fff; padding: 8px 12px; color: var(--primary-dark); }
.primary-btn {
  background: var(--primary); color: #fff; padding: 12px 18px; border-color: var(--primary);
}
.secondary-btn { background: #fff; color: var(--primary-dark); padding: 12px 18px; }
.preset-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.preset-btn { background: #f7fbff; padding: 10px 14px; color: var(--primary-dark); }
.preset-btn.active { background: #e8f2fb; border-color: #7fb0dc; }
.controls { display: grid; gap: 14px; }
.control-item {
  border: 1px solid #e0ebf4; border-radius: 16px; padding: 14px;
  background: #fbfdff;
}
.control-label { margin-bottom: 10px; font-size: 14px; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
select {
  width: 100%; padding: 10px 12px; border: 1px solid #c8d9e7; border-radius: 12px;
  background: #fff; color: var(--text);
}
.action-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.sim-wrap {
  border-radius: 18px; background: #0e2640; overflow: hidden; border: 1px solid #23456b;
}
#roadCanvas { width: 100%; height: auto; display: block; background: #163a5e; }
.caption-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px;
  font-size: 13px; color: var(--muted);
}
.status-dot, .runtime { color: var(--muted); font-size: 13px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #b6c6d5; margin-right: 6px; }
.metric-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px;
}
.metric-card {
  padding: 16px; border: 1px solid #e0ebf4; border-radius: 16px; background: #fbfdff;
}
.metric-num { font-size: 24px; font-weight: 800; color: var(--primary-dark); }
.metric-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.result-box {
  min-height: 92px; border: 1px solid #d6e5f1; background: #f7fbfe;
  border-radius: 16px; padding: 14px; line-height: 1.7; margin-bottom: 12px;
}
.result-table, .record-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.result-table th, .result-table td,
.record-table th, .record-table td {
  border-bottom: 1px solid #e6eef6; padding: 10px 8px; text-align: left; vertical-align: top;
}
.result-table th, .record-table th { color: var(--muted); font-weight: 600; }
.record-note {
  background: #f7fbfe; border: 1px solid #d6e5f1; border-radius: 14px; padding: 12px; margin-bottom: 10px;
  font-size: 14px; color: var(--text);
}
.table-scroll { max-height: 280px; overflow: auto; }
.empty-row td { text-align: center; color: var(--muted); }
.task-panel { margin-top: 16px; }
.task-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.task-card {
  border: 1px solid #dce8f2; border-radius: 16px; padding: 16px; background: #fbfdff;
}
.task-card h3 { margin: 0 0 10px; font-size: 16px; }
.task-card p { margin: 0; color: var(--muted); line-height: 1.7; }

@media (max-width: 980px) {
  .grid-main, .grid-results, .task-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .page { padding: 14px; }
  .topbar { padding: 12px 16px; }
  .steps-row { grid-template-columns: repeat(2, 1fr); }
  .two-col, .caption-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .hero-card h1 { font-size: 24px; }
  .action-row { flex-direction: column; }
  .primary-btn, .secondary-btn { width: 100%; }
}
