.gold-fx-dashboard {
  --gf-card: var(--panel);
  --gf-surface: var(--panel2);
  --gf-ink: var(--text);
  --gf-muted: var(--muted);
  --gf-line: var(--line);
  --gf-gold: var(--gold);
  --gf-green: var(--green);
  --gf-red: var(--red);
  width: 100%;
  min-width: 0;
  margin-inline: auto;
  color: var(--gf-ink);
}

.gf-page-heading,
.gf-section-heading,
.gf-card-heading,
.gf-source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.gf-page-heading { align-items: flex-start; flex-wrap: wrap; margin: 0 0 20px; }
.gf-page-heading > div:first-child,.gf-section-heading > div { min-width: 0; flex: 1 1 240px; }
.gf-page-heading h1 { margin: 4px 0 7px; color: var(--gf-ink); font-size: 24px; line-height: 1.6; }
.gf-page-heading p { margin: 0; color: var(--gf-muted); }
.gf-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.gf-subtitle { font-size: 13px; line-height: 1.9; }
.gf-update { display: grid; gap: 5px; min-width: 150px; padding: 12px 15px; border: 1px solid var(--gf-line); border-radius: 12px; background: var(--gf-card); text-align: center; color: var(--gf-muted); font-size: 11px; }
.gf-update bdi { color: var(--gf-ink); font-size: 14px; font-weight: 700; }

.gf-source-panel,
.gf-tables,
.gf-table-card,
.gf-card,
.gf-formula-card {
  border: 1px solid var(--gf-line);
  border-radius: 14px;
  background: var(--gf-card);
}

