/* Hexagon Preprint Explorer: Editorial Light & Dark Theme Stylesheet */

.wrap-hexagon {
  max-width: 1320px;
}
.wrap-hexagon [hidden],
.hx-drawer-backdrop[hidden] {
  display: none !important;
}

/* Header & Attribution Banner */
.hx-intro {
  margin-bottom: 18px;
}
.hx-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 10px;
}
.hx-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  min-width: 0;
}
.hx-title-group h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.8vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hx-ext-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--math-blue-soft);
  color: var(--math-blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--math-blue) 26%, transparent);
}
.hx-ext-pill:hover {
  text-decoration: underline;
  color: var(--math-blue);
}

.hx-scope-note {
  padding: 10px 14px;
  border-left: 3px solid var(--math-blue);
  background: color-mix(in srgb, var(--math-blue-soft) 55%, var(--surface));
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 10px;
}
.hx-scope-note p {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.hx-scope-note strong {
  color: var(--text);
}

.hx-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.hx-meta-strip strong {
  color: var(--text-secondary);
  font-weight: 600;
}
.hx-sep {
  opacity: 0.5;
}

/* KPI Summary Cards */
.hx-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.hx-kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 3px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--text);
  font-family: var(--sans);
  min-width: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.hx-kpi:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.hx-kpi.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}
.hx-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}
.hx-kpi-value {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hx-kpi-unit {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.hx-kpi-sub {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Mode Tabs & Action Strip */
.hx-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 12px;
}
.hx-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}
.hx-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.hx-tab:hover {
  color: var(--text);
}
.hx-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.hx-tab-count {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
}
.hx-tab-short {
  display: none;
}
.hx-tab.is-active .hx-tab-count {
  background: var(--accent-soft);
  color: var(--accent);
}

.hx-mode-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hx-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hx-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
#hx-analytics-toggle::after {
  content: "▸";
  font-size: 11px;
}
#hx-analytics-toggle[aria-expanded="true"]::after {
  content: "▾";
}

/* Visual Analytics Deck */
.hx-analytics-wrap {
  margin-bottom: 16px;
}
.hx-analytics-scope {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
}
.hx-analytics {
  display: grid;
  grid-template-columns: 1.15fr 1.05fr 1.15fr;
  gap: 12px;
}
.hx-chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hx-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  margin-bottom: 10px;
}
.hx-chart-head h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}
.hx-chart-note {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
}
.hx-chart-body {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.hx-card-foot-strip {
  margin-top: auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
}
.hx-card-foot-strip strong {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
}
.hx-time-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
}
.hx-swatch-bar,
.hx-swatch-formal,
.hx-swatch-line {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}
.hx-swatch-bar {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--math-blue);
  opacity: 0.78;
}
.hx-swatch-formal {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--b-lean-fg);
}
.hx-swatch-line {
  width: 14px;
  height: 2px;
  background: var(--accent);
}
.hx-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.hx-svg text {
  font-family: var(--sans);
  fill: var(--muted);
}
.hx-time-bar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  fill: var(--accent);
  fill-opacity: 1;
}
.hx-chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: var(--ink-btn);
  color: var(--ink-btn-text);
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.35;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

