/* One bilingual type system. Last-loaded so legacy mono/control shorthands
   cannot make a workspace use a different family. Keep the Matrix art mono. */
@font-face {
  font-family:"Inter";
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  font-feature-settings:"tnum" 1;
  src:url("fonts/inter-ui-v4.1-latin-vietnamese.woff2") format("woff2");
}
:root {
  --ui-font-body:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --ui-font-data:var(--ui-font-body);
  --ui-font-mono:"JetBrains Mono",Consolas,monospace;
  /* Legacy --mono consumers include ordinary copy, not just code. */
  --mono:var(--ui-font-data);
  --reading-weight:400;
  --heading-weight:600;
}
body {
  font-family:var(--ui-font-body);
  font-size:14px;
  font-weight:400;
  line-height:1.6;
  font-optical-sizing:auto;
  font-variant-numeric:tabular-nums lining-nums;
  font-synthesis:style;
}
button,input,select,textarea {font-family:var(--ui-font-body);font-weight:500;}
strong,b,h1,h2,h3,h4 {font-weight:600;}
input::placeholder,textarea::placeholder {font-family:var(--ui-font-body);font-weight:400;}
/* Explicit family declarations in the historical widgets need an override. */
.wallet-button,.wallet-actions button,.wallet-actions a,.wallet-access-panel input,
.wallet-primary-action,.wallet-dialog-close,.wallet-admin-sessions>header button,
.wallet-session-row button,.access-admin-row button,.issued-access-key button,
.switch-chart-route,.scenario-ai button,.chart-size-tools button,
#priceForecast button,#priceForecast select,#priceForecast input,
#paperTrading .paper-ledger-tabs button,#paperTrading .paper-position-filters button,
#researchHub .admission-audit-metrics dd {
  font-family:var(--ui-font-body);
}
#marketOutlook {--market-font:var(--ui-font-body);}
.brand h1 {font-family:var(--ui-font-body);font-weight:700;letter-spacing:-.035em;}
.nav-rail nav a {font-family:var(--ui-font-body);font-weight:600;letter-spacing:0;}
.nav-rail nav a[aria-current="page"] {font-weight:600;}
.nav-rail nav a span {line-height:1.35;}
.actions .language-control {font-family:var(--ui-font-body);font-weight:500;}
.actions .wallet-button {font-weight:500;}
.stats article>span {font-weight:500;line-height:1.45;}
.stats strong,#timeStat {font-weight:600;letter-spacing:-.025em;}
#signalsWorkspace .opportunities-heading h2,#paperTrading #paperTradingTitle,
#researchHub #researchTitle,#priceForecast h2,#marketOutlook h2 {
  font-family:var(--ui-font-body);
  font-size:clamp(25px,2.2vw,32px);
  font-weight:600;
  line-height:1.25;
  letter-spacing:-.03em;
}
.heading-secondary,.hub-description,.snapshot-time,.candidate-explanation,
.selection-session,.chart-view-mode,.subtle-label,
.signal-grid .exchanges,.signal-grid>.card>.card-facts,
.signal-grid>.card>.scan-explanation,.market-main .signal-grid>.card>.card-verdict,
.scenario-panel p,#entryScoutGrid p,#entryScoutGrid summary,
.performance-panel p,.performance-panel li,.performance-panel summary,
.market-outlook p,.outlook-realtime p,.outlook-hero aside p,
.outlook-evidence p,.outlook-benchmarks p,.outlook-method p,.outlook-method summary,
.breadth-legend {font-weight:400;}
#signalsWorkspace .opportunities-heading p,#paperTrading #paperTradingSubtitle,
#researchHub .hub-description,#priceForecast .forecast-heading p {
  font-size:14px;line-height:1.65;font-weight:400;
}
#signalsWorkspace :is(.asset,.opportunity-quote dd,.opportunity-plan strong,
.opportunity-evidence dd,.hold-thesis>strong),
#paperTrading :is(.paper-metric strong,.paper-position-asset,.paper-position-pnl strong),
#priceForecast :is(#forecastAsset,#forecastPrice),
#marketOutlook .outlook-live-price {font-weight:600;}
.chart-canvas .chart-axis,.chart-canvas .price-tag,.chart-canvas .offscale-label,
.chart-canvas .plan-label,.paper-equity-chart svg text,#priceForecast svg text {
  font-family:var(--ui-font-data);
  font-variant-numeric:tabular-nums lining-nums;
}
#marketOutlook .outlook-price-current {font-variant-numeric:tabular-nums lining-nums;}
/* Tabular figures retain fixed digit slots; only changed digits still roll. */
#marketOutlook .outlook-price-glyph.is-digit {width:.64em;}
code,pre,kbd,samp,.issued-access-key code,.key-dialog code,[data-font="mono"] {
  font-family:var(--ui-font-mono);
  font-optical-sizing:none;
}
.wallet-address {font-family:var(--ui-font-mono);}
code,samp,[data-font="mono"],.wallet-address {overflow-wrap:anywhere;}
@media(max-width:720px) {
  body {font-size:14px;line-height:1.55;}
  #signalsWorkspace .opportunities-heading h2,#paperTrading #paperTradingTitle,
  #researchHub #researchTitle,#priceForecast h2,#marketOutlook h2 {font-size:23px;}
  .actions .wallet-button,.actions .language-control {font-size:12px;}
  .nav-rail nav a[data-workspace-target] span {overflow-wrap:normal;word-break:normal;hyphens:none;}
  /* 16px avoids Safari auto-zoom when focusing a phone text field. */
  input[type="text"],input[type="email"],input[type="search"],input[type="password"],
  textarea,#signalsWorkspace #searchInput,#priceForecast #forecastSearch,
  .wallet-access-panel input {font-size:16px;}
}
/* The longer English names need wider cells, not broken words or tiny text. */
@media(max-width:480px) {
  html[lang="en"] .nav-rail nav {grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;}
  html[lang="en"] .nav-rail nav a[data-workspace-target] span {font-size:11px;}
  html[lang="en"] .nav-rail nav a[data-workspace-target] {grid-column:span 2;}
  html[lang="en"] .nav-rail nav a[data-workspace-target]:nth-last-child(-n+2) {grid-column:span 3;}
}
@media(max-width:380px) {
  html[lang="vi"] .nav-rail nav a[data-workspace-target] span {font-size:10px;}
}
