/* The result charts above the tabs (RV15), on the search page and the sample pages. The drawings take their colors
   from lib/biosequence/chart-draw.mjs; this sheet lays out the cards around them. docs/STYLE_GUIDE.md, Sequences,
   "Charts". */
.result-charts { margin: 0 18px 12px; }
@media (min-width: 768px) {
  .result-charts { margin: 0 24px 14px; }
}
.charts-summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; border-radius: var(--radius-s);
  font-size: 14.5px; font-weight: 500; list-style: none; cursor: pointer;
}
.charts-summary::-webkit-details-marker { display: none; }
.charts-summary::before {
  content: ''; width: 7px; height: 7px; margin: 0 3px 0 4px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg);
}
.result-charts[open] > .charts-summary::before { transform: rotate(45deg); }
.charts-note { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); }
.charts-grid { display: grid; gap: 14px; }
/* Identity against coverage and Hits by year side by side, Where hits align on the query below them; a chart with no
   partner takes the whole row. */
@media (min-width: 1100px) {
  .charts-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .charts-grid > .chart[data-kind="alignment"], .charts-grid > .chart:only-child,
  .charts-grid > .chart:first-child:has(+ .chart[data-kind="alignment"]) { grid-column: 1 / -1; }
}
.chart { min-width: 0; margin: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.chart-head { display: grid; gap: 2px; }
.chart-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.chart-summary { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.chart-plot { margin-top: 12px; border-radius: var(--radius-s); }
.chart-plot:focus-visible { outline: 2px solid var(--brand-link); outline-offset: 3px; }
.chart[data-kind="identity"] .chart-plot { cursor: crosshair; touch-action: pan-y; }
.chart-svg { display: block; width: 100%; max-width: 100%; height: auto; }
.chart-help { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.chart-area-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 8px 0 0; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.chart-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chart-tables { display: grid; gap: 10px; margin-top: 10px; }
.chart-table caption { padding: 10px 12px 6px; caption-side: top; text-align: left; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.chart-table th[scope="row"] { font: 450 13.5px/1.35 var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--ink); background: transparent; border-bottom: 1px solid var(--line-faint); }
.chart-table td { font-size: 13.5px; }
/* On a phone, each row of a chart's table stacks: its first cell as a title, then each value beside its column's
   name, so no table is wider than the screen. */
@media (max-width: 767.98px) {
  .chart-table thead { display: none; }
  .chart-table, .chart-table caption, .chart-table tbody, .chart-table tr, .chart-table th[scope="row"] { display: block; }
  .chart-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line-faint); }
  .chart-table tbody tr:last-child { border-bottom: 0; }
  .chart-table th[scope="row"] { padding: 0 0 4px; border: 0; font-weight: 600; }
  .chart-table td { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; border: 0; text-align: right; }
  .chart-table td[data-label]::before { content: attr(data-label); flex: none; text-align: left; color: var(--ink-2); }
}
/* A sample page draws the charts on the server; without script, each table sits in a details element. */
.chart-details > summary { display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; cursor: pointer; }
