/* QuantPulse Public Web Terminal — Zero-Orange Sovereign Design System */
:root {
  --qp-bg: #0A0E13;
  --qp-panel: #101720;
  --qp-panel-alt: #151F2C;
  --qp-panel-hover: #1A2636;
  --qp-line: #1E2A3A;
  --qp-line-soft: rgba(30, 42, 58, 0.58);
  --qp-gold: #E6BE64;
  --qp-gold-dim: rgba(230, 190, 100, 0.14);
  --qp-bull: #2AD89B;
  --qp-bull-dim: rgba(42, 216, 155, 0.14);
  --qp-bear: #DE5B72;
  --qp-bear-dim: rgba(222, 91, 114, 0.14);
  --qp-anchor: #4C9AFF;
  --qp-anchor-dim: rgba(76, 154, 255, 0.14);
  --qp-violet: #A78BFA;
  --qp-level: #C8D8EC;
  --qp-neutral: #8EA4C0;
  --qp-text: #ECF2F8;
  --qp-muted: #7F91A8;
  --qp-faint: #52637A;
  --qp-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;
  --qp-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  background: var(--qp-bg);
  color: var(--qp-text);
  font-family: var(--qp-sans);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--qp-anchor);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

/* ── Top Sticky Institutional Header ───────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 23, 32, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--qp-line);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.brand:hover {
  text-decoration: none;
}

.brand:hover .brand-tag {
  border-color: rgba(230, 190, 100, 0.55);
  color: var(--qp-gold);
}

.brand svg {
  width: 24px;
  height: 18px;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--qp-mono);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.8px;
  color: var(--qp-text);
  white-space: nowrap;
}

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

.brand-tag {
  margin-left: 4px;
  font-family: var(--qp-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--qp-bg);
  border: 1px solid var(--qp-line);
  color: var(--qp-muted);
  white-space: nowrap;
  transition: border-color 0.14s, color 0.14s;
}

.nav-tabs {
  display: inline-flex;
  background: var(--qp-bg);
  border: 1px solid var(--qp-line);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
}

.nav-tab {
  border: 0;
  background: transparent;
  color: var(--qp-muted);
  font-family: var(--qp-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}

.nav-tab:hover {
  color: var(--qp-text);
  background: var(--qp-panel-alt);
}

.nav-tab.active {
  background: var(--qp-panel-hover);
  color: var(--qp-gold);
  box-shadow: inset 0 0 0 1px rgba(230, 190, 100, 0.3);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asof-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--qp-mono);
  font-size: 10.5px;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--qp-bg);
  border: 1px solid var(--qp-line);
  color: var(--qp-neutral);
  white-space: nowrap;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--qp-bull);
  box-shadow: 0 0 8px rgba(42, 216, 155, 0.7);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--qp-line);
  background: var(--qp-panel-alt);
  color: var(--qp-text);
  font-family: var(--qp-mono);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.14s, color 0.14s, background 0.14s, transform 0.12s;
}

.btn:hover {
  border-color: var(--qp-gold);
  color: var(--qp-gold);
}

.btn-gold {
  background: var(--qp-gold);
  color: #0A0E13;
  border-color: var(--qp-gold);
}

.btn-gold:hover {
  background: #F0CB75;
  border-color: #F0CB75;
  color: #0A0E13;
}

.btn-sm {
  height: 27px;
  padding: 0 9px;
  font-size: 11px;
}

/* ── Main Shell ────────────────────────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.tab-panel.active {
  display: flex;
}

.eyebrow {
  font-family: var(--qp-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--qp-muted);
}

.card {
  background: var(--qp-panel);
  border: 1px solid var(--qp-line);
  border-radius: 9px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

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

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--qp-text);
  letter-spacing: 0.01em;
}

.card-sub {
  font-size: 12px;
  color: var(--qp-muted);
  margin-top: 2px;
}

/* ── Segmented Controls & Pills ────────────────────────────────────────────── */
.seg-switch {
  display: inline-flex;
  background: var(--qp-bg);
  border: 1px solid var(--qp-line);
  border-radius: 6px;
  overflow: hidden;
  height: 30px;
}

