/* HUD chrome mapped from the cyberpunk terminal mock.
   Palette, card tick, slim header/footer, dense mono tables.
   The mock's Three.js torus is not loaded (default off). No invented prices. */

:root {
  --bg: #090a10;
  --card-bg: rgba(14, 17, 27, 0.88);
  --card-border: #1a2235;
  --border-glow: #243352;
  --green: #00ff88;
  --red: #ff3355;
  --yellow: #f5b041;
  --blue: #2e86de;
  --cyan: #00d2d3;
  --pink: #ff4797;
  --text-dim: #a9b9d0;
  --text-mid: #d5deec;
  --text-bright: #ffffff;
  --fs-label: 0.8125rem; /* 13px */
  --fs-ui: 0.875rem; /* 14px */
  --fs-body: 1rem; /* 16px */
  --fs-figure: 1.375rem; /* 22px */
  --fs-spot: 1.625rem; /* 26px */
  --fs-headline: 1.75rem; /* 28px */
  --panel: #0e111b;
  --panel-2: #0d111b;
  --line: #1a2235;
  --text: #d5deec;
  --muted: #a9b9d0;
  --buy: #00ff88;
  --buy-dim: rgba(0, 255, 136, 0.12);
  --sell: #ff3355;
  --sell-dim: rgba(255, 51, 85, 0.15);
  --hold: #00d2d3;
  --wait: #f5b041;
  --wait-dim: rgba(245, 176, 65, 0.12);
  --closed: #a9b9d0;
  --vwap: #2e86de;
  --macd: #ff4797;
  --signal: #f5b041;
  --neon: #00ff88;
  --magenta: #ff4797;
  --amber: #f5b041;
  --hud-font: "SF Mono", "Courier New", "Fira Code", ui-monospace, monospace;
}

html {
  font-size: 100%;
}

html, body {
  overflow-x: visible;
  overflow-y: auto;
  max-width: 100%;
}

body {
  background: var(--bg);
  color: var(--text-mid);
  font-family: var(--hud-font);
  font-size: var(--fs-body);
  line-height: 1.45;
}

button, input, select, textarea { font-family: inherit; }

h1, h2, h3, .mark, .kicker, .brand {
  font-family: var(--hud-font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  color: var(--text-bright);
  font-size: var(--fs-body);
  font-weight: 700;
  text-shadow: none;
  margin: 0;
}

h2, h3, .charts-head h2, .paper-head h2, .od-head h3, .card > h2 {
  color: var(--text-dim);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.headline,
.board .headline {
  font-size: var(--fs-headline);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.1;
  color: var(--text-bright);
}

.hero[data-tone="BUY"] .headline {
  color: var(--green);
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.35);
}
.hero[data-tone="SELL"] .headline { color: var(--red); text-shadow: none; }
.hero[data-tone="WAIT"] .headline,
.hero[data-tone="HOLD"] .headline { color: var(--yellow); text-shadow: none; }
.hero[data-tone="CLOSED"] .headline { color: var(--text-dim); }

.kicker, .card-title, .charts-note, .sub, .lede {
  color: var(--text-dim);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reason, .paper-note, .od-suggest { color: var(--text-mid); font-size: var(--fs-body); }

.wrap {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 0 10px 28px;
}

.wrap > header,
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0 -10px 8px;
  padding: 0 12px;
  min-height: 38px;
  background: #0d111b;
  border: 0;
  border-bottom: 1px solid var(--card-border);
  border-radius: 0;
  box-shadow: none;
}

.wrap > header.telemetry {
  flex-direction: column;
  align-items: stretch;
  padding: 0 8px 8px;
}

.wrap > header::before,
.top::before {
  content: none;
}

.telemetry-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  width: 100%;
  min-height: 38px;
}

.mark {
  display: inline-block;
  margin: 0 8px 0 0;
  padding: 2px 6px;
  border-radius: 2px;
  background: #1c273d;
  color: var(--cyan);
  border: 1px solid var(--border-glow);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.06em;
}

header .sub { display: none; }

