/**
 * Page-specific styles — imports OKX design system tokens & components.
 * See design-system.css for token documentation.
 */
@import url('design-system.css');

/* ── Toolbar ── */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filters .btn { margin-right: 0.5rem; }

/* ── KPI strip ── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.kpi-strip-compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.kpi-card-accent {
  border-color: color-mix(in srgb, var(--primary) 20%, var(--border));
}

/* ── Analysis module grid (2×2) ── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .module-grid { grid-template-columns: 1fr; }
}

.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.module-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
  margin: 0 0 0.35rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.metric-list .metric-row:first-child {
  padding-top: 0.35rem;
}

.metric-list {
  margin: 0;
  padding: 0;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--muted);
}

.metric-row:last-child { border-bottom: none; }

.metric-row dt {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  font-weight: var(--weight-normal);
  margin: 0;
}

.metric-row dd {
  font-size: var(--text-md);
  font-weight: var(--weight-normal);
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  margin: 0;
  text-align: right;
}

.metric-as-of,
.metric-note {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--text-caption);
  font-weight: var(--weight-normal);
  color: var(--text-muted);
  line-height: 1.35;
}

.metric-row:has(+ .metric-caption) {
  border-bottom: none;
  padding-bottom: 0.15rem;
}

.metric-list .metric-caption {
  margin: 0 0 0.5rem;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--muted);
}

/* ── Detail page ── */
.detail-page { max-width: 100%; }

.detail-page > .breadcrumb,
.detail-page > .detail-header,
.detail-page .detail-title-block,
.detail-page .detail-title-block h1 {
  padding-inline: 0;
  margin-inline: 0;
}

.detail-header {
  margin-bottom: 1.5rem;
}

.detail-title-block h1 {
  font-size: var(--text-xl);
  margin: 0 0 0.35rem;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-sm);
  line-height: 1.25;
  color: var(--muted-foreground);
  margin: 0 0 1.25rem;
}

.breadcrumb a,
.breadcrumb-separator,
.breadcrumb-current {
  font-size: inherit;
  line-height: inherit;
}

.breadcrumb-separator {
  color: var(--muted-foreground);
  user-select: none;
}

.breadcrumb-current {
  color: var(--muted-foreground);
}

.breadcrumb a {
  color: var(--muted-foreground);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--foreground);
}

.meta {
  color: var(--muted-foreground);
  font-size: var(--text-base);
  margin: 0;
}

/* ── Section cards ── */
.section-card,
.charts-section,
.projects-section,
.financial-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
  margin-bottom: 1.75rem;
}

.section-header {
  margin-bottom: 1rem;
}

.section-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  letter-spacing: -0.025em;
  color: #111111;
  margin: 0 0 0.35rem;
}

.hint {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.55;
}

.hint.warn { color: var(--warning); }

.sub-heading {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin: 1.5rem 0 0.85rem;
}

/* ── Legacy hero cards ── */
.hero-section { margin-bottom: 1.5rem; }

