/* Evidence section (06), in the type scale and boxes of sections 02-05: the heading is an idea heading
   (reading-typography.css), each story sits in a box like the demo boxes (demos/kv-cache.html .demo), and its
   figures sit in panels like the demo panels (.panel). */
#evidence .evidence-story { margin: 0 0 42px; padding: 16px; border: 1px solid #d7d2cc; border-radius: 10px; background: #fffdfaf2; }
#evidence .evidence-story:last-child { margin-bottom: 0; }
#evidence .ev-title { margin: 0; font-size: 26px; font-weight: 500; line-height: 1.12; letter-spacing: -.035em; }
#evidence .ev-line { margin: 6px 0 0; font: 13px/1.5 var(--mono); color: var(--faint); }
#evidence .ev-intro { max-width: 70ch; margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
#evidence .ev-kicker { margin: 0; font: 12px/1.5 var(--mono); letter-spacing: .08em; color: var(--muted); }

/* Workload choice, styled like the step bar of the demos. */
#evidence .workload-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 14px; }
#evidence .workload-controls button { display: flex; align-items: baseline; justify-content: center; gap: 8px; min-height: 36px; padding: 6px 8px; border: 1px solid #ded9d2; border-radius: 4px; background: transparent; color: #68616a; font: inherit; font-size: 14px; line-height: 1.3; cursor: pointer; }
#evidence .workload-controls button span { font: 12px var(--mono); opacity: .75; }
#evidence .workload-controls button:hover { border-color: #c9c2ba; }
#evidence .workload-controls button[aria-pressed="true"] { border-color: #ca7a85; background: #fae9eb; color: #ae2032; }
#evidence .workload-controls button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* Panels, like the two panels of the demos. */
#evidence .ev-panel { min-width: 0; margin: 0; padding: 12px 16px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fcfbf9; }
#evidence .ev-panel h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
#evidence .axis-note { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
#evidence .ev-panel figcaption { margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--muted); }

#evidence .latency-plots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
#evidence .latency-plots img { display: block; width: 100%; height: 240px; margin-top: 12px; object-fit: contain; }

#evidence .legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; font-size: 14px; color: var(--muted); }
#evidence .legend > span { display: inline-flex; align-items: center; gap: 8px; }
#evidence .legend i { display: inline-block; width: 16px; height: 10px; }
#evidence .legend .ours { background: #ae2038; }
#evidence .legend .baseline { background: #b6b5b3; }
#evidence .legend .reference { width: 24px; height: 0; border-top: 3px solid #111; }
#evidence .legend .static-ref { width: 24px; height: 0; border-top: 3px dashed #111; }
#evidence .timeline-legend { margin-top: 0; }

/* The result in words: a demo caption, one step larger. */
#evidence .finding { max-width: 1040px; margin: 16px 0 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--red); font-size: 20px; font-weight: 500; line-height: 1.45; letter-spacing: -.015em; text-wrap: pretty; }

/* Details, like "How it works" in the demos. */
#evidence .method { margin-top: 16px; padding-top: 12px; border-top: 1px solid #dfd7d0; }
#evidence .method summary { cursor: pointer; font-size: 14px; color: #645961; }
#evidence .method summary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
#evidence .method > div { max-width: 860px; }
#evidence .method p { margin: 10px 0 0; font-size: 14px; line-height: 1.65; color: #655b63; }

#evidence .adaptation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: stretch; margin-top: 16px; }
#evidence .timeline img { display: block; width: 100%; max-width: 680px; margin: 14px auto 0; }
#evidence .measured-gains { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 4px 4px 4px 8px; }
#evidence .measured-gains p { margin: 0; }
#evidence .measured-gains strong { display: block; color: var(--red); font-size: 44px; font-weight: 500; line-height: 1; letter-spacing: -.05em; }
#evidence .measured-gains span { display: block; margin-top: 6px; font-size: 15px; line-height: 1.45; }
#evidence .gain-note { padding-top: 14px; border-top: 1px solid #dfd7d0; font-size: 14px; line-height: 1.55; color: var(--muted); }

#evidence .attribution-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
#evidence .attribution-layout > figure > img { display: block; width: 100%; height: 205px; margin-top: 12px; object-fit: contain; }
#evidence .ablation-bars { margin: 18px 0 0; }
#evidence .bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; font-size: 14px; }
#evidence .bar-label b { font-weight: 500; white-space: nowrap; }
#evidence .bar-track { height: 28px; margin-bottom: 20px; }
#evidence .bar { height: 100%; border-radius: 0 3px 3px 0; }
#evidence .bar.gray { background: #b6b5b3; }
#evidence .bar.red { background: #ae2038; }
#evidence .ablation-bars figcaption { margin-top: 0; }
#evidence .ablation-result { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
#evidence .ablation-result strong { color: var(--red); font-weight: 500; }

@media (max-width: 800px) {
  #evidence .adaptation-layout { grid-template-columns: minmax(0, 1fr); }
  #evidence .measured-gains { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 4px 0 0; }
  #evidence .measured-gains :is(.ev-kicker, .gain-note) { grid-column: 1 / -1; }
  #evidence .latency-plots img { height: 210px; }
}
@media (max-width: 640px) {
  #evidence .evidence-story { padding: 14px; }
  #evidence .ev-title { font-size: 24px; }
  #evidence :is(.latency-plots, .attribution-layout) { grid-template-columns: minmax(0, 1fr); }
  #evidence .workload-controls button { flex-direction: column; align-items: center; gap: 1px; font-size: 13px; }
  #evidence .workload-controls button span { font-size: 11px; }
  #evidence .finding { font-size: 18px; }
  #evidence .measured-gains strong { font-size: 40px; }
  #evidence :is(.latency-plots img, .attribution-layout > figure > img) { height: auto; max-height: 260px; }
  #evidence .ev-panel { padding: 12px 12px 14px; }
}

/* BibTeX of the technical report (07), in a panel like the evidence panels; long lines wrap. */
#research .bibtex { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fcfbf9; overflow: hidden; }
#research .bibtex-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); font: 12px/1.5 var(--mono); letter-spacing: .08em; color: var(--muted); }
#research .bibtex-copy { padding: 4px 10px; border: 1px solid #ded9d2; border-radius: 4px; background: transparent; color: var(--muted); font: 12px var(--mono); cursor: pointer; }
#research .bibtex-copy:hover { border-color: #ca7a85; color: var(--red); }
#research .bibtex-copy:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
#research .bibtex pre { margin: 0; padding: 14px 16px; font: 12.5px/1.65 var(--mono); color: #3a3840; white-space: pre-wrap; overflow-wrap: anywhere; }
