:root {
  --ink: #17201d;
  --muted: #64746e;
  --paper: #fffaf0;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(23, 32, 29, 0.12);
  --teal: #0f766e;
  --amber: #b45309;
  --shadow: 0 24px 70px rgba(39, 50, 44, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.18), transparent 30rem),
    radial-gradient(circle at 90% 0%, rgba(180, 83, 9, 0.18), transparent 28rem),
    linear-gradient(135deg, #fff7ed 0%, #eef6f1 100%);
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem clamp(1rem, 4vw, 4rem) 1rem;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 2.65rem;
  padding: 0.68rem 1rem;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.button-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.button-secondary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.button-tertiary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.button-quiet {
  background: transparent;
  color: var(--muted);
}

.button:hover {
  transform: translateY(-1px);
  transition:
    transform 120ms ease,
    background 120ms ease;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.page {
  padding: 1rem clamp(1rem, 4vw, 4rem) 4rem;
}

.hero,
.content-card,
.intro-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  margin-bottom: 0.25rem;
  padding: clamp(1.1rem, 2.4vw, 1.8rem) clamp(1.25rem, 4vw, 3rem);
}

.intro-card {
  margin-bottom: 0.75rem;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
}

.intro-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.hero h2,
.content-card h2,
.content-card h3 {
  margin: 0 0 0.75rem;
  letter-spacing: -0.04em;
}

.hero p:last-child,
.content-card p:last-child {
  margin-bottom: 0;
}

.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
}

.content-card {
  margin: 1rem 0;
  padding: 1rem;
}

.selector-card {
  margin-bottom: 1rem;
}

.selector-intro {
  margin-bottom: 1rem;
}

.selector-subsection {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.52);
}

.selector-subsection h4 {
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
}

.selector-help {
  margin: -0.35rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.selection-actions {
  align-items: center;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.load-status-inline {
  flex: 1 1 18rem;
  margin: 0;
}

.upload-box {
  border: 1.5px dashed rgba(15, 118, 110, 0.5);
  border-radius: 20px;
  margin-bottom: 0.75rem;
  padding: 1rem;
  background: rgba(15, 118, 110, 0.07);
  text-align: center;
}

.upload-box.secondary {
  border-color: rgba(180, 83, 9, 0.45);
  background: rgba(180, 83, 9, 0.07);
}

.metadata-url-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 0.75rem;
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
}

.metadata-url-input.secondary {
  margin-bottom: 0;
}

.status-line {
  margin: 0.75rem 0;
  color: var(--muted);
  font-weight: 600;
}

.sankey-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.sankey-control-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.52);
}

.sankey-control-block h4 {
  margin: 0;
  letter-spacing: -0.02em;
}

.sankey-control-block > .button {
  margin-top: auto;
}

.sankey-slider-field {
  display: grid;
  gap: 0.35rem;
}

.sankey-filter-grid {
  display: grid;
  gap: 0.65rem;
}

.sankey-filter-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sankey-filter-field {
  display: grid;
  gap: 0.35rem;
}

.sankey-subject-category-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sankey-subject-category-field label {
  white-space: nowrap;
}

.sankey-subject-category-field .dash-dropdown {
  flex: 1;
  min-width: 0;
}

.sankey-slider-field label,
.sankey-filter-field label,
.sankey-subject-category-field label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sankey-filter-field .Select-option,
.sankey-filter-field .VirtualizedSelectOption {
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
  line-height: 1.25;
  white-space: normal;
}

.category-pair-summary {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
}

.category-pair-summary h4 {
  margin: 0;
}

.upload-selection,
.url-selection {
  margin: 0.75rem 0 1rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.upload-selection:empty,
.url-selection:empty {
  display: none;
}

.upload-selection p,
.url-selection p,
.empty-inline p {
  margin: 0.2rem 0;
}

.url-selection p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.reset-selection-button {
  margin: 0;
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--teal);
}

.selection-heading-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem;
}

.selection-heading-line h3 {
  margin: 0;
}

.selection-reset-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.selection-summary {
  margin-top: 0.5rem;
}