.hero-cards {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.hero-cards > .card {
  flex: 1 1 0;
  min-width: 108px;
}

.card.metric .label {
  display: block;
  font-size: var(--text-caption);
  color: var(--muted-foreground);
  white-space: nowrap;
}

.card.metric .value {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hint-inline {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted-foreground);
  margin-top: 0.15rem;
  line-height: 1.3;
}

.data-table a {
  color: var(--foreground);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color 0.15s;
}

.data-table a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.data-table.compact { font-size: var(--text-sm); }

.table-footnote {
  margin: 0.5rem 0 0;
  font-size: var(--text-caption);
  color: var(--muted-foreground);
  line-height: 1.4;
}

/* ── Charts ── */
.grid-3, .grid-4 {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.ref-metrics { font-size: var(--text-sm); color: var(--muted-foreground); margin-top: 0.5rem; }

.chart-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.chart-cell { min-width: 0; }

.chart-footnote {
  margin: 0.55rem 0 0;
  font-size: var(--text-xs);
  color: var(--muted-foreground);
  line-height: 1.45;
}

.charts-section .chart-box {
  height: 300px;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
}

.chart-box {
  height: 280px;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.chart-box.wide { height: 380px; margin-bottom: 0; }
.chart-box.small { height: 200px; margin-top: 0.75rem; }
.chart-box.project-chart { height: 318px; margin-top: 0; border: none; background: transparent; }

.project-distribution-row {
  margin-bottom: 0.75rem;
}

.project-distribution-row .chart-box {
  border: 1px solid var(--border);
}

.project-distribution-block {
  margin-bottom: 1.25rem;
}

.project-distribution-block .chart-group-label {
  margin: 0 0 0.5rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--muted-foreground);
}

.project-pie-heading {
  margin: 0 0 0.35rem 0.75rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
}

.chart-box.project-pie-chart {
  height: 300px;
}

.val-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.val-chart-modes, .val-chart-ranges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.val-mode-btn, .val-range-btn {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  cursor: pointer;
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--foreground);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.val-mode-btn:hover, .val-range-btn:hover {
  background: var(--muted);
  border-color: var(--ring);
}

.val-mode-btn.active, .val-range-btn.active {
  background: var(--foreground);
  color: var(--primary-foreground);
  border-color: var(--foreground);
  font-weight: var(--weight-medium);
}

.val-range-label, .val-meta-label {
  color: var(--muted-foreground);
  margin-right: 0.25rem;
}

.val-mode-label-short { display: none; }

.val-meta-value {
  font-weight: var(--weight-medium);
  color: var(--foreground);
}

.chart-box.wide.cap-band-mode { height: 420px; }

/* ── Financial tabs ── */
.fin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.fin-tab {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--muted);
  cursor: pointer;
  font-size: var(--text-sm);
  font-family: inherit;
}

.fin-tab.active {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

.fin-panel { display: none; }
.fin-panel.active { display: block; }

/* ── Wind-style financial tables ── */
.fin-wind { margin-top: 0.5rem; }

.fin-main-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.fin-main-tabs::-webkit-scrollbar {
  display: none;
}

.fin-main-tab {
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--muted-foreground);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}

.fin-main-tab:hover { color: var(--foreground); }

.fin-main-tab.active {
  color: var(--foreground);
  font-weight: var(--weight-semibold);
  border-bottom-color: var(--foreground);
}

.fin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  margin-bottom: 0.35rem;
  font-size: var(--text-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.fin-toolbar::-webkit-scrollbar {
  display: none;
}

.fin-toolbar-left,
.fin-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.fin-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: var(--text-caption);
}

.fin-tag.active {
  background: var(--card);
  border-color: var(--foreground);
  color: var(--foreground);
  font-weight: var(--weight-medium);
}

.fin-select {
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: var(--text-caption);
  font-family: inherit;
  background: var(--card);
  color: var(--foreground);
}

.fin-tool-btn {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  cursor: pointer;
  font-size: var(--text-caption);
  font-family: inherit;
  color: var(--muted-foreground);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.fin-tool-btn:hover {
  border-color: var(--ring);
  color: var(--foreground);
}

.fin-tool-btn.active {
  background: var(--muted);
  border-color: var(--ring);
  color: var(--foreground);
  font-weight: var(--weight-medium);
}

.fin-check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted-foreground);
  cursor: pointer;
  user-select: none;
}

.fin-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.fin-icon-btn {
  padding: 0.25rem 0.4rem;
  border: none;
  background: var(--card);
  cursor: pointer;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}

.fin-icon-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.fin-icon-btn.active {
  background: var(--muted);
  color: var(--foreground);
}

.fin-icon-btn + .fin-icon-btn {
  border-left: 1px solid var(--border);
}

.fin-table-block {
  overflow: hidden;
  max-width: 100%;
}

.fin-table-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
  padding: 0.4rem 0;
}

.fin-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.fin-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  --fin-metric-col-width: 220px;
  --fin-period-col-min: 120px;
  --fin-period-count: 1;
  min-width: calc(var(--fin-metric-col-width) + var(--fin-period-count) * var(--fin-period-col-min));
}

.fin-table col.fin-metric-col {
  width: var(--fin-metric-col-width);
}

.fin-table col.fin-period-col {
  width: auto;
}

.fin-table th.fin-metric-col,
.fin-table td.fin-metric-col,
.fin-sticky-col.fin-metric-col {
  width: var(--fin-metric-col-width);
  min-width: var(--fin-metric-col-width);
  max-width: var(--fin-metric-col-width);
}

.fin-table th.fin-period-col,
.fin-table td.fin-period-col,
.fin-num {
  min-width: var(--fin-period-col-min);
  width: auto;
  max-width: none;
}

.fin-sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  border-right: 1px solid var(--border);
  box-shadow: none;
  background: inherit;
}

.fin-table th,
.fin-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  box-sizing: border-box;
  vertical-align: middle;
}

