/* Keep semantic chart and currency colours unchanged. */
:root[data-vcl-theme="graphite"]{--bg:#101216;--panel:#1b2028;--line:#3a4553;--text:#edf2f7;--muted:#aebbc9;--accent:#89c8ee;--amber:#e6bd79;--vcl-glow:#29333f;--vcl-control:#202934;--vcl-selected:#35465a}
:root[data-vcl-theme="forest"]{--bg:#071710;--panel:#11271d;--line:#345c47;--text:#edf6ef;--muted:#a7c7b4;--accent:#8ddbb5;--amber:#e7c180;--vcl-glow:#183e2a;--vcl-control:#193325;--vcl-selected:#285c40}
html[data-vcl-theme="graphite"] body,html[data-vcl-theme="forest"] body{background:radial-gradient(circle at 80% 0,var(--vcl-glow) 0,transparent 34%),var(--bg)}
html[data-vcl-theme="graphite"] :is(.quality,.panel,.currency-card,.table-wrap,.history-list,.clock,.language-control,.account-trial-bar,.operational-panel),html[data-vcl-theme="forest"] :is(.quality,.panel,.currency-card,.table-wrap,.history-list,.clock,.language-control,.account-trial-bar,.operational-panel){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-vcl-theme="graphite"] :is(button,select,input),html[data-vcl-theme="forest"] :is(button,select,input){background:var(--vcl-control);color:var(--text);border-color:var(--line)}
html[data-vcl-theme="graphite"] button.active,html[data-vcl-theme="forest"] button.active{background:var(--vcl-selected);border-color:var(--accent)}
html[data-vcl-theme="graphite"] .currency-choices button,html[data-vcl-theme="forest"] .currency-choices button{color:var(--currency);border-color:var(--currency)}
#vcl-theme-button{min-height:44px;white-space:nowrap;color:var(--text);border-color:var(--accent)}
#vcl-theme-button:focus-visible{outline:3px solid var(--amber);outline-offset:3px}

/* VCL_WHITE_THEME_20261003 */
:root[data-vcl-theme="white"]{color-scheme:light;--bg:#ffffff;--panel:#f3f6f8;--line:#b9c9d3;--text:#182b38;--muted:#465e6d;--accent:#176280;--amber:#79520c}
html[data-vcl-theme="white"] body{background:var(--bg);color:var(--text)}
html[data-vcl-theme="white"] :is(.quality,.panel,.currency-card,.table-wrap,.history-list,.clock,.language-control,.account-trial-bar,.operational-panel,.observation-row,.pair-card){background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-vcl-theme="white"] :is(button,select,input){background:#fff;color:var(--text);border-color:var(--line)}
html[data-vcl-theme="white"] :is(button.active,button[aria-pressed="true"]){background:#dcecf4;border-color:var(--accent);color:var(--text)}
html[data-vcl-theme="white"] :is(.regime,.history-item p,.observation-row small,.passport-grid dt,.concordance-cells time,.fingerprint-result){color:var(--muted)!important}
html[data-vcl-theme="white"] #observatory-clock~section>p{color:var(--muted)}
html[data-vcl-theme="white"] .chart-text{fill:var(--text)}
html[data-vcl-theme="white"] .landscape-plane{fill:#e9f0f4;stroke:#647d8d}
html[data-vcl-theme="white"] .network-node circle{fill:#fff}
html[data-vcl-theme="white"] .network-node.selected circle{fill:#dcecf4}
html[data-vcl-theme="white"] .landscape-trace{stroke:#465e6d}
html[data-vcl-theme="white"] .landscape-trace-point{fill:#465e6d}
html[data-vcl-theme="white"] .currency-choices button{color:var(--currency);border-color:var(--currency)}

/* VCL_WHITE_CONTRAST_20261003 */
html[data-vcl-theme="white"] .currency-AUD{--currency:#205ca5}
html[data-vcl-theme="white"] .currency-CAD{--currency:#006878}
html[data-vcl-theme="white"] .currency-CHF{--currency:#6940a5}
html[data-vcl-theme="white"] .currency-EUR{--currency:#903a94}
html[data-vcl-theme="white"] .currency-GBP{--currency:#805009}
html[data-vcl-theme="white"] .currency-JPY{--currency:#484da0}
html[data-vcl-theme="white"] .currency-NZD{--currency:#686016}
html[data-vcl-theme="white"] .currency-USD{--currency:#31657a}
html[data-vcl-theme="white"] a,
html[data-vcl-theme="white"] a:visited{color:#175e7c!important}
html[data-vcl-theme="white"] #clock-time{color:#79520c!important}
html[data-vcl-theme="white"] .rank-tick{fill:#465e6d}
html[data-vcl-theme="white"] .rank-series.muted{opacity:1}
html[data-vcl-theme="white"] .rank-series.selected .rank-line{stroke-width:3.5}
html[data-vcl-theme="white"] .clock{box-shadow:0 3px 12px #182b3826}
html[data-vcl-theme="white"] a:focus-visible{outline:2px solid #175e7c;outline-offset:3px}
html[data-vcl-theme="white"] #landscape-chart,
html[data-vcl-theme="white"] #replay-landscape{
  background:#f7fafc;
  border-color:#b9c9d3;
}
html[data-vcl-theme="white"] .landscape-order,
html[data-vcl-theme="white"] .landscape-rank,
html[data-vcl-theme="white"] .landscape-currency,
html[data-vcl-theme="white"] .trace-heading{
  fill:#263f4f;
}
html[data-vcl-theme="white"] .network-edge{
  stroke:#8ca0ad;
  opacity:.42;
}
html[data-vcl-theme="white"] .network-edge.chosen{
  opacity:1;
}
html[data-vcl-theme="white"] .network-node:not(.selected){
  opacity:1;
}

/* Mobile: nella lista relazioni mostra solo le 7 coppie
   collegate alla valuta selezionata. Desktop invariato. */
@media (max-width: 600px) {
  #network-text .pair-card {
    display: none;
  }

  #network-text .pair-card[aria-pressed="true"] {
    display: block;
  }
}

/* White theme: concordance contrast */
html[data-vcl-theme="white"] .concordance-times,
html[data-vcl-theme="white"] .concordance-time-note,
html[data-vcl-theme="white"] .concordance-band-key{
  color:#465e6d!important;
}

html[data-vcl-theme="white"] .concordance-table{
  background:#0d1a24;
  color:#edf4f8;
}

html[data-vcl-theme="white"] .concordance-table th,
html[data-vcl-theme="white"] .concordance-table td,
html[data-vcl-theme="white"] .concordance-table thead th,
html[data-vcl-theme="white"] .concordance-table tbody th>strong,
html[data-vcl-theme="white"] .concordance-table td strong{
  color:#edf4f8!important;
}

html[data-vcl-theme="white"] .concordance-table abbr{
  color:#d5e0e8!important;
}

html[data-vcl-theme="white"] .concordance-badge{
  color:#f4f7fa!important;
}

html[data-vcl-theme="white"] .concordance-detail-cells p{
  color:#465e6d!important;
}