/* 3x3 Authorship x Human Understanding Interactive Heatmap Matrix */
.hx-matrix-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}
.hx-matrix-grid {
  display: grid;
  grid-template-columns: minmax(76px, 0.9fr) repeat(3, minmax(0, 1fr));
  gap: 5px;
  align-items: stretch;
  font-family: var(--sans);
}
.hx-matrix-corner {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  align-items: flex-end;
  padding: 0 2px 3px;
}
.hx-matrix-axis {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 5px;
  text-align: center;
  line-height: 1.25;
}
.hx-matrix-axis-row {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 6px;
}
.hx-matrix-axis:hover {
  background: var(--surface-alt);
  border-color: var(--line);
  color: var(--accent);
}
.hx-matrix-axis.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.hx-matrix-axis-sub {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
.hx-matrix-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 48px;
  padding: 5px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color 120ms ease, transform 120ms ease;
}
.hx-matrix-cell:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.hx-matrix-cell.is-lvl-0 {
  background: var(--bg);
  color: var(--muted);
  border-style: dashed;
  border-color: var(--line-strong);
}
.hx-matrix-cell.is-lvl-1 {
  background: color-mix(in srgb, var(--math-blue) 9%, var(--surface));
  color: var(--text);
}
.hx-matrix-cell.is-lvl-2 {
  background: color-mix(in srgb, var(--math-blue) 16%, var(--surface));
  color: var(--text);
}
.hx-matrix-cell.is-lvl-3 {
  background: color-mix(in srgb, var(--math-blue) 24%, var(--surface));
  color: var(--text);
}
.hx-matrix-cell.is-lvl-4 {
  background: color-mix(in srgb, var(--math-blue) 32%, var(--surface));
  color: var(--text);
  border-color: color-mix(in srgb, var(--math-blue) 45%, var(--line));
}
.hx-matrix-cell.is-active {
  background: var(--ink-btn);
  color: var(--ink-btn-text);
  border-color: var(--ink-btn);
  border-style: solid;
}
.hx-matrix-num {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.hx-matrix-pct {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.hx-matrix-cell.is-lvl-0 .hx-matrix-pct {
  color: var(--muted);
}
.hx-matrix-cell.is-active .hx-matrix-pct {
  color: var(--ink-btn-text);
}
.hx-matrix-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
}
.hx-matrix-unspec-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--math-blue);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.hx-matrix-unspec-btn:hover {
  color: var(--accent);
}

/* Card 3: Subjects, Tool Families & Verification Cascade */
.hx-breakdown-split {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1 1 auto;
}
.hx-subhead {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 4px;
}
.hx-subj-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.hx-subj-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.hx-subj-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hx-subj-btn.is-active {
  background: var(--ink-btn);
  color: var(--ink-btn-text);
  border-color: var(--ink-btn);
}
.hx-subj-btn code,
.hx-subj-btn span {
  font-family: var(--mono);
  font-size: 11px;
}
.hx-hbar-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hx-hbar-btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  width: 100%;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  color: var(--text);
}
.hx-hbar-btn:hover {
  background: var(--surface-alt);
  border-color: var(--line);
}
.hx-hbar-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.hx-hbar-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hx-hbar-val {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.hx-hbar-track {
  position: relative;
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-alt);
  overflow: hidden;
}
.hx-hbar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--math-blue);
  transition: width 180ms ease;
}
.hx-hbar-fill-pal {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: var(--b-lean-fg);
  box-shadow: 1px 0 0 var(--surface);
  opacity: 0.95;
  pointer-events: none;
}
.hx-hbar-fill.is-slate { background: color-mix(in srgb, var(--text-secondary) 55%, var(--math-blue)); }
.hx-hbar-fill.is-amber { background: var(--b-cited-fg); }
.hx-hbar-fill.is-purple { background: var(--b-bound-fg); }
.hx-hbar-fill.is-accent { background: var(--accent); }
.hx-cascade-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
  text-align: left;
}
.hx-cascade-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hx-cascade-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.hx-cascade-btn strong {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text);
}

/* Search, Controls & Filters Panel */
.hx-controls {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.hx-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.hx-search-box {
  position: relative;
  flex: 1 1 320px;
  min-width: min(100%, 260px);
}
.hx-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.hx-search-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 34px 8px 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
}
.hx-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hx-search-kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  pointer-events: none;
}
.hx-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.hx-select {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  max-width: 100%;
}
.hx-select-sm {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 13px;
}
.hx-view-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.hx-view-btn {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.hx-view-btn:first-child {
  border-left: 0;
}
.hx-view-btn.is-active {
  background: var(--ink-btn);
  color: var(--ink-btn-text);
}

.hx-primary-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.hx-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.hx-filter-kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.hx-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.hx-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hx-chip.is-active {
  background: var(--ink-btn);
  color: var(--ink-btn-text);
  border-color: var(--ink-btn);
}
.hx-chip .hx-n {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.85;
}
.hx-chip.is-empty:not(.is-active) {
  color: var(--muted);
  border-style: dashed;
  border-color: var(--line-strong);
}
.hx-chip.is-empty:not(.is-active) .hx-n {
  opacity: 1;
}

.hx-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
}
.hx-more-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hx-more-toggle::after {
  content: "▾";
  font-size: 11px;
}
.hx-more-toggle[aria-expanded="true"]::after {
  content: "▴";
}
.hx-more-badge:empty {
  display: none;
}
.hx-more-badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
}