.fin-header-cell {
  background: var(--muted);
  color: var(--foreground);
  font-weight: var(--weight-medium);
  font-size: var(--text-xs);
  text-align: right;
  position: sticky;
  top: 0;
  z-index: 2;
  vertical-align: bottom;
  line-height: 1.25;
}

.fin-header-cell:not(.fin-sticky-col) {
  min-width: var(--fin-period-col-min);
}

.fin-header-cell .fin-period-date {
  display: block;
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.fin-header-cell .fin-period-tag {
  display: block;
  margin-top: 0.1rem;
  font-size: var(--text-2xs);
  font-weight: var(--weight-normal);
  color: var(--muted-foreground);
  white-space: nowrap;
}

.fin-header-cell:first-child { text-align: left; }

.fin-header-cell.fin-sticky-col {
  text-align: left;
}

.fin-table thead tr {
  background: var(--muted);
}

.fin-table thead .fin-sticky-col {
  background: var(--muted);
  z-index: 4;
}

.fin-table thead .fin-header-cell {
  background: var(--muted);
  border-top: 1px solid var(--border);
}

.fin-group-row td {
  font-weight: var(--weight-semibold);
  padding: 0.35rem 0.65rem;
}

.fin-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
  padding: 0;
}

.fin-group-icon {
  font-size: var(--text-2xs);
  color: var(--muted-foreground);
  width: 0.75rem;
}

.fin-label-cell {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: var(--weight-medium);
}

.fin-spark-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
}

.fin-spark-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.fin-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: visible;
}

.fin-data-row,
.fin-yoy-row {
  background: var(--card);
}

.fin-data-row.fin-zebra,
.fin-yoy-row.fin-zebra {
  background: var(--muted);
}

.fin-data-row > td,
.fin-yoy-row > td {
  background: inherit;
}

.fin-group-row {
  background: var(--muted);
}

.fin-group-row > td {
  background: inherit;
}

.fin-group-row .fin-group-cell {
  background: var(--muted);
}

.fin-group-row .fin-group-fill {
  background: var(--muted);
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.fin-yoy-row td {
  font-size: var(--text-caption);
  color: var(--muted-foreground);
  padding-top: 0.2rem;
  padding-bottom: 0.45rem;
}

.fin-yoy-label {
  padding-left: 1.85rem !important;
  font-weight: var(--weight-normal) !important;
  color: var(--text-muted) !important;
}

/* 财务摘要：同比% 统一灰色，不按涨跌着色 */
.fin-table[data-fin-tab="summary"] .fin-yoy-row td {
  color: var(--text-secondary);
}

.fin-table[data-fin-tab="summary"] .fin-yoy.fin-negative {
  color: var(--text-secondary) !important;
}

.fin-negative { color: var(--down) !important; }

.fin-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

[data-theme="dark"] .fin-modal {
  background: rgba(0, 0, 0, 0.7);
}

.fin-modal.hidden { display: none; }

.fin-modal-panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: hidden;
}

.fin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.fin-modal-header h3 {
  margin: 0;
  font-size: var(--text-md);
}

.fin-modal-close {
  border: none;
  background: transparent;
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0 0.25rem;
}

.fin-spark-chart,
.fin-overview-chart {
  width: 100%;
  height: 320px;
  padding: 0.5rem;
}

/* ── Project panels ── */
.project-layout { margin-bottom: 0.75rem; }

.project-metrics-charts {
  width: 100%;
  display: flex;
  justify-content: center;
}

