:root {
  --bg: #0e0a07;
  --surface: #17100a;
  --surface-2: #21160d;
  --line: rgba(239, 143, 55, 0.22);
  --line-strong: rgba(239, 143, 55, 0.50);
  --orange: #f29a3f;
  --orange-bright: #ffac55;
  --cream: #f3dfc3;
  --text: #d9b382;
  --muted: #8d6c4e;
  --danger: #ef765f;
  --success: #d9b866;
  --shadow: 0 22px 70px rgba(0,0,0,.34);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 70% -20%, rgba(242,154,63,.08), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0, rgba(255,255,255,.012) 1px, transparent 1px, transparent 4px),
    var(--bg);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  letter-spacing: .015em;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0,0,0,.38) 100%);
  z-index: 99;
}

button, input { font: inherit; }
a { color: inherit; }

.app-shell { position: relative; z-index: 1; min-height: 100vh; }
.site-header {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-icon-circle, .pulse-icon-circle {
  display: inline-block;
  border-radius: 50%;
  background: #ff9d00;
  box-shadow: 0 0 18px rgba(255,157,0,.28);
  flex: 0 0 auto;
}
.brand-icon-circle { width: 48px; height: 48px; }
.pulse-icon-circle { width: 54px; height: 54px; }
.brand-name { color: var(--cream); font-weight: 800; letter-spacing: .12em; font-size: 14px; }
.brand-subtitle { color: var(--muted); font-size: 9px; letter-spacing: .18em; margin-top: 4px; }
.header-status { font-size: 10px; letter-spacing: .13em; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--orange); margin-right: 8px; box-shadow: 0 0 13px var(--orange); }