.seg-switch button {
  border: 0;
  background: transparent;
  color: var(--qp-muted);
  font-family: var(--qp-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

.seg-switch button.active {
  background: var(--qp-panel-hover);
  color: var(--qp-gold);
}

.pill-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--qp-line);
  background: var(--qp-panel-alt);
  color: var(--qp-muted);
  font-family: var(--qp-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}

.toggle-pill.on {
  color: var(--qp-text);
  border-color: rgba(230, 190, 100, 0.45);
  background: var(--qp-panel-hover);
}

.toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── KPI Strips ────────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  gap: 9px;
}

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

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

.kpi-card {
  background: var(--qp-panel);
  border: 1px solid var(--qp-line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.kpi-card small {
  font-family: var(--qp-mono);
  font-size: 9.8px;
  font-weight: 700;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  color: var(--qp-muted);
}

.kpi-card strong {
  font-family: var(--qp-mono);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--qp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-card span {
  font-size: 11px;
  color: var(--qp-neutral);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Tab 1: State of the Cycle ─────────────────────────────────────────────── */
.cycle-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 12px;
}

.cycle-canvas-wrap {
  position: relative;
  height: 410px;
  min-height: 300px;
  width: 100%;
  background: #080C11;
  border: 1px solid var(--qp-line);
  border-radius: 7px;
  overflow: hidden;
}

.cycle-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.hover-bar {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 2;
  pointer-events: none;
  font-family: var(--qp-mono);
  font-size: 11px;
  color: var(--qp-level);
  background: rgba(10, 14, 19, 0.86);
  border: 1px solid var(--qp-line);
  border-radius: 5px;
  padding: 5px 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cycle-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--qp-mono);
  font-size: 11px;
}

.cycle-right-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.narrative-box {
  background: var(--qp-panel-alt);
  border-left: 3px solid var(--qp-gold);
  border-radius: 5px;
  padding: 9px 11px;
}

.narrative-box b {
  display: block;
  font-family: var(--qp-mono);
  font-size: 10.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--qp-gold);
  margin-bottom: 3px;
}

.narrative-box p {
  font-size: 12px;
  line-height: 1.48;
  color: var(--qp-text);
}

.anchor-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anchor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--qp-panel-alt);
  border: 1px solid rgba(30, 42, 58, 0.6);
}

.anchor-row strong {
  font-size: 12px;
  color: var(--qp-text);
  display: block;
}

.anchor-row small {
  font-size: 10.8px;
  color: var(--qp-muted);
  display: block;
}

.anchor-vals {
  text-align: right;
  font-family: var(--qp-mono);
  font-size: 12px;
  white-space: nowrap;
}

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--qp-line);
  border-radius: 7px;
  background: #0D131B;
}

.tv-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--qp-mono);
  font-size: 12px;
}