.project-metrics-charts .chart-box.project-chart {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.project-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
  background: var(--muted);
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.project-panel summary {
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-size: var(--text-base);
}

.project-body { padding: 0 1.15rem 1.15rem; min-width: 0; }

.projects-section {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

/* Horizontal scroll for project summary + per-project operation history */
.project-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.project-table-wrap .project-table,
.project-table-wrap .project-metrics-table {
  width: 100%;
  min-width: max-content;
}

.project-panel .project-table-wrap {
  margin-inline: -1.15rem;
  width: calc(100% + 2.3rem);
  max-width: calc(100% + 2.3rem);
}

.project-panel .project-table-wrap .data-table {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.project-panel .project-table-wrap .data-table thead th:first-child,
.project-panel .project-table-wrap .data-table thead th:last-child {
  border-radius: 0;
}

.project-panel .project-table-wrap .data-table tbody tr {
  background: var(--card);
}

.project-panel .project-table-wrap .data-table tbody td {
  border-left: none;
  border-right: none;
}

/* ── Page methodology notes ── */
.page-notes {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}

.page-notes-sections {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.page-notes-section {
  width: 100%;
}

.page-notes-heading {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.45rem;
}

.page-notes-heading .label-proper {
  text-transform: none;
}

.page-notes-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: var(--text-xs);
  color: var(--muted-foreground);
  line-height: 1.55;
  list-style-type: disc;
  list-style-position: outside;
}

.page-notes-list li {
  font-size: var(--text-xs);
  color: var(--muted-foreground);
}

.page-notes-list li + li {
  margin-top: 0.25rem;
}

/* ── Overview page ── */
.overview-page { max-width: 100%; }

.overview-page > .overview-head,
.overview-page > .sector-tabs,
.overview-page > .overview-table-card {
  padding-inline: 0;
  margin-inline: 0;
}

main.container:has(.overview-page) {
  padding-top: calc(var(--header-height) + 1.5rem);
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.overview-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0;
  color: var(--foreground);
}

.overview-refresh-btn,
button.overview-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--foreground);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s, border-color 0.15s;
}

.overview-refresh-btn:hover {
  background: var(--muted);
  border-color: var(--ring);
}

.overview-refresh-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.overview-refresh-btn.is-loading [data-lucide="refresh-cw"] {
  animation: refresh-spin 0.8s linear infinite;
}

@keyframes refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sector-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.sector-tabs::-webkit-scrollbar { display: none; }

.sector-tab {
  position: relative;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
}

.sector-tab:first-child {
  padding-left: 0;
}

.sector-tab:hover { color: var(--foreground); }

.sector-tab.active {
  color: var(--foreground);
  font-weight: var(--weight-semibold);
}

.sector-tab.active::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px 2px 0 0;
}

.sector-tab:first-child.active::after {
  left: 0;
}

.overview-table-card {
  margin-top: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.overview-table-wrap {
  overflow-x: visible;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
}

.overview-table {
  --ov-rank-w: 2rem;
  --ov-name-w: 11.5rem;
  --ov-name-min-w: 9.5rem;
  --ov-sector-w: 6.75rem;
  --ov-num-w: 5.125rem;
  --ov-ev-w: 6.5rem;
  --ov-cap-rate-w: 7rem;
  --ov-num-count: 10;
  --ov-cell-px: 0.4rem;
  --ov-cell-py: 0.7rem;
  --ov-sort-icon-w: 0.75rem;
  --ov-sort-gap: 0.3rem;
  --ov-sort-reserve: calc(var(--ov-sort-icon-w) + var(--ov-sort-gap));
  width: 100%;
  border-collapse: collapse;
  border: none;
  font-family: var(--font);
  font-size: var(--text-sm);
  table-layout: fixed;
}

#reits-table {
  width: 100%;
  min-width: 0;
}

.overview-table col.col-rank { width: var(--ov-rank-w); }
#reits-table col.col-name { width: var(--ov-name-w); }
#reits-table col.col-sector { width: var(--ov-sector-w); }
#reits-table col.col-num {
  width: var(--ov-num-w);
}

#reits-table col.col-ev {
  width: var(--ov-ev-w);
}

#reits-table col.col-cap-rate {
  width: var(--ov-cap-rate-w);
}

.overview-table th,
.overview-table td {
  box-sizing: border-box;
}

.th-label-short { display: none; }

#reits-table thead th,
.overview-table thead th {
  /* Static header — vertical sticky + overflow-x scroll wrapper made
     top: --header-height overlap row #1 (sticky scoping bug). */
  position: relative;
  background: var(--muted);
  padding: var(--ov-cell-py) var(--ov-cell-px);
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
  font-weight: var(--weight-semibold);
  font-size: var(--text-caption);
  color: var(--foreground);
  text-align: left;
  white-space: normal;
  overflow: visible;
  line-height: 1.35;
  letter-spacing: 0.01em;
  user-select: none;
  vertical-align: middle;
}

.overview-table thead th.sortable {
  cursor: pointer;
}

.overview-table thead th.sortable .th-sort-inner {
  display: inline-flex;
  align-items: center;
  gap: var(--ov-sort-gap);
  line-height: 1.3;
}

.overview-table thead th.num.sortable .th-sort-inner {
  display: block;
  width: 100%;
}

#reits-table thead th.num.sortable .th-sort-label {
  display: block;
  text-align: right;
  overflow: visible;
  white-space: normal;
  word-break: keep-all;
}

.overview-table thead th.sortable .th-sort-label {
  min-width: 0;
}