.graph-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.graph-chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  max-width: 28rem;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 18px;
  padding: 0.8rem 1rem;
  background: rgba(15, 118, 110, 0.08);
}

.graph-chip span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comparison-dashboard {
  border-color: rgba(180, 83, 9, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.94), rgba(238, 246, 241, 0.9)),
    var(--card);
}

.comparison-download-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.comparison-download-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.baseline-selector {
  width: min(24rem, 100%);
}

.baseline-selector label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-section {
  margin: 1rem 0;
}

.comparison-section h4,
.comparison-section h5 {
  margin: 0.85rem 0 0.55rem;
  letter-spacing: -0.02em;
}

.comparison-pair-card {
  margin-top: 1.1rem;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.52);
}

.comparison-pair-card summary {
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.comparison-warning-list {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.comparison-overview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.comparison-overview-table th,
.comparison-overview-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison-overview-table tr:last-child td {
  border-bottom: 0;
}

.comparison-overview-cell {
  display: grid;
  gap: 0.25rem;
  min-width: 7.5rem;
}

.comparison-heatmap-section {
  margin-top: 1rem;
}

.comparison-heatmap-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
}

.heatmap-gradient-legend {
  display: grid;
  flex: 1 1 24rem;
  gap: 0.25rem;
  max-width: 32rem;
}

.heatmap-row-limit-control {
  display: grid;
  gap: 0.25rem;
  margin-left: auto;
}

.heatmap-row-limit-control input {
  width: 5rem;
}

.heatmap-row-limit-hint {
  max-width: 14rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.heatmap-row-limit-error {
  display: none;
  max-width: 14rem;
  color: #b91c1c;
  font-size: 0.72rem;
}

.heatmap-row-limit-control input:invalid ~ .heatmap-row-limit-error {
  display: block;
}

.heatmap-legend-heading {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.heatmap-gradient-wrap {
  display: grid;
  gap: 0.16rem;
}

.heatmap-gradient-bar {
  height: 0.72rem;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: linear-gradient(90deg, #e5f5f9 0%, #99d8c9 50%, #2ca25f 100%);
}

.heatmap-gradient-ticks {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.heatmap-direction-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.heatmap-direction-item {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
}

.heatmap-direction-mark {
  display: inline-block;
  width: 0.38rem;
  height: 1rem;
  border-radius: 999px;
}

.heatmap-direction-positive .heatmap-direction-mark {
  background: #2563eb;
}

.heatmap-direction-negative .heatmap-direction-mark {
  background: #dc2626;
}

.comparison-heatmap-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.64);
}

.comparison-heatmap-table th,
.comparison-heatmap-table td {
  padding: 0.42rem 0.58rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.comparison-heatmap-table th:last-child,
.comparison-heatmap-table td:last-child {
  border-right: 0;
}

.comparison-heatmap-table tr:last-child th,
.comparison-heatmap-table tr:last-child td {
  border-bottom: 0;
}

.heatmap-row-group-cell {
  width: 9rem;
  min-width: 7.5rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.heatmap-row-label-cell {
  width: 18rem;
  min-width: 14rem;
  background: rgba(255, 255, 255, 0.55);
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 900;
}

.heatmap-cell {
  min-width: 9.5rem;
  border-left: 0.38rem solid transparent;
  color: #0f172a;
}

.heatmap-cell-positive {
  border-left-color: rgba(37, 99, 235, 0.82);
}

.heatmap-cell-negative {
  border-left-color: rgba(220, 38, 38, 0.82);
}

.heatmap-cell-metadata {
  border-left-color: rgba(180, 83, 9, 0.78);
}

.heatmap-cell-neutral {
  border-left-color: rgba(100, 116, 139, 0.55);
}

.heatmap-cell strong {
  display: inline;
  font-size: 0.86rem;
  font-weight: 900;
}

.heatmap-percent {
  display: inline;
  margin-left: 0.35rem;
  font-size: 0.74rem;
  font-weight: 850;
}

.heatmap-cell-positive .heatmap-percent {
  color: #1d4ed8;
}

.heatmap-cell-negative .heatmap-percent {
  color: #b91c1c;
}

.heatmap-cell-empty {
  background: rgba(15, 23, 42, 0.025);
}

.heatmap-status {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.06rem 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.heatmap-status-added {
  color: #1d4ed8;
}

.heatmap-status-removed {
  color: #b91c1c;
}

.heatmap-status-metadata {
  color: #92400e;
}

.source-overview-cell {
  gap: 0.12rem;
}

.comparison-overview-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.overview-delta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18rem;
}

.overview-delta-positive {
  color: #2563eb;
}

.overview-delta-negative {
  color: #dc2626;
}

.overview-delta-arrow {
  font-size: 1.3rem;
  line-height: 1;
}

.metadata-change-action-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.schema-type-overview-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: baseline;
}

.comparison-dialog-open {
  justify-self: start;
  min-height: 1.65rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
}

.comparison-glyph {
  width: 100%;
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

.comparison-glyph-bar {
  display: block;
  height: 100%;
  min-width: 0.25rem;
  border-radius: inherit;
}

.comparison-glyph-positive .comparison-glyph-bar {
  background: #2563eb;
}

.comparison-glyph-negative .comparison-glyph-bar {
  background: #dc2626;
}

.comparison-glyph-neutral .comparison-glyph-bar {
  background: #64748b;
}

.schema-entry-grid {
  display: grid;
  gap: 1rem;
  margin: 0.75rem 0 1rem;
  min-width: 0;
}

.schema-entry-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.58);
  min-width: 0;
  overflow: hidden;
}

.schema-table-panel summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.schema-table-panel[open] summary {
  margin-bottom: 0.65rem;
}

.schema-summary-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: 0.7rem;
  align-items: start;
}

.schema-summary-card-column {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  min-width: 0;
}

.schema-summary-type-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
  gap: 0.7rem;
  align-items: start;
  min-width: 0;
}

.schema-summary-card {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 16px;
  padding: 0.72rem;
  background: rgba(255, 255, 255, 0.48);
}

.schema-summary-card h5 {
  margin: 0;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schema-entry-section h5 {
  margin: 0 0 0.35rem;
}

.comparison-table-note {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

.schema-rich-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.schema-rich-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  table-layout: fixed;
}

.schema-rich-table th,
.schema-rich-table td {
  max-width: 18rem;
  padding: 0.52rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.schema-node-table th:nth-child(1),
.schema-node-table td:nth-child(1) {
  width: 18%;
}

.schema-node-table th:nth-child(2),
.schema-node-table td:nth-child(2) {
  width: 13%;
}

.schema-node-table th:nth-child(3),
.schema-node-table td:nth-child(3) {
  width: 34%;
}

.schema-node-table th:nth-child(4),
.schema-node-table td:nth-child(4) {
  width: 35%;
}

.schema-edge-table th:nth-child(1),
.schema-edge-table td:nth-child(1) {
  width: 19%;
}

.schema-edge-table th:nth-child(2),
.schema-edge-table td:nth-child(2) {
  width: 10%;
}

.schema-rich-table tr:last-child td {
  border-bottom: 0;
}

.schema-count-cell,
.schema-map-cell {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.schema-map-summary {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.schema-type-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.schema-type-item {
  display: inline-grid;
  gap: 0.05rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 5rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.5);
}

.schema-type-item strong {
  font-size: 1rem;
  line-height: 1;
}

.schema-type-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schema-type-added strong {
  color: #2563eb;
}

.schema-type-removed strong {
  color: #dc2626;
}

.schema-map-group {
  display: grid;
  gap: 0.3rem;
}

.schema-map-group + .schema-map-group {
  margin-top: 0.3rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.schema-map-group-heading {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schema-map-group-added .schema-map-group-heading {
  color: #2563eb;
}

.schema-map-group-removed .schema-map-group-heading {
  color: #dc2626;
}

.schema-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(3.8rem, 0.45fr);
  gap: 0.32rem;
  align-items: center;
}

.schema-map-label {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  font-weight: 700;
}

.schema-map-delta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.schema-count-cell .comparison-glyph,
.schema-map-delta .comparison-glyph {
  max-width: 4.75rem;
}

.schema-map-delta span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.muted-cell {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.comparison-dialog {
  width: min(72rem, calc(100vw - 2rem));
  max-height: min(82vh, 54rem);
  border: 0;
  border-radius: 24px;
  padding: 0;
  background: transparent;
}

.comparison-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

.schema-changes-dialog {
  width: min(90rem, calc(100vw - 2rem));
}

.schema-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  background: var(--paper);
}

.schema-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.schema-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  font-size: 1.25rem;
  line-height: 1;
}

.schema-dialog-header h4 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.schema-dialog-header button {
  flex-shrink: 0;
}

.schema-dialog-comparison {
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 500;
}

.schema-more-button {
  margin-top: 0.5rem;
}

.comparison-dialog-card {
  max-height: min(82vh, 54rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.comparison-warning-list {
  border: 1px solid rgba(180, 83, 9, 0.26);
  border-radius: 16px;
  margin: 0.75rem 0;
  padding: 0.75rem 0.9rem;
  background: rgba(180, 83, 9, 0.08);
}

.comparison-warning-list p {
  margin: 0.25rem 0;
}

.overview-heading h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.overview-description {
  width: 100%;
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.schema-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.overview-info-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 0.46fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 1rem 0 0;
  align-items: start;
}

.overview-info-grid .definition-grid {
  margin: 0;
}

.overview-key-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.8rem;
  align-items: center;
  padding-right: 1rem;
  border-right: 1px solid var(--line);
}

.overview-value {
  display: grid;
  align-content: center;
  gap: 0.08rem;
  min-width: 0;
}

.overview-value-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.overview-value strong {
  color: var(--teal);
  font-size: inherit;
  line-height: 1;
}

.definition-grid {
  display: grid;
  grid-template-columns: 9.75rem minmax(0, 1fr);
  gap: 0.55rem 0.85rem;
  align-items: center;
}

.definition-grid dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.definition-grid dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.dash-tab {
  font-weight: 700;
}

.sankey-scroll-panel {
  max-height: min(78vh, 980px);
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  overflow: auto;
  overscroll-behavior: contain;
}

.sankey-scroll-panel:not([hidden]) {
  min-height: min(70vh, 860px);
}

.inline-sankey-graph {
  min-width: 1120px;
}

@media (max-width: 820px) {
  .site-header,
  .selector-grid,
  .sankey-control-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-info-grid {
    grid-template-columns: 1fr;
  }

  .overview-key-values {
    padding-right: 0;
    padding-bottom: 0.8rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .definition-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .comparison-download-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .sankey-control-block {
    height: auto;
  }

  .sankey-filter-grid-compact {
    grid-template-columns: 1fr;
  }

  .sankey-scroll-panel {
    max-height: 74vh;
    min-height: 62vh;
  }
}

.contribution-panel {
  min-width: 0;
  overflow-x: auto;
}

.contribution-panel-with-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.contribution-panel-with-metric > .contribution-chart {
  grid-area: 1 / 1;
}

.contribution-metric-toggle {
  grid-area: 1 / 1;
  justify-self: center;
  align-self: start;
  position: sticky;
  left: calc(50% - 70px);
  right: calc(50% - 70px);
  z-index: 1;
  width: fit-content;
  margin: 12px 0 0;
  font-size: 0.9rem;
  background: white;
}

.contribution-metric-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.contribution-metric-toggle label + label {
  margin-left: 16px;
}
.node-attribute-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.node-attribute-controls > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-attribute-controls label {
  white-space: nowrap;
}

.node-attribute-controls .dash-dropdown {
  flex: 1;
  min-width: 0;
}

.node-attribute-controls input {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font: inherit;
}

@media (max-width: 700px) {
  .node-attribute-controls {
    grid-template-columns: 1fr;
  }
}
.node-attribute-scroll {
  overflow-y: auto;
  min-width: 0;
}
