:root {
  color-scheme: light;
  --page: #ffffff;
  --ink: #111318;
  --muted: #747987;
  --faint: #9da2ad;
  --border: #dfe1e5;
  --divider: #eef0f2;
  --hover: #f7f8f8;
  --green: #20b889;
  --green-soft: #e7f8f2;
  --blue: #527bd8;
  --yellow: #d8940a;
  --red: #e95055;
  --shadow: 0 1px 2px rgba(18, 22, 33, .06);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
a { -webkit-tap-highlight-color: transparent; }

.grid-noise { display: none; }

.topbar {
  width: 100%;
  max-width: 1180px;
  min-height: 68px;
  margin: 0 auto;
  padding: 16px 24px;
  border-bottom: 1px solid var(--divider);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.brand {
  min-width: 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .075em;
  text-decoration: none;
}

.brand b { color: var(--muted); font-weight: 540; }

.brand-mark {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.service-tabs {
  min-width: 0;
  padding: 3px;
  border: 1px solid #e1e3e7;
  border-radius: 7px;
  background: #f5f6f7;
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.service-tabs::-webkit-scrollbar { display: none; }

.service-tab {
  min-width: 72px;
  height: 28px;
  padding: 0 11px;
  border-radius: 4px;
  color: #727783;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .075em;
  line-height: 1;
  text-decoration: none;
  transition: color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.service-tab:hover { color: #24272d; background: rgba(255, 255, 255, .72); }

.service-tab.is-active {
  color: #fff;
  background: #292b31;
  box-shadow: 0 1px 3px rgba(17, 19, 24, .18);
}

.language-button {
  min-width: 38px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #d8dbe0;
  border-radius: 6px;
  color: #555b66;
  background: #fff;
  justify-self: end;
  font: 650 11px/1 inherit;
  cursor: pointer;
}

.language-button:hover { background: var(--hover); }

.shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 66px 24px 54px;
}

.hero {
  margin-bottom: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.eyebrow {
  margin: 0 0 16px;
  color: #5e6470;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow span { width: 24px; height: 1px; background: #aeb2b9; }
.eyebrow em { color: var(--faint); font-style: normal; }

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -.048em;
}

.intro {
  max-width: 690px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.overall-badge {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--muted);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  font-size: 11px;
  box-shadow: var(--shadow);
}

.overall-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}

.overall-badge.is-stable,
.overall-badge.is-baseline { color: #168665; border-color: #ccecdf; background: #f2fbf8; }
.overall-badge.is-stable i,
.overall-badge.is-baseline i { background: var(--green); }
.overall-badge.is-watch { color: #9c6904; border-color: #f0dfb8; background: #fffaf0; }
.overall-badge.is-watch i { background: var(--yellow); }
.overall-badge.is-changed,
.overall-badge.is-error { color: #be3c42; border-color: #f1ced0; background: #fff7f7; }
.overall-badge.is-changed i,
.overall-badge.is-error i { background: var(--red); }

.metric-grid {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.metric-grid article {
  min-height: 126px;
  padding: 21px;
  border-right: 1px solid var(--divider);
}

.metric-grid article:last-child { border-right: 0; }

.metric-grid span {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 620;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.metric-grid strong {
  margin: 18px 0 7px;
  color: #24272d;
  display: block;
  font: 600 24px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.metric-grid small { color: var(--faint); font-size: 10px; }

.legend,
.chart-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.flash { background: var(--green); }
.pro { background: var(--blue); }
.vision { background: #c05aa4; }

.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.chart-panel { padding: 25px 25px 18px; }
.panel-head { display: flex; justify-content: space-between; gap: 20px; }
.kicker { margin: 0 0 7px; color: var(--faint); font-size: 9px; font-weight: 650; letter-spacing: .13em; }
.panel h2 { margin: 0; color: #24272d; font-size: 17px; font-weight: 630; }

.chart-legend { color: var(--muted); display: flex; gap: 18px; font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-wrap { position: relative; min-height: 290px; margin-top: 22px; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid-line { stroke: #eceef0; stroke-width: 1; }
.chart-label { fill: #9ba0aa; font: 10px ui-monospace, monospace; }
.line { fill: none; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.flash-line { stroke: var(--green); }
.pro-line { stroke: var(--blue); }
.vision-line { stroke: #c05aa4; }
.chart-dot { stroke: #fff; stroke-width: 2; }

.empty-chart {
  position: absolute;
  inset: 0;
  color: var(--faint);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.empty-chart[hidden] { display: none; }

.chart-foot {
  padding-top: 13px;
  border-top: 1px solid var(--divider);
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
}

.models-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.model-card { padding: 23px; }

.model-head {
  padding-bottom: 19px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.model-name { color: #24272d; font: 600 16px/1.2 ui-monospace, monospace; }
.model-sub { margin-top: 6px; color: var(--faint); display: block; font-size: 9px; }

.model-state {
  padding: 6px 8px;
  border-radius: 5px;
  color: #168665;
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
}

.model-state.watch { color: #9c6904; background: #fff5dc; }
.model-state.changed,
.model-state.error,
.model-state.partial { color: #be3c42; background: #ffebec; }

.probe-list { margin-top: 16px; }
.probe-row {
  min-height: 35px;
  border-bottom: 1px solid #f0f1f2;
  color: var(--muted);
  display: grid;
  grid-template-columns: 34px 1fr 62px 70px;
  align-items: center;
  gap: 10px;
  font: 10px/1.2 ui-monospace, monospace;
}
.probe-row:last-child { border-bottom: 0; }
.probe-index { color: #b0b4bb; }
.probe-answer { color: #343840; }
.probe-answer.bad { color: var(--red); }
.probe-prob,
.probe-logp { text-align: right; }
.probe-prob { color: #555b65; }
.probe-logp { color: #9297a0; }

.model-meta { margin-top: 17px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.model-meta div { min-width: 0; padding: 11px; border: 1px solid #e5e7ea; border-radius: 6px; background: #fafbfb; overflow: hidden; }
.model-meta span { color: var(--faint); display: block; font-size: 8px; letter-spacing: .07em; }
.model-meta b { margin-top: 5px; color: #656b76; display: block; overflow: hidden; font: 500 10px/1.2 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.empty-probes { padding: 50px 10px; color: var(--faint); text-align: center; font-size: 12px; }

.method-panel {
  margin-top: 18px;
  padding: 23px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.method-steps { display: flex; align-items: center; }
.method-steps span { min-width: 88px; text-align: center; }
.method-steps b { color: #343840; display: block; font: 600 16px/1 ui-monospace, monospace; }
.method-steps small { margin-top: 6px; color: var(--faint); display: block; font-size: 8px; letter-spacing: .07em; }
.method-steps > i { width: 30px; height: 1px; background: #dfe2e5; }

footer {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 25px 24px 30px;
  border-top: 1px solid var(--divider);
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 9px;
  letter-spacing: .06em;
}

@media (max-width: 800px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .service-tabs { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-self: stretch; }
  .language-button { grid-column: 2; grid-row: 1; }
  .hero { display: block; }
  .overall-badge { width: max-content; margin-top: 22px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid article { border-bottom: 1px solid var(--divider); }
  .metric-grid article:nth-child(even) { border-right: 0; }
  .metric-grid article:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .models-grid { grid-template-columns: 1fr; }
  .method-panel { display: block; }
  .method-steps { margin-top: 24px; justify-content: space-between; }
  .method-steps > i { width: 13px; }
}

@media (max-width: 520px) {
  .topbar { padding: 14px 16px; }
  .brand b { display: none; }
  .service-tab { min-width: 68px; padding: 0 9px; }
  .shell { padding: 46px 16px 42px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid article { min-height: 108px; border-right: 0; border-bottom: 1px solid var(--divider) !important; }
  .metric-grid article:last-child { border-bottom: 0 !important; }
  .chart-panel { padding: 20px 14px 15px; }
  .chart-legend { gap: 10px; }
  .chart-wrap { min-height: 205px; }
  .model-card { padding: 19px 14px; }
  .probe-row { grid-template-columns: 27px 1fr 55px 60px; }
  .method-steps { overflow: auto; justify-content: flex-start; }
  .method-steps span { min-width: 74px; }
  .method-steps > i { min-width: 12px; }
  footer { display: block; line-height: 1.8; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