.overview-table th.sortable {
  transition: color 0.12s, background-color 0.12s;
}

.overview-table th.sortable:hover {
  color: var(--foreground);
  background: color-mix(in srgb, var(--muted) 80%, var(--foreground) 5%);
}

.overview-table thead th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
  font-size: var(--text-caption);
  color: var(--foreground);
  white-space: normal;
  overflow: visible;
}

.overview-table tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  color: var(--foreground);
  white-space: nowrap;
}

#reits-table th.num,
#reits-table td.num {
  padding-right: calc(var(--ov-cell-px) + var(--ov-sort-reserve));
}

#reits-table thead th.num.sortable .sort-icon {
  position: absolute;
  right: var(--ov-cell-px);
  top: 50%;
  transform: translateY(-50%);
}

.overview-table thead th.col-rank,
.overview-table tbody td.col-rank {
  width: var(--ov-rank-w);
  min-width: var(--ov-rank-w);
  max-width: var(--ov-rank-w);
  text-align: center;
  white-space: nowrap;
}

.overview-table tbody td.col-rank {
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  font-size: var(--text-caption);
}

#reits-table .col-name {
  width: var(--ov-name-w);
  min-width: 0;
  max-width: none;
}

#reits-table tbody td.col-name {
  overflow: visible;
  white-space: normal;
}

#reits-table th.col-num,
#reits-table td.col-num {
  width: auto;
  min-width: 0;
  max-width: none;
}

#reits-table th.col-ev,
#reits-table td.col-ev {
  min-width: 0;
}

#reits-table th.col-cap-rate,
#reits-table td.col-cap-rate {
  min-width: 0;
}

.overview-table thead th.col-cap-rate .th-label-full {
  display: none;
}

.overview-table thead th.col-cap-rate .th-label-short {
  display: inline;
}

.overview-table thead th.col-change .th-label-full {
  display: none;
}

.overview-table thead th.col-change .th-label-short {
  display: inline;
}

.overview-table thead th.sortable .sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
  width: var(--ov-sort-icon-w);
  height: var(--ov-sort-icon-w);
}

.sort-icon::after {
  content: '⇅';
  display: block;
  font-size: var(--text-2xs);
  color: var(--text-muted);
  line-height: 1;
}

.overview-table th.sort-asc .sort-icon::after {
  content: '↑';
  color: var(--foreground);
}

.overview-table th.sort-desc .sort-icon::after {
  content: '↓';
  color: var(--foreground);
}

.overview-table tbody td {
  padding: var(--ov-cell-py) var(--ov-cell-px);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow: hidden;
  line-height: 1.5;
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--foreground);
}

.overview-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--muted) 45%, transparent);
}

.overview-table tbody tr:hover {
  background: var(--muted);
}

.overview-table tbody tr:last-child td { border-bottom: none; }

#reits-table .col-sector {
  width: var(--ov-sector-w);
  min-width: var(--ov-sector-w);
  max-width: var(--ov-sector-w);
  white-space: nowrap;
  overflow: visible;
  text-align: left;
}

#reits-table tbody td.col-sector {
  overflow: visible;
}

.overview-table thead th.col-sector {
  text-align: left;
}

.overview-table .sector-badge {
  display: inline-block;
  padding: 0.14rem 0.4rem;
  font-size: var(--text-2xs);
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  vertical-align: middle;
}

.overview-table .sector-badge.sector-logistics,
.overview-table .sector-badge.sector-park,
.overview-table .sector-badge.sector-rental {
  background: var(--muted);
  color: var(--muted-foreground);
  border-color: var(--border);
}

.overview-table .reit-name-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
  min-width: 0;
  max-width: 100%;
}

.overview-table .reit-name-link {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
  text-decoration: none;
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  max-width: 100%;
}

.overview-table .reit-name-link:hover {
  color: var(--primary);
}

.overview-table .reit-code-tag {
  display: block;
  margin: 0;
  padding: 0.05rem 0.3rem;
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  color: var(--muted-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  white-space: nowrap;
  line-height: 1.35;
  align-self: flex-start;
}

.fin-period-empty {
  color: var(--text-muted);
  font-weight: normal;
}

.fin-table .col-name { min-width: 200px; }

.reit-name-link {
  display: block;
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  color: var(--foreground);
  text-decoration: none;
  line-height: 1.3;
}

.reit-name-link:hover { color: var(--primary); }

.reit-code-tag {
  display: block;
  font-size: var(--text-caption);
  color: var(--muted-foreground);
  font-weight: var(--weight-normal);
  margin-top: 0.1rem;
}

.sector-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: 1.25;
  white-space: nowrap;
}

