/*
 * GoldPulse AI FREE v3 — readable stylesheet.
 * All selectors and declarations are preserved from the uploaded version.
 * Arial/Helvetica are preferred for Windows text compatibility.
 */

:root {
  --bg: #070d16;
  --bg2: #0b1421;
  --surface: #101c2b;
  --surface2: #142234;
  --line: #263548;
  --line2: #304354;
  --text: #f1f5fc;
  --muted: #94a5ba;
  --gold: #f8c96c;
  --gold2: #dc9f42;
  --mint: #56e2b3;
  --red: #ff7793;
  --sky: #79aeff;
  --violet: #b5a0ff;
  --radius: 17px;
  --shadow: 0 15px 40px #0004;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(ellipse 1000px 400px at 80% -120px,#48361745,transparent 75%),radial-gradient(ellipse 950px 600px at 3% 44%,#152642a0,transparent 70%),var(--bg);
  color: var(--text);
  font: 14px/1.45 Arial,Helvetica,sans-serif;
  min-height: 100vh;
}

button,input,select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,input:focus-visible,select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Header and top navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #293542aa;
  background: #09111deE;
  backdrop-filter: blur(20px);
}

.top-inner {
  max-width: 1680px;
  margin: auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.brand-logo {
  height: 40px;
  width: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg,#ffdb92,#a97629 78%);
  color: #1c190f;
  font-weight: 1000;
  font-size: 24px;
  box-shadow: 0 0 36px #ffc95b3e;
  transform: perspective(140px) rotateY(-14deg);
}

.brand h1 {
  font-size: 17px;
  letter-spacing: -.55px;
  line-height: 1;
  margin: 0;
}

.brand h1 span {
  color: var(--gold);
}

.brand small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

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

.status-pill,.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #37506b;
  border-radius: 50px;
  background: #111d2f;
  color: #b8c9d9;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .35px;
}

.status-pill.demo {
  border-color: #846631;
  color: #ffda88;
  background: #34281966;
}

.status-pill.live {
  border-color: #276c62;
  color: #69e0bc;
  background: #12433755;
}

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

.btn {
  border: 1px solid #39506a;
  color: #e9f1fb;
  background: #192a3d;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 12px;
  transition: .2s;
}

.btn:hover {
  border-color: #d5ae65;
  transform: translateY(-1px);
  background: #22344a;
}

