:root {
  color-scheme: dark;
  --page: #080b0e;
  --page-raised: #0c1115;
  --panel: #11171c;
  --panel-raised: #151d23;
  --line: #263039;
  --line-soft: rgba(255, 255, 255, 0.075);
  --text: #f3f4f0;
  --muted: #96a0a7;
  --muted-strong: #bcc3c7;
  --orange: #f5a524;
  --orange-soft: rgba(245, 165, 36, 0.14);
  --positive: #4fd49a;
  --positive-soft: rgba(79, 212, 154, 0.13);
  --negative: #ff6b68;
  --negative-soft: rgba(255, 107, 104, 0.13);
  --warning: #f3c969;
  --fund-1: #f5a524;
  --fund-2: #4fd49a;
  --fund-3: #64a8ff;
  --fund-4: #c58cff;
  --fund-5: #56d5dc;
  --fund-6: #f17fb4;
  --fund-7: #a7b37a;
  --fund-8: #8d98a1;
  --radius: 18px;
  --radius-small: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -10%, rgba(245, 165, 36, 0.13), transparent 30rem),
    linear-gradient(180deg, #0b1014 0, var(--page) 32rem);
  line-height: 1.5;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #080b0e;
  background: var(--orange);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 11, 14, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 165, 36, 0.35);
  border-radius: 10px;
  color: #101010;
  background: var(--orange);
  box-shadow: 0 8px 30px rgba(245, 165, 36, 0.16);
  font-size: 22px;
  font-weight: 800;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand strong {
  letter-spacing: 0.12em;
  font-size: 13px;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-link,
.refresh-button,
.primary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.text-link {
  padding: 0 14px;
  color: var(--muted-strong);
  font-size: 13px;
}

.text-link:hover {
  color: var(--text);
}

.refresh-button {
  gap: 7px;
  padding: 0 15px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
}

.refresh-button:hover {
  border-color: #45535e;
  background: var(--panel-raised);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.refresh-button.is-loading .refresh-symbol {
  animation: spin 900ms linear infinite;
}

.visually-hidden {
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: absolute;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.snapshot-bar {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}

.snapshot-bar-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.snapshot-bar-copy .eyebrow,
.snapshot-bar-copy > p:last-child {
  margin: 0;
}

.snapshot-bar-copy > p:last-child {
  color: var(--muted);
  font-size: 12px;
}

.eyebrow,
.section-index,
.empty-kicker {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.17em;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px var(--orange-soft);
}

h2,
p {
  text-wrap: pretty;
}

.snapshot-meta {
  min-width: 196px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill,
.method-badge,
.alert-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px currentColor;
  opacity: 0.8;
}

.status-loading {
  color: var(--warning);
}

.status-ok {
  color: var(--positive);
}

.status-partial,
.status-stale {
  color: var(--warning);
}

.status-error {
  color: var(--negative);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(243, 201, 105, 0.24);
  border-radius: var(--radius-small);
  color: #e9d49e;
  background: rgba(243, 201, 105, 0.08);
  font-size: 13px;
}

.notice strong {
  flex: 0 0 auto;
  color: var(--warning);
}

.notice-plain {
  border-color: var(--line);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.025);
}

.notice-plain strong {
  color: var(--text);
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 80px;
}

.skeleton {
  min-height: 180px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.055) 48%, transparent 75%);
  transform: translateX(-100%);
  animation: shimmer 1.35s infinite;
}

.skeleton-wide {
  grid-column: 1 / -1;
}

.skeleton-wide {
  min-height: 360px;
}

.empty-state {
  max-width: 720px;
  margin: 16px auto 96px;
  padding: 64px 36px;
  border: 1px dashed #38454f;
  border-radius: 24px;
  text-align: center;
  background: rgba(17, 23, 28, 0.58);
}

.empty-state h2 {
  margin: 0;
  font-size: 28px;
}

