/* Dashboard components. Shared header, footer, fonts and colors use /styles.css. */
:root { color-scheme: dark; }
.dashboard-page { display: flex; flex-direction: column; min-height: 100vh; }
.dashboard-main {
  width: min(1480px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  flex: 1;
  font-size: 0.875rem;
}
.dashboard-main h2, .dashboard-main h3, #preview-dialog h2 { color: var(--cream); }
.dashboard-main button, .dashboard-main input, .dashboard-main select, #preview-dialog button, #preview-dialog input { font: inherit; }
.dashboard-main button, #preview-dialog button { cursor: pointer; }
.dashboard-main button:disabled { opacity: .5; cursor: default; }
.dashboard-main a, #preview-dialog a { color: var(--gold); text-underline-offset: .2rem; }
.dashboard-main :focus-visible, #preview-dialog :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; margin-bottom: 2rem; }
.dashboard-heading h1 { max-width: none; margin: 0; color: var(--cream); font-size: 2.5rem; letter-spacing: -.025em; }
.dashboard-update { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: 0; font-size: .8rem; font-variant-numeric: tabular-nums; }
.dashboard-update button, .preview-button, .page-controls button, .close {
  padding: .35rem .75rem;
  color: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: .3rem;
  background: var(--night-soft);
}
.dashboard-update button { margin-left: .6rem; }
.dashboard-main button:hover, #preview-dialog button:hover { color: var(--amber); border-color: var(--amber); }
.dashboard-main .text-link { display: inline; margin: 0; padding: 0; border: 0; color: var(--gold); background: none; font: inherit; letter-spacing: 0; text-align: left; text-decoration: underline; text-underline-offset: .2rem; }
.tabs { display: flex; gap: 1.75rem; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs .tab { padding: .9rem 0; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: none; white-space: nowrap; font-size: .85rem; }
.tabs .tab.active { color: var(--amber); border-bottom-color: var(--amber); }
.view { min-height: 240px; }
.table-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin: 0 0 .75rem; font-size: .75rem; }
.table-tools input { width: 300px; max-width: 100%; padding: .55rem .75rem; color: var(--ink); border: 1px solid var(--line); border-radius: .3rem; background: var(--night-soft); }
.table-tools > button { margin-left: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .4rem; background: var(--night-soft); }
.dashboard-main table, #preview-dialog table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table { white-space: nowrap; font-size: .8rem; font-variant-numeric: tabular-nums; }
.data-table th, .file-table th { padding: .8rem 1rem; color: var(--cream); border-bottom: 1px solid var(--line-strong); background: #211a11; font-size: .75rem; font-weight: 500; white-space: nowrap; }
.data-table td { max-width: 500px; overflow: hidden; padding: .8rem 1rem; border-bottom: 1px solid var(--line); text-overflow: ellipsis; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover, .file-table tbody tr:hover { background: rgba(231, 194, 100, .04); }
.data-table .cd-row td:first-child { color: var(--amber); font-weight: 600; }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; padding: 1.25rem 0; }
.search-label { display: flex; align-items: center; flex: 1; gap: .6rem; min-width: 240px; padding: 0 .75rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--night-soft); }
.search-label input { width: 100%; min-width: 80px; padding: .65rem 0; color: var(--ink); border: 0; background: none; font-size: .8rem; }
.select-label select { max-width: 290px; padding: .6rem 2rem .6rem .75rem; color: var(--cream); border: 1px solid var(--line-strong); border-radius: .3rem; background: var(--night-soft); font-size: .75rem; }
.results-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 .8rem; font-size: .75rem; }
.results-heading p { margin: 0; }
.results-heading a { white-space: nowrap; }
.file-table td { padding: .9rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; font-size: .75rem; }
.file-table .file-name { font-size: .8rem; }
.file-name { display: block; max-width: 580px; color: var(--cream); font-weight: 500; overflow-wrap: anywhere; text-decoration: none; }
.file-path { display: block; max-width: 580px; margin-top: .3rem; color: var(--muted); font: .7rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.file-format { padding: .2rem .35rem; border: 1px solid var(--line); border-radius: .2rem; color: var(--gold); font: .65rem ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.file-table td:nth-child(2) { max-width: 200px; }
.file-table td:nth-child(4), .file-table td:nth-child(5) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.file-actions { display: flex; align-items: center; gap: .8rem; white-space: nowrap; }
.file-actions .preview-button { font-size: .75rem; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; font-size: .75rem; }
.page-controls { display: flex; align-items: center; gap: .5rem; }
.page-controls > span { padding: 0 .4rem; }
.plot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.plot-card { overflow: hidden; border: 1px solid var(--line); border-radius: .45rem; background: var(--night-soft); }
.plot-image-button { display: block; width: 100%; aspect-ratio: 1.37; padding: .8rem; border: 0; border-bottom: 1px solid var(--line); background: white; }
.plot-image-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.plot-body { padding: 1rem; }
.plot-body h3 { margin: 0 0 .5rem; font-family: inherit; font-size: .9rem; line-height: 1.5; }
.plot-body p { margin: 0 0 .5rem; font-size: .7rem; overflow-wrap: anywhere; }
.plot-body .file-path { font-size: .65rem; }
.plot-bottom { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; font-size: .7rem; }
#view-activity, #view-about { padding-top: 1.5rem; }
#view-activity > h2, #view-about > h2 { margin-bottom: 1.25rem; font-size: 1.75rem; }
.activity-item { display: grid; grid-template-columns: 145px 1fr auto; align-items: center; gap: 1.25rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.activity-time { font-size: .75rem; }
.activity-item button { justify-self: end; font-size: .75rem; }
.about { max-width: 900px; }
.about > p { font-size: .85rem; line-height: 1.9; }
.about h3 { margin: 1.75rem 0 .75rem; font-size: 1.35rem; }
.coverage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.5rem 0; }
.coverage-stat { padding: .8rem; border: 1px solid var(--line); font-size: .8rem; }
.collection-item { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
.collection-item span { font-size: .75rem; white-space: nowrap; }
.notice { padding: 1rem 1.25rem; margin: 1rem 0; border: 1px solid var(--line-strong); border-radius: .35rem; background: #2a1d13; color: var(--cream); font-size: .85rem; }
.empty { padding: 1.5rem; font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#preview-dialog { width: min(1240px,94vw); max-height: 92dvh; padding: 1.5rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: .5rem; background: var(--night-soft); font-size: .875rem; }
#preview-dialog::backdrop { background: rgba(0,0,0,.75); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.dialog-head h2 { margin: 0; font-size: 1.75rem; overflow-wrap: anywhere; }
.source-kind { margin: 0 0 .4rem; color: var(--gold); font-size: .75rem; }
.close { width: 36px; height: 36px; flex-shrink: 0; padding: 0; font-size: 1.5rem!important; line-height: 1; }
.source-path { margin-top: .8rem; font: .75rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.preview-actions { display: flex; gap: 1.25rem; margin: 1rem 0 1.5rem; font-size: .8rem; }
#preview-content { overflow: auto; max-height: 65dvh; }
#preview-content > img { display: block; max-width: 100%; height: auto; margin: auto; background: white; }
#preview-content pre { padding: 1rem; margin: 0; color: var(--muted); border-radius: .3rem; background: #100e0b; white-space: pre-wrap; overflow-wrap: anywhere; font: .75rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
#preview-content table { white-space: nowrap; font: .75rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
#preview-content td, #preview-content th { max-width: 700px; overflow: hidden; padding: .5rem .75rem; border: 1px solid var(--line); text-overflow: ellipsis; }
#preview-content th { position: sticky; top: 0; background: #211a11; color: var(--cream); }
.preview-notice, .preview-note { margin: 0 0 .8rem; font-size: .8rem; }
.preview-note { color: var(--amber); }
[hidden] { display: none!important; }
@media (max-width: 1100px) {
  .plot-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-bar .search-label { min-width: 40%; }
  .select-label select { max-width: 230px; }
}
@media (max-width: 720px) {
  .dashboard-main { width: calc(100% - 2rem); padding-top: 1.75rem; }
  .dashboard-heading { display: block; margin-bottom: 1.75rem; }
  .dashboard-heading h1 { margin-bottom: 1rem; font-size: 2rem; }
  .dashboard-update { font-size: .75rem; }
  .study-grid { grid-template-columns: 1fr; }
  .study-card { padding: 1rem; }
  .study-top { gap: .75rem; }
  .study-card h3 { font-size: 1.25rem; }
  .tabs { gap: 1.4rem; }
  .tabs .tab { font-size: .8rem; }
  .benchmark-picker { display: block; padding: 1.25rem 0; }
  .benchmark-picker label { display: block; margin-bottom: .5rem; }
  .benchmark-picker select { width: 100%; min-width: 0; font-size: .8rem; }
  #benchmark-description h2 { font-size: 1.5rem; }
  #benchmark-description > p { font-size: .8rem; }
  #benchmark-chart:not(:empty) { padding: .6rem .4rem 1rem; }
  .chart-legend { margin-left: .75rem; gap: .6rem 1rem; font-size: .65rem; }
  .table-tools input { width: 100%; }
  .table-tools > button { margin-left: 0; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .search-label { grid-column: 1/-1; min-width: 0; }
  .select-label select { width: 100%; max-width: 100%; padding-left: .5rem; font-size: .7rem; }
  .select-label:last-child { grid-column: 1/-1; }
  .results-heading { align-items: flex-start; font-size: .7rem; }
  .file-table { min-width: 880px; }
  .file-table td:first-child { min-width: 260px; max-width: 360px; }
  .plot-grid { grid-template-columns: 1fr; gap: 1rem; }
  .activity-item { grid-template-columns: 1fr auto; gap: .5rem .75rem; }
  .activity-time { grid-column: 1/-1; }
  .activity-item .file-name { font-size: .8rem; }
  .coverage-grid { grid-template-columns: 1fr; }
  .collection-item { gap: .75rem; }
  .collection-item span { font-size: .7rem; }
  .pagination { flex-wrap: wrap; font-size: .7rem; }
  .page-controls button { padding: .3rem .5rem; }
  #preview-dialog { padding: 1rem; }
  .dialog-head h2 { font-size: 1.4rem; }
}

.tanuki-cd-report { line-height: 1.75; }
.tanuki-cd-report header { padding-top: 1.5rem; }
.tanuki-cd-report p { max-width: 78ch; }
.tanuki-cd-report section { margin: 2.75rem 0; scroll-margin-top: 1.5rem; }
.tanuki-cd-report h2 { margin: 0 0 1.25rem; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.tanuki-cd-report h3 { margin: 1.8rem 0 .8rem; font-size: 1.35rem; }
.tanuki-cd-report strong { color: var(--cream); }
.tanuki-cd-report a { color: var(--gold); text-underline-offset: .2rem; }
.tanuki-cd-report nav ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 1rem 0; list-style: none; border-bottom: 1px solid var(--line); }
.tanuki-cd-report .report-meta { color: var(--cream); font-size: .85rem; }
.tanuki-cd-report .report-summary { padding-left: 1.3rem; }
.tanuki-cd-report li { margin: .6rem 0; }
.tanuki-cd-report .table-wrap { margin: 1.5rem 0; }
.tanuki-cd-report table { font-size: .85rem; font-variant-numeric: tabular-nums; }
.tanuki-cd-report caption { padding: .85rem 1rem; color: var(--muted); text-align: left; line-height: 1.6; caption-side: top; }
.tanuki-cd-report th, .tanuki-cd-report td { padding: .7rem .85rem; text-align: right; vertical-align: top; border-bottom: 1px solid var(--line); }
.tanuki-cd-report th { color: var(--cream); font-weight: 600; }
.tanuki-cd-report thead { background: #211a11; }
.tanuki-cd-report th:first-child, .tanuki-cd-report td:first-child { text-align: left; }
.tanuki-cd-report figure { margin: 2rem 0; }
.tanuki-cd-report figure img { display: block; width: 100%; height: auto; background: #fff; }
.tanuki-cd-report figcaption { margin-top: .8rem; font-size: .85rem; }
.tanuki-cd-report details { margin: 1.5rem 0; }
.tanuki-cd-report summary { color: var(--gold); cursor: pointer; }
.tanuki-cd-report .source-note { font-size: .85rem; }
@media (max-width: 700px) {
 .tanuki-cd-report table { min-width: 600px; font-size: .8rem; }
 .tanuki-cd-report th, .tanuki-cd-report td { padding: .55rem .65rem; }
 .tanuki-cd-report section { margin: 2rem 0; }
}
@media print {
 .site-header, .site-footer, .tabs, .dashboard-update, .tanuki-cd-report nav { display: none; }
 .dashboard-main { width: 100%; padding: 0; }
 .tanuki-cd-report .table-wrap { overflow: visible; }
 .tanuki-cd-report table { min-width: 0; }
 .tanuki-cd-report figure { break-inside: avoid; }
}

.foundations > header > h2 { margin-top: 0; }
.tanuki-cd-report .equation { overflow-x: auto; margin: 1.25rem 0; padding: .75rem 0; color: var(--cream); }
.tanuki-cd-report .equation math { display: block; width: max-content; min-width: 100%; font-size: 1.1rem; }
.tanuki-cd-report var { color: var(--cream); font-family: Georgia, "Times New Roman", serif; }
.tanuki-cd-report code { color: var(--cream); font-size: .95em; }
.content-attribution { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .8rem; }
.content-attribution p { max-width: 95ch; }