.hx-more-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.hx-more-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.hx-more-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hx-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.hx-field label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.hx-field .hx-select {
  min-height: 36px;
  font-size: 13px;
  width: 100%;
}
.hx-signals-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* Active Filter Pills & Status Row */
.hx-active-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.hx-active-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hx-pill-active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.hx-pill-active:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.hx-reset-btn {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.hx-reset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hx-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.hx-status-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}
.hx-result-count {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hx-kbd-hint {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}
.hx-kbd-hint code {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
}
.hx-status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hx-per-label {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
}

/* Loading & Empty States */
.hx-loading,
.hx-empty {
  padding: 36px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  color: var(--muted);
  margin-bottom: 18px;
}
.hx-empty p {
  margin: 0 0 12px;
  font-size: 15px;
}

/* Data Table */
.hx-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.hx-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.hx-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 13.5px;
  min-width: 900px;
}
.hx-table thead th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line-strong);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.hx-table thead th.col-sponsor {
  min-width: 162px;
}
.hx-table thead th.num,
.hx-table tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hx-th-sort,
.hx-sp-sort,
.hx-tl-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}
.hx-th-sort:hover,
.hx-sp-sort:hover,
.hx-tl-sort:hover {
  color: var(--text);
}
.hx-th-sort::after,
.hx-sp-sort::after,
.hx-tl-sort::after {
  content: "↕";
  opacity: 0.45;
  font-size: 11px;
}
th[aria-sort="ascending"] .hx-th-sort::after,
th[aria-sort="ascending"] .hx-sp-sort::after,
th[aria-sort="ascending"] .hx-tl-sort::after {
  content: "↑";
  opacity: 1;
  color: var(--accent);
}
th[aria-sort="descending"] .hx-th-sort::after,
th[aria-sort="descending"] .hx-sp-sort::after,
th[aria-sort="descending"] .hx-tl-sort::after {
  content: "↓";
  opacity: 1;
  color: var(--accent);
}
.hx-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background-color 100ms ease;
}
.hx-table tbody tr:last-child {
  border-bottom: 0;
}
.hx-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-alt) 55%, var(--surface));
}
.hx-table tbody tr.is-focused {
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.hx-table tbody td {
  padding: 10px 12px;
  vertical-align: top;
}
.hx-row-id-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.hx-id-code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
.hx-row-ext-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--math-blue);
  text-decoration: none;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--math-blue-soft);
}
.hx-row-ext-link:hover {
  text-decoration: underline;
  color: var(--accent);
}
.hx-row-title-btn {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  cursor: pointer;
}
.hx-row-title-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}
.hx-row-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.hx-sponsor-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--math-blue);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  word-break: break-word;
}
.hx-sponsor-btn:hover {
  text-decoration: underline;
}
.hx-area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.hx-area-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--line);
}
.hx-tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.hx-tool-chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text-secondary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hx-tool-chip-btn {
  border: 1px solid var(--line);
  cursor: pointer;
}
.hx-tool-chip-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Semantic Pills */
.hx-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.hx-pill-ai { background: var(--b-bound-bg); color: var(--b-bound-fg); }
.hx-pill-mixed { background: var(--b-conj-bg); color: var(--b-conj-fg); }
.hx-pill-human { background: var(--b-proved-bg); color: var(--b-proved-fg); }
.hx-pill-hu-all { background: var(--b-lean-bg); color: var(--b-lean-fg); }
.hx-pill-hu-some { background: var(--b-cited-bg); color: var(--b-cited-fg); }
.hx-pill-hu-none { background: var(--surface-alt); color: var(--text-secondary); border: 1px solid var(--line); }
.hx-pill-palomar { background: var(--b-lean-bg); color: var(--b-lean-fg); border: 1px solid color-mix(in srgb, var(--b-lean-fg) 28%, transparent); }
.hx-pill-palomar-rev { background: var(--b-conj-bg); color: var(--b-conj-fg); border: 1px solid color-mix(in srgb, var(--b-conj-fg) 28%, transparent); }
.hx-pill-prove2 { background: var(--b-cited-bg); color: var(--b-cited-fg); }
.hx-pill-ver { background: var(--b-bound-bg); color: var(--b-bound-fg); font-family: var(--mono); font-size: 11px; }
.hx-pill-neutral { background: var(--surface-alt); color: var(--muted); }
.hx-pill-cross { background: var(--b-proved-bg); color: var(--b-proved-fg); }
.hx-pill-same { background: var(--surface-alt); color: var(--muted); border: 1px solid var(--line); }
.hx-badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.hx-cite-main {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.hx-cite-main.is-base {
  font-weight: 500;
  color: var(--muted);
}
.hx-cite-base-tag {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}
.hx-sort-mode:empty {
  display: none;
}
.hx-sort-mode {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
}
.hx-cite-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 2px;
}
.hx-date-cell {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.hx-mobile-scroll-cue {
  display: none;
  margin: 0;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

/* Cards View */
.hx-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.hx-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}
.hx-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.hx-card.is-focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.hx-card-body {
  padding: 14px 16px 10px;
  flex: 1 1 auto;
}
.hx-card-title {
  margin: 7px 0 8px;
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.3;
}
.hx-card-title button {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.hx-card-title button:hover {
  color: var(--accent);
  text-decoration: underline;
}
.hx-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}
.hx-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}
.hx-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-alt) 55%, var(--surface));
  font-family: var(--sans);
  font-size: 13px;
}
.hx-card-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}
.hx-card-inspect {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}
.hx-card-inspect:hover {
  text-decoration: underline;
}
.hx-card-link {
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
}
.hx-card-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Pagination */
.hx-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px 18px;
  font-family: var(--sans);
  font-size: 13.5px;
}
.hx-page-info {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hx-page-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.hx-page-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hx-page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.hx-page-btn.is-current {
  background: var(--ink-btn);
  color: var(--ink-btn-text);
  border-color: var(--ink-btn);
}
.hx-page-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Contributors & Tools Cohort Panels */
.hx-cohort-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 18px;
}
.hx-cohort-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.hx-cohort-head h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
}
.hx-cohort-head p {
  margin: 0;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
}
.hx-cohort-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.hx-cohort-search {
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
}
.hx-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.hx-cohort-table {
  min-width: 980px;
}
.hx-cohort-table tbody tr {
  cursor: pointer;
}
.hx-filter-btn {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.hx-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hx-sub-num {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* Methodology Section */
.hx-methodology {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  scroll-margin-top: 76px;
}
.hx-methodology h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text);
}
.hx-methodology p,
.hx-methodology li {
  font-size: 13.5px;
  line-height: 1.52;
  color: var(--text-secondary);
}
.hx-methodology ul {
  margin: 0;
  padding-left: 18px;
}
.hx-methodology li {
  margin-bottom: 6px;
}
.hx-methodology code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--code-bg);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Slide-Over Inspector Drawer */
.hx-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 14, 12, 0.56);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: flex-end;
}
.hx-drawer {
  width: min(740px, 100vw);
  max-width: 100%;
  height: 100%;
  background: var(--surface);
  color: var(--text);
  border-left: 1px solid var(--line-strong);
  box-shadow: -12px 0 42px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  outline: none;
}
.hx-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
  font-family: var(--sans);
}
.hx-drawer-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}
.hx-mono-id {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.hx-ver-pill {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--math-blue-soft);
  color: var(--math-blue);
  font-weight: 600;
}
.hx-date-kicker {
  font-size: 12.5px;
  color: var(--muted);
}
.hx-drawer-close {
  min-width: 40px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.hx-drawer-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hx-drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 20px 32px;
}
.hx-drawer-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.38rem;
  line-height: 1.25;
  color: var(--text);
}
.hx-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.hx-drawer-actions .btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}
.hx-nonmirror-note {
  margin: 0 0 14px;
  padding: 7px 10px;
  border-left: 3px solid var(--math-blue);
  background: color-mix(in srgb, var(--math-blue-soft) 45%, var(--surface));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-secondary);
}
.hx-audit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.hx-audit-tile {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--sans);
  min-width: 0;
}
.hx-audit-tile-k {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 3px;
}
.hx-audit-tile-v {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hx-audit-tile-s {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.hx-dsec {
  margin-bottom: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.hx-dsec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.hx-dsec h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Palomar Bridge Card inside Drawer */
.hx-palomar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hx-palomar-card {
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--b-lean-fg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, var(--b-lean-bg) 28%, var(--surface));
  font-family: var(--sans);
}
.hx-palomar-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.hx-palomar-card-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.hx-palomar-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.hx-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.hx-mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hx-mini-btn-primary {
  background: var(--ink-btn);
  color: var(--ink-btn-text);
  border-color: var(--ink-btn);
}
.hx-mini-btn-primary:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Definition List & Citation Items inside Drawer */
.hx-dl {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 5px 12px;
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
}
.hx-dl dt {
  color: var(--muted);
  font-weight: 600;
}
.hx-dl dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.hx-dl code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--code-bg);
  padding: 1px 4px;
  border-radius: 3px;
}
.hx-cite-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.hx-cite-item {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--sans);
}
.hx-cite-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  margin-bottom: 3px;
}
.hx-cite-title-btn {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  line-height: 1.3;
}
.hx-cite-title-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}
.hx-cite-meta {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .hx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hx-analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-analytics .hx-chart-card:last-child { grid-column: 1 / -1; }
  .hx-more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .hx-mobile-scroll-cue { display: block; }
  .hx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-kpis .hx-kpi:first-child { grid-column: 1 / -1; }
  .hx-analytics { grid-template-columns: minmax(0, 1fr); }
  .hx-analytics .hx-chart-card:last-child { grid-column: auto; }
  .hx-cards-grid { grid-template-columns: minmax(0, 1fr); }
  .hx-more-grid,
  .hx-more-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-kbd-hint { display: none; }
}