.main-content { max-width: 1180px; margin: 0 auto; padding: 0 28px 70px; }
.hero { min-height: 530px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 74px 0 56px; }
.eyebrow, .panel-kicker { color: var(--orange); letter-spacing: .15em; font-size: 10px; font-weight: 800; }
.hero h1 { color: var(--cream); max-width: 870px; font-size: clamp(35px, 6vw, 69px); line-height: 1.02; letter-spacing: -.055em; margin: 21px 0 18px; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.hero-copy { max-width: 760px; margin: 0 auto; line-height: 1.75; font-size: 15px; color: #af8964; }
.query-panel { width: min(790px, 100%); margin-top: 35px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.query-panel .form-group, .email-form .form-group { margin: 0; }
.query-panel input, .email-form input {
  width: 100%; height: 54px; border: 1px solid var(--line-strong); background: rgba(9,6,4,.76); color: var(--cream); border-radius: 2px; padding: 0 17px; outline: none; box-shadow: inset 0 0 20px rgba(0,0,0,.26);
}
.query-panel input:focus, .email-form input:focus { border-color: var(--orange-bright); box-shadow: 0 0 0 2px rgba(242,154,63,.10); }
.primary-button, .secondary-button, .ghost-button {
  min-height: 48px; border-radius: 2px !important; letter-spacing: .10em; font-size: 10px !important; font-weight: 900 !important; padding: 0 20px !important; cursor: pointer; transition: .18s ease; text-decoration: none !important;
}
.primary-button { border: 1px solid var(--orange) !important; background: var(--orange) !important; color: #1b0f06 !important; }
.primary-button:hover { background: var(--orange-bright) !important; transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--orange) !important; background: rgba(242,154,63,.10) !important; color: var(--orange-bright) !important; }
.ghost-button { border: 1px solid var(--line) !important; background: transparent !important; color: var(--text) !important; }
.ghost-button:hover, .secondary-button:hover { border-color: var(--orange) !important; background: rgba(242,154,63,.08) !important; }
.example-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-top: 20px; font-size: 10px; color: var(--muted); }
.example-row a { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
.example-row a:hover { color: var(--orange); }
.trust-line { margin-top: 26px; color: #74583f; font-size: 9px; line-height: 1.6; letter-spacing: .08em; text-transform: uppercase; }

.system-message { border: 1px solid var(--line); background: rgba(242,154,63,.04); padding: 14px 16px; margin: 0 0 24px; display: flex; gap: 12px; align-items: center; font-size: 11px; }
.error-message { border-color: rgba(239,118,95,.45); color: #e6a090; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(242,154,63,.25); border-top-color: var(--orange); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.results-section { scroll-margin-top: 20px; padding-top: 28px; }
.results-heading { display: flex; justify-content: space-between; gap: 25px; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 24px; }
.results-heading h2 { font-family: Georgia, serif; color: var(--cream); font-size: 34px; font-weight: 500; letter-spacing: -.03em; margin: 8px 0 0; }
.result-meta { text-align: right; display: grid; gap: 5px; color: var(--muted); font-size: 9px; letter-spacing: .09em; }
.result-grid { display: grid; grid-template-columns: minmax(330px, .88fr) minmax(360px, 1.12fr); gap: 22px; }
.pulse-card-wrap, .explanation-panel { border: 1px solid var(--line); background: rgba(22,15,9,.78); box-shadow: var(--shadow); }
.pulse-card-wrap { padding: 18px; }
.pulse-card { min-height: 430px; padding: 28px; position: relative; overflow: hidden; border: 1px solid rgba(242,154,63,.36); background: radial-gradient(circle at 86% 18%, rgba(242,154,63,.12), transparent 38%), #120d08; display: flex; flex-direction: column; }
.pulse-card::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0, transparent 5px, rgba(255,255,255,.014) 5px, rgba(255,255,255,.014) 6px); pointer-events: none; }
.pulse-card-top { display: flex; justify-content: space-between; position: relative; }
.pulse-ticker { color: var(--cream); font-size: 25px; font-weight: 900; letter-spacing: .06em; }
.pulse-caption { color: var(--muted); font-size: 9px; letter-spacing: .15em; margin-top: 6px; }
.pulse-score-row { display: flex; align-items: baseline; margin-top: 54px; position: relative; }
.pulse-score { color: var(--orange-bright); font-size: clamp(80px, 11vw, 128px); line-height: .80; font-family: Georgia, serif; letter-spacing: -.08em; text-shadow: 0 0 28px rgba(242,154,63,.18); }
.pulse-denominator { color: var(--muted); font-size: 20px; margin-left: 9px; }
.pulse-state { color: var(--cream); font-size: 26px; letter-spacing: .15em; margin-top: 27px; font-weight: 900; }
.pulse-direction { display: inline-flex; width: fit-content; margin-top: 10px; font-size: 10px; letter-spacing: .11em; border: 1px solid var(--line); padding: 7px 9px; color: var(--orange); }
.pulse-description { color: #a37e5d; line-height: 1.65; font-size: 11px; margin-top: 18px; max-width: 92%; }
.pulse-card-bottom { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; letter-spacing: .09em; }
.pulse-watermark { position: absolute; right: -23px; bottom: 65px; transform: rotate(-90deg); color: rgba(242,154,63,.11); font-size: 10px; letter-spacing: .24em; }
.state-steady { border-color: rgba(223,184,102,.48); }
.state-changing { border-color: rgba(242,154,63,.48); }
.state-strained { border-color: rgba(239,118,95,.48); }
.state-unstable { border-color: rgba(239,84,64,.68); }
.share-actions { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.share-actions .btn { white-space: normal; }
/* Shiny renders downloadButton() as an <a>, so explicitly use flex centering. */
.share-actions .btn,
.share-actions .shiny-download-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px;
  line-height: 1 !important;
  box-sizing: border-box;
}

.explanation-panel { padding: 30px; }
.explanation-panel h3 { color: var(--cream); font-family: Georgia, serif; font-size: 27px; font-weight: 500; margin: 16px 0 13px; }
.explanation-panel p, .explanation-panel li { font-size: 12px; line-height: 1.75; color: #ae8966; }
.explanation-panel ul { padding-left: 18px; }
.score-warning { margin-top: 20px; border-left: 2px solid var(--orange); padding: 9px 12px; background: rgba(242,154,63,.05); color: var(--muted); font-size: 10px; line-height: 1.6; }
.submetric-bars { margin-top: 25px; display: grid; gap: 17px; }
.submetric-label { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); margin-bottom: 7px; }
.submetric-track { height: 4px; background: rgba(242,154,63,.10); overflow: hidden; }
.submetric-fill { height: 100%; background: var(--orange); box-shadow: 0 0 9px rgba(242,154,63,.5); }
.methodology-note { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 17px; color: var(--muted); }
.methodology-note summary { cursor: pointer; color: var(--text); font-size: 10px; letter-spacing: .08em; }

.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.metric-tile { min-height: 135px; border: 1px solid var(--line); background: rgba(22,15,9,.70); padding: 19px; }
.metric-label { color: var(--muted); font-size: 8px; letter-spacing: .12em; line-height: 1.5; }
.metric-value { color: var(--cream); font-family: Georgia, serif; font-size: 28px; margin-top: 15px; }
.metric-detail { color: #765a42; font-size: 9px; line-height: 1.5; margin-top: 9px; }
.engine-charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 15px; }
.engine-chart-panel { min-width: 0; overflow: hidden; background: #120a03; border: 1px solid rgba(255,157,0,.24); box-shadow: 0 16px 38px rgba(0,0,0,.28); }
.engine-chart-panel.chart-wide { grid-column: 1 / -1; }
.engine-chart-panel .plotly, .engine-chart-panel .js-plotly-plot, .engine-chart-panel .plot-container { width: 100% !important; }
.diagnostics-panel { margin-top: 15px; padding: 22px; border: 1px solid var(--line); background: rgba(22,15,9,.78); box-shadow: var(--shadow); }
.diagnostic-table { margin-top: 14px; border-top: 1px solid var(--line); }
.diagnostic-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid rgba(242,154,63,.10); font-size: 10px; }
.diagnostic-row span { color: var(--muted); }
.diagnostic-row strong { color: var(--cream); text-align: right; }

.email-section { margin-top: 70px; border: 1px solid var(--line-strong); background: linear-gradient(120deg, rgba(242,154,63,.07), rgba(22,15,9,.88)); padding: 32px; display: grid; grid-template-columns: 1fr .9fr; gap: 38px; align-items: center; }
.email-section h2 { color: var(--cream); font-family: Georgia, serif; font-weight: 500; font-size: 31px; margin: 12px 0 10px; letter-spacing: -.03em; }
.email-section p { color: #9a7557; line-height: 1.65; font-size: 11px; margin: 0; }
.email-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.email-message { grid-column: 1 / -1; font-size: 10px; padding-top: 7px; }
.email-message.success { color: var(--success); }
.email-message.error { color: var(--danger); }
.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 28px 38px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 34px;
  color: #76583e;
  font-size: 9px;
  letter-spacing: .04em;
  line-height: 1.65;
}
.footer-brand,
.footer-column { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.footer-brand strong { color: var(--cream); font-size: 11px; letter-spacing: .12em; }
.footer-heading { color: var(--orange-bright); font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.footer-note { color: #5f4633; font-size: 8px; }
.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .07em;
  transition: color .12s ease, text-shadow .12s ease;
}
.footer-links a:hover,
.footer-links a:focus { color: var(--cream); text-shadow: 0 0 10px rgba(242,154,63,.35); }


.shiny-notification { background: #24170d !important; color: var(--text) !important; border: 1px solid var(--line-strong) !important; }
.progress { background: #21160d !important; border-radius: 0 !important; }
.progress-bar { background: var(--orange) !important; }

@media (max-width: 930px) {
  .result-grid, .email-section { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .engine-charts-grid { grid-template-columns: 1fr; }
  .engine-chart-panel.chart-wide { grid-column: auto; }
  .hero { min-height: 470px; }
}

@media (max-width: 650px) {
  .site-header { padding: 17px 16px; }
  .header-status { display: none; }
  .brand-icon-circle { width: 42px; height: 42px; }
  .main-content { padding: 0 14px 50px; }
  .hero { min-height: auto; padding: 62px 0 45px; align-items: stretch; text-align: left; }
  .hero h1 { font-size: 42px; }
  .hero-copy { margin: 0; font-size: 13px; }
  .query-panel { grid-template-columns: 1fr; }
  .query-panel .primary-button { width: 100%; height: 52px; }
  .example-row { justify-content: flex-start; }
  .trust-line { text-align: left; }
  .results-heading { display: block; }
  .result-meta { text-align: left; margin-top: 13px; }
  .pulse-card-wrap, .explanation-panel { padding: 12px; }
  .explanation-panel { padding: 23px 19px; }
  .pulse-card { min-height: 400px; padding: 22px; }
  .pulse-score { font-size: 94px; }
  .pulse-state { font-size: 23px; }
  .share-actions { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-tile { min-height: 112px; }
  .email-section { padding: 24px 18px; }
  .email-form { grid-template-columns: 1fr; }
  .email-form .primary-button { width: 100%; }
  .site-footer { padding: 24px 16px 30px; grid-template-columns: 1fr; gap: 22px; }
}



/* Product navigation: heartbeat + genuine advanced-parameter tab.
   Target the Shiny tabset ID directly so conditionalPanel/wrapper changes can
   never fall back to Bootstrap's white default tab styling. */
.product-tabs-shell {
  margin-top: 0;
}
#product_tabs.nav-tabs {
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  list-style: none;
  background: transparent !important;
}
#product_tabs.nav-tabs > li {
  display: block;
  margin: 0 0 -1px 0;
  padding: 0;
  float: none;
  list-style: none;
}
#product_tabs.nav-tabs > li::marker { content: ""; }
#product_tabs.nav-tabs > li > a {
  display: block;
  border-radius: 0 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  letter-spacing: .12em !important;
  font-weight: 800 !important;
  padding: 11px 14px !important;
  margin: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  outline: none;
}
#product_tabs.nav-tabs > li > a:hover,
#product_tabs.nav-tabs > li > a:focus {
  color: var(--cream) !important;
  border-color: var(--line) !important;
  background: rgba(242,154,63,.035) !important;
}
#product_tabs.nav-tabs > li.active > a,
#product_tabs.nav-tabs > li.active > a:hover,
#product_tabs.nav-tabs > li.active > a:focus {
  background: rgba(242,154,63,.08) !important;
  color: var(--orange-bright) !important;
  border: 1px solid var(--line-strong) !important;
  border-bottom-color: var(--bg) !important;
}
.product-tabs-shell > .tabbable > .tab-content {
  overflow: visible;
}
.product-tabs-shell .tab-pane {
  display: none;
}
.product-tabs-shell .tab-pane.active {
  display: block;
}
.product-tabs-shell .tab-pane[hidden] {
  display: none !important;
}

.parameter-page { padding: 44px 0 72px; }
.parameter-heading { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 18px; }
.parameter-heading h2 {
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -.035em;
  margin: 10px 0 8px;
}
.parameter-heading p, .parameter-intro {
  color: #9d7858;
  font-size: 11px;
  line-height: 1.7;
  max-width: 900px;
}
.parameter-intro {
  border: 1px solid var(--line);
  background: rgba(242,154,63,.035);
  padding: 14px 16px;
  margin-bottom: 14px;
}

/* Advanced controls deliberately use plain terminal panels rather than native
   <details> chrome. This mirrors the original parameter surface exactly and
   keeps labels/inputs aligned regardless of browser defaults. */
.param-section {
  width: 100%;
  border: 1px solid rgba(239,143,55,.30);
  background: rgba(18,10,3,.54);
  margin: 0 0 10px;
  padding: 0;
}
.param-section-title {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid rgba(239,143,55,.22);
  color: #ead8c1;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .12em;
  font-weight: 500;
  text-transform: uppercase;
}
.param-section-body {
  padding: 22px 14px 19px;
  background: linear-gradient(180deg, rgba(22,15,9,.44), rgba(15,10,6,.36));
}
.param-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px 11px;
  align-items: start;
}
.param-grid .form-group {
  min-width: 0;
  margin: 0;
}
.param-grid .control-label {
  display: block;
  color: #9b744f;
  font-size: 9px;
  line-height: 1;
  letter-spacing: .10em;
  text-transform: uppercase;
  margin: 0 0 8px;
  font-weight: 600;
}
.param-grid .form-control {
  display: block;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 12px;
  background: #120a03 !important;
  border: 1px solid rgba(239,143,55,.36) !important;
  color: #ead8c1 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  color-scheme: dark;
}
.param-grid .form-control:focus {
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 1px rgba(242,154,63,.32) !important;
}
.param-grid input[type="number"]::-webkit-inner-spin-button,
.param-grid input[type="number"]::-webkit-outer-spin-button { opacity: .38; }
.param-grid input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; }
.checkbox-field {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 15px;
}
.checkbox-field input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--orange);
}
.checkbox-field label {
  color: var(--text);
  font-size: 10px;
  line-height: 1.45;
}
.parameter-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 14px; flex-wrap: wrap; }
.diagnostic-subhead { color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .13em; margin-top: 15px; }
.diagnostic-subhead-spaced { margin-top: 30px; }
.regime-diagnostic span { max-width: 78%; }

/* Exact engine plots render their own original #120a03 / orange Plotly theme. */
.engine-charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 15px; }
.engine-chart-panel { min-width: 0; overflow: hidden; background: #120a03; border: 1px solid rgba(255,157,0,.24); box-shadow: 0 16px 38px rgba(0,0,0,.28); }
.engine-chart-panel.chart-wide { grid-column: 1 / -1; }
.engine-chart-panel .plotly, .engine-chart-panel .js-plotly-plot, .engine-chart-panel .plot-container { width: 100% !important; }

@media (max-width: 930px) {
  .param-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .engine-charts-grid { grid-template-columns: 1fr; }
  .engine-chart-panel.chart-wide { grid-column: auto; }
}
@media (max-width: 650px) {
  #product_tabs.nav-tabs { overflow-x: auto; white-space: nowrap; }
  .param-grid { grid-template-columns: 1fr; }
  .parameter-actions { justify-content: stretch; }
  .parameter-actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Popular U.S. stocks / autonomous market overview
   -------------------------------------------------------------------------- */
.market-overview-section {
  margin: 22px 0 34px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(25,15,8,.92), rgba(13,8,4,.96));
  box-shadow: var(--shadow);
}
.overview-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--line);
}
.overview-heading-row h2 {
  margin: 7px 0 7px;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 29px;
  letter-spacing: -.025em;
}
.overview-heading-row p {
  max-width: 760px;
  margin: 0;
  color: #9a7557;
  font-size: 10px;
  line-height: 1.65;
}
.overview-controls {
  min-width: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.overview-refresh {
  min-width: 150px;
  min-height: 38px !important;
  height: 38px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 14px !important;
}
.overview-status {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .12em;
  white-space: nowrap;
}
.overview-status.scanning { color: var(--orange-bright); }
.overview-status.ready { color: #b99a77; }
.overview-status.warning { color: #d99c53; }
.overview-status .live-dot { margin-right: 6px; }

.overview-table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: rgba(242,154,63,.35) #120a03;
}
.overview-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 9px;
  color: var(--text);
}
.overview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  text-align: left;
  color: #806044;
  background: #100904;
  border-bottom: 1px solid var(--line-strong);
  font-size: 7px;
  letter-spacing: .12em;
  font-weight: 800;
  white-space: nowrap;
}
.overview-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(242,154,63,.085);
  vertical-align: middle;
  white-space: nowrap;
}
.overview-stock-row {
  cursor: pointer;
  outline: none;
  transition: background .12s ease, box-shadow .12s ease;
}
.overview-stock-row:hover,
.overview-stock-row:focus {
  background: rgba(242,154,63,.065);
  box-shadow: inset 2px 0 0 var(--orange);
}
.overview-row-pending { opacity: .68; }
.overview-row-error { opacity: .62; }
.overview-ticker {
  display: inline-block;
  min-width: 50px;
  color: var(--cream);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
}
.overview-open-hint {
  margin-left: 8px;
  color: #69482f;
  font-size: 7px;
  letter-spacing: .08em;
  opacity: 0;
  transition: opacity .12s ease;
}
.overview-stock-row:hover .overview-open-hint,
.overview-stock-row:focus .overview-open-hint { opacity: 1; }

