.dh-module { min-width: 0; max-width: 100%; color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.65; }
.dh-module * { box-sizing: border-box; }
.dh-module h2 { font-family: var(--font-serif-cn); font-size: clamp(24px, 3vw, 32px); margin: 0 0 16px; }
.dh-module p { margin: 0 0 16px; }
.dh-kicker { color: var(--ink-soft); font-size: 14px; letter-spacing: .08em; }
.dh-controls, .dh-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 24px 0 16px; }
.dh-controls label { display: grid; gap: 6px; font-size: 14px; min-width: 0; }
.dh-module button, .dh-module select, .dh-module summary { min-height: 44px; font-size: 16px; }
.dh-module button, .dh-module select { border: 1px solid var(--muted); border-radius: 4px; padding: 8px 12px; color: var(--ink); background: var(--paper-raise); cursor: pointer; }
.dh-module button:hover { background: var(--accent-soft); }
.dh-module :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.dh-order { color: var(--ink); font-weight: 600; }
.dh-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 12px; }
.dh-gradient { width: 150px; height: 16px; border: 1px solid var(--muted); }
.dh-scroll-hint, .dh-note { font-size: 14px; color: var(--ink-soft); }
.dh-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--muted); isolation: isolate; }
.dh-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; min-width: 1088px; font-variant-numeric: tabular-nums; }
.dh-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.dh-table th, .dh-table td { text-align: center; padding: 10px 6px; border-right: 1px solid var(--hairline-strong); border-bottom: 1px solid var(--hairline-strong); font-size: 16px; }
.dh-table tr > :last-child { border-right: 0; }
.dh-table tbody tr:last-child > * { border-bottom: 0; }
.dh-table thead th { background: var(--paper); vertical-align: bottom; padding: 4px; }
.dh-table th:first-child { position: sticky; left: 0; z-index: 2; width: 168px; text-align: left; background: var(--paper-raise); padding: 12px; box-shadow: 2px 0 0 var(--muted); }
.dh-table thead th:first-child { background: var(--paper); }
.dh-table th button { width: 100%; min-height: 68px; font-size: 14px; padding: 6px; line-height: 1.5; white-space: normal; border-color: transparent; background: transparent; }
.dh-table th[aria-sort="ascending"], .dh-table th[aria-sort="descending"] { box-shadow: inset 0 -4px var(--accent); }
.dh-table th[aria-sort] button { border-color: var(--accent); }
.dh-table td { background: var(--dh-background); color: var(--dh-foreground); }
.dh-table td.dh-missing { background: var(--paper); color: var(--ink-soft); font-size: 14px; }
.dh-rank { display: inline-block; min-width: 24px; color: var(--ink-soft); font-size: 14px; }
.dh-note { margin-top: 12px !important; }
.dh-sources { border-block: 1px solid var(--hairline-strong); padding: 8px 0; margin-top: 24px; }
.dh-sources summary { cursor: pointer; padding: 8px 0; }
.dh-sources code { font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere; }
.dh-source { padding: 12px 0; border-top: 1px solid var(--hairline); overflow-wrap: anywhere; }
.dh-source a { color: var(--accent); text-underline-offset: 3px; }
#dh-status { font-size: 14px; }
@media (max-width: 600px) {
  .dh-controls label:nth-child(2) { flex: 1 1 160px; min-width: 140px; }
  .dh-controls select { width: 100%; }
  .dh-table th:first-child { width: 150px; }
  .dh-legend { gap: 6px; }
  .dh-gradient { width: 90px; }
}
/* A continuous outline follows the selected domain through all six model rows. */
.dh-table td.dh-selected { border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.dh-table tbody tr:last-child td.dh-selected { border-bottom: 2px solid var(--ink); }