.empty-state p {
  max-width: 540px;
  margin: 14px auto 26px;
  color: var(--muted);
  line-height: 1.75;
}

.primary-button {
  padding: 0 18px;
  border: 0;
  color: #15120b;
  background: var(--orange);
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #ffb53c;
}

.asset-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 36px;
}

.asset-detail-heading h2 {
  margin: 0;
  letter-spacing: -0.025em;
  font-size: clamp(22px, 3vw, 32px);
}

.asset-tabs {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #090d10;
}

.asset-tab {
  min-width: 0;
  min-height: 54px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-content: start;
  column-gap: 8px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted-strong);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.asset-tab:hover,
.asset-tab:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
}

.asset-tab.is-active {
  border-color: rgba(245, 165, 36, 0.28);
  color: var(--text);
  background: var(--orange-soft);
}

.asset-tab-symbol {
  grid-row: 1 / 3;
  min-width: 22px;
  color: var(--orange);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.asset-tab > span:nth-child(2) {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.asset-tab small {
  color: var(--muted);
  font-size: 9px;
}

.asset-tab-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.quality-state,
.quality-text {
  font-size: 10px;
  font-weight: 700;
}

.quality-matched {
  color: var(--positive);
}

.quality-divergent {
  color: var(--negative);
}

.quality-single {
  color: var(--warning);
}

.asset-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.asset-detail-heading > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.asset-detail-symbol {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 165, 36, 0.3);
  border-radius: 13px;
  color: #17120a;
  background: var(--orange);
  font-size: 25px;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card,
.panel,
.source-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(21, 29, 35, 0.96), rgba(14, 19, 23, 0.96));
  box-shadow: var(--shadow);
}

.metric-card {
  min-width: 0;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.metric-card-featured {
  border-color: rgba(245, 165, 36, 0.25);
  background:
    radial-gradient(circle at 105% -20%, rgba(245, 165, 36, 0.18), transparent 60%),
    linear-gradient(145deg, #181b1b, #111619);
}

.metric-card-featured {
  min-height: 214px;
}

.quality-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
}

.aum-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 3px 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 9px;
}

.aum-secondary strong {
  color: var(--muted-strong);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.aum-secondary time {
  grid-column: 1 / -1;
}

.relative-strength {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.relative-strength > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}

.relative-strength small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
}

.relative-strength strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.metric-heading,
.metric-footer,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-heading {
  color: var(--muted-strong);
  font-size: 12px;
}