.tv-table thead th {
  background: var(--qp-panel-alt);
  color: var(--qp-muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 8px 11px;
  text-align: left;
  border-bottom: 1px solid var(--qp-line);
  white-space: nowrap;
}

.tv-table th.num,
.tv-table td.num {
  text-align: right;
}

.tv-table tbody td {
  padding: 8px 11px;
  border-bottom: 1px solid var(--qp-line-soft);
  white-space: nowrap;
}

.tv-table tbody tr:last-child td {
  border-bottom: 0;
}

.tv-table tbody tr:hover td {
  background: var(--qp-panel-hover);
}

.tv-table td.wrap-cell {
  white-space: normal;
  min-width: 190px;
  max-width: 310px;
  font-family: var(--qp-sans);
  font-size: 12px;
}

/* ── Semantic Colors & Badges ──────────────────────────────────────────────── */
.pos { color: var(--qp-bull) !important; }
.neg { color: var(--qp-bear) !important; }
.gold { color: var(--qp-gold) !important; }
.anchor { color: var(--qp-anchor) !important; }
.muted { color: var(--qp-muted) !important; }
.neutral { color: var(--qp-neutral) !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--qp-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.45px;
  border: 1px solid var(--qp-line);
  white-space: nowrap;
}

.badge-bull {
  background: var(--qp-bull-dim);
  color: var(--qp-bull);
  border-color: rgba(42, 216, 155, 0.38);
}

.badge-bear {
  background: var(--qp-bear-dim);
  color: var(--qp-bear);
  border-color: rgba(222, 91, 114, 0.38);
}

.badge-gold {
  background: var(--qp-gold-dim);
  color: var(--qp-gold);
  border-color: rgba(230, 190, 100, 0.4);
}

.badge-anchor {
  background: var(--qp-anchor-dim);
  color: var(--qp-anchor);
  border-color: rgba(76, 154, 255, 0.38);
}

.badge-muted {
  background: rgba(142, 164, 192, 0.10);
  color: var(--qp-neutral);
  border-color: rgba(142, 164, 192, 0.28);
}

/* ── Tab 2: 10-Pillar Bridge Scoreboard ────────────────────────────────────── */
.bridge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.bridge-card {
  background: var(--qp-panel);
  border: 1px solid var(--qp-line);
  border-radius: 9px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  transition: border-color 0.15s;
}

.bridge-card:hover {
  border-color: rgba(230, 190, 100, 0.35);
}

.bridge-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.bridge-sym {
  font-family: var(--qp-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--qp-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bridge-tf {
  font-size: 10.5px;
  color: var(--qp-muted);
  font-weight: 600;
}

.bridge-price-block {
  text-align: right;
  font-family: var(--qp-mono);
}

.bridge-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--qp-text);
}

.bridge-chg {
  font-size: 11px;
  font-weight: 600;
}

/* -100..+100 Gauge */
.gauge-wrap {
  background: #0B1017;
  border: 1px solid var(--qp-line);
  border-radius: 7px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gauge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--qp-mono);
}

.gauge-score {
  font-size: 18px;
  font-weight: 800;
}

.gauge-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--qp-panel-alt);
  border: 1px solid var(--qp-line);
  overflow: hidden;
}

.gauge-neutral-band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 31.5%;
  width: 37%;
  background: rgba(142, 164, 192, 0.14);
  border-left: 1px dashed rgba(142, 164, 192, 0.35);
  border-right: 1px dashed rgba(142, 164, 192, 0.35);
}

.gauge-center-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--qp-neutral);
  z-index: 2;
}

.gauge-fill {
  position: absolute;
  top: 1px;
  bottom: 1px;
  border-radius: 999px;
  z-index: 1;
}

.gauge-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--qp-mono);
  font-size: 9.5px;
  color: var(--qp-faint);
}

.bridge-edge-pill {
  font-family: var(--qp-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--qp-panel-alt);
  border: 1px solid var(--qp-line);
  color: var(--qp-gold);
  line-height: 1.35;
}

.bridge-plain {
  font-size: 11.8px;
  line-height: 1.45;
  color: var(--qp-level);
}

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

.level-chip {
  background: #0B1017;
  border: 1px solid var(--qp-line);
  border-radius: 5px;
  padding: 5px 7px;
  font-family: var(--qp-mono);
}

.level-chip small {
  display: block;
  font-size: 9.5px;
  color: var(--qp-muted);
  text-transform: uppercase;
}

.level-chip span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--qp-text);
}

.bridge-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--qp-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--qp-mono);
  font-size: 10.8px;
}

/* ── Tab 3: Unedited Call Ledger ───────────────────────────────────────────── */
.ledger-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ep-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--qp-mono);
  font-weight: 700;
  color: var(--qp-anchor);
}

.ep-sub {
  display: block;
  font-family: var(--qp-sans);
  font-size: 11.5px;
  color: var(--qp-muted);
  margin-top: 2px;
}