.sector-badge.sector-logistics,
.sector-badge.sector-park,
.sector-badge.sector-rental {
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}

.overview-table tbody td.num.chg-up { color: var(--positive); }
.overview-table tbody td.num.chg-down { color: var(--negative); }
.overview-table tbody td.num.chg-flat { color: var(--muted-foreground); }

.overview-table td.col-date {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}

.footer-qa-link {
  margin-left: 0.75rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: var(--text-sm);
}

.footer-qa-link:hover {
  color: var(--foreground);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .fin-main-tab {
    padding: 0.3rem 0.55rem;
    font-size: var(--text-caption);
    min-height: 36px;
    line-height: 1.25;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .fin-main-tab.active {
    font-weight: var(--weight-medium);
  }

  .fin-table {
    --fin-metric-col-width: 172px;
    --fin-period-col-min: 100px;
    font-size: var(--text-caption);
  }

  .fin-table th,
  .fin-table td {
    padding: 0.35rem 0.5rem;
  }

  .fin-header-cell {
    font-size: var(--text-caption);
  }

  .fin-header-cell .fin-period-date {
    font-size: var(--text-sm);
  }

  .fin-header-cell .fin-period-tag {
    font-size: var(--text-xs);
  }

  .fin-group-row td {
    padding: 0.28rem 0.5rem;
  }

  .fin-group-toggle {
    font-size: var(--text-caption);
  }

  .fin-yoy-row td {
    font-size: var(--text-xs);
    padding-top: 0.15rem;
    padding-bottom: 0.35rem;
  }

  .fin-yoy-label {
    padding-left: 1.65rem !important;
  }

  .fin-spark-btn {
    width: 18px;
    height: 18px;
  }

  .fin-main-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: calc(-1 * var(--page-gutter));
    padding-inline: var(--page-gutter);
    margin-bottom: 0.5rem;
  }

  .fin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.3rem 0;
    margin-bottom: 0.25rem;
    font-size: var(--text-2xs);
  }

  .fin-toolbar-left,
  .fin-toolbar-right {
    width: 100%;
    justify-content: flex-start;
    gap: 0.3rem;
  }

  .fin-toolbar-right {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .fin-select,
  .fin-tool-btn {
    min-height: 36px;
    padding: 0.2rem 0.4rem;
    font-size: var(--text-2xs);
    line-height: 1.25;
  }

  .fin-tool-btn.active {
    font-weight: var(--weight-normal);
  }

  .fin-icon-btn {
    min-height: 36px;
    min-width: 36px;
    padding: 0.2rem 0.35rem;
    justify-content: center;
  }

  .fin-icon-btn svg {
    width: 13px;
    height: 13px;
  }

  .fin-check {
    min-height: 36px;
    font-size: var(--text-2xs);
    gap: 0.2rem;
  }

  .fin-check input[type="checkbox"] {
    width: 14px;
    height: 14px;
  }

  .th-label-full { display: none; }
  .th-label-short { display: inline; }

  .overview-head {
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .overview-title {
    font-size: var(--text-lg);
    flex: 1 1 auto;
    min-width: 0;
  }

  .overview-refresh-btn {
    min-height: 44px;
    padding: 0.625rem 1rem;
    flex-shrink: 0;
  }

  .sector-tabs {
    margin-inline: calc(-1 * var(--page-gutter));
    padding-inline: var(--page-gutter);
  }

  .sector-tab {
    padding: 0.75rem 0.85rem;
    font-size: var(--text-sm);
    min-height: 44px;
  }

  .overview-table-card {
    margin-top: 1rem;
    border-radius: 0;
    border: none;
    background: transparent;
    /* overflow:hidden on card breaks sticky scoping vs the inner scroll wrapper */
    overflow: visible;
  }

  .overview-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* stable gutter reserves a light strip on some mobile engines */
    scrollbar-gutter: auto;
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
  }

  .overview-table {
    --ov-name-w: 9rem;
    --ov-name-min-w: 9rem;
    --ov-num-w: 4.75rem;
    --ov-ev-w: 5.75rem;
    --ov-cap-rate-w: 6.25rem;
    --ov-cell-px: 0.35rem;
    --ov-cell-py: 0.75rem;
    --ov-sort-gap: 0.25rem;
    --ov-sort-icon-w: 0.65rem;
    /* 1px overlap seals subpixel gaps between sticky cols during momentum scroll */
    --ov-sticky-overlap: 1px;
    --ov-sticky-name-left: calc(var(--ov-rank-w) - var(--ov-sticky-overlap));
    border-collapse: separate;
    border-spacing: 0;
  }

  #reits-table {
    min-width: calc(
      var(--ov-rank-w) + var(--ov-name-w) + var(--ov-sector-w) +
      var(--ov-num-count) * var(--ov-num-w)
    );
  }

  #reits-table col.col-name { width: var(--ov-name-w); }

  .overview-table tbody td {
    overflow: visible;
  }

  /* #reits-table thead th { position:relative } beats .overview-table thead th.col-rank —
     rank header must use the same # selector as col-name or it scrolls away. */
  #reits-table thead th.col-rank,
  #reits-table tbody td.col-rank {
    position: sticky;
    left: calc(-1 * var(--ov-sticky-overlap));
    top: auto;
    z-index: 2;
    padding-left: calc(var(--ov-cell-px) + var(--ov-sticky-overlap));
    width: calc(var(--ov-rank-w) + var(--ov-sticky-overlap));
    min-width: calc(var(--ov-rank-w) + var(--ov-sticky-overlap));
    max-width: calc(var(--ov-rank-w) + var(--ov-sticky-overlap));
    background: var(--card);
    border: none;
    box-shadow: none;
  }

  #reits-table thead th.col-rank {
    background: var(--muted);
    z-index: 5;
  }

  #reits-table thead th.col-name,
  #reits-table tbody td.col-name {
    position: sticky;
    left: var(--ov-sticky-name-left);
    top: auto;
    z-index: 1;
    background: var(--card);
    border: none;
    /* inset divider — border-right flickers between sticky cols on WebKit scroll */
    box-shadow: inset calc(-1 * var(--ov-sticky-overlap)) 0 0 var(--border);
    width: var(--ov-name-w);
    min-width: var(--ov-name-w);
    max-width: var(--ov-name-w);
    overflow: hidden;
  }

  #reits-table thead th.col-name {
    background: var(--muted);
    z-index: 4;
    overflow: visible;
  }

  .overview-table tbody tr:nth-child(even) td.col-rank,
  .overview-table tbody tr:nth-child(even) td.col-name {
    background: color-mix(in srgb, var(--muted) 45%, var(--card));
  }

  .overview-table tbody tr:hover td.col-rank,
  .overview-table tbody tr:hover td.col-name {
    background: var(--muted);
  }

  #reits-table thead th.num.sortable {
    position: relative;
  }

  /* Detail page — mobile typography hierarchy (mirrors desktop scale, smaller) */
  .detail-title-block h1 {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    line-height: 1.3;
  }

  .meta {
    font-size: var(--text-xs);
    line-height: 1.45;
    word-break: break-word;
  }

  .breadcrumb {
    font-size: var(--text-xs);
    min-height: 44px;
    align-items: center;
  }

  .section-title {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
  }

  .module-title {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
  }

  .metric-row dt {
    font-size: var(--text-sm);
  }

  .metric-row dd {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
  }

  .section-card,
  .charts-section,
  .projects-section,
  .financial-section {
    padding: 1rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
  }

  .module-card {
    padding: 1rem;
  }

  .kpi-strip {
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .charts-section .chart-box {
    height: 240px;
  }

  .chart-box {
    height: 220px;
  }

  .chart-box.wide {
    height: 260px;
  }

  .chart-box.wide.cap-band-mode {
    height: 280px;
  }

  .chart-box.project-chart,
  .chart-box.project-pie-chart {
    height: 240px;
  }

  .val-chart-toolbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.625rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .val-chart-toolbar::-webkit-scrollbar {
    display: none;
  }

  .val-chart-modes,
  .val-chart-ranges {
    flex-wrap: nowrap;
    width: auto;
    flex-shrink: 0;
    gap: 0.15rem;
  }

  .val-mode-label-full { display: none; }
  .val-mode-label-short { display: inline; }

  .val-range-label {
    display: none;
  }

  .val-mode-btn,
  .val-range-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.1rem 0.3rem;
    font-size: 0.625rem;
    line-height: 1.2;
  }

  .val-mode-btn.active,
  .val-range-btn.active {
    font-weight: var(--weight-normal);
  }

  /* No scroll-hint gradient — fin-table has sticky metric column; a fixed
     ::before overlay reads as a white bar beside section headers while scrolling. */
  .fin-table-scroll {
    scrollbar-gutter: auto;
  }

  .project-panel summary {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    padding: 0.85rem 1rem;
    min-height: 44px;
  }

  .project-body {
    padding: 0 1rem 1rem;
  }

  .project-panel .project-metrics-charts {
    margin-inline: -1rem;
    width: calc(100% + 2rem);
    max-width: calc(100% + 2rem);
  }

  .project-panel .project-table-wrap {
    margin-inline: -1rem;
    width: calc(100% + 2rem);
    max-width: calc(100% + 2rem);
  }

  /* No scroll-hint gradient — project tables have no sticky columns; a fixed
     ::after overlay reads as a gray bar between columns while scrolling. */
  .project-table-wrap {
    scrollbar-gutter: auto;
  }

  .page-notes {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 640px) {
  .overview-title {
    font-size: var(--text-base);
  }

  .overview-table {
    --ov-name-w: 8rem;
    --ov-num-w: 4.5rem;
    --ov-ev-w: 5.25rem;
    --ov-cap-rate-w: 5.75rem;
    --ov-sector-w: 6rem;
  }

  #reits-table .col-sector {
    min-width: var(--ov-sector-w);
    max-width: var(--ov-sector-w);
  }

  .val-mode-btn {
    flex: 0 0 auto;
    text-align: center;
    padding-inline: 0.2rem;
    white-space: nowrap;
  }

  .val-chart-ranges {
    justify-content: flex-start;
    gap: 0.15rem;
  }

  .val-range-btn {
    min-width: 30px;
    flex: 0 0 auto;
    padding-inline: 0.25rem;
  }

  .fin-table {
    --fin-metric-col-width: 148px;
    --fin-period-col-min: 96px;
  }

  .fin-table th,
  .fin-table td {
    padding: 0.3rem 0.45rem;
  }

  .fin-group-row td {
    padding: 0.25rem 0.45rem;
  }

  .fin-yoy-row td {
    padding-top: 0.12rem;
    padding-bottom: 0.3rem;
  }

  .fin-main-tab {
    padding: 0.25rem 0.45rem;
    font-size: var(--text-xs);
  }

  .fin-toolbar {
    gap: 0.3rem;
    padding: 0.25rem 0;
  }

  .fin-toolbar-left,
  .fin-toolbar-right {
    gap: 0.25rem;
  }

  .fin-select,
  .fin-tool-btn,
  .fin-icon-btn {
    min-height: 34px;
    padding-block: 0.15rem;
  }

  .fin-icon-btn {
    min-width: 34px;
  }

  .fin-icon-btn svg {
    width: 12px;
    height: 12px;
  }

  .fin-check {
    min-height: 34px;
  }

  .detail-title-block h1 {
    font-size: var(--text-md);
  }

  .section-title,
  .module-title {
    font-size: var(--text-sm);
  }

  .metric-row dt,
  .metric-row dd {
    font-size: var(--text-sm);
  }

  .metric-row dd {
    font-weight: var(--weight-semibold);
  }
}