@media (max-width: 560px) {
  .hx-intro { padding-top: 6px; margin-bottom: 12px; }
  .hx-meta-strip { gap: 4px 12px; }
  .hx-meta-strip .hx-sep { display: none; }
  .hx-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }
  .hx-kpis .hx-kpi:first-child { grid-column: 1 / -1; }
  .hx-kpi { padding: 9px 11px; gap: 2px; }
  .hx-kpi-value { font-size: 1.25rem; }
  .hx-kpi-sub { font-size: 11.5px; }
  .hx-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr) minmax(0, 0.85fr);
    width: 100%;
    flex-wrap: nowrap;
  }
  .hx-tab {
    justify-content: center;
    padding: 0 5px;
    font-size: 12px;
    gap: 4px;
    white-space: nowrap;
    min-width: 0;
  }
  .hx-tab-count {
    font-size: 10.5px;
    padding: 1px 5px;
  }
  .hx-tab-full {
    display: none;
  }
  .hx-tab-short {
    display: inline;
  }
  .hx-more-grid,
  .hx-more-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hx-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hx-dl dd { margin-bottom: 6px; }
  .hx-drawer-body { padding: 14px 14px 28px; }
  .hx-search-kbd { display: none; }
  .hx-mode-actions { width: 100%; }
  .hx-mode-actions .hx-action-btn { flex: 1 1 auto; justify-content: center; }
  .hx-matrix-grid { grid-template-columns: minmax(64px, 0.85fr) repeat(3, minmax(0, 1fr)); gap: 4px; }
}