/* ── QuantPulse Pro Waitlist Banner ────────────────────────────────────────── */
.pro-banner {
  background: linear-gradient(135deg, rgba(230, 190, 100, 0.09) 0%, var(--qp-panel) 55%, rgba(76, 154, 255, 0.07) 100%);
  border: 1px solid rgba(230, 190, 100, 0.35);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pro-banner-copy {
  max-width: 720px;
}

.pro-banner-copy h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--qp-text);
  margin-top: 3px;
}

.pro-banner-copy p {
  font-size: 12.2px;
  color: var(--qp-neutral);
  margin-top: 4px;
}

.pro-banner-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.input-dark {
  height: 34px;
  min-width: 240px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid var(--qp-line);
  background: var(--qp-bg);
  color: var(--qp-text);
  font-family: var(--qp-mono);
  font-size: 12px;
}

.input-dark:focus {
  outline: none;
  border-color: var(--qp-gold);
}

.form-status {
  font-family: var(--qp-mono);
  font-size: 11px;
  min-height: 16px;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--qp-line);
  background: var(--qp-panel);
  margin-top: 8px;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--qp-muted);
}

.footer-disclaimer {
  max-width: 820px;
  line-height: 1.5;
}

/* ── Waitlist Modal ────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 8, 12, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal-dialog {
  width: 100%;
  max-width: 460px;
  background: var(--qp-panel);
  border: 1px solid rgba(230, 190, 100, 0.42);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--qp-line);
  background: var(--qp-panel-alt);
}

.modal-head h3 {
  font-family: var(--qp-mono);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--qp-text);
}

.modal-close {
  border: 1px solid var(--qp-line);
  background: var(--qp-bg);
  color: var(--qp-muted);
  border-radius: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--qp-gold);
  border-color: var(--qp-gold);
}

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--qp-level);
}

.modal-perks li::before {
  content: "◈ ";
  color: var(--qp-gold);
  font-family: var(--qp-mono);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.modal-form label {
  font-family: var(--qp-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--qp-muted);
}

.modal-form .input-dark {
  width: 100%;
  min-width: 0;
}

/* ── Loading & Error States ────────────────────────────────────────────────── */
.empty-state {
  padding: 24px 16px;
  text-align: center;
  font-family: var(--qp-mono);
  font-size: 12px;
  color: var(--qp-muted);
  background: var(--qp-panel-alt);
  border: 1px dashed var(--qp-line);
  border-radius: 8px;
}

/* ── Responsive Breakpoints (1440px -> 390px Mobile) ───────────────────────── */
@media (max-width: 1240px) {
  .kpi-grid-7 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .bridge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .cycle-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .kpi-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    padding: 9px 12px;
    gap: 8px;
  }
  .brand-tag {
    display: none;
  }
  .btn {
    height: 30px;
    padding: 0 9px;
    font-size: 11px;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nav-tab {
    text-align: center;
    padding: 6px 4px;
    font-size: 10px;
    white-space: normal;
    line-height: 1.2;
  }
  .asof-pill {
    display: none;
  }
  .shell {
    padding: 10px 12px 22px;
    gap: 11px;
  }
  .kpi-grid-7,
  .kpi-grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #cycleKpiGrid .kpi-card:last-child {
    grid-column: 1 / -1;
  }
  .kpi-card span {
    white-space: normal;
  }
  .bridge-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cycle-canvas-wrap {
    height: 290px;
    min-height: 250px;
  }
  .pro-banner-form {
    width: 100%;
  }
  .pro-banner-form .input-dark {
    width: 100%;
    min-width: 0;
  }
  .pro-banner-form .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .kpi-card strong {
    font-size: 13.5px;
  }
  .card {
    padding: 11px 12px;
  }
  .card-head .badge {
    white-space: normal;
    line-height: 1.35;
    max-width: 100%;
  }
}