/* ── QA report page ── */
.qa-page { padding-bottom: 2rem; }

.qa-meta {
  margin: 0.35rem 0 0;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

.qa-meta code {
  font-size: var(--text-caption);
  background: var(--muted);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-xs);
}

.qa-meta-empty { color: var(--destructive); }

.qa-back-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.qa-empty-card {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.qa-cli {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  overflow-x: auto;
}

.qa-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.qa-summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.qa-summary-num {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.qa-summary-label {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  font-weight: var(--weight-medium);
}

.qa-sev-error .qa-summary-num { color: var(--destructive); }
.qa-sev-warn .qa-summary-num { color: var(--warning); }
.qa-sev-info .qa-summary-num { color: var(--primary); }

.qa-filter-tabs { margin-top: 1.25rem; }
.qa-category-tabs { margin-top: 0.5rem; }

.qa-issues-table { min-width: 48rem; }

.qa-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.qa-badge-error {
  background: var(--destructive-muted);
  color: var(--destructive);
}

.qa-badge-warn {
  background: var(--warning-muted);
  color: var(--warning);
}

.qa-badge-info {
  background: var(--accent-blue-subtle);
  color: var(--primary);
}

.qa-code-tag {
  font-size: var(--text-caption);
  background: var(--muted);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-xs);
}

.qa-footnote {
  margin: 0.75rem 1rem 1rem;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

@media (max-width: 768px) {
  .qa-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