.btn.primary {
  border-color: #ca9e48;
  background: linear-gradient(135deg,#ffdc92,#d6a147);
  color: #211a0d;
  box-shadow: 0 5px 25px #e6ac4435;
}

.btn.ghost {
  background: #0d1928;
}

/* Dashboard layout, price cards and forecasts */
.main {
  max-width: 1680px;
  margin: auto;
  padding: 21px 28px 30px;
}

.disclaimer {
  border: 1px solid #775b2a66;
  background: linear-gradient(90deg,#3d2f163f,#1620322b);
  padding: 8px 13px;
  border-radius: 10px;
  color: #eacb8c;
  font-size: 11px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.disclaimer strong {
  color: #ffe0a5;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px,1.15fr) repeat(4,minmax(150px,.63fr));
  gap: 12px;
  margin-top: 16px;
}

.card {
  background: linear-gradient(155deg,#132137f5,#0d1828ed 75%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.card.glow:after {
  content: '';
  position: absolute;
  top: -100px;
  right: -85px;
  width: 240px;
  height: 200px;
  pointer-events: none;
  background: radial-gradient(circle,#ffc96c20,transparent 65%);
}

.price-card {
  padding: 22px 24px;
  background: linear-gradient(132deg,#243044,#111f30 62%,#0e1b2c);
}

.eyebrow {
  text-transform: uppercase;
  color: #93a5b8;
  letter-spacing: 1.6px;
  font-size: 10px;
  font-weight: 850;
}

.name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 17px;
}

.gold-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(140deg,#fff0bc,#ba792a);
  display: grid;
  place-items: center;
  color: #31220b;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 15px #fec96455;
}

.big-price {
  font-size: clamp(30px,2.7vw,45px);
  font-weight: 850;
  letter-spacing: -2.1px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.small-dollar {
  color: var(--muted);
  font-size: 14px;
  vertical-align: top;
  letter-spacing: 0;
}

.price-bottom {
  margin-top: 13px;
  color: #adc0ce;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
}

.delta.up {
  color: var(--mint);
}

.delta.down {
  color: var(--red);
}

.delta {
  font-weight: 850;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.stat-card {
  padding: 17px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
}

.stat-card .stat-v {
  font-weight: 870;
  font-size: 24px;
  letter-spacing: -.85px;
  font-variant-numeric: tabular-nums;
}

.stat-card small {
  color: var(--muted);
  font-size: 11px;
}

.stat-card .tinyline {
  height: 18px;
  width: 100%;
  opacity: .9;
}

.stat-card:before {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100px;
  height: 90px;
  background: radial-gradient(circle,#ffcb6c0d,transparent 73%);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0,1.85fr) minmax(315px,.85fr);
  gap: 14px;
  margin-top: 14px;
}

.chart-card {
  padding: 20px 20px 10px;
  min-height: 475px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-head h2,.section-head h3 {
  font-size: 15px;
  margin: 0;
  letter-spacing: -.15px;
}

.section-head .sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.control-group {
  display: flex;
  gap: 4px;
  background: #0b1523;
  border: 1px solid #2a3b4f;
  padding: 4px;
  border-radius: 10px;
}

.seg {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 7px 10px;
  color: #96abc1;
  font-size: 11px;
  font-weight: 850;
}

.seg.active {
  color: #191a14;
  background: #f5cc79;
  box-shadow: 0 3px 12px #d9a24d32;
}

.chart-wrap {
  height: 332px;
  margin: 10px -4px 0;
  position: relative;
}

#priceChart {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.chart-tip {
  display: none;
  position: absolute;
  background: #091320ec;
  border: 1px solid #425a71;
  border-radius: 8px;
  padding: 9px 11px;
  pointer-events: none;
  z-index: 2;
  font-size: 11px;
  box-shadow: 0 12px 24px #0008;
  white-space: nowrap;
}

.chart-footer {
  padding: 11px 2px 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  flex-wrap: wrap;
  color: #8f9fb3;
  font-size: 10px;
}

.legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.legend i {
  display: inline-block;
  width: 11px;
  height: 3px;
  vertical-align: middle;
  margin-right: 5px;
  border-radius: 2px;
}

.forecast-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 475px;
}

.forecast-label {
  border-radius: 10px;
  background: #14283c;
  border: 1px solid #385473;
  color: #a9d6ff;
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 800;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: max-content;
}

.future-price {
  font-size: clamp(31px,3vw,45px);
  font-weight: 900;
  letter-spacing: -1.7px;
  font-variant-numeric: tabular-nums;
}

.future-price small {
  font-size: 12px;
  color: #9cadba;
  letter-spacing: 0;
}

.label-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #8fa4ba;
  font-size: 11px;
}

.signal-big {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #35475d;
  border-radius: 12px;
  padding: 12px;
  background: #122235;
}

.signal-text {
  font-size: 21px;
  font-weight: 950;
  letter-spacing: .25px;
}

.signal-text.bull {
  color: var(--mint);
}

.signal-text.bear {
  color: var(--red);
}

.signal-text.neutral {
  color: #f0cf8d;
}

.horizontal-meter {
  height: 8px;
  border-radius: 20px;
  background: linear-gradient(90deg,#b45369,#c3b0a0 50%,#46ad89);
  position: relative;
  margin: 10px 0 4px;
}

.meter-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  height: 16px;
  width: 4px;
  border: 1px solid #fff;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 9px white;
  transform: translateX(-50%);
  transition: left .2s;
}

.forecast-note {
  font-size: 11px;
  color: #b1c0ce;
  line-height: 1.65;
}

.forecast-note strong {
  color: #e7eefa;
}

.scenario {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 11px;
  border: 1px solid #2c3c4b;
  border-radius: 11px;
  background: #0d1927;
}

.scenario div {
  min-width: 0;
}

.scenario strong {
  display: block;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.scenario small {
  color: #8e9caf;
  font-size: 10px;
}

.confidence {
  border: 1px dashed #536075;
  border-radius: 9px;
  color: #afbdd0;
  font-size: 11px;
  padding: 9px 12px;
  background: #ffffff06;
}

.horizons {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5,minmax(125px,1fr));
  gap: 12px;
}

.horizon-card {
  padding: 15px;
  cursor: pointer;
  transition: transform .2s,border-color .2s,box-shadow .2s;
}

.horizon-card:hover {
  transform: translateY(-3px);
  border-color: #c9a661;
}

.horizon-card.active {
  border-color: #f0c574;
  box-shadow: inset 0 0 0 1px #efba6550,0 8px 32px #d7a04a1c;
}

.horizon-top {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  align-items: center;
  color: #b6c4d2;
  font-size: 11px;
  font-weight: 800;
}

.horizon-num {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.7px;
}

.horizon-card small {
  display: block;
  font-size: 10px;
  color: #9bacbf;
  margin: 7px 0 4px;
}

.target {
  font-size: 21px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.8px;
}

.arrow {
  font-size: 15px;
}

.mini-range {
  font-size: 10px;
  color: #98a8bc;
  min-height: 17px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.05fr .9fr;
  gap: 14px;
  margin-top: 14px;
}

.detail-card {
  padding: 19px;
  min-height: 285px;
}

.detail-card .section-head {
  margin-bottom: 15px;
}

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

.indicator {
  background: #0b1726a6;
  border: 1px solid #25394b;
  border-radius: 10px;
  padding: 10px 11px;
}

.indicator .label {
  font-size: 10px;
  letter-spacing: .5px;
  color: #91a5b9;
}

.indicator .value {
  font-size: 16px;
  font-weight: 850;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.indicator .annotation {
  font-size: 10px;
  color: #a5b5c7;
  margin-top: 4px;
}

.insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #27364a;
}

.insight:last-child {
  border-bottom: 0;
}

.insight .badge-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #213247;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 15px;
}

.insight strong {
  font-size: 12px;
}

.insight p {
  margin: 3px 0 0;
  color: #a8b9ca;
  font-size: 11px;
  line-height: 1.5;
}

.risk-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risk-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #2a3b4c;
  padding-bottom: 10px;
  font-size: 11px;
  color: #aabbcc;
}

.risk-line b {
  color: #e9eff6;
  white-space: nowrap;
}

.risk-line b.warning {
  color: #edc478;
}

.risk-line b.fail {
  color: #f795a7;
}

.info-panel {
  margin-top: 14px;
  padding: 16px 19px;
  border: 1px solid #273e51;
  border-radius: 14px;
  background: #101d2d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.info-panel h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.info-panel p {
  margin: 0;
  font-size: 11px;
  color: #a4b3c4;
  max-width: 900px;
  line-height: 1.55;
}

.info-panel .mini-pill {
  border-color: #776347;
  color: #e2c387;
  white-space: nowrap;
}

.foot {
  padding: 18px 2px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #758aa1;
  font-size: 10px;
}

/* Data-source dialog and notifications */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #02060dd9;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(10px);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(530px,100%);
  background: linear-gradient(155deg,#182a40,#0d1727);
  border: 1px solid #516078;
  border-radius: 18px;
  padding: 25px;
  box-shadow: 0 30px 100px #000b;
  max-height: 90vh;
  overflow: auto;
}

.modal h2 {
  font-size: 20px;
  margin: 0 0 6px;
}

.modal p {
  font-size: 12px;
  color: #b3c3d0;
  line-height: 1.6;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 18px 0;
}

.field label {
  font-size: 12px;
  font-weight: 800;
  color: #c8d9e7;
}

.field input {
  width: 100%;
  background: #0b1625;
  border: 1px solid #3e536a;
  border-radius: 9px;
  padding: 12px;
  color: #eef4fc;
}

.help {
  font-size: 11px;
  color: #9db2c8;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.modal-close {
  float: right;
  border: 0;
  background: transparent;
  color: #aebfd0;
  font-size: 20px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  max-width: 410px;
  border: 1px solid #4c6a80;
  border-radius: 11px;
  background: #162637;
  padding: 14px 17px;
  box-shadow: 0 20px 60px #0009;
  color: #e3edf6;
  font-size: 12px;
  display: none;
}

.toast.visible {
  display: block;
}

.footer-link {
  color: #d6b36e;
  text-decoration: none;
}

@media (max-width:1250px) {
  .hero {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }

  .price-card {
    grid-column: span 4;
  }

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

  .bottom-grid .detail-card:last-child {
    grid-column: span 2;
  }

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

}

@media (max-width:900px) {
  .main {
    padding: 14px;
  }

  .top-inner {
    padding: 10px 14px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .forecast-card {
    min-height: auto;
  }

  .forecast-card .future-price {
    font-size: 40px;
  }

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

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

}

@media (max-width:600px) {
  .brand h1 {
    font-size: 15px;
  }

  .brand-logo {
    width: 35px;
    height: 35px;
  }

  .top-actions .btn.ghost {
    display: none;
  }

  .top-actions {
    gap: 5px;
  }

  .status-pill {
    padding: 6px 8px;
    font-size: 9px;
  }

  .btn {
    padding: 8px 9px;
  }

  .main {
    padding: 10px;
  }

  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .price-card {
    grid-column: span 2;
  }

  .stat-card {
    min-height: 125px;
  }

  .horizons {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .chart-card {
    padding: 15px 10px;
    min-height: 420px;
  }

  .chart-wrap {
    height: 285px;
  }

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

  .bottom-grid .detail-card:last-child {
    grid-column: auto;
  }

  .info-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .disclaimer {
    font-size: 10px;
  }

  .top-actions .btn {
    font-size: 10px;
  }

}

/* GoldPulse Research Lab v2 additions */

:root {
  --panel: #0e1b2c;
  --accent: #e7bd71;
}

/* Historical lab controls and comparison panels */
.lab-bar {
  margin-top: 14px;
  padding: 15px 18px;
  background: linear-gradient(110deg,#14233a,#11202f 66%,#201d26);
  border: 1px solid #3b4c60;
  border-radius: 17px;
  box-shadow: 0 14px 50px #0003;
  display: grid;
  grid-template-columns: minmax(250px,.9fr) minmax(370px,1.25fr) minmax(230px,.7fr);
  align-items: center;
  gap: 14px;
}

.lab-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.lab-logo {
  height: 43px;
  width: 43px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg,#57401d,#1a2737);
  border: 1px solid #a88950;
  color: #ffe2a3;
  font-size: 21px;
  box-shadow: 0 0 35px #c8994a26;
}

.lab-head h2 {
  margin: 0;
  font-size: 15px;
}

.lab-head p {
  font-size: 10px;
  color: #91a8bb;
  margin: 3px 0 0;
}

.lab-controls {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.history-btn {
  border: 1px solid #2d4255;
  border-radius: 8px;
  background: #0a1727;
  padding: 9px 11px;
  font-size: 11px;
  font-weight: 850;
  color: #b6c5d2;
  transition: .17s;
}

.history-btn:hover {
  border-color: #af8d57;
}

.history-btn.active {
  background: linear-gradient(140deg,#ffd890,#c99949);
  color: #21180d;
  border-color: #dbb271;
}

.lab-result {
  text-align: right;
}

.lab-result strong {
  font-size: 12px;
  color: #f8d58b;
}

.lab-result small {
  display: block;
  color: #96aabd;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 3px;
}

.lab-result.error strong {
  color: #ff9fb1;
}

.lab-fine {
  grid-column: 1/-1;
  color: #94a6bb;
  font-size: 10px;
  border-top: 1px solid #314454;
  padding-top: 9px;
}

.lab-fine b {
  color: #d0ddec;
}

.method-label {
  font-size: 10px;
  font-weight: 800;
  color: #a2c6e6;
  letter-spacing: 1.1px;
  margin: 2px 0 3px;
}

.research-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.research-card {
  padding: 18px;
}

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

.research-card .small-sub {
  font-size: 10px;
  color: #92a7ba;
  margin: 5px 0 13px;
}

.research-metric {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.metric-tile {
  border: 1px solid #30435a;
  background: #0b1726;
  border-radius: 11px;
  padding: 11px;
  min-width: 0;
}

.metric-tile .m-label {
  font-size: 10px;
  color: #9ab0c0;
}

.metric-tile .m-value {
  font-size: 20px;
  font-weight: 850;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.6px;
}

.metric-tile .m-help {
  font-size: 9px;
  color: #92a8b9;
  margin-top: 3px;
}

.small-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #29394b;
  padding: 10px 0;
  font-size: 11px;
  color: #9cabbc;
}

.small-row:last-child {
  border-bottom: 0;
}

.small-row strong {
  color: #edf2fc;
  text-align: right;
  max-width: 58%;
}

.warning-inline {
  background: #3a271854;
  border: 1px solid #805b34;
  color: #f0c888;
  border-radius: 9px;
  padding: 9px 12px;
  margin-top: 11px;
  font-size: 10px;
  line-height: 1.6;
}

.good-inline {
  background: #143d314a;
  border: 1px solid #2f7160;
  color: #a5e9ca;
  border-radius: 9px;
  padding: 9px 12px;
  margin-top: 11px;
  font-size: 10px;
}

.history-section {
  margin-top: 14px;
  padding: 19px;
}

.history-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.history-top h2 {
  font-size: 15px;
  margin: 0;
}

.history-top p {
  font-size: 11px;
  color: #96adc0;
  margin: 4px 0 0;
}

.footmark {
  border: 1px solid #4f4c40;
  background: #2d291d;
  padding: 6px 10px;
  border-radius: 16px;
  color: #f2cf87;
  font-size: 10px;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
}

.bt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 660px;
}

.bt-table th {
  font-size: 10px;
  letter-spacing: .5px;
  color: #8fa4ba;
  text-transform: uppercase;
  text-align: left;
  font-weight: 850;
  border-bottom: 1px solid #385068;
  padding: 10px 12px;
}

.bt-table td {
  padding: 12px;
  font-size: 12px;
  border-bottom: 1px solid #283c51;
  font-variant-numeric: tabular-nums;
}

.bt-table tr:last-child td {
  border: 0;
}

.bt-table .big-cell {
  font-weight: 800;
  font-size: 14px;
}

.bt-table .smallcell {
  font-size: 10px;
  color: #91a5b8;
}

.bt-table .pos {
  color: #6ee3b5;
}

.bt-table .neutral {
  color: #e9be81;
}

.notes {
  font-size: 10px;
  color: #91a7ba;
  line-height: 1.6;
  margin: 10px 0 0;
}

.compare-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 8px;
}

.compare-pill {
  border: 1px solid #34475b;
  background: #0c1a2a;
  border-radius: 10px;
  padding: 10px;
  min-width: 0;
}

.compare-pill.selected {
  border-color: #d4b06b;
  background: #29241c;
}

.compare-pill b {
  font-size: 11px;
  color: #f0d19a;
}

.compare-pill strong {
  display: block;
  font-size: 17px;
  margin: 4px 0 0;
}

.compare-pill small {
  font-size: 9px;
  color: #879eb4;
  display: block;
}

.result-kpi {
  font-size: 10px;
  font-weight: 800;
  margin-top: 5px;
  color: #9babbc;
}

.indicator-section {
  margin-top: 14px;
  padding: 17px 19px;
}

.indicator-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.indicator-group-heading h2 {
  font-size: 15px;
  margin: 0;
}

.indicator-group-heading small {
  color: #95a8bd;
}

.ind-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 9px;
  margin-top: 15px;
}

.ind-cell {
  background: #0b1829;
  border: 1px solid #283c50;
  border-radius: 11px;
  padding: 11px;
  min-width: 0;
}

.ind-cell .ic-head {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 10px;
  color: #9db1c4;
}

.ind-cell .ic-head span:last-child {
  color: #cbab75;
}

.ind-cell strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ind-cell small {
  display: block;
  margin-top: 3px;
  color: #8ea0b6;
  font-size: 9px;
  line-height: 1.35;
}

.readiness {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
  margin-top: 14px;
}

.ready {
  background: #091827;
  border: 1px solid #293d50;
  border-radius: 11px;
  padding: 10px;
}

.ready b {
  font-size: 11px;
  display: block;
}

.ready span {
  display: block;
  color: #9daec2;
  font-size: 10px;
  margin-top: 3px;
}

.ready strong {
  font-size: 10px;
  color: #d7b473;
  display: block;
  margin-top: 5px;
}

.control-group.chart-modes {
  gap: 4px;
}

.tiny-toggle {
  background: #15283a;
  border: 1px solid #34495e;
  color: #acbed1;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 10px;
}

.tiny-toggle.active {
  color: #ffdc92;
  border-color: #b48d4f;
  background: #352d22;
}

.wrap-chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.mc-note {
  border-top: 1px solid #354454;
  padding-top: 8px;
  margin-top: 8px;
  color: #a2b4c3;
  font-size: 10px;
}

.mono {
  font-variant-numeric: tabular-nums;
}

@media (max-width:1300px) {
  .lab-bar {
    grid-template-columns: 1fr 1.5fr;
  }

  .lab-result {
    grid-column: 1/-1;
    text-align: left;
  }

  .lab-fine {
    grid-column: 1/-1;
  }

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

}

@media (max-width:1100px) {
  .research-grid {
    grid-template-columns: 1fr 1fr;
  }

  .research-card:last-child {
    grid-column: 1/-1;
  }

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

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

}

@media (max-width:700px) {
  .lab-bar {
    grid-template-columns: 1fr;
    padding: 13px;
  }

  .lab-result {
    grid-column: 1;
    text-align: left;
  }

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

  .research-card:last-child {
    grid-column: auto;
  }

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

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

  .history-section {
    padding: 12px;
  }

  .history-top {
    flex-direction: column;
  }

  .footmark {
    white-space: normal;
  }

  .bt-table {
    min-width: 600px;
  }

}

@media (max-width:390px) {
  .ind-grid {
    grid-template-columns: 1fr;
  }

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

  .history-btn {
    padding: 7px 9px;
  }

}

.field select {
  width: 100%;
  background: #0b1625;
  border: 1px solid #3e536a;
  border-radius: 9px;
  padding: 12px;
  color: #eef4fc;
  outline-offset: 3px;
}

.field select option {
  background: #0d1b2b;
  color: #eaf2f9;
}

/* The previous Inter-first fallback could be hijacked by a broken local Inter font.
   Prefer Arial, shipped on standard Windows machines, for every HTML text element. */

/* Base document and typography */
html,body,body button,body input,body select,body textarea,body option {
  font-family: Arial,Helvetica,sans-serif !important;
}

/* Independent free spot quote reference */
.free-spot {
  margin: 14px 0 0;
  padding: 17px 19px;
  border: 1px solid #916d32;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: linear-gradient(110deg,#3e2c14 0%,#192638 46%,#0e1c2d 100%);
  box-shadow: 0 10px 30px #05080e90;
}

.free-kicker {
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 10px;
  color: #f8d99a;
  font-weight: 800;
}

.free-spot .live-figure {
  font-size: clamp(24px,2vw,35px);
  letter-spacing: -1.3px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 0;
}

.live-meta {
  font-size: 11px;
  color: #d7caaa;
  margin-top: 3px;
  line-height: 1.5;
}

.free-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.free-status {
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #7e714a;
  border-radius: 20px;
  color: #ebcf86;
  padding: 7px 10px;
}

.free-status.ok {
  border-color: #417e75;
  color: #73e9b7;
}

.free-status.off {
  border-color: #815764;
  color: #ff93a8;
}

.live-caption {
  font-size: 10px;
  color: #9fb3c5;
}

.free-info {
  max-width: 410px;
  font-size: 11px;
  color: #b7c6d5;
  line-height: 1.55;
}

.free-info b {
  color: #f5da9d;
}

.free-label {
  color: #ead39d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  display: block;
  margin-top: 7px;
}

.free-source-box {
  margin: 13px 0;
  padding: 14px 16px;
  background: #0c1c2b;
  border: 1px solid #416777;
  border-radius: 12px;
}

.free-source-box strong {
  color: #f9cc79;
}

.free-source-box p {
  color: #b4c6d6;
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.65;
}

.free-source-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 13px;
}

.free-source-actions .btn {
  flex: 0 0 auto;
}

.field .csv-advice {
  margin-top: 8px;
  color: #c7d1df;
}

.status-inline {
  padding: 7px 11px;
  border: 1px solid #375372;
  border-radius: 8px;
  background: #12273a;
  color: #d8dfeb;
  font-size: 11px;
}

.free-spot code,.modal code {
  color: #ffc97a;
}

.free-resources {
  margin-top: 12px;
  padding: 14px 17px;
  background: #0e1d2d;
  border: 1px solid #314861;
  border-radius: 12px;
  color: #c2d1e1;
  font-size: 11px;
}

.free-resources strong {
  color: #f7d489;
}

.free-resources a {
  color: #9fceff;
  text-decoration: none;
  margin-left: 12px;
}

.free-resources a:hover {
  text-decoration: underline;
}

@media (max-width:700px) {
  .free-spot {
    align-items: flex-start;
    padding: 15px;
  }

  .free-side {
    width: 100%;
  }

  .free-info {
    max-width: 100%;
  }

  .free-source-actions .btn {
    flex: 1 1 140px;
  }

}