.status-row, .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill, .nav-manual, .nav a, button, .paper-badge, .banner, button.ghost {
  border-radius: 2px;
  border: 1px solid var(--border-glow);
  background: #1c273d;
  color: var(--cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: var(--fs-ui);
  padding: 4px 8px;
  min-height: 0;
}

.pill.live, .paper-badge {
  color: var(--green);
  border-color: var(--green);
  background: rgba(0, 255, 136, 0.08);
}
.pill.demo, .banner {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 51, 85, 0.15);
}
button:hover, .nav a:hover, .nav-manual:hover {
  border-color: var(--cyan);
  color: var(--text-bright);
}

#clock { color: var(--text-bright); font-size: var(--fs-ui); }

.hero, .card, .paper-card, .market-today, .vix-card, .charts-card, .chain-card,
.od, .od-card, .chart-pane, .panel, .mt-card, .vix-index, article, .tape-cell {
  position: relative;
  border-radius: 4px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: none;
}

.hero::before, .card::before, .paper-card::before, .market-today::before,
.vix-card::before, .charts-card::before, .chain-card::before, .od::before,
.od-card::before, .panel::before, .mt-card::before, .vix-index::before,
.chart-pane::before {
  content: "";
  position: absolute;
  inset: auto;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--text-dim);
  border-left: 1px solid var(--text-dim);
  background: none;
  pointer-events: none;
}

