.ev-jump {
  margin-left: auto;
  color: var(--ink2);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 3px;
}

.ev-card {
  margin-top: 16px;
  scroll-margin-top: 16px;
}

.ev-card [hidden] { display: none; }
.ev-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.ev-header h2 { font-size: 21px; }
.ev-header p, .ev-panel-head p, .ev-method { color: var(--ink2); font-size: 14px; }
.ev-panel-head p { max-width: 76ch; margin-top: 4px; }
.ev-tabs { margin-top: 14px; }

#ev-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ev-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
}

.ev-panel-head h3 { font-size: 18px; }
.ev-case { width: min(100%, 270px); }
.ev-case span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }

.ev-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 10px 0;
  margin: 8px 0 0;
  border-bottom: 1px solid var(--line);
}

.ev-metrics div { display: flex; align-items: baseline; gap: 7px; }
.ev-metrics dt { font-weight: 700; font-size: 17px; }
.ev-metrics dd { margin: 0; color: var(--ink2); font-size: 13px; }
.ev-plot { width: 100%; max-width: 820px; margin: 12px auto 0; }
.ev-plot svg { display: block; width: 100%; height: auto; }
.ev-plot svg text { font-size: 12px; }
.ev-plot .ev-axis-title { font-size: 13px; font-weight: 600; fill: var(--ink2); }
.ev-plot .ev-gridline { stroke: var(--line); }
.ev-plot .ev-zero { stroke: var(--mute); }
.ev-plot .ev-case-range { stroke: var(--mute); opacity: .65; }
.ev-plot .ev-range { stroke: var(--ink2); stroke-width: 2.5; }
.ev-plot .ev-selected-band { fill: var(--soft); }
.ev-plot .ev-dashed { stroke: var(--ink2); stroke-dasharray: 5 4; }
.ev-plot .ev-point { fill: var(--mute); fill-opacity: .65; stroke: var(--card); stroke-width: 1.25; }
.ev-plot .ev-near, .ev-plot .ev-point-selected { fill: var(--ink); fill-opacity: 1; }
.ev-plot .ev-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
.ev-plot [data-pick] { cursor: pointer; }
.ev-plot [data-pick]:is(:hover,:focus-visible) { stroke: var(--ink); stroke-width: 2; }

.ev-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 0;
  margin: 3px 0 0;
  list-style: none;
  color: var(--ink2);
  font-size: 13px;
}

.ev-legend i {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  width: 16px;
  border-top: 2px solid var(--ink);
}

.ev-legend .ev-legend-outer { border-top-color: var(--mute); border-top-width: 1px; }
.ev-legend .ev-legend-guide { border-top-style: dashed; border-top-color: var(--mute); }
.ev-legend .ev-legend-point { width: 8px; height: 8px; border-radius: 50%; background: var(--ink2); border: none; }
.ev-legend .ev-legend-near { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); border: none; }

.ev-detail {
  margin-top: 12px;
  padding: 9px 12px;
  background: var(--soft);
  border-radius: 12px;
  font-size: 14px;
}

.ev-method { margin-top: 10px; }
.ev-empty { padding: 32px 0; text-align: center; color: var(--ink2); }

@media (max-width: 760px) {
  .nav .badge { max-width: 100%; white-space: normal; }
  .ev-card .ev-tabs button { min-height: 28px; }
  .ev-jump { margin-left: 0; }
  .ev-legend { justify-content: flex-start; }
}
