:root {
  color-scheme: light;
  --navy: #0a2130;
  --navy-soft: #173849;
  --teal: #0b746c;
  --teal-light: #16a394;
  --aqua: #d8f1ec;
  --surface: #ffffff;
  --canvas: #edf4f4;
  --line: #d7e2e2;
  --muted: #60727a;
  --shadow: 0 24px 70px rgba(13, 43, 55, 0.1);
  font-family: Inter, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--navy); background: var(--canvas); }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: fixed;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: white;
  background: var(--navy);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 78px;
  padding: 0 4vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid rgba(10, 33, 48, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 0.8rem; width: fit-content; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; }
.brand strong { font-size: 1rem; letter-spacing: -0.01em; }
.brand small { margin-top: 0.14rem; font-size: 0.63rem; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }
.site-header nav { display: flex; gap: 2rem; font-size: 0.83rem; color: #36505b; }
.site-header nav a:hover { color: var(--teal); }
.status-pill { justify-self: end; display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.78rem; color: var(--muted); }
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #d0a743; box-shadow: 0 0 0 5px rgba(208, 167, 67, 0.12); }
.status-pill.is-ready i { background: var(--teal-light); box-shadow: 0 0 0 5px rgba(22, 163, 148, 0.12); }

main { width: min(1180px, calc(100% - 3rem)); margin: 0 auto; padding: 5.5rem 0 5rem; }
.evaluation-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 6rem; align-items: end; }
.eyebrow, .panel-heading p { margin: 0 0 1rem; color: var(--teal); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.19em; }
h1 { margin: 0; max-width: 760px; font-family: Georgia, "Songti SC", serif; font-size: clamp(3rem, 6vw, 5.8rem); font-weight: 500; line-height: 0.98; letter-spacing: -0.055em; }
.hero-copy { padding-bottom: 0.45rem; }
.hero-copy p { margin: 0 0 1.4rem; color: #3f5964; font-size: 1.05rem; line-height: 1.8; }
.hero-copy span { font-size: 0.78rem; color: var(--muted); }

.metric-grid { margin: 4.5rem 0 1.25rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--line); box-shadow: var(--shadow); }
.metric-card { min-height: 190px; padding: 1.7rem; display: flex; flex-direction: column; background: var(--surface); }
.metric-card-primary { color: white; background: var(--navy); }
.metric-card span { color: var(--teal); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.metric-card-primary span, .metric-card-primary small { color: #a6d8d2; }
.metric-card strong { margin: auto 0 0.55rem; font-family: Georgia, serif; font-size: 3.2rem; font-weight: 500; letter-spacing: -0.05em; }
.metric-card small { color: var(--muted); line-height: 1.45; }

.dashboard-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1.25rem; }
.surface { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 16px 50px rgba(13, 43, 55, 0.06); }
.latency-panel, .review-panel, .topic-panel { padding: 2rem; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.panel-heading p { margin-bottom: 0.45rem; }
.panel-heading h2 { margin: 0; font-size: 1.45rem; letter-spacing: -0.025em; }
.panel-heading > span { padding: 0.45rem 0.7rem; border-radius: 999px; color: var(--teal); background: var(--aqua); font-size: 0.72rem; font-weight: 700; }
.latency-total { margin: 2.1rem 0 1.35rem; display: flex; align-items: end; justify-content: space-between; }
.latency-total span { color: var(--muted); }
.latency-total strong { font-family: Georgia, serif; font-size: 3rem; font-weight: 500; }
.latency-stack { height: 13px; display: flex; overflow: hidden; border-radius: 999px; background: #e8eeee; }
.latency-segment.retrieval { background: var(--teal); }
.latency-segment.generation { background: #62b7ac; }
.latency-legend { margin-top: 1.25rem; display: grid; gap: 0.8rem; }
.latency-legend div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 0.65rem; font-size: 0.85rem; }
.latency-legend i { width: 8px; height: 8px; border-radius: 50%; }
.latency-legend i.retrieval { background: var(--teal); }
.latency-legend i.generation { background: #62b7ac; }
.panel-note { margin: 2rem 0 0; padding: 1rem 1.1rem; border-left: 3px solid var(--teal-light); color: var(--muted); background: #f2f7f7; font-size: 0.8rem; line-height: 1.65; }

.review-bars { margin-top: 1.65rem; display: grid; gap: 1.15rem; }
.review-row { display: grid; grid-template-columns: minmax(110px, 0.55fr) 1fr 52px; align-items: center; gap: 0.85rem; }
.review-row span { font-size: 0.82rem; color: #334e59; }
.review-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e6eeee; }
.review-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--teal-light)); }
.review-row strong { text-align: right; font-size: 0.82rem; }

.topic-panel { margin-top: 1.25rem; }
.topic-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 0.7rem; }
th, td { padding: 1rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.82rem; }
th { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.11em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.score-pill { display: inline-flex; min-width: 64px; justify-content: center; padding: 0.38rem 0.62rem; border-radius: 999px; color: var(--teal); background: var(--aqua); font-weight: 800; }

.method-grid { margin-top: 1.25rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.method-grid article { min-height: 160px; padding: 1.5rem; display: flex; gap: 1.1rem; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, 0.72); }
.method-grid article > span { color: var(--teal); font-family: Georgia, serif; font-size: 1.8rem; }
.method-grid strong { display: block; margin: 0.35rem 0 0.65rem; }
.method-grid p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.65; }
.loading-state { color: var(--muted); }

footer { min-height: 84px; padding: 0 4vw; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #71838b; border-top: 1px solid var(--line); background: white; font-size: 0.75rem; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .evaluation-hero { grid-template-columns: 1fr; gap: 2rem; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header { min-height: 68px; padding: 0 1rem; }
  .status-pill { font-size: 0; }
  main { width: min(100% - 1.5rem, 1180px); padding-top: 3.5rem; }
  h1 { font-size: 3.3rem; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 150px; }
  .review-row { grid-template-columns: 1fr 52px; }
  .review-track { grid-column: 1 / -1; grid-row: 2; }
  footer { padding: 1.2rem; flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