.score-chip,
.state-chip,
.diag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid rgba(242,154,63,.18);
  background: rgba(242,154,63,.035);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.25;
}
.score-chip { min-width: 58px; justify-content: center; font-size: 9px; }
.score-chip.steady, .state-chip.steady {
  color: #efc46e;
  border-color: rgba(239,196,110,.48);
  background: rgba(239,196,110,.09);
}
.score-chip.changing, .state-chip.changing {
  color: #ff9d00;
  border-color: rgba(255,157,0,.52);
  background: rgba(255,157,0,.10);
}
.score-chip.strained, .state-chip.strained {
  color: #e37328;
  border-color: rgba(227,115,40,.52);
  background: rgba(227,115,40,.10);
}
.score-chip.unstable, .state-chip.unstable {
  color: #d95636;
  border-color: rgba(217,86,54,.52);
  background: rgba(217,86,54,.10);
}
.score-chip.pending, .state-chip.pending { color: #76583e; }

.diag-chip.diag-good, .diag-number.diag-good { color: #e8b95f; }
.diag-chip.diag-neutral, .diag-number.diag-neutral { color: #b08761; }
.diag-chip.diag-warn, .diag-number.diag-warn { color: #e78a32; }
.diag-chip.diag-bad, .diag-number.diag-bad { color: #dc6040; }
.diag-chip.diag-good { border-color: rgba(232,185,95,.30); background: rgba(232,185,95,.05); }
.diag-chip.diag-warn { border-color: rgba(231,138,50,.36); background: rgba(231,138,50,.07); }
.diag-chip.diag-bad { border-color: rgba(220,96,64,.40); background: rgba(220,96,64,.07); }
.diag-number { font-weight: 800; }
.regime-name { color: #d2a570; max-width: 190px; display: inline-block; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

@media (max-width: 760px) {
  .market-overview-section { margin-top: 10px; }
  .overview-heading-row { display: block; padding: 20px 16px 16px; }
  .overview-heading-row h2 { font-size: 25px; }
  .overview-controls { min-width: 0; margin-top: 15px; align-items: stretch; }
  .overview-status { white-space: normal; }
  .overview-refresh { width: 100%; }
  .overview-table { min-width: 1240px; }
}

/* Web-app wording treatment: terminal cursor beside the heartbeat prompt. */
.hero-terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  margin-left: 7px;
  background: var(--orange-bright);
  box-shadow: 0 0 9px rgba(255,172,85,.42);
  animation: hero-terminal-blink 1s steps(1, end) infinite;
}
@keyframes hero-terminal-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-terminal-cursor { animation: none; opacity: 1; }
}

/* Standalone web-app additions. Existing Orange Terminal styles above are copied verbatim. */
[hidden], .hidden { display: none !important; }
.plot-host { width: 100%; min-height: 390px; }
#state_space.plot-host { min-height: 650px; }
#zeta_path.plot-host { min-height: 430px; }
.loading-panel { margin: 18px 0 0; padding: 14px 16px; border: 1px solid rgba(255,157,0,.28); background: rgba(255,157,0,.045); color: #d9892c; font: 11px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; letter-spacing: .055em; text-transform: uppercase; }
.loading-panel.error { border-color: rgba(255,92,0,.48); color: #ff8a43; }
.tab-content-static { display: none; }
.tab-content-static.active { display: block; }
.product-tabs-static { display:flex; gap: 6px; padding: 0; margin: 0 0 22px; list-style:none; border-bottom: 1px solid #4a2910; }
.product-tabs-static button { appearance:none; border:0; border-bottom:2px solid transparent; padding:12px 16px; background:transparent; color:#9d6328; font:700 10px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; letter-spacing:.08em; cursor:pointer; }
.product-tabs-static button.active { color:#ffb347; border-bottom-color:#ff9d00; }
.parameter-actions { display:flex; gap:10px; margin-top:18px; flex-wrap:wrap; }
.parameter-grid label { color:#cc7a28; font:700 9px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; letter-spacing:.055em; text-transform:uppercase; display:block; margin-bottom:6px; }
.parameter-grid input[type="text"], .parameter-grid input[type="number"], .parameter-grid input[type="date"] { box-sizing:border-box; width:100%; background:#100903; border:1px solid #5c330f; color:#ffd083; padding:9px 10px; font:11px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.parameter-grid .checkbox-field { display:flex; align-items:center; gap:8px; padding-top:22px; }
.parameter-grid .checkbox-field label { margin:0; }
.toast-static { position:fixed; right:18px; bottom:18px; z-index:9999; background:#24170d; color:#f3dfc3; border:1px solid rgba(242,154,63,.48); padding:12px 15px; font:10px monospace; letter-spacing:.06em; box-shadow:0 18px 40px rgba(0,0,0,.35); opacity:0; pointer-events:none; transition:opacity .18s; }
.toast-static.show { opacity:1; }
.progress-line { height:2px; background:#3a210d; overflow:hidden; margin-top:10px; }
.progress-line > span { display:block; height:100%; width:35%; background:#ff9d00; animation:orangeProgress 1.15s ease-in-out infinite; }
@keyframes orangeProgress { 0%{transform:translateX(-130%)} 100%{transform:translateX(390%)} }