.gf-tabs { display: flex; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid var(--gf-line); }
.gf-tab { display: inline-flex; min-height: 42px; align-items: center; padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--gf-muted); text-decoration: none; font-size: 13px; }
.gf-tab.is-active { border-color: var(--gf-gold); color: var(--gf-ink); font-weight: 700; }
.gf-tab:hover { color: var(--gf-ink); }
.gf-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.gf-tab-panel[hidden] { display: none; }
.gf-source-panel { padding: 0 16px; margin-bottom: 14px; }
.gf-source-heading { justify-content: flex-start; flex-wrap: wrap; min-height: 44px; margin: 0; color: var(--gf-ink); font-weight: 700; cursor: pointer; }
.gf-source-heading::after { content: '⌄'; margin-inline-start: auto; }
.gf-source-panel[open] > .gf-source-heading::after { content: '⌃'; }
.gf-source-heading:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.gf-source-panel[open] { padding-bottom: 12px; }
.gf-source-heading small { color: var(--gf-muted); font-size: 12px; font-weight: 400; }
.gf-source-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gf-source-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; max-width: 100%; padding: 7px 14px; border: 1px solid var(--gf-line); border-radius: 9px; background: var(--gf-surface); color: var(--gf-ink); text-decoration: none; font: inherit; font-size: 12px; overflow-wrap: anywhere; cursor: pointer; }
.gf-source-chip.is-active { border-color: var(--primary-border); background: var(--tab-active-bg); color: var(--nav-active-text); font-weight: 700; }
.gf-source-chip:hover { border-color: var(--gf-gold); }
.gf-source-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.gf-section { min-width: 0; margin: 20px 0 24px; container-type: inline-size; }
.gf-section-heading { flex-wrap: wrap; margin-bottom: 14px; }
.gf-section-heading h2,.gf-table-title h2 { margin: 0 0 4px; color: var(--gf-ink); font-size: 19px; }
.gf-section-heading p,.gf-table-title p { margin: 0; color: var(--gf-muted); font-size: 11px; line-height: 1.8; }
.gf-state-pill { display: inline-flex; align-items: center; min-height: 30px; max-width: 100%; padding: 5px 10px; border: 1px solid var(--gf-line); border-radius: 8px; color: var(--gf-muted); background: var(--gf-surface); font-size: 11px; line-height: 1.8; }
.gf-state-pill.is-estimated { color: var(--warning-text); background: var(--warning-bg); border-color: var(--warning-border); }
.gf-state-pill.is-unavailable { color: var(--gf-red); }
.gf-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px,100%),1fr)); gap: 14px; }
@container (min-width: 740px) {
  .gf-card-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gf-card-grid:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .gf-card-grid:has(> :nth-child(5):last-child) > * { grid-column: span 2; }
  .gf-card-grid:has(> :nth-child(5):last-child) > :nth-last-child(-n+2) { grid-column: span 3; }
  .gf-card-grid:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@container (min-width: 1060px) {
  .gf-card-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
.gf-card { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 17px; overflow-wrap: anywhere; }
.gf-card-heading { justify-content: flex-start; width: 100%; margin-bottom: 10px; }
.gf-card-heading h3 { min-width: 0; line-height: 1.8; }
.gf-card-heading h3 { margin: 0; color: var(--gf-ink); font-size: 14px; }
.gf-orb,.gf-coin-orb { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb,var(--gf-gold) 40%,var(--gf-line)); border-radius: 10px; color: var(--gf-gold); background: var(--accent-soft); }
.gf-asset-glyph { display: block; width: 24px; height: 24px; }
.gf-asset-mark { fill: currentColor; stroke: none; font-family: Arial,sans-serif; font-size: 6px; font-weight: 700; text-anchor: middle; dominant-baseline: central; direction: ltr; unicode-bidi: isolate; }
.gf-asset-mark--coin { font-size: 10px; }
.gf-orb--currency { color: var(--gf-green); border-color: var(--success-border); background: var(--success-bg); }
.gf-price { max-width: 100%; margin-top: 1px; color: var(--gf-ink); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.6; }
.gf-unit,.gf-provenance { color: var(--gf-muted); font-size: 12px; line-height: 1.8; }
.gf-provenance [data-freshness="STALE"],.gf-provenance [data-freshness="DELAYED"] { color: var(--warning-text); }
.gf-change { margin-top: 9px; padding: 6px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.gf-change.is-up { color: var(--gf-green); background: color-mix(in srgb,var(--gf-green) 9%,var(--gf-card)); }
.gf-change.is-down { color: var(--gf-red); background: color-mix(in srgb,var(--gf-red) 8%,var(--gf-card)); }
.gf-change.is-neutral { color: var(--gf-muted); background: var(--gf-surface); font-weight: 400; }
.gf-provenance { margin-top: 9px; }
.gf-table-card .gf-provenance { display: block; min-width: 12rem; white-space: normal; }
.gf-no-data { margin: 13px 0 4px; color: var(--gf-muted); font-size: 16px; }
.gf-bubble-mini,.gf-bubble-box { display: grid; width: 100%; gap: 4px; margin-top: 10px; padding: 9px 10px; border-radius: 9px; background: color-mix(in srgb,var(--gf-red) 7%,var(--gf-card)); color: var(--gf-ink); font-size: 12px; }
.gf-bubble-mini { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.gf-bubble-mini span { grid-column: 1/-1; }
.gf-bubble-mini span,.gf-bubble-box span { color: var(--gf-muted); }
.gf-bubble-box.is-positive { background: color-mix(in srgb,var(--gf-green) 9%,var(--gf-card)); }
.gf-bubble-box.is-negative strong { color: var(--gf-red); }
.gf-bubble-box.is-positive strong { color: var(--gf-green); }
.gf-empty { margin: 0; padding: 18px; border: 1px dashed var(--gf-line); border-radius: 12px; background: var(--gf-card); color: var(--gf-muted); text-align: center; line-height: 1.9; }

.gf-calculated-section { padding: 16px; border-radius: 14px; background: var(--gf-surface); }
.gf-formula-legend { margin: -4px 0 12px; color: var(--gf-muted); font-size: 11px; line-height: 1.9; }
.gf-formula-legend code { padding: 2px 4px; border-radius: 4px; background: var(--gf-card); }
.gf-formula-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(260px,100%),1fr)); gap: 12px; }
.gf-formula-card { display: grid; min-width: 0; gap: 8px; padding: 14px; overflow-wrap: anywhere; }
.gf-formula-card .gf-card-heading { margin: 0; }
.gf-formula-label,.gf-formula-status { color: var(--gf-muted); font-size: 11px; }
.gf-formula { display: block; max-width: 100%; padding: 10px; overflow-wrap: anywhere; border: 1px solid var(--gf-line); border-radius: 8px; background: var(--gf-surface); color: var(--gf-ink); font-size: 12px; line-height: 1.8; text-align: left; }
.gf-formula-status { color: var(--gf-red); font-size: 12px; font-weight: 700; }
.gf-formula-status.is-ready { color: var(--gf-green); }
.gf-formula-status.is-estimated { color: var(--warning-text); }
.gf-formula-card small { color: var(--gf-muted); font-size: 10px; line-height: 1.9; }
.gf-formula-details { min-width: 0; padding-top: 9px; border-top: 1px solid var(--gf-line); font-size: 11px; }
.gf-formula-details summary { cursor: pointer; color: var(--gf-ink); line-height: 1.9; }
.gf-formula-details summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.gf-formula-details dl { margin: 8px 0 0; }
.gf-formula-details dl > div { padding: 7px 0; border-bottom: 1px solid var(--gf-line); }
.gf-formula-details dl > div:last-child { border-bottom: 0; }
.gf-formula-details dt { color: var(--gf-muted); }
.gf-formula-details dd { margin: 3px 0 0; line-height: 1.9; color: var(--gf-ink); }
.gf-formula-details dd small { display: block; }
.gf-tables { min-width: 0; padding: 16px; }
.gf-table-title { margin-bottom: 14px; }
.gf-table-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(480px,100%),1fr)); gap: 14px; }
.gf-table-card { min-width: 0; padding: 13px; }
.gf-table-card h3 { margin: 0 0 10px; color: var(--gf-ink); font-size: 14px; }
.gf-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--gf-line); border-radius: 8px; }
.gf-table-card table { width: 100%; border-collapse: collapse; font-size: 11px; }
.gf-table-card th,.gf-table-card td { padding: 11px 10px; border-bottom: 1px solid var(--gf-line); text-align: start; white-space: nowrap; }
.gf-table-card tbody tr:last-child > * { border-bottom: 0; }
.gf-table-card thead th { color: var(--gf-muted); background: var(--gf-surface); font-weight: 600; }
.gf-table-card tbody th { color: var(--gf-ink); font-weight: 700; }
.gf-muted,.gf-table-note { color: var(--gf-muted); font-size: 11px; }
.gf-table-note { line-height: 1.8; margin: 10px 0 0; }
@media (max-width: 600px) {
  .gf-page-heading { align-items: stretch; flex-direction: column; gap: 6px; margin-bottom: 10px; }
  .gf-page-heading > div:first-child,.gf-section-heading > div { flex-basis: auto; }
  .gf-page-heading h1 { font-size: 21px; margin: 0 0 4px; }
  .gf-eyebrow { display: none; }
  .gf-subtitle { line-height: 1.7; }
  .gf-update { display: flex; align-items: center; gap: 8px; min-width: 0; width: auto; max-width: 100%; padding: 4px 0; border: 0; background: transparent; font-size: 12px; }
  .gf-update bdi { font-size: 13px; }
  .gf-section { margin: 12px 0 20px; }
  .gf-section-heading { align-items: flex-start; gap: 6px; margin-bottom: 10px; }
  .gf-section-heading h2 { font-size: 18px; }
  .gf-section-heading p { font-size: 13px; }
  .gf-section-heading > div { flex: 1 1 180px; }
  .gf-source-heading { gap: 8px; }
  .gf-source-panel { padding-inline: 10px; margin-bottom: 10px; }
  .gf-tabs { margin-bottom: 10px; }
  .gf-source-chip { min-height: 40px; padding-inline: 11px; }
  .gf-card-grid { gap: 12px; }
  .gf-card { padding: 14px; }
  .gf-card-heading { gap: 8px; }
  .gf-card-heading h3 { font-size: 12px; }
  .gf-unit,.gf-provenance,.gf-formula-card small,.gf-table-note { font-size: 13px; }
  .gf-calculated-section,.gf-tables { padding: 12px; }
  .gf-tab { min-height: 42px; padding-inline: 10px; font-size: 12px; }
  .gf-table-card { padding: 10px; }
}