.source-tag {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.metric-value {
  display: block;
  overflow: hidden;
  margin: 18px 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.04em;
  font-size: clamp(29px, 3vw, 40px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.metric-value-small {
  font-size: clamp(25px, 2.4vw, 34px);
}

.metric-footer {
  color: var(--muted);
  font-size: 11px;
}

.not-flow {
  color: var(--warning);
}

.market-context-row {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) repeat(2, minmax(170px, 0.72fr)) auto;
  align-items: center;
  gap: 0;
  margin-bottom: 96px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.018);
}

.market-context-copy,
.market-context-metric {
  min-width: 0;
  padding: 17px 20px;
}

.market-context-copy {
  display: grid;
  gap: 3px;
}

.market-context-copy strong {
  font-size: 14px;
}

.market-context-copy small,
.market-context-metric span,
.market-context-metric small,
.market-context-time {
  color: var(--muted);
  font-size: 10px;
}

.market-context-metric {
  border-left: 1px solid var(--line-soft);
}

.market-context-metric span,
.market-context-metric small {
  display: block;
}

.market-context-metric strong {
  display: block;
  overflow: hidden;
  margin: 4px 0 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.market-context-time {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 17px 20px;
  border-left: 1px solid var(--line-soft);
  white-space: nowrap;
}

.positive,
.value-positive {
  color: var(--positive) !important;
}

.negative,
.value-negative {
  color: var(--negative) !important;
}

.neutral {
  color: var(--muted-strong) !important;
}

.section-block {
  margin-bottom: 104px;
  scroll-margin-top: 96px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  letter-spacing: -0.025em;
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading p:not(.section-index) {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-index {
  margin-bottom: 8px;
}

.legend {
  flex: 0 0 auto;
  display: flex;
  gap: 16px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 2px;
}

.legend-inflow {
  background: var(--positive);
}

.legend-outflow {
  background: var(--negative);
}

.method-badge {
  flex: 0 0 auto;
  border-color: rgba(79, 212, 154, 0.2);
  color: var(--positive);
  background: var(--positive-soft);
}

.method-badge-warn {
  border-color: rgba(243, 201, 105, 0.22);
  color: var(--warning);
  background: rgba(243, 201, 105, 0.08);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 14px;
}

.split-grid-wide {
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.75fr);
}

.panel {
  min-width: 0;
  padding: 24px;
}

.panel-heading {
  align-items: flex-start;
  margin-bottom: 26px;
}

.panel-heading > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.panel-heading strong {
  font-size: 17px;
}

.panel-label,
.panel-meta {
  color: var(--muted);
  font-size: 11px;
}

.etf-chart-stack {
  display: grid;
  gap: 14px;
}

.etf-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
}

.chart-panel-primary {
  padding-bottom: 20px;
}

.chart-key,
.fund-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 17px;
  margin: -8px 0 12px;
  color: var(--muted);
  font-size: 10px;
}

.chart-key span,
.fund-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.key-swatch,
.fund-swatch {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 2px;
}

.key-inflow {
  background: var(--positive);
}

.key-outflow {
  background: var(--negative);
}

.key-line {
  width: 14px;
  height: 0;
  display: inline-block;
  border-top: 1px dashed var(--warning);
}

.key-anomaly {
  width: 8px;
  height: 8px;
  display: inline-block;
  border: 2px solid var(--orange);
  border-radius: 2px;
}

.flow-chart {
  position: relative;
  width: 100%;
  min-height: 286px;
  overflow: hidden;
}

.flow-chart-compact {
  min-height: 278px;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-grid-line,
.chart-zero-line,
.chart-threshold-line {
  vector-effect: non-scaling-stroke;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.065);
  stroke-width: 1;
}

.chart-zero-line {
  stroke: #53616b;
  stroke-width: 1;
}

.chart-threshold-line {
  stroke: var(--warning);
  stroke-width: 1.25;
  stroke-dasharray: 6 5;
}

.chart-axis-label,
.chart-threshold-label {
  fill: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.chart-threshold-label {
  fill: var(--warning);
  font-size: 10px;
  font-weight: 650;
}

.flow-bar,
.fund-segment,
.cumulative-line,
.cumulative-dot {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.flow-bar.inflow {
  fill: var(--positive);
}

.flow-bar.outflow {
  fill: var(--negative);
}

.flow-bar.zero {
  fill: var(--muted);
}

.flow-bar.is-anomaly {
  stroke: var(--orange);
  stroke-width: 2.5;
}

.cumulative-area {
  fill: var(--orange-soft);
  pointer-events: none;
}

.cumulative-line {
  fill: none;
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.cumulative-dot {
  fill: var(--panel);
  stroke: var(--orange);
  stroke-width: 1.75;
}

.chart-hit {
  fill: transparent;
  cursor: crosshair;
  outline: none;
}

.chart-hit:focus-visible {
  stroke: var(--orange);
  stroke-width: 1.5;
}

.chart-tooltip {
  position: absolute;
  z-index: 12;
  width: max-content;
  min-width: 168px;
  max-width: min(270px, calc(100% - 16px));
  padding: 11px 12px;
  border: 1px solid #3a464f;
  border-radius: 10px;
  color: var(--text);
  background: rgba(8, 12, 15, 0.96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.chart-tooltip-title {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
}

.chart-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0;
  color: var(--muted);
}

.chart-tooltip-row b {
  color: var(--text);
  font-weight: 650;
}

.chart-tooltip-row.is-emphasis {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-strong);
}

.chart-method-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.fund-legend {
  min-height: 20px;
  margin-bottom: 4px;
}

.fund-series-0 { fill: var(--fund-1); background: var(--fund-1); }
.fund-series-1 { fill: var(--fund-2); background: var(--fund-2); }
.fund-series-2 { fill: var(--fund-3); background: var(--fund-3); }
.fund-series-3 { fill: var(--fund-4); background: var(--fund-4); }
.fund-series-4 { fill: var(--fund-5); background: var(--fund-5); }
.fund-series-5 { fill: var(--fund-6); background: var(--fund-6); }
.fund-series-6 { fill: var(--fund-7); background: var(--fund-7); }
.fund-series-7 { fill: var(--fund-8); background: var(--fund-8); }

.latest-products-details {
  margin-top: 6px;
}

.latest-products-details summary span {
  margin-left: 5px;
  color: var(--muted);
}

.latest-products-details .contribution-list {
  margin-top: 18px;
}

.data-details {
  margin-top: 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-strong);
  font-size: 12px;
}

.data-details summary {
  padding-top: 16px;
  cursor: pointer;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

th:first-child,
td:first-child {
  padding-left: 0;
  text-align: left;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

.contribution-list {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.contribution-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.ticker {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.contribution-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.contribution-bar {
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: var(--positive);
}

.contribution-bar.outflow {
  background: var(--negative);
}

.contribution-value {
  min-width: 70px;
  text-align: right;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.inline-empty {
  min-height: 118px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px dashed #32404a;
  border-radius: var(--radius-small);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.alert-state {
  border-color: var(--line);
  color: var(--muted-strong);
}

.alert-state.is-triggered {
  border-color: rgba(79, 212, 154, 0.22);
  color: var(--positive);
  background: var(--positive-soft);
}

.alert-state.is-error {
  border-color: rgba(255, 107, 104, 0.22);
  color: var(--negative);
  background: var(--negative-soft);
}

.alert-state.is-warning {
  border-color: rgba(243, 201, 105, 0.22);
  color: var(--warning);
  background: rgba(243, 201, 105, 0.08);
}

.alert-diagnostic-panel {
  padding: 0;
  overflow: hidden;
}

.alert-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.alert-diagnostic-grid > div {
  min-width: 0;
  padding: 22px;
  border-left: 1px solid var(--line-soft);
}

.alert-diagnostic-grid > div:first-child {
  border-left: 0;
}

.alert-diagnostic-grid span,
.alert-diagnostic-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.alert-diagnostic-grid strong {
  display: block;
  overflow: hidden;
  margin: 10px 0 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(17px, 2vw, 24px);
  font-variant-numeric: tabular-nums;
}

.alert-history-compact {
  padding: 16px 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
  font-size: 11px;
}

.alert-history-compact > p {
  display: inline;
  margin: 0 0 0 12px;
}

.alert-list-compact {
  margin-top: 8px;
}

#fundStackEmpty {
  min-height: 0;
  padding: 14px;
  border: 0;
}

.rule-list,
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.rule-list li:last-child {
  border-bottom: 0;
}

.rule-list li > span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rule-list strong {
  font-size: 13px;
}

.rule-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.alert-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.alert-item:last-child {
  border-bottom: 0;
}

.alert-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 4px var(--positive-soft);
}

.alert-marker.is-extreme {
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
}

.alert-marker.is-warning {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(243, 201, 105, 0.1);
}

.alert-item-main {
  min-width: 0;
}

.alert-item-main strong,
.alert-item-main small {
  display: block;
}

.alert-item-main strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.alert-item-main small,
.alert-item time {
  color: var(--muted);
  font-size: 10px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.source-card {
  min-width: 0;
  padding: 20px;
}

.source-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.source-card h3 {
  margin: 0;
  font-size: 14px;
}

.source-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.source-state {
  flex: 0 0 auto;
  color: var(--muted-strong);
  font-size: 10px;
}

.source-state::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

.source-state.available,
.source-state.ok,
.source-state.success {
  color: var(--positive);
}

.source-state.missing,
.source-state.error,
.source-state.failed {
  color: var(--negative);
}

.source-state.pending,
.source-state.stale,
.source-state.partial,
.source-state.unconfigured {
  color: var(--warning);
}

.source-time {
  display: block;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-strong);
  font-size: 10px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.source-link {
  color: var(--orange);
  font-size: 10px;
  text-decoration: none;
}

.source-link:hover,
.source-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.provenance-note {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 11px;
}

.site-footer {
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  background: rgba(5, 7, 9, 0.56);
}

.footer-inner {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  font-size: 11px;
}

.footer-inner p:last-child {
  max-width: 720px;
  text-align: right;
}

.noscript-message {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 107, 104, 0.35);
  border-radius: 12px;
  color: var(--text);
  text-align: center;
  background: #2a1415;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .snapshot-meta {
    align-items: flex-start;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-diagnostic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-diagnostic-grid > div:nth-child(3) {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .alert-diagnostic-grid > div:nth-child(4) {
    border-top: 1px solid var(--line-soft);
  }

  .market-context-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-context-copy {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line-soft);
  }

  .market-context-metric:first-of-type {
    border-left: 0;
  }

  .market-context-time {
    grid-column: 1 / -1;
    min-height: 46px;
    padding-block: 12px;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .split-grid,
  .split-grid-wide,
  .etf-secondary-grid {
    grid-template-columns: 1fr;
  }

  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand small,
  .text-link {
    display: none;
  }

  .refresh-button {
    min-height: 40px;
  }

  .snapshot-bar {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 24px 0 20px;
  }

  .snapshot-bar-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .snapshot-meta {
    width: 100%;
    flex-flow: row wrap;
    align-items: center;
    gap: 8px 12px;
    padding-bottom: 0;
  }

  .asset-navigation {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 28px;
  }

  .asset-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-tab-note {
    text-align: left;
  }

  .asset-detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
  }

  .metric-card {
    min-height: 154px;
  }

  .market-context-row {
    grid-template-columns: 1fr;
    margin-bottom: 72px;
  }

  .market-context-copy,
  .market-context-metric,
  .market-context-time {
    grid-column: auto;
    padding: 15px 17px;
    border-right: 0;
    border-left: 0;
  }

  .market-context-metric {
    border-top: 1px solid var(--line-soft);
  }

  .market-context-time {
    min-height: auto;
  }

  .alert-diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .alert-diagnostic-grid > div,
  .alert-diagnostic-grid > div:nth-child(3),
  .alert-diagnostic-grid > div:nth-child(4) {
    padding: 17px;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .alert-diagnostic-grid > div:first-child {
    border-top: 0;
  }

  .alert-history-compact > p {
    display: block;
    margin: 8px 0 0;
  }

  .section-block {
    margin-bottom: 76px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .legend {
    padding: 0;
  }

  .panel {
    padding: 18px;
    border-radius: 15px;
  }

  .flow-chart {
    min-height: 286px;
  }

  .flow-chart-compact {
    min-height: 248px;
  }

  .chart-key,
  .fund-legend {
    gap: 7px 12px;
  }

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 30px 0;
  }

  .footer-inner p {
    margin: 0;
  }

  .footer-inner p:last-child {
    text-align: left;
  }

  .notice {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .brand strong {
    font-size: 11px;
  }

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

  .skeleton-wide {
    grid-column: auto;
  }

  #autoRefreshNote {
    display: none;
  }

  .asset-tab {
    padding-inline: 10px;
  }

  .alert-item {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .alert-item time {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