.chart-pane, .chart-host {
  background: radial-gradient(circle at center, #111827 0%, #07090e 75%);
}
.chart-pane::before { display: none; }

.metrics-strip, .paper-chip, .src-tag, .od-tone, .od-chip, .od-wall, .od-fact, .chip {
  border-radius: 2px;
}

.od-spot, .metric .mvalue, .tape-cell b {
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
}

.od-spot { font-size: var(--fs-spot); font-weight: 700; }

.metric .mlabel, .metric > span, .tape-cell span, .tape-cell small {
  color: var(--text-dim);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric .mvalue, .metric > b, .vix-metric .mvalue, .od-chip b, .od-wall b, .od-fact b, .chip b {
  font-size: var(--fs-figure);
  font-weight: 700;
  line-height: 1.15;
}

table.chain, table.od-chain, table.dense-table {
  border-collapse: collapse;
  font-size: var(--fs-ui);
}

table.chain th, table.chain td,
table.od-chain th, table.od-chain td {
  padding: 6px 8px;
  font-size: var(--fs-ui);
  font-weight: 400;
}

table.chain th, table.od-chain th {
  font-size: var(--fs-label);
}

table.chain th, table.od-chain th {
  color: var(--text-dim);
  border-bottom: 1px solid var(--card-border);
}

table.chain tbody tr:hover td,
table.od-chain tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.chain-scroll, .od-scroll,
table.chain td.strike, table.od-chain td.strike, table.chain thead th.strike {
  background: #0e111b;
}

table.chain tr.atm td.strike, table.od-chain tr.atm td {
  color: var(--yellow);
}

table.chain .up, table.od-chain .up, .tape-cell em.up, .od-chg.up, .green { color: var(--green); }
table.chain .down, table.od-chain .down, .tape-cell em.down, .od-chg.down, .red { color: var(--red); }

.od-disclaimer, .vix-disclaimer, .paper-note { color: var(--yellow); }
.od-scroll, .chain-scroll { border-radius: 4px; border-color: var(--card-border); }

.dhan-tape {
  width: 100%;
  margin: 0;
  padding: 0 0 2px;
  border: 0;
  background: transparent;
  min-width: 0;
}
.dhan-tape-note {
  margin: 0 0 4px;
  color: var(--text-dim);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dhan-tape-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
}
.tape-cell {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 4px 8px;
  background: rgba(8, 10, 15, 0.85);
  border: 1px solid var(--border-glow);
}
.tape-cell[data-key="INDIAVIX"],
.tape-cell[data-key="NIFTY"] {
  flex: 0 1 auto;
  min-width: 0;
}
.tape-cell span,
.tape-cell b,
.tape-cell em {
  white-space: nowrap;
}
.tape-cell[data-key="INDIAVIX"] b { font-size: var(--fs-figure); }
.tape-cell[data-key="NIFTY"] b,
.tape-cell b { font-size: var(--fs-spot); white-space: nowrap; }
.tape-cell small { display: none; }
.dhan-tape-note:empty { display: none; }
.dhan-tape-row[hidden] { display: none; }
.tape-cell em { font-style: normal; font-variant-numeric: tabular-nums; font-size: var(--fs-ui); }
.tape-cell em:empty { display: none; }

.status-foot {
  margin: 12px -10px 0;
  padding: 0;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0;
  min-height: 28px;
  padding: 0 14px;
  background: #06080d;
  border: 0;
  border-top: 1px solid var(--card-border);
  color: var(--text-dim);
  letter-spacing: 0.04em;
  font-size: var(--fs-label);
  text-transform: uppercase;
}

.status-line span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-line span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.status-foot p, footer p, .wrap > footer {
  color: var(--text-mid);
  font-size: var(--fs-label);
  padding: 8px 14px 0;
}

.grid, .mt-perf, .mt-grid, .mt-split, .vix-grid, .charts-grid, .layout {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .mt-perf, .mt-grid, .mt-split { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: 1.15fr 0.85fr; }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1280px) {
  .wrap { padding: 0 16px 32px; }
  .wrap > header,
  .top { margin: 0 -16px 8px; }
  .status-foot { margin: 12px -16px 0; }
}

@media (max-width: 800px) {
  .wrap > header, .top { position: static; }
  button, .nav-manual, .nav a { min-height: 40px; padding: 8px 10px; }
  .status-line { letter-spacing: 0.04em; }
}

body.fs-chart { overflow: hidden; }
body.fs-chart .charts-card::before,
body.fs-chart .chart-pane::before { display: none; }

/* Type scale. rem so the desk follows the browser default (16px).
   Labels stay at 13px; figures are 22–28px. Later sheet, so these beat the page rules. */
.vix-metric .mlabel,
.od-chip span, .od-wall span, .od-fact span, .chip span,
.paper-stat span, .paper-fact span,
.volume-label, .ctrl-label, .ind-label, .oi-chip .oi-kind,
.chain-expiry-label, .src-tag, .charts-note, .vix-disclaimer, .od-disclaimer,
.chain-meta, .od-id, .od-asof, .od-split-label, .kronos-chart-label,
.dhan-tape-note, .kicker {
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
}
.tf-pills button, .ind-toggles button, .chart-tabs button,
.paper-chip, .paper-kronos-head strong,
.od-day, .od-chg, .signal .meta, .bt-meta, .paper-filters, .paper-blockers,
.volume-label {
  font-size: var(--fs-ui);
}
.chart-pane-head strong, .paper-stat b, .paper-fact b {
  font-size: var(--fs-body);
}
.ohlc-legend, .oi-chip, .chart-pane-head span, .last-px {
  font-size: 1.125rem;
}
/* The 14/16 scale applies at 1024 as well as on the wide desk.
   It is not gated behind a 1100px breakpoint. */
.charts-line { font-size: var(--fs-body); color: var(--text-mid); }
.ctrl-label, .volume-label { font-size: var(--fs-ui); }
.oi-chip b, .chart-pane-head .last-px {
  font-size: 1.375rem;
  font-weight: 700;
}
.paper-card, .od, .chain-card, .vix-card, .hero {
  padding: 16px 18px 14px;
}
@media (max-width: 699px) {
  .paper-card, .od, .chain-card, .vix-card, .hero, .card {
    padding: 12px 12px 10px;
  }
}
.metric.wide .mvalue { font-size: var(--fs-body); font-weight: 650; }
.vix-metric { white-space: nowrap; }
.dhan-tape-row { min-width: 0; }
.od-wall small, .od-fact small, .vol-row, .vix-empty, .od-rules, .paper-kronos-note {
  font-size: var(--fs-label);
}
.status-row .pill { font-size: var(--fs-ui); }

.brand-lockup { display: flex; align-items: center; min-width: 0; gap: 8px; }
.brand-lockup h1 { margin: 0; }
.head-menu { position: relative; }
.head-menu > summary {
  list-style: none;
  cursor: pointer;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: var(--text-mid);
}
.head-menu > summary::-webkit-details-marker { display: none; }
.head-menu-panel { display: flex; gap: 8px; align-items: center; }
.foot-short { margin: 0; padding: 8px 14px 0; color: var(--text-mid); font-size: var(--fs-label); }
.about-data { padding: 0 14px 8px; color: var(--text-mid); font-size: var(--fs-label); }
.about-data summary { cursor: pointer; }
.dhan-tape-note.is-pill {
  display: inline-block;
  width: auto;
  margin: 0 0 2px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-glow);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

@media (min-width: 700px) {
  .head-menu > summary { display: none; }
  .about-data summary { display: none; }
}

@media (max-width: 699px) {
  .status-row {
    width: auto;
    margin-top: 0;
    flex-wrap: nowrap;
    overflow: visible;
    justify-content: flex-end;
    gap: 6px;
  }
  .telemetry-bar { flex-wrap: nowrap; align-items: center; gap: 6px; min-height: 0; }
  .wrap > header.telemetry { padding: 2px 8px 0; margin-bottom: 2px; }
  .brand-lockup { height: 32px; }
  .brand-lockup h1 { font-size: 15px; line-height: 1; }
  .mark { padding: 1px 4px; line-height: 1.2; }
  .dhan-tape { padding: 0; }
  .dhan-tape-note.is-pill { margin: 2px 0 0; }
  .charts-card { margin-top: 2px; padding: 2px 8px 6px; }
  .chart-pane { padding: 0 2px 2px; }
  .head-menu > summary { display: inline-flex; align-items: center; }
  .head-menu-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;
    flex-direction: column;
    align-items: stretch;
    min-width: 200px;
    padding: 8px;
    background: #0d111b;
    border: 1px solid var(--card-border);
  }
  .head-menu[open] .head-menu-panel { display: flex; }
  #charts-note {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .charts-card { padding: 2px 8px 6px; }
  .status-row button#refresh,
  .head-menu > summary { min-height: 32px; padding: 4px 10px; }
  .chart-controls { height: 36px; flex-wrap: nowrap; overflow-x: auto; }
  .tf-pills button, .ind-toggles button { min-height: 28px; min-width: 0; padding: 2px 8px; }
  .src-tag { display: none !important; }
}

.founder { font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: 0.06em; color: #ffcc00; border-left: 1px solid rgba(0,255,200,0.35); padding-left: 8px; white-space: nowrap; }
@media (max-width: 720px) { .brand-lockup { height: auto !important; flex-wrap: wrap; row-gap: 2px; } .founder { flex-basis: 100%; font-size: 12px; border-left: 0; padding-left: 0; white-space: normal; } }

/* ===== Phone layout (portrait ≤699px, landscape phones ≤950×500). Desktop unaffected. ===== */
@media (max-width: 699px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  body { font-size: 16px; }
  .wrap { padding-left: 6px; padding-right: 6px; }
  /* header: brand row on top, controls row below */
  .telemetry-bar { flex-wrap: wrap !important; row-gap: 6px; }
  .brand-lockup { flex: 1 1 100%; }
  .brand-lockup h1 { font-size: 18px !important; }
  .founder { font-size: 14px !important; }
  .status-row { flex: 1 1 100%; justify-content: space-between !important; flex-wrap: wrap !important; gap: 8px; }
  .status-row .pill, #clock { font-size: 15px !important; white-space: nowrap; }
  .status-row button#refresh, .head-menu > summary { min-height: 40px !important; padding: 6px 14px !important; font-size: 15px; }
  .head-menu-panel a, .head-menu-panel .pill { min-height: 40px; display: flex; align-items: center; font-size: 16px; }
  /* quote / VIX strip stacks full width */
  .dhan-tape, .dhan-tape-row { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  .dhan-tape-row > *, .tape-cell { width: 100%; box-sizing: border-box; }
  /* chart controls: scrollable chip row with 40px taps */
  .chart-controls { height: auto !important; flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; gap: 8px; }
  .chart-controls::-webkit-scrollbar { display: none; }
  .tf-pills, .ind-toggles { flex: 0 0 auto !important; flex-wrap: nowrap !important; width: auto !important; }
  .tf-pills button, .ind-toggles button { min-height: 40px !important; min-width: 44px !important; padding: 6px 12px !important; font-size: 15px !important; }
  .btn-fs { min-width: 40px; min-height: 40px; }
  #charts-note { white-space: normal !important; overflow: visible; font-size: 14px; line-height: 1.35; }
  /* chart: full width, ~62vh, volume stays inside the same pane */
  .charts-card { padding-left: 4px !important; padding-right: 4px !important; }
  .price-volume { height: clamp(380px, 62vh, 640px) !important; min-height: 380px !important; grid-template-rows: minmax(0, 1fr) minmax(70px, 20%) auto !important; }
  .ohlc-legend { font-size: 13px !important; line-height: 1.3; right: 46px; background: rgba(5,8,14,0.6); }
  /* metric grids stack as 2-column cards without truncation */
  .metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; display: grid !important; overflow: visible !important; }
  .metric { white-space: normal !important; padding: 10px 12px !important; }
  .metric .mvalue, .metric > b { white-space: normal; overflow: visible !important; text-overflow: clip !important; word-break: break-word; font-size: 18px !important; }
  .metric .mlabel, .vix-metric .mlabel { font-size: 13px !important; }
  .vix-metrics { flex-wrap: wrap; overflow: visible; row-gap: 8px; }
  .vix-metric { flex: 1 1 40%; white-space: normal; }
  .vix-metric .mvalue { font-size: 20px !important; }
  /* panels and tables: cards, tables scroll inside their own box */
  .grid, .board .grid, .mt-grid, .mt-split, .layout { grid-template-columns: minmax(0, 1fr) !important; }
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 15px; }
  .smc-list li { grid-template-columns: 60px 1fr 90px !important; }
  .smc-list li .why { grid-column: 1 / -1; font-size: 15px; }
  .smc-note, .smc-hit { font-size: 15px; opacity: 1; }
  .reason, p, li { font-size: max(15px, 1em); }
  .wrap > header.telemetry, .status-foot { margin-left: -6px !important; margin-right: -6px !important; max-width: calc(100% + 12px); box-sizing: border-box; }
  .kronos-chart-label, .od-meta summary, .od-wall small, .od-fact b, .od-chip small { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
  .kronos-chart-label { position: static !important; order: 3; max-width: none !important; padding: 4px 6px; font-size: 14px !important; line-height: 1.35; background: rgba(5,8,14,0.8); }
}
@media (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  html, body { overflow-x: hidden; }
  .price-volume { height: clamp(300px, 88vh, 460px) !important; min-height: 300px !important; }
  .chart-controls { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
  .tf-pills button, .ind-toggles button, .head-menu-panel a, .status-row button#refresh { min-height: 40px !important; font-size: 15px !important; }
  #charts-note { white-space: normal !important; }
  .metric { white-space: normal !important; }
  .metric .mvalue, .metric > b, .kronos-chart-label, .od-meta summary, .od-wall small, .od-fact b { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
  .btn-fs { min-width: 40px; min-height: 40px; }
}

/* ======================================================================
   Clean theme (Oct 2026): calm navy, one accent, Inter, decision-first.
   Overrides the HUD styles above. Analysis only — no orders.
   ====================================================================== */
:root {
  --bg: #0b101b; --panel: #121a2a; --card-bg: #121a2a; --line: #1e2738; --card-border: #1e2738; --border-glow: #26324a;
  --text: #e6ebf5; --text-bright: #f5f7fb; --text-mid: #c3cbdb; --text-dim: #8d98ad; --muted: #8d98ad;
  --accent: #8ea7ff; --accent-dim: rgba(142,167,255,0.14);
  --buy: #3fb68b; --green: #3fb68b; --neon: #3fb68b; --buy-dim: rgba(63,182,139,0.12);
  --sell: #e5616e; --red: #e5616e; --sell-dim: rgba(229,97,110,0.12);
  --hold: #8ea7ff; --cyan: #8ea7ff; --blue: #8ea7ff; --vwap: #8ea7ff;
  --wait: #d9a94e; --yellow: #d9a94e; --amber: #d9a94e; --signal: #d9a94e;
  --pink: #c4b5fd; --magenta: #c4b5fd; --macd: #c4b5fd;
  --hud-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html, body { background: var(--bg); }
body { font-family: var(--hud-font); color: var(--text-mid); font-size: 16px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .mark, .kicker, .brand { font-family: var(--hud-font); text-transform: none; letter-spacing: 0; }
body *, body *::before, body *::after { text-shadow: none !important; }
.charts-card, .vix-card, .paper-card, .od, .chain-card, .card, .hero, .smc-panel, .hero-card {
  background: var(--panel) !important; border: 1px solid var(--line) !important; border-radius: 16px !important; box-shadow: none !important;
}
.charts-card::before, .vix-card::before, .paper-card::before, .od::before, .chain-card::before, .card::before,
.charts-card::after, .vix-card::after, .paper-card::after, .od::after, .chain-card::after, .card::after { display: none !important; }
button, .pill, summary { font-family: var(--hud-font); }

/* header */
.wrap > header.telemetry { background: transparent; border: 0; padding: 10px 4px 6px !important; margin: 0 !important; }
.telemetry-bar { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; gap: 10px; }
.brand-lockup { display: flex !important; align-items: center !important; gap: 10px; flex: 1 1 auto !important; min-width: 0; height: auto !important; flex-wrap: nowrap !important; }
.logo { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #0b101b;
  background: linear-gradient(135deg, #8ea7ff, #c4b5fd); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-lockup h1 { font-size: 19px !important; font-weight: 700; color: var(--text-bright); letter-spacing: 0; }
.founder { font-size: 13px !important; font-weight: 500 !important; letter-spacing: 0 !important; color: var(--text-dim) !important; border: 0 !important; padding: 0 !important; white-space: nowrap !important; flex-basis: auto !important; }
.status-row { flex: 0 0 auto !important; display: flex !important; flex-wrap: nowrap !important; align-items: center; gap: 8px !important; width: auto !important; justify-content: flex-end !important; }
.status-row .pill, #clock { font-size: 13px !important; color: var(--text-dim); background: transparent; border: 0; padding: 0 2px; white-space: nowrap; }
#refresh, .head-menu > summary { width: 42px; height: 42px; min-height: 42px !important; padding: 0 !important; display: inline-grid !important; place-items: center;
  border-radius: 12px; border: 1px solid var(--line) !important; background: #16203300; color: var(--text) !important; font-size: 20px !important; line-height: 1; cursor: pointer; }
#refresh:hover, .head-menu > summary:hover { border-color: var(--accent) !important; color: var(--accent) !important; }
.head-menu-panel { background: var(--panel) !important; border: 1px solid var(--line) !important; border-radius: 12px; right: 0; }
@media (min-width: 700px) {
  .head-menu > summary { display: inline-grid !important; }
  .head-menu-panel { display: none; position: absolute; top: calc(100% + 6px); z-index: 40; flex-direction: column; align-items: stretch; min-width: 220px; padding: 8px; }
  .head-menu[open] .head-menu-panel { display: flex; }
}
.dhan-tape { display: none !important; }

/* hero decision card */
.hero-card { margin: 6px 0 12px; padding: 16px 18px !important; display: grid; gap: 12px;
  grid-template-columns: minmax(0, 1fr); }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hero-px { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.hero-label { display: block; width: 100%; font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
#hero-ltp { font-size: 38px; font-weight: 700; color: var(--text-bright); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.05; }
#hero-chg { font-style: normal; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-dim); }
#hero-chg.up { color: var(--buy); } #hero-chg.down { color: var(--sell); }
.vix-chip { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; background: var(--accent-dim); color: var(--accent); font-weight: 600; font-size: 15px; white-space: nowrap; }
.hero-bias-row { display: flex; align-items: center; gap: 12px; }
.hero-bias-row .hero-label { width: auto; }
.bias { font-size: 22px; font-weight: 700; padding: 4px 14px; border-radius: 10px; }
.bias.bullish { color: var(--buy); background: var(--buy-dim); }
.bias.bearish { color: var(--sell); background: var(--sell-dim); }
.bias.neutral { color: var(--text); background: rgba(255,255,255,0.06); }
.hero-reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.hero-reasons li { font-size: 16px; color: var(--text-mid); padding-left: 16px; position: relative; }
.hero-reasons li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lvl { background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lvl span { display: block; font-size: 13px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.lvl b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lvl.sup b { color: var(--sell); } .lvl.res b { color: var(--buy); }
.hero-note { margin: 0; font-size: 13px; color: var(--text-dim); }
@media (min-width: 900px) {
  .hero-card { grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 1fr) minmax(260px, 1fr); align-items: center; column-gap: 24px; }
  .hero-top { grid-column: 1; grid-row: 1 / span 2; }
  .hero-bias-row { grid-column: 2; grid-row: 1; }
  .hero-reasons { grid-column: 2; grid-row: 2; }
  .hero-levels { grid-column: 3; grid-row: 1 / span 2; }
  .hero-note { grid-column: 1 / -1; }
  #hero-ltp { font-size: 44px; }
}

/* chart card */
.charts-card { padding: 12px 12px 10px !important; }
.charts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#charts-note { color: var(--text-dim) !important; font-size: 13px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis; margin: 0; min-width: 0; flex: 1 1 auto; }
.smc-quick { flex: 0 0 auto; min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text-mid); font-weight: 600; font-size: 15px; cursor: pointer; }
.smc-quick.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.chart-controls { border: 0 !important; background: transparent !important; }
.tf-pills .ctrl-label, .ind-toggles .ctrl-label { display: none; }
.tf-pills button, .ind-toggles button { border-radius: 999px !important; border: 1px solid var(--line) !important; background: transparent !important; color: var(--text-mid) !important;
  font-weight: 600 !important; font-size: 15px !important; min-height: 40px !important; padding: 6px 14px !important; box-shadow: none !important; text-transform: none !important; }
.tf-pills button.active, .ind-toggles button.active { border-color: var(--accent) !important; color: var(--accent) !important; background: var(--accent-dim) !important; }
.ohlc-legend { position: absolute !important; top: 6px !important; left: 8px !important; right: 52px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
  font-size: 13px !important; line-height: 1.3 !important; color: var(--text-dim) !important; background: rgba(15,21,34,0.7) !important; padding: 2px 6px !important; border-radius: 6px; }
.ohlc-legend b { color: var(--text) ; font-weight: 600; }
.ohlc-legend b.up { color: var(--buy); } .ohlc-legend b.down { color: var(--sell); }
.kr-bit { color: #c4b5fd; } .kr-bit.stale { color: var(--text-dim); }
.kronos-chart-label { display: none !important; }
.volume-label { position: absolute !important; top: auto !important; bottom: auto !important; left: auto !important; right: 6px !important; margin: 0 !important;
  font-size: 11px !important; color: var(--text-dim) !important; background: transparent !important; border: 0 !important; padding: 0 !important; opacity: 0.8; }
.price-volume { height: clamp(520px, 72vh, 1000px) !important; }
.btn-fs { border-radius: 10px !important; border: 1px solid var(--line) !important; background: rgba(15,21,34,0.8) !important; color: var(--text-dim) !important; }
.src-tag { display: none !important; }

/* folds: secondary content collapsed by default */
details.fold { margin: 10px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
details.fold > summary { list-style: none; cursor: pointer; padding: 14px 16px; min-height: 48px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 600; color: var(--text); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾"; color: var(--text-dim); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > :not(summary) { margin: 0 10px 12px !important; border: 0 !important; }
details.fold > .ind-toggles { display: flex !important; flex-wrap: wrap !important; gap: 8px; padding: 0 6px 6px; }
.smc-panel { border: 0 !important; background: transparent !important; }
.smc-list .buy { color: var(--buy) !important; } .smc-list .sell { color: var(--sell) !important; }
.smc-badge { color: var(--wait) !important; border-color: var(--wait) !important; }
.status-foot { border-top: 1px solid var(--line); color: var(--text-dim); }

/* phones */
@media (max-width: 699px) {
  .wrap { padding-left: 10px !important; padding-right: 10px !important; }
  .wrap > header.telemetry { margin-left: 0 !important; margin-right: 0 !important; max-width: 100% !important; }
  .brand-lockup h1 { font-size: 18px !important; }
  #clock { display: none !important; }
  .head-menu-panel { position: absolute; top: calc(100% + 6px); right: 0; }
  #hero-ltp { font-size: 34px; }
  .hero-card { padding: 14px !important; }
  .charts-card { padding: 8px 4px 6px !important; }
  .price-volume { height: 60vh !important; min-height: 360px !important; }
  .ohlc-legend .bar-bit, .ohlc-legend .vol-bit { display: none; }
  .chart-controls { padding: 6px 4px !important; }
  .status-foot { margin-left: 0 !important; margin-right: 0 !important; max-width: 100% !important; }
}
@media (max-width: 380px) {
  .founder { font-size: 12px !important; }
  #hero-ltp { font-size: 30px; }
  .vix-chip { font-size: 14px; padding: 5px 10px; }
}
@media (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  .price-volume { height: 82vh !important; min-height: 280px !important; }
}
.charts-head { display: flex !important; flex-direction: row !important; align-items: center !important; flex-wrap: nowrap !important; width: 100%; min-width: 0; }
.head-menu:not([open]) .head-menu-panel { display: none !important; }
.head-menu[open] .head-menu-panel { display: flex !important; flex-direction: column; position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 220px; padding: 8px; gap: 6px; }
.head-menu-panel a, .head-menu-panel .pill { min-height: 40px; display: flex !important; align-items: center; padding: 0 12px; border-radius: 10px; color: var(--text) !important; font-size: 15px !important; text-transform: none !important; letter-spacing: 0 !important; background: transparent !important; border: 0 !important; }
.head-menu-panel a:hover { background: var(--accent-dim) !important; }
.page-links { display: none !important; }
#backtest { padding: 0 !important; }
#backtest > details.fold { margin: 0; border: 0; }
#backtest > details.fold > summary h2 { margin: 0; font-size: 16px !important; font-weight: 600 !important; color: var(--text) !important; text-transform: none !important; letter-spacing: 0 !important; }
.status-line { background: transparent !important; }
.nav-nifty-dash { flex: 0 0 auto; margin-left: 4px; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent) !important; background: var(--accent-dim); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
@media (max-width: 400px) { .nav-nifty-dash { padding: 0 9px; font-size: 13px; } .logo { width: 34px; height: 34px; font-size: 18px; } .brand-lockup { gap: 8px; } }
.brand-text { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.brand-text .founder { white-space: normal !important; overflow-wrap: anywhere; }

/* PR #21 review fixes */
/* volume: own synced pane under the candles, no price labels */
.price-volume:not(.vol-fallback) .price-col { grid-row: auto !important; z-index: auto; }
.price-volume:not(.vol-fallback) .volume-pane { pointer-events: auto; border-top: 1px solid var(--line) !important; }
.price-volume:not(.vol-fallback) .chart-host.volume { display: block !important; }
.price-volume { grid-template-rows: minmax(0, 1fr) minmax(64px, 22%) auto !important; }
.price-volume.vol-fallback { grid-template-rows: minmax(0, 1fr) 40px auto !important; }
.volume-label { top: 4px !important; left: 8px !important; right: auto !important; z-index: 5; }
@media (min-width: 700px) {
  .price-volume { height: clamp(360px, calc(100vh - 410px), 600px) !important; min-height: 360px !important; }
}
/* fullscreen button sits in the chart header */
.charts-head .btn-fs.in-head { position: static !important; margin-left: 8px; flex: 0 0 auto; }
#charts-card > .charts-head .charts-line { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.fs-chart #charts-card > .charts-head { display: flex !important; position: fixed; top: 6px; right: 6px; width: auto !important; z-index: 1000; }
body.fs-chart #charts-card > .charts-head > :not(.btn-fs) { display: none !important; }
/* DEMO badges */
.demo-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: #1b1405; background: #f5b041; vertical-align: middle; }
.demo-badge[hidden] { display: none !important; }
.chart-demo { position: absolute; z-index: 6; top: 34px; left: 10px; pointer-events: none; }
.hero-card.is-demo .bias, .bias.demo { color: var(--text-dim) !important; background: transparent !important; border-color: var(--line) !important; opacity: .7; }
.hero-card.is-demo .hero-levels { opacity: .5; }
/* chart info fold */
#charts-info .charts-line { margin: 0 12px 12px !important; font-size: 14px; color: var(--text-dim); white-space: normal !important; }
/* header clock: phone shows IST time, desktop shows founder */
.brand-clock { display: none; font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
@media (max-width: 699px) {
  .brand-text .founder { display: none !important; }
  .brand-clock { display: block; }
  .ohlc-legend .lg-o, .ohlc-legend .lg-h, .ohlc-legend .lg-l, .ohlc-legend .day-bit { display: none !important; }
  .ohlc-legend { right: 8px !important; }
}
/* accordion: one gap */
#folds-top, .folds-stack { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
details.fold { margin: 0 !important; }
.charts-head .btn-fs.in-head { min-width: 40px; min-height: 40px; }
.brand-lockup h1 { white-space: nowrap; }
@media (max-width: 380px) { .brand-lockup h1 { font-size: 16px !important; } .nav-nifty-dash { padding: 0 8px; font-size: 12px; } }
