/* Primary Engine frame parity: the original SaaS keeps the recommendation
   workflow, the two summary cards, and the verbose detail lane in one
   bordered cabinet below the product tabs. The wrapper is presentation-only;
   the published target, private-review boundary, and verification semantics
   remain owned by their existing child surfaces. */
.qe-primary-frame {
  background: #0e0f13;
  border: 1px solid var(--qe-border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  box-sizing: border-box;
  display: block;
  margin: 4px 0 14px;
  max-width: 100%;
  min-width: 0;
  order: 30;
  padding: 14px 18px;
}

.qe-primary-frame[hidden] { display: none !important; }

.qe-primary-frame > .qe-original-workflow,
.qe-primary-frame > .qe-original-recommendation,
.qe-primary-frame > .qe-original-detail-lane,
.qe-primary-frame > .qe-original-stacked-section {
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}

.qe-primary-frame > .qe-original-workflow { margin-top: 0; }
.qe-primary-frame > .qe-original-detail-lane { margin-bottom: 0; }

@media (max-width: 590px) {
  .qe-primary-frame { margin-top: 6px; padding-inline: 12px; }
}

/* Literal old-SaaS sidebar-tool composition, fed by validated
   published snapshots.  The geometry and visual grammar follow the donor
   popup instead of the retired generic metric-card substitute. */
.qe-context-dialog-card {
  width: min(900px, calc(100vw - 60px)) !important;
  max-width: 900px !important;
  max-height: var(--qe-dialog-room, 90vh) !important;
  overflow: auto !important;
  padding: 20px 22px;
  border-radius: 14px;
}
.qe-context-dialog-heading { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.qe-context-dialog-heading .qe-eyebrow { display: none; }
.qe-context-dialog-heading::before { content: ""; width: 3px; height: 18px; border-radius: 2px; background: var(--gold); flex: none; }
.qe-context-dialog-heading h2 { font-size: 15px; font-weight: 650; letter-spacing: .2px; }
#qe-context-dialog-close { background: transparent; color: var(--text2); border: 1px solid var(--border); padding: 5px 12px; border-radius: 8px; font-size: 11px; }
#qe-context-dialog-summary { display: none; }
.qe-context-dialog-actions[hidden] { display: none !important; }
.qe-context-dialog-actions { margin: 0 0 10px; }
.qe-context-dialog-actions button { padding: 5px 10px; font-size: 11px; }
#qe-context-dialog-result { overflow: visible !important; max-height: none !important; border: 0 !important; padding: 0 !important; }
.v33-parity-tool { color: var(--text); font-size: 12px; }
.v33-parity-hint { margin: 0 0 8px; color: var(--text2); font-size: 13px; line-height: 1.55; }
.v33-parity-hint b { color: var(--text); }
.v33-parity-meta { margin: 0 0 12px; color: var(--text2); font-size: 10.5px; }
.v33-parity-tool h4 { margin: 12px 0 8px; color: var(--text); font-size: 11px; letter-spacing: .025em; }
.v33-parity-hero { display: flex; justify-content: space-between; gap: 20px; align-items: stretch; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.018); }
.v33-parity-hero > div:first-child { flex: 1; min-width: 0; }
.v33-parity-horizon { display: flex; width: max-content; margin-bottom: 8px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.v33-parity-horizon span { padding: 3px 13px; color: var(--text-3); font: 9px var(--mono); }
.v33-parity-horizon span[data-active="true"] { color: #111; background: var(--gold); }
.v33-parity-hero h3 { margin: 0 0 7px; font-size: 20px; letter-spacing: .02em; }
.v33-parity-hero p { margin: 0; color: var(--text2); }
.v33-parity-hero-stats { display: flex; min-width: 130px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.v33-parity-hero-stats strong { color: var(--green); font-size: 25px; }
.v33-parity-hero-stats span { color: var(--text-3); font: 9px var(--mono); }
.v33-parity-map { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(76px, auto); overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.v33-parity-map article { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 8px; padding: 9px; border-right: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); background: #17243a; }
.v33-parity-map article[data-tone="positive"] { background: rgba(13,111,75,.68); }
.v33-parity-map article[data-tone="negative"] { background: rgba(122,35,41,.7); }
.v33-parity-map-themes article[data-prominent="true"] { grid-column: span 2; grid-row: span 2; }
.v33-parity-map article strong { overflow: hidden; color: #e9edf3; font-size: 11px; text-overflow: ellipsis; }
.v33-parity-map article span { color: #f4f6f8; font: 700 13px var(--mono); }
.v33-parity-cycle { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; }
.v33-parity-cycle-wheel { display: flex; width: 220px; aspect-ratio: 1; margin: 0 auto; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle at center, var(--card) 0 39%, transparent 40%), conic-gradient(#c89b3c 0 25%, #17372f 25% 50%, #43202a 50% 75%, #3a3020 75%); border: 1px solid var(--border); }
.v33-parity-cycle-wheel span { color: var(--text-3); font: 9px var(--mono); }
.v33-parity-cycle-wheel strong { max-width: 120px; color: var(--gold); font-size: 16px; text-align: center; }
.v33-parity-map-cycle { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v33-parity-detectors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v33-parity-detectors article { position: relative; display: flex; min-height: 78px; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-left: 3px solid var(--text-3); border-radius: 9px; background: var(--bg); }
.v33-parity-detectors article[data-tone="positive"] { border-left-color: var(--green); }
.v33-parity-detectors article[data-tone="negative"] { border-left-color: var(--red); }
.v33-parity-detectors article b { position: absolute; top: 10px; right: 10px; color: var(--text2); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; font: 9px var(--mono); }
.v33-parity-detectors article span, .v33-parity-detectors article small { color: var(--text2); font: 10.5px var(--mono); }
.v33-parity-tool-title { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.v33-parity-tool-title h3 { margin: 0; font-size: 15px; }
.v33-parity-tool-title b { padding: 3px 9px; color: var(--green); background: rgba(46,230,154,.12); border: 1px solid rgba(46,230,154,.22); border-radius: 14px; font-size: 10px; }
.v33-parity-ai-capex > p, .v33-parity-smart-money > p { margin: 0 0 10px; color: var(--text2); line-height: 1.5; }
.v33-parity-sequence { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(223,187,100,.035); }
.v33-parity-sequence > h4 { margin: 0 0 6px; }
.v33-parity-sequence > p { margin: 0 0 10px; color: var(--text2); }
.v33-parity-sequence > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.v33-parity-sequence article { display: flex; min-height: 58px; flex-direction: column; justify-content: center; gap: 5px; padding: 9px; border: 1px solid rgba(223,187,100,.28); border-radius: 7px; background: rgba(5,7,12,.72); }
.v33-parity-sequence article[data-tone="positive"] { border-bottom-color: var(--green); }
.v33-parity-sequence article[data-tone="negative"] { border-bottom-color: var(--red); }
.v33-parity-sequence article span { color: var(--text2); font-size: 10.5px; }
.v33-parity-risk-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.v33-parity-risk-grid article { position: relative; display: flex; min-height: 126px; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid rgba(223,187,100,.28); border-left: 3px solid var(--gold); border-radius: 9px; background: rgba(5,7,12,.78); }
.v33-parity-risk-grid article[data-tone="positive"] { border-left-color: var(--green); }
.v33-parity-risk-grid article[data-tone="negative"] { border-left-color: var(--red); }
.v33-parity-risk-grid article > strong { max-width: 75%; font-size: 14px; }
.v33-parity-risk-grid article > b { position: absolute; top: 12px; right: 10px; padding: 2px 6px; color: var(--gold); border: 1px solid currentColor; border-radius: 5px; font: 9px var(--mono); }
.v33-parity-risk-grid article > span { margin-top: auto; color: var(--text2); font: 10.5px var(--mono); }
.v33-parity-smart-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.v33-parity-smart-grid article { position: relative; display: flex; min-height: 154px; flex-direction: column; gap: 7px; padding: 12px; border: 1px solid rgba(223,187,100,.28); border-left: 3px solid var(--gold); border-radius: 9px; background: rgba(5,7,12,.78); }
.v33-parity-smart-grid article[data-tone="positive"] { border-left-color: var(--green); }
.v33-parity-smart-grid article[data-tone="negative"] { border-left-color: var(--red); }
.v33-parity-smart-grid h3 { margin: 0; font-size: 16px; }
.v33-parity-smart-grid b { position: absolute; top: 11px; right: 10px; padding: 2px 7px; color: var(--green); border: 1px solid currentColor; border-radius: 5px; font: 9px var(--mono); }
.v33-parity-smart-grid p { margin: 0; color: var(--text2); font-size: 11px; line-height: 1.45; }
.v33-parity-smart-grid span { margin-top: auto; color: var(--text); font: 10.5px var(--mono); }
.v33-parity-smart-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.v33-parity-smart-totals > div { display: flex; flex-direction: column; gap: 5px; padding: 10px; border: 1px solid var(--border); border-radius: 7px; }
.v33-parity-smart-totals span { color: var(--text2); font-size: 10px; }
.v33-parity-smart-totals strong { font: 14px var(--mono); }
.v33-parity-gauge-row { display: grid; grid-template-columns: 1.25fr .9fr; gap: 14px; }
.v33-parity-gauge, .v33-parity-reading { padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: #10182a; }
.v33-parity-gauge h4, .v33-parity-reading h4 { margin-top: 0; color: var(--text2); font-size: 12px; }
.v33-parity-gauge-bar { position: relative; height: 31px; margin: 15px 0 10px; border-radius: 8px; background: linear-gradient(90deg,#8fad9d 0%,#e2be52 52%,#ff6b55 100%); }
.v33-parity-gauge-bar::after { content: ""; position: absolute; top: -4px; left: var(--score); width: 3px; height: 39px; border-radius: 2px; background: white; box-shadow: 0 0 8px rgba(255,255,255,.75); }
.v33-parity-gauge > strong { margin-right: 12px; color: var(--gold); font-size: 14px; }
.v33-parity-gauge > span, .v33-parity-reading p { color: var(--text2); font-size: 11px; }
.v33-parity-reading p { margin: 6px 0; }
.v33-parity-asset-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.v33-parity-asset-tiles article { display: flex; min-height: 60px; flex-direction: column; justify-content: space-between; padding: 11px; border: 1px solid var(--border); border-left: 3px solid var(--text-3); border-radius: 8px; background: var(--bg); }
.v33-parity-asset-tiles article[data-tone="positive"] { border-left-color: var(--green); }
.v33-parity-asset-tiles article[data-tone="negative"] { border-left-color: var(--red); }
.v33-parity-asset-tiles span { color: var(--text2); font-size: 10px; }
.v33-parity-asset-tiles strong { color: var(--text); font: 15px var(--mono); }
.v33-parity-feature-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.v33-parity-feature-cards article { display: flex; min-height: 104px; flex-direction: column; gap: 8px; padding: 15px; border: 1px solid rgba(223,187,100,.24); border-radius: 12px; background: linear-gradient(135deg,rgba(18,28,47,.96),rgba(8,12,22,.98)); }
.v33-parity-feature-cards article[data-tone="positive"] { border-color: rgba(46,230,154,.28); }
.v33-parity-feature-cards article[data-tone="warning"] { border-color: rgba(223,187,100,.34); }
.v33-parity-feature-cards small { color: var(--text2); font-size: 10px; letter-spacing: .06em; }
.v33-parity-feature-cards strong { color: var(--gold); font-size: 18px; }
.v33-parity-feature-cards span { color: var(--text2); font-size: 11px; line-height: 1.45; }
.v33-parity-snapshot-chart { margin-top: 14px; padding: 14px; border: 1px solid rgba(223,187,100,.24); border-radius: 10px; background: rgba(5,7,12,.72); }
.v33-parity-snapshot-chart > h4 { margin: 0 0 14px; color: var(--text2); font-size: 11px; font-weight: 500; }
.v33-parity-snapshot-chart > div { display: flex; min-height: 150px; align-items: end; gap: 8px; padding: 16px 8px 0; border-bottom: 1px solid rgba(223,187,100,.18); background: linear-gradient(180deg,rgba(25,36,56,.46),rgba(5,7,12,.18)); }
.v33-parity-snapshot-chart article { display: flex; min-width: 0; flex: 1; height: 130px; flex-direction: column; justify-content: end; align-items: stretch; gap: 5px; }
.v33-parity-snapshot-chart i { display: block; height: var(--magnitude); min-height: 8px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg,rgba(223,187,100,.9),rgba(223,187,100,.25)); }
.v33-parity-snapshot-chart article[data-tone="positive"] i { background: linear-gradient(180deg,rgba(46,230,154,.9),rgba(46,230,154,.22)); }
.v33-parity-snapshot-chart article[data-tone="negative"] i { background: linear-gradient(180deg,rgba(255,82,96,.9),rgba(255,82,96,.22)); }
.v33-parity-snapshot-chart span { overflow: hidden; color: var(--text2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.v33-parity-snapshot-chart strong { font: 10px var(--mono); }
.v33-parity-why { margin: 14px 0 0; padding: 11px 14px; color: var(--text2); border: 1px solid rgba(223,187,100,.2); border-radius: 8px; background: rgba(223,187,100,.06); font-size: 11px; line-height: 1.45; }
.v33-parity-claude { margin-top: 16px; padding: 12px; border: 1px solid rgba(223,187,100,.28); border-radius: 10px; background: rgba(223,187,100,.045); }
.v33-parity-claude-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.v33-parity-claude-head strong { color: #dfbb64; font-size: 11px; letter-spacing: .08em; }
.v33-parity-claude-head span { color: var(--qe-muted, #b7c0ce); font-size: 10.5px; }
.v33-parity-claude-head select { margin-left: auto; min-width: 180px; }
.v33-parity-claude-presets { display: flex; gap: 6px; margin-bottom: 8px; }
.v33-parity-claude-presets button { padding: 6px 12px; font-size: 12px; color: #e6edf3; background: #263244; border: 1px solid #64748b; border-radius: 6px; cursor: pointer; }
.v33-parity-claude textarea { box-sizing: border-box; width: 100%; resize: vertical; }
.v33-parity-claude .v33-parity-claude-submit { margin-top: 9px; padding: 9px 14px; color: #15120a; background: #dfbb64; border: 1px solid #dfbb64; border-radius: 7px; font-weight: 750; cursor: pointer; }
.v33-parity-claude button:disabled { color: #d5deea; background: #334155; border-color: #64748b; opacity: 1; cursor: not-allowed; }
.v33-parity-claude button:focus-visible, .v33-parity-claude textarea:focus-visible, .v33-parity-claude select:focus-visible { outline: 2px solid #f4d588; outline-offset: 3px; }
.v33-parity-claude button:not(:disabled):hover { filter: brightness(1.12); }
.qe-research-table-scroll { max-width: 100%; overflow-x: auto; }
.qe-research-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.5; }
.qe-research-table th { padding: 8px 10px; color: #b7c0ce; background: #19202b; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.qe-research-table td { padding: 10px; border-bottom: 1px solid #303846; vertical-align: top; overflow-wrap: anywhere; }
.qe-research-table td:first-child { color: #dfbb64; width: 42%; }
.qe-research-table tbody tr:nth-child(even) { background: #ffffff03; }
.qe-research-page-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.qe-research-page-controls input { flex: 1 1 160px; width: 160px; min-width: 0; }
.qe-research-page-controls button { background: #18212d; color: #dfbb64; border: 1px solid #8d753e; border-radius: 6px; padding: 10px 12px; font: inherit; cursor: pointer; }
.qe-research-page-controls button:disabled { color: #a0a8b4; border-color: #414a57; cursor: default; }
.qe-research-page-controls :is(button,input):focus-visible { outline: 2px solid #dfbb64; outline-offset: 2px; }
.qe-research-page-controls [role="status"] { flex: 1 1 150px; text-align: center; color: #b7c0ce; font-size: 13px; }
.qe-research-page-rows > :is(section,p) { margin: 0; padding: 14px 0; border-bottom: 1px solid #303846; overflow-wrap: anywhere; }
.qe-research-page-rows > section h4 { margin: 0 0 10px; color: #dfbb64; }
@media (max-width: 600px) {
  .qe-research-page-controls { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  .qe-research-page-controls input { grid-column: 1 / -1; box-sizing: border-box; width: 100%; }
  .qe-research-page-controls [role="status"] { min-width: 0; overflow-wrap: anywhere; }
}
.qe-congress-observations > p { color: #b7c0ce; font-size: 11px; line-height: 1.5; }
.qe-model-details table { width: 100%; border-collapse: collapse; font-size: 11px; line-height: 1.4; }
.qe-model-details th { padding: 8px 10px; text-align: left; color: #a7afbc; background: #16171d; font-size: 10px; white-space: nowrap; }
.qe-model-details td { padding: 8px 10px; text-align: left; vertical-align: middle; }
.qe-model-details tr[data-model-row] td { border-top: 1px solid #30313a; }
.qe-model-details tr[data-model-row]:hover { background: #ffffff04; }
.qe-model-details th:nth-child(n+5), .qe-model-details tr[data-model-row] td:nth-child(n+5) { text-align: right; white-space: nowrap; }
.qe-model-details .qe-model-rationale-row td { padding: 0 10px 8px; text-align: left; color: #a7afbc; font-size: 10px; white-space: normal; }
.qe-model-details .qe-model-rationale-row td[data-risk-disclosure="true"] { color: #dfbb64; }
@media (max-width: 760px) {
  .qe-context-dialog-card { width: calc(100vw - 18px); padding: 14px; }
  .v33-parity-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v33-parity-cycle, .v33-parity-gauge-row { grid-template-columns: 1fr; }
  .v33-parity-detectors { grid-template-columns: 1fr; }
  .v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-smart-totals, .v33-parity-feature-cards { grid-template-columns: 1fr; }
  .v33-parity-asset-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v33-parity-claude-head { align-items: flex-start; flex-direction: column; }
  .v33-parity-claude-head select { width: 100%; margin-left: 0; }
}

@media (max-width: 767px) {
  body:not(.qe-rail-collapsed) .qe-tools-rail {
    z-index: 80;
  }
}

@media (max-width: 590px) {
  .qe-product-tabs {
    height: 147px;
    margin-top: 16px;
    scroll-padding-inline: 6px;
  }
  .qe-product-tabs button {
    flex-basis: 122px;
    height: 147px;
    min-height: 147px;
    min-width: 122px;
    scroll-margin-inline: 6px;
  }
  /* The product cabinet is taller in the phone reference; retain the
     recommendation heading's measured position after that fold correction. */
  .qe-original-workflow { margin-top: 20px; }
  .qe-bottom-bar {
    height: 42.4px;
    max-height: 42.4px;
    min-height: 42.4px;
    overflow: hidden;
  }
}

/* The Portfolio workspace intentionally hides the legacy target mount.  Its
   two live panels must therefore own the cabinet width instead of inheriting
   the engine-picks two-column placement and leaving an empty first column. */
@media (min-width: 701px) {
  body[data-workspace-view="portfolio"] .qe-command-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-workspace-view="portfolio"] .qe-command-grid > #qe-customer-controls,
  body[data-workspace-view="portfolio"] .qe-command-grid > #qe-watchlist {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Final bounded reference pass.  These rules only tune the existing shell
   surfaces: no retired provider controls or new interaction paths are added.
   The reference modal is centered in the document's client width (excluding
   the vertical scrollbar), while the macro detail is an inline continuation
   of the macro row rather than a second modal close affordance. */
body.qe-workspace {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.qe-brand {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
}

.qe-tools-rail button,
.qe-rail-link {
  font-family: inherit; /* the deck's face; was the donor's UA Arial (owner QA P2 #17) */
  font-size: 11px;
  line-height: normal;
  padding: 8px 14px;
}

.qe-product-tabs button {
  font-size: 18px;
}


/* Literal old-SaaS Settings shell. Historical compatibility ids remain so the
   verified focus and authorization bindings keep their exact contract. */
#qe-settings-panel.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
}
#qe-settings-panel.modal-backdrop:not([hidden]) { display: flex; }
#qe-settings-panel .modal {
  width: 960px;
  max-width: 96vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg2, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
#qe-settings-panel #qe-settings-content {
  /* Preserve the reference modal's 895px readable content column inside its
     960px outer frame (the frame itself remains the stable desktop width). */
  width: 100%;
  max-width: 895px;
}
#qe-settings-panel .qe-original-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#qe-settings-panel .qe-original-settings-head h2 { margin: 0; font-size: 18px; }
#qe-settings-panel .qe-original-settings-head button {
  padding: 2px 8px;
  color: var(--text2, #8b949e);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 6px;
}
#qe-settings-panel .qe-original-settings-head button:hover,
#qe-settings-panel .qe-original-settings-head button:focus-visible {
  color: var(--text, #e6edf3);
  background: var(--bg3, #1c2128);
  outline: none;
}
#qe-settings-panel .set-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 16px;
  border-bottom: 1px solid var(--border, #30363d);
}
#qe-settings-panel .set-tab {
  padding: 8px 14px;
  color: var(--text2, #8b949e);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
#qe-settings-panel .set-tab:hover { color: var(--text, #e6edf3); }
#qe-settings-panel .set-tab.active { color: var(--text, #e6edf3); border-bottom-color: var(--blue, #dfbb64); }
#qe-settings-panel .set-tabpanel { display: none; }
#qe-settings-panel .set-tabpanel.active { display: block; }
#qe-settings-panel .qe-settings-section { padding-top: 0; margin-top: 0; border-top: 0; }
#qe-settings-panel .qe-settings-section h3 {
  margin: 6px 0 10px;
  color: var(--text, #e6edf3);
  font: 700 13px/1.3 inherit;
  letter-spacing: 0;
  text-transform: none;
}
#qe-settings-panel .qe-settings-row { padding: 8px 0; border-top-color: var(--border, #30363d); }
#qe-settings-panel .qe-settings-row dt { color: var(--text2, #8b949e); font-size: 12px; }
#qe-settings-panel .qe-settings-row dd { color: var(--text, #e6edf3); font-size: 12px; }
#qe-settings-panel .qe-settings-section > p { color: var(--text2, #8b949e); font-size: 11.5px; line-height: 1.6; }
#qe-settings-panel .qe-settings-contract-data { display: none !important; }
#qe-settings-panel .qe-donor-plan-card {
  background: var(--bg, #0d1117);
  border: 1px solid var(--border, #30363d);
  border-radius: 9px;
  margin-bottom: 14px;
  padding: 12px 14px;
}
#qe-settings-panel .qe-donor-plan-heading { align-items: baseline; display: flex; gap: 9px; }
#qe-settings-panel .qe-donor-plan-heading span {
  color: var(--text2, #8b949e);
  font: 600 9px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: .1em;
}
#qe-settings-panel .qe-donor-plan-heading strong { color: var(--text, #e6edf3); font-size: 18px; }
#qe-settings-panel .qe-donor-plan-heading small { color: var(--text2, #8b949e); font-size: 10px; }
#qe-settings-panel .qe-donor-plan-card ul { color: var(--text2, #8b949e); font-size: 12px; line-height: 1.55; margin: 7px 0 0; padding-left: 20px; }
#qe-settings-panel .qe-donor-plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#qe-settings-panel .qe-donor-plan-sign-out { display: contents; }
#qe-settings-panel .qe-donor-plan-actions button {
  background: var(--bg, #0d1117);
  border: 1px solid var(--border, #30363d);
  border-radius: 5px;
  color: var(--text2, #8b949e);
  cursor: pointer;
  font: 11.5px/1.2 inherit;
  padding: 7px 12px;
}
#qe-settings-panel .qe-donor-plan-actions button:hover { border-color: var(--blue, #dfbb64); color: var(--text, #e6edf3); }
#qe-settings-panel .qe-donor-plan-actions button.danger { border-color: rgb(248 81 73 / 60%); color: #bf929a; }
#qe-settings-panel .qe-donor-plan-action-status { color: var(--text2, #8b949e); font-size: 10.5px; margin: 7px 0 0; min-height: 0; }
#qe-settings-panel .qe-donor-plan-action-status:empty { display: none; }
#qe-settings-panel .qe-donor-settings-intro {
  background: rgb(223 187 100 / 5%);
  border: 1px solid var(--border, #30363d);
  border-left: 3px solid var(--blue, #dfbb64);
  border-radius: 7px;
  color: var(--text2, #8b949e);
  font-size: 11.5px;
  line-height: 1.55;
  margin-bottom: 16px;
  padding: 10px 12px;
}
#qe-settings-panel .qe-donor-settings-intro strong { color: var(--text, #e6edf3); }
#qe-settings-panel .qe-donor-settings-section { border-top: 1px solid var(--border, #30363d); padding-top: 14px; }
#qe-settings-panel .qe-donor-settings-section > label,
#qe-settings-panel .qe-donor-profile-section > label { color: var(--text, #e6edf3); display: block; font-size: 12.5px; font-weight: 600; }
#qe-settings-panel .qe-donor-profile-section > label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
#qe-settings-panel .qe-donor-settings-opt {
  background: rgb(223 187 100 / 12%);
  border-radius: 999px;
  color: var(--blue, #dfbb64);
  font: 600 9px/1 "IBM Plex Mono", monospace;
  margin-left: 5px;
  padding: 2px 6px;
}
#qe-settings-panel .qe-donor-settings-hint { color: var(--text2, #8b949e); font-size: 10.5px; font-weight: 400; margin-left: 4px; }
#qe-settings-panel .qe-donor-settings-desc { color: var(--text2, #8b949e); font-size: 11.5px; line-height: 1.55; margin: 6px 0 9px; }
#qe-settings-panel .qe-donor-key-row { align-items: center; display: flex; gap: 6px; }
#qe-settings-panel .qe-donor-key-row input {
  flex: 1;
  min-width: 0;
}
#qe-settings-panel .qe-donor-key-row button { background: var(--blue, #dfbb64); border: 0; border-radius: 6px; color: #241a05; font-size: 11.5px; font-weight: 700; padding: 8px 14px; }
#qe-settings-panel .qe-donor-settings-section > p:last-child { color: var(--text2, #8b949e); font-size: 11px; margin: 5px 0 0; }
#qe-settings-panel .qe-donor-validation-section { margin-top: 14px; }
#qe-settings-panel .qe-donor-validation-section select {
  margin-top: 7px;
  width: 100%;
}
#qe-settings-panel .qe-donor-token-note { background: rgb(223 187 100 / 6%); border-left: 3px solid var(--blue, #dfbb64); border-radius: 0 6px 6px 0; color: var(--text2, #8b949e); font-size: 11.5px; line-height: 1.5; padding: 8px 10px; }
#qe-settings-panel .qe-donor-token-note strong { color: var(--text, #e6edf3); }
#qe-settings-panel .qe-donor-profile-section { margin-top: 6px; }
#qe-settings-panel .qe-donor-profile-row { align-items: center; display: flex; gap: 8px; margin: 8px 0 16px; }
#qe-settings-panel .qe-donor-profile-row button { background: rgb(143 173 157 / 10%); border: 1px solid rgb(143 173 157 / 35%); border-radius: 7px; color: #8fad9d; cursor: pointer; font-size: 13px; font-weight: 700; padding: 8px 16px; }
#qe-settings-panel .qe-donor-profile-row span { color: var(--text2, #8b949e); font-size: 11px; }
#qe-settings-panel .qe-donor-account-card { background: var(--bg, #0d1117); border: 1px dashed var(--border, #30363d); border-radius: 6px; display: grid; gap: 4px; margin-top: 8px; padding: 10px 11px; }
#qe-settings-panel .qe-donor-account-card strong { color: #8fad9d; font-size: 12px; }
#qe-settings-panel .qe-donor-account-card span { color: var(--text, #e6edf3); font-size: 12px; }
#qe-settings-panel .qe-donor-account-card small { color: var(--text2, #8b949e); }
/* Connect a broker -- Alpaca: the donor's inline geometry and colours
   (dashboard_ui.html Alpaca set-section; dashboard-main-formatting-jobs.js
   refreshAlpacaStatus), carried as classes because this deck's CSP keeps
   runtime styles out of the markup. */
#qe-settings-panel .qe-broker-settings { margin-top: 16px; }
#qe-settings-panel .qe-broker-muted { color: var(--text-3, #6e7681); }
#qe-settings-panel .qe-broker-note { color: var(--text2, #8b949e); font-size: 11.5px; line-height: 1.55; margin: 4px 0 0; }
#qe-settings-panel .qe-broker-accounts { display: flex; flex-direction: column; gap: 5px; margin: 6px 0; }
#qe-settings-panel .qe-broker-empty { color: var(--text2, #8b949e); font-size: 11px; }
#qe-settings-panel .qe-broker-empty a { color: var(--blue, #58a6ff); }
#qe-settings-panel .qe-broker-account { align-items: center; background: var(--bg2, #161b22); border: 1px solid var(--border, #30363d); border-radius: 6px; display: flex; gap: 8px; padding: 6px 9px; }
#qe-settings-panel .qe-broker-account-text { flex: 1; min-width: 0; }
#qe-settings-panel .qe-broker-account-name { color: var(--text, #e6edf3); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
#qe-settings-panel .qe-broker-account-key { color: var(--text2, #8b949e); font: 10.5px/1.4 "IBM Plex Mono", monospace; overflow-wrap: anywhere; }
#qe-settings-panel .qe-broker-badge { border-radius: 4px; font-size: 10px; font-weight: 400; margin-left: 5px; padding: 1px 6px; }
#qe-settings-panel .qe-broker-badge.paper { background: rgb(251 191 36 / 18%); color: #fbbf24; }
#qe-settings-panel .qe-broker-badge.live { background: rgb(143 173 157 / 18%); color: #8fad9d; }
#qe-settings-panel .qe-broker-default { color: var(--green, #8fad9d); font-size: 11px; font-weight: 600; white-space: nowrap; }
#qe-settings-panel .qe-broker-use,
#qe-settings-panel .qe-broker-remove { background: var(--bg, #0d1117); border: 1px solid var(--border, #30363d); border-radius: 4px; color: var(--text2, #8b949e); cursor: pointer; font-size: 10.5px; padding: 3px 8px; white-space: nowrap; }
#qe-settings-panel .qe-broker-remove { border-color: rgb(248 81 73 / 40%); color: var(--red, #bf929a); }
#qe-settings-panel .qe-broker-confirm { align-items: center; background: var(--bg, #0d1117); border: 1px solid rgb(248 81 73 / 40%); border-radius: 6px; display: flex; flex-wrap: wrap; gap: 6px; padding: 7px 9px; }
#qe-settings-panel .qe-broker-confirm p { color: var(--text2, #8b949e); flex-basis: 100%; font-size: 11px; margin: 0; }
#qe-settings-panel .qe-broker-confirm button { background: var(--bg, #0d1117); border: 1px solid var(--border, #30363d); border-radius: 4px; color: var(--text2, #8b949e); cursor: pointer; font-size: 10.5px; padding: 3px 8px; }
#qe-settings-panel .qe-broker-confirm button:first-of-type { border-color: rgb(248 81 73 / 60%); color: var(--red, #bf929a); }
#qe-settings-panel .qe-broker-add { border: 1px dashed var(--border, #30363d); border-radius: 6px; margin-top: 6px; padding: 8px; }
#qe-settings-panel .qe-broker-add-title { color: var(--text2, #8b949e); font-size: 11px; margin-bottom: 5px; }
#qe-settings-panel .qe-broker-add input[type="text"],
#qe-settings-panel .qe-broker-add input[type="password"] { box-sizing: border-box; display: block; margin-bottom: 6px; width: 100%; }


#qe-settings-panel .qe-broker-add-row { align-items: center; display: flex; gap: 8px; }
#qe-settings-panel .qe-broker-paper { align-items: center; color: var(--text2, #8b949e); cursor: pointer; display: flex; font-size: 11px; font-weight: 400; gap: 5px; margin: 0; }
#qe-settings-panel .qe-broker-paper input { margin: 0; }
#qe-settings-panel .qe-broker-add-button { background: #dfbb64; border: 0; border-radius: 5px; color: #241a05; cursor: pointer; font-size: 11.5px; font-weight: 600; margin-left: auto; padding: 7px 14px; }
#qe-settings-panel .qe-broker-add-button:disabled { cursor: not-allowed; opacity: .55; }
#qe-settings-panel .qe-broker-status { color: var(--text2, #8b949e); font-size: 11px; margin-top: 5px; }
#qe-settings-panel .qe-broker-status:empty { display: none; }
#qe-settings-panel .qe-donor-schedule-box { border-top: 1px solid var(--border, #30363d); margin-top: 18px; padding-top: 14px; }
#qe-settings-panel .qe-donor-schedule-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 8px; }
#qe-settings-panel .qe-donor-schedule-heading strong { color: var(--text, #e6edf3); font-size: 13px; }
#qe-settings-panel .qe-donor-schedule-heading span { border: 1px solid var(--border, #30363d); border-radius: 6px; color: var(--text2, #8b949e); padding: 4px 10px; }

/* The original renderer writes these declarations inline, but the strict
   CSP intentionally refuses runtime inline CSS. These classes are the exact
   CSP-safe geometry/color equivalent for the copied Step 3 allocation rows. */
#v33-me-model .es-model-row {
  align-items: center;
  display: flex;
  font-variant-numeric: tabular-nums;
  gap: 6px;
  padding: 2px 0;
}
/* The published position rows carry the sleeve each holding belongs to.
   A fixed width keeps the symbol column aligned whether the word is Core or
   Satellite, and the muted treatment keeps it subordinate to the weight. */
#v33-me-model .es-model-sleeve {
  color: #94a3b8;
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  min-width: 58px;
  text-transform: uppercase;
}
#v33-me-model .es-action-pill {
  border: 1px solid rgb(148 163 184 / 33%);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 600;
  min-width: 56px;
  padding: 1px 5px;
  text-align: center;
}
#v33-me-model .es-action-pill[data-action="BUY_NEW"] { background: rgb(143 173 157 / 13%); border-color: rgb(143 173 157 / 33%); color: #8fad9d; }
#v33-me-model .es-action-pill[data-action="ADD"] { background: rgb(134 239 172 / 13%); border-color: rgb(134 239 172 / 33%); color: #a4bdb0; }
#v33-me-model .es-action-pill[data-action="TRIM"] { background: rgb(251 191 36 / 13%); border-color: rgb(251 191 36 / 33%); color: #fbbf24; }
#v33-me-model .es-action-pill[data-action="SELL"] { background: rgb(191 146 154 / 13%); border-color: rgb(191 146 154 / 33%); color: #bf929a; }
#v33-me-model .es-model-symbol { flex: 1; }
#v33-me-model .es-model-allocation { color: var(--text2); cursor: pointer; font-size: 11px; min-width: 118px; text-align: right; }
#v33-me-model .es-model-allocation b { color: var(--text); }
#v33-me-model .es-model-delta { color: var(--text2); font-size: 11px; min-width: 58px; text-align: right; }
#v33-me-model .es-model-delta[data-action="BUY_NEW"] { color: #8fad9d; }
#v33-me-model .es-model-delta[data-action="ADD"] { color: #a4bdb0; }
#v33-me-model .es-model-delta[data-action="TRIM"] { color: #fbbf24; }
#v33-me-model .es-model-delta[data-action="SELL"] { color: #bf929a; }
#v33-me-model .es-model-more { color: var(--text2); font-size: 10px; margin-top: 4px; }
#v33-me-model .es-model-total { border-top: 1px solid var(--border); display: flex; font-size: 11px; font-variant-numeric: tabular-nums; justify-content: space-between; margin-top: 5px; padding-top: 4px; }
#v33-me-model .es-model-total > span { color: var(--text2); font-weight: 700; letter-spacing: .04em; }
#v33-me-model .es-model-total > strong { color: var(--text); font-style: normal; font-weight: 700; }
#v33-me-model .es-model-total em { color: #fcd34d; font-style: normal; font-weight: 600; }
#v33-me-portfolio .es-model-row { align-items:center; display:flex; font-variant-numeric:tabular-nums; gap:6px; padding:2px 0; }
#v33-me-portfolio .es-action-pill,
#v33-verbose-portfolio .es-action-pill { border:1px solid rgb(148 163 184 / 33%); border-radius:6px; color:#94a3b8; font-size:9px; font-weight:600; min-width:56px; padding:1px 5px; text-align:center; }
:is(#v33-me-portfolio, #v33-verbose-portfolio) .es-action-pill[data-action="BUY_NEW"] { background:rgb(143 173 157 / 13%); border-color:rgb(143 173 157 / 33%); color:#8fad9d; }
:is(#v33-me-portfolio, #v33-verbose-portfolio) .es-action-pill[data-action="ADD"] { background:rgb(134 239 172 / 13%); border-color:rgb(134 239 172 / 33%); color:#a4bdb0; }
:is(#v33-me-portfolio, #v33-verbose-portfolio) .es-action-pill[data-action="TRIM"] { background:rgb(251 191 36 / 13%); border-color:rgb(251 191 36 / 33%); color:#fbbf24; }
:is(#v33-me-portfolio, #v33-verbose-portfolio) .es-action-pill[data-action="SELL"] { background:rgb(191 146 154 / 13%); border-color:rgb(191 146 154 / 33%); color:#bf929a; }
#v33-me-portfolio .es-model-symbol { flex:1; }
#v33-me-portfolio .es-model-allocation { color:var(--text2); cursor:pointer; font-size:11px; min-width:118px; text-align:right; }
#v33-me-portfolio .es-model-allocation b { color:var(--text); }
#v33-me-portfolio .es-model-delta { color:var(--text2); font-size:11px; min-width:58px; text-align:right; }
#v33-me-portfolio .es-model-delta[data-action="BUY_NEW"] { color:#8fad9d; }
#v33-me-portfolio .es-model-delta[data-action="ADD"] { color:#a4bdb0; }
#v33-me-portfolio .es-model-delta[data-action="TRIM"] { color:#fbbf24; }
#v33-me-portfolio .es-model-delta[data-action="SELL"] { color:#bf929a; }
#v33-me-portfolio .es-model-more { color:var(--text2); font-size:10px; margin-top:4px; }
#v33-me-portfolio .es-model-total { border-top:1px solid var(--border); display:flex; font-size:11px; font-variant-numeric:tabular-nums; justify-content:space-between; margin-top:5px; padding-top:4px; }
#v33-me-portfolio .es-model-total > span { color:var(--text2); font-weight:700; letter-spacing:.04em; }
#v33-me-portfolio .es-model-total > strong { color:var(--text); font-weight:700; }
#v33-verbose-portfolio .es-portfolio-verbose-heading { align-items:center; display:flex; justify-content:space-between; margin-bottom:10px; }
#v33-verbose-portfolio .es-portfolio-verbose-heading span { color:var(--text2); font-size:10px; }
#v33-verbose-portfolio .es-portfolio-verbose-scroll { overflow-x:auto; }
#v33-verbose-portfolio table { border-collapse:collapse; font-size:11px; width:100%; }
#v33-verbose-portfolio th, #v33-verbose-portfolio td { border-bottom:1px solid var(--border); padding:6px 8px; text-align:right; }
#v33-verbose-portfolio th:nth-child(-n+2), #v33-verbose-portfolio td:nth-child(-n+2) { text-align:left; }
#qe-settings-panel .qe-donor-schedule-box dl { margin: 0; }
#qe-settings-panel .qe-donor-schedule-box > p { color: var(--text2, #8b949e); font-size: 11.5px; }
#qe-settings-panel .qe-budget-controls,
#qe-settings-panel .qe-settings-profile-control {
  padding-top: 16px;
  margin-top: 20px;
  border-top: 1px solid var(--border, #30363d);
}
#qe-settings-panel .qe-budget-controls label,
#qe-settings-panel .qe-settings-profile-control label { color: var(--text2, #8b949e); font-size: 12px; font-weight: 600; }
#qe-settings-panel .qe-budget-controls select,
#qe-settings-panel .qe-settings-profile-control select {
  min-width: 220px;
}
#qe-settings-panel .actions-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#qe-settings-panel .btn-secondary,
#qe-settings-panel .btn-primary { padding: 7px 14px; font-size: 13px; cursor: pointer; border: 1px solid var(--border, #30363d); border-radius: 6px; }
#qe-settings-panel .btn-secondary { color: var(--text2, #8b949e); background: var(--bg, #0d1117); }
#qe-settings-panel .btn-primary { color: #241a05; background: var(--accent, #dfbb64); border-color: var(--accent, #dfbb64); }

@media (min-width: 769px) {
  #qe-settings-panel { right: 15px; width: calc(100vw - 15px); }
}

@media (max-width: 430px) {
  .qe-brand {
    font-size: 12px;
  }

  .qe-product-tabs button {
    font-size: 13px;
  }
}

/* The literal donor cabinet has desktop inline flex styles. At the original
   390px phone reference, contain that intrinsic width in a swipeable tab row
   and stack its two-card comparison surfaces instead of clipping card two. */
@media (max-width: 590px) {
  #original-saas-primary-nav-root,
  #original-saas-primary-main-root,
  #v33-section-header,
  #panel-quant-etf,
  #qetf-engine-panel,
  #ltc-panel { box-sizing: border-box; max-width: 100%; min-width: 0; }

  /* All three products on one phone-width row: the strip scrolled, and its
     third tab read "INVEST" at the edge as if cut (owner QA P2 #22). */
  #v33-cabinet {
    align-items: stretch !important;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }
  #v33-cabinet > .v33-cab-tab {
    flex: 1 1 0 !important;
    font-size: 13px !important;
    min-height: 60px !important;
    min-width: 0 !important;
    padding: 10px 6px !important;
  }
  body.qe-rail-collapsed #v33-macro-row {
    padding-left: 12px !important;
    flex-wrap: wrap !important;
  }
  body.qe-rail-collapsed #v33-macro-row > :first-child { margin-left: 64px; }
  #v33-macro-row > div#v33-macro-tiles {
    order: 3;
    flex: 1 0 100% !important;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #v33-macro-row > div#v33-macro-tiles > :nth-child(5):last-child {
    grid-column: 1 / -1;
  }
  #v33-me-2col,
  #qetf-me-2col,
  #ltc-me-2col,
  .qe-quant-card-row { flex-direction: column !important; min-width: 0; }
  #v33-me-model-card,
  #v33-me-portfolio-card,
  #qetf-model-card,
  /* The backtest card sized to its SPY table's 420px (align-items: flex-start) and was clipped on a phone:
     the Difference column and the right-hand metric boxes were cut off (QA, 2026-10-02). At the row's
     width its table scrolls inside .qe-backtest-benchmark-scroll, as intended. */
  #ltc-model-card,
  .qe-quant-card-row > .qe-quant-performance-card { box-sizing: border-box; flex-basis: auto !important; width: 100%; }
}

@media (min-width: 431px) and (max-width: 768px) {
  .qe-brand {
    font-size: 12px;
  }
}

/* Final shell parity authority, measured against the original SaaS shell.
   These rules tune only the existing presentation surfaces; product behavior,
   plan semantics, and server-owned model boundaries remain unchanged. */
.qe-workspace {
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.qe-brand {
  align-items: center;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  font-weight: 700;
  gap: 2px;
  letter-spacing: normal;
  line-height: normal;
}

.qe-brand-mark {
  align-items: center;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  flex: 0 0 27px;
  height: 27px;
  justify-content: center;
  width: 27px;
}

.qe-brand-mark svg {
  display: block;
  height: 27px;
  width: 27px;
}

.qe-brand-wordmark {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  line-height: normal;
}

.qe-brand strong { font-weight: 700; }

/* Literal donor rail treatment: Lucide-style line icons, compact 11.5px
   command rows, and icon-only per-tool color on hover. */
.qe-tools-rail .v33-tool-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 28px;
  padding: 5.5px 14px;
  color: var(--text2, #8b949e);
  font-family: inherit; /* the deck's face; was the donor's UA Arial (owner QA P2 #17) */
  font-size: 11.5px;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  transition: background .14s, color .14s, border-color .14s;
}
.qe-tools-rail .v33-tool-btn[data-rail-short]::before { content: none; }
.qe-tools-rail .v33-tool-btn > span { font-weight: 600; letter-spacing: .1px; }
.qe-tools-rail .v33-tool-btn .v33-tico {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--text-3, #64748b);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color .14s, transform .14s;
}
.qe-tools-rail .v33-tool-btn:hover,
.qe-tools-rail .v33-tool-btn:focus-visible {
  color: var(--text, #e6edf3);
  background: rgba(148, 163, 184, .07) !important;
  border-left-color: var(--ic, var(--cyan, #dfbb64));
  outline: none;
}
.qe-tools-rail .v33-tool-btn:hover .v33-tico,
.qe-tools-rail .v33-tool-btn:focus-visible .v33-tico { color: var(--ic, var(--cyan, #dfbb64)); transform: translateX(1px); }
.qe-tools-rail #qe-claude-chat-rail,
.qe-tools-rail #qe-ticker-rail-open,
.qe-tools-rail #qe-screener-rail-open { --ic: #dfbb64; }
.qe-tools-rail #qe-watchlist-rail-open { --ic: #fcd34d; }
.qe-tools-rail [data-context-tool="intraday_flow"] { --ic: #dfbb64; }
.qe-tools-rail [data-context-tool="theme_heat"] { --ic: #fb923c; }
.qe-tools-rail [data-context-tool="business_cycle"] { --ic: #dfbb64; }
.qe-tools-rail [data-context-tool="geopolitical_shocks"] { --ic: #c69ca3; }
.qe-tools-rail [data-context-tool="ai_capex"] { --ic: #e7c877; }
.qe-tools-rail [data-context-tool="smart_money_watch"] { --ic: #90b8b2; }
.qe-tools-rail [data-context-tool="crypto"] { --ic: #f7931a; }
.qe-tools-rail [data-context-tool="commodities"] { --ic: #eab308; }
.qe-tools-rail [data-context-tool="bonds_fx"] { --ic: #dfbb64; }

.qe-product-tabs button {
  font-family: inherit; /* the deck's face; was the donor's UA Arial (owner QA P2 #17) */
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: normal;
}

#v33-macro-toggle-btn,
#v33-cabinet button {
  font-family: inherit; /* the deck's face; was the donor's UA Arial (owner QA P2 #17) */
}

@media (min-width: 769px) {
  /* The original footer starts after the open 52px rail, with content inset
     from that edge rather than reserving the full 168px rail width. */
  .qe-bottom-bar { left: 52px; padding-left: 18px; }
  body.qe-rail-collapsed .qe-bottom-bar { left: 0; padding-left: 18px; }
}

@media (max-width: 768px) {
  .qe-brand-wordmark { font-size: 13px; }
}

@media (min-width: 591px) and (max-width: 768px) {
  body:not(.qe-rail-collapsed) #qe-mobile-rail-toggle {
    display: none !important;
    pointer-events: none;
  }
  body.qe-rail-collapsed #qe-mobile-rail-toggle {
    display: inline-flex !important;
    pointer-events: auto;
    visibility: visible;
  }
}

@media (max-width: 590px) {
  /* Match the original drawer: the floating reopen handle is visible only
     while the rail is closed; the rail's own control closes it when open. */
  body.qe-rail-collapsed .qe-mobile-rail-toggle {
    display: inline-flex !important;
    pointer-events: auto;
    visibility: visible !important;
    z-index: 120;
  }
  body:not(.qe-rail-collapsed) .qe-mobile-rail-toggle {
    display: none !important;
    pointer-events: none;
  }
}

/* Tablet parity: the two-row published macro strip owns its full height.
   Do not pull the product cabinet back into that strip at 591–768px; the
   original compact shell has a clear cabinet boundary and no panel overlap. */
@media (min-width: 591px) and (max-width: 768px) {
  .qe-product-tabs { margin-top: 16px; }
}

/* A collapsed desktop rail is off-canvas, so its reopen handle must live
   outside the transformed drawer and remain hit-testable in the viewport. */
@media (min-width: 769px) {
  body.qe-rail-collapsed #qe-mobile-rail-toggle {
    bottom: auto;
    display: inline-flex !important;
    left: 10px;
    pointer-events: auto;
    position: fixed;
    top: 56px;
    visibility: visible;
    z-index: 120;
  }
  body:not(.qe-rail-collapsed) #qe-mobile-rail-toggle {
    display: none !important;
    pointer-events: none;
  }
}

/* Desktop shell parity: the original rail runs to the viewport edge and the
   fixed footer overlays its lower edge instead of shortening the rail. */
@media (min-width: 769px) {
  .qe-tools-rail { bottom: 0; }
}

/* Responsive drawer parity: the reference rail runs to the viewport edge and
   sits behind the fixed footer instead of stopping one footer-height early. */
@media (max-width: 768px) {
  .qe-tools-rail {
    bottom: 0;
    max-height: none;
  }
}

/* Tablet drawer parity: the reference keeps the 168px rail as an overlay,
   so the cabinet remains full-width and the drawer can be opened without
   changing the page's horizontal geometry. */
@media (min-width: 591px) and (max-width: 768px) {
  body:not(.qe-rail-collapsed) .qe-main {
    margin-left: 0;
    max-width: 100%;
    width: 100%;
  }
}

/* Shell parity slice: the reference rail uses a stable 32px command row and
   24.4px group heading rhythm. Keep the additional methodology route,
   labels, and server-owned interactions, but give the shared rail the same
   measured navigation cadence on desktop and tablet. */
.qe-rail-controls {
  box-sizing: border-box;
  height: 31.8px;
  min-height: 31.8px;
  overflow: hidden;
  padding: 5.3px 10px;
}

.qe-rail-heading {
  box-sizing: border-box;
  height: 24.4px;
  min-height: 24.4px;
  padding: 10px 14px 6.4px;
}

.qe-tools-rail > [data-rail-short] {
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 8px 14px;
}

/* At the reference tablet width the original top bar collapses to the
   identity/profile/settings essentials. Keep the new risk-profile flow
   available, while the rail remains the primary navigation surface. */
@media (min-width: 591px) and (max-width: 768px) {
  .qe-header {
    box-sizing: border-box;
    display: grid;
    gap: 0 8px;
    grid-template-columns: 205px auto minmax(0, 1fr);
    justify-content: initial;
    padding: 0 10px;
  }

  .qe-header > .qe-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .qe-header > .qe-original-news-strip {
    display: none;
  }

  .qe-header-status {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    grid-column: 2;
    grid-row: 1;
    height: 32px;
    min-width: 0;
    overflow: visible;
    width: auto;
  }

  .qe-header-status > .qe-status-dot,
  .qe-header-status > .qe-header-separator,
  .qe-header-status > label,
  .qe-header-status > span:not(#qe-claude-budget-notice):not(#qe-local-session),
  #qe-profile-guide-toggle,
  #quant-engine-access,
  #qe-claude-budget-notice,
  #qe-local-session,
  #qe-published-refresh,
  #qe-command-toggle,
  #qe-keyboard-help-toggle {
    display: none;
  }

  #qe-profile {
    display: block;
    flex: 0 0 82px;
    font-size: 10px;
    height: 24px;
    width: 82px;
  }

  #qe-settings-toggle {
    display: inline-flex;
    flex: 0 0 75px;
    height: 26px;
    min-width: 75px;
    padding: 4px 8px;
    width: 75px;
  }
}

/* Single Ticker parity slice: the original SaaS opens a wide, centered
   published-detail surface with a large inline body.  Keep the existing
   route/data contract while restoring that measured dialog geometry. */
@media (min-width: 769px) {
  #qe-ticker-dialog {
    align-items: flex-start;
    padding: 30px;
  }

  #qe-ticker-dialog .qe-ticker-dialog-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* The donor's Single Ticker fills the viewport less a margin (its
       single-ticker.png: 50px top and bottom on a 1000px window). 648px
       letterboxed the page into a scroll box a third of a tall screen. */
    height: calc(100vh - 60px);
    max-height: none;
    max-width: 1100px;
    min-height: calc(100vh - 60px);
    overflow: auto;
    width: 100%;
  }

  #qe-ticker-dialog #qe-ticker-dialog-result {
    border: 1px solid var(--qe-border);
    border-radius: 6px;
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    padding: 12px;
  }

  #qe-ticker-dialog #qe-ticker-dialog-result > .qe-card {
    box-sizing: border-box;
    width: 100%;
  }

  #qe-ticker-dialog #qe-ticker-dialog-result > .qe-empty-state {
    border: 0;
    margin: 0;
    padding: 0;
    text-align: center;
  }
}

.qe-ticker-dialog-description {
  line-height: 1.55;
  max-width: 820px;
}

.qe-ticker-supplemental {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 15px 0 11px;
}

.qe-ticker-supplemental-panel {
  background: #111820;
  border: 1px solid var(--qe-border);
  border-radius: 5px;
  min-width: 0;
  padding: 10px;
}

.qe-ticker-supplemental-panel h3 {
  color: var(--qe-accent);
  font: 500 10px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: .07em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.qe-ticker-supplemental-panel dl {
  margin: 0;
}

.qe-ticker-supplemental-panel dl div {
  align-items: baseline;
  border-top: 1px solid rgb(48 54 61 / 70%);
  display: flex;
  font-size: 11px;
  gap: 7px;
  justify-content: space-between;
  padding: 5px 0 0;
}

.qe-ticker-supplemental-panel dt {
  color: var(--qe-muted);
  min-width: 0;
}

.qe-ticker-supplemental-panel dd {
  color: var(--qe-text);
  font-weight: 600;
  margin: 0;
  text-align: right;
}

.qe-ticker-availability {
  color: var(--qe-muted);
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
}

.qe-ticker-availability[data-state="UNAVAILABLE"] {
  border-left: 2px solid var(--qe-border);
  padding-left: 8px;
}

.qe-ticker-overview {
  border-top: 1px solid var(--qe-border);
  margin-top: 14px;
  padding-top: 12px;
}

.qe-ticker-overview h3 {
  color: var(--qe-accent);
  font: 500 10px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: .07em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.qe-ticker-overview p {
  color: var(--qe-muted);
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 768px) {
  #qe-ticker-dialog .qe-ticker-dialog-card {
    max-height: calc(100vh - 20px);
    min-height: 0;
    width: calc(100vw - 20px);
  }

  #qe-ticker-dialog #qe-ticker-dialog-result {
    min-height: 220px;
  }

  .qe-ticker-supplemental {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .qe-quant-cabinet-cards { grid-template-columns: 1fr; }
}

/* Custom Screener parity slice.  The donor presents this as one compact
   five-column filter desk; the browser binding remains read-only and local. */
@media (min-width: 901px) {
  #qe-screener-dialog {
    align-items: center;
    padding: 30px;
  }

  #qe-screener-dialog .qe-screener-dialog-card {
    box-sizing: border-box;
    max-height: 90vh;
    max-width: 1100px;
    min-height: 0;
    overflow-y: auto;
    width: 100%;
  }

  #qe-screener-dialog-filter {
    background: var(--qe-bg-raised, #0e0f13);
    border: 1px solid var(--qe-border);
    border-radius: 8px;
    display: grid;
    gap: 7px 13px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 12px 0 0;
    padding: 14px 16px;
  }

  #qe-screener-dialog-filter > label {
    color: var(--qe-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .3px;
    line-height: 1.25;
    margin: 0;
    text-transform: uppercase;
  }

  #qe-screener-dialog-filter > input,
  #qe-screener-dialog-filter > select {
    min-width: 0;
    width: 100%;
  }

  #qe-screener-dialog-filter > #qe-screener-dialog-submit {
    background: #dfbb64;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgb(223 187 100 / 30%);
    color: #241a05;
    font-size: 12.5px;
    font-weight: 700;
    grid-column: 1;
    grid-row: 5;
    justify-self: start;
    padding: 8px 18px;
  }

  #qe-screener-dialog-filter > #qe-screener-dialog-reset {
    background: transparent;
    border: 1px solid var(--qe-border);
    border-radius: 6px;
    color: var(--qe-muted);
    font-size: 12.5px;
    grid-column: 1;
    grid-row: 5;
    justify-self: start;
    margin-left: 125px;
    padding: 8px 14px;
  }

  #qe-screener-dialog-status {
    align-self: center;
    color: var(--qe-muted);
    font-size: 11px;
    grid-column: 3 / 6;
    grid-row: 5;
  }
}

.qe-screener-dialog-description {
  font-size: 11.5px;
  line-height: 1.55;
  margin: 4px 0 0;
  max-width: 760px;
}

#qe-screener-dialog-close {
  background: transparent;
  border: 1px solid var(--qe-border);
  border-radius: 8px;
  color: var(--qe-muted);
  font-size: 10px;
  padding: 5px 11px;
}

@media (min-width: 769px) {
  /* Match the reference desktop's 14px main-content gutter. The original
     macro row, product tabs, and primary cabinet share the same left edge;
     only the fixed rail sits outside that gutter. */
  .qe-header { gap: 20px; }

  .qe-primary-frame {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    padding-left: 18px;
    padding-right: 18px;
    width: auto;
  }

  .qe-original-recommendation-card {
    height: auto;
    min-height: 270px;
    padding: 12px;
  }

  /* The open rail owns the left edge; the footer must not print over it. */
  .qe-bottom-bar { left: 168px; }
  body.qe-rail-collapsed .qe-bottom-bar { left: 0; }
}

/* Keep the existing unavailable model view controls in the same header lane
   as the original SaaS card.  This changes placement only; the controls stay
   disabled until a complete server publication exists. */
@media (min-width: 769px) {
  #qe-original-model-target .qe-original-recommendation-mode-controls {
    margin-top: 0;
    position: absolute;
    right: 12px;
    top: 12px;
  }
}

/* Original SaaS chrome baseline: the top bar exposes only the live-news
   context, refresh, and Settings. Profile/access state is still server-owned
   and remains available inside Settings; it is not a second dashboard row. */
#v33-top .qe-header-status > .qe-status-dot,
#v33-top .qe-header-status > span:nth-of-type(2),
#v33-top .qe-header-status > .qe-header-separator,
#v33-top .qe-header-status > label,
#v33-top .qe-header-status > #qe-profile,
#v33-top .qe-header-status > #qe-profile-guide-toggle,
#v33-top .qe-header-status > #quant-engine-access,
#v33-top .qe-header-status > #qe-claude-budget-notice,
#v33-top .qe-header-status > #qe-local-session,
#v33-top .qe-header-status > #qe-command-toggle,
#v33-top .qe-header-status > #qe-keyboard-help-toggle { display: none; }
#v33-top .qe-header-status { flex: 0 0 auto; gap: 8px; }
/* The Original's header carried the palette and shortcut chips; where the
   header has room they are shown again. */
@media (min-width: 1100px) {
  #v33-top .qe-header-status > #qe-command-toggle,
  #v33-top .qe-header-status > #qe-keyboard-help-toggle { display: inline-flex; align-items: center; opacity: .85; }
}

.qe-sign-in-card { width: min(440px, 94vw); }
.qe-email-sign-in-form { display: grid; gap: 9px; margin-top: 18px; }
.qe-email-sign-in-form label { color: var(--text2, #8b949e); font-size: 12px; font-weight: 700; }


.qe-email-sign-in-form button,
.qe-google-sign-in {
  align-items: center;
  background: #dfbb64;
  border: 1px solid #dfbb64;
  border-radius: 6px;
  color: #111827;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  text-decoration: none;
}
.qe-email-sign-in-form button:focus-visible,
.qe-google-sign-in:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.qe-sign-in-divider { align-items: center; color: var(--text2, #8b949e); display: flex; font-size: 11px; gap: 10px; margin: 14px 0; text-transform: uppercase; }
.qe-sign-in-divider::before,
.qe-sign-in-divider::after { background: var(--border, #30363d); content: ""; flex: 1; height: 1px; }
.qe-sign-in-divider[hidden] { display: none; }
/* A sign-in method the deployment does not offer is hidden by bindSignIn; the
   grid rule above outranked the attribute and showed it anyway. */
.qe-email-sign-in-form[hidden], #qe-google-sign-in[hidden] { display: none !important; }
/* Signed out, where people sign in: target_workspace.js stops building the
   deck there (every read would be refused), so everything that could only
   show unread placeholders is set aside. What remains is the brand, the
   session state, the Sign in button, the banner that says why, and the
   sign-in panel itself. */
body[data-signed-out="true"] #qe-original-news-strip,
body[data-signed-out="true"] #qe-index-ribbon,
body[data-signed-out="true"] #qe-original-news-toggle,
body[data-signed-out="true"] #qe-profile,
body[data-signed-out="true"] #qe-profile-picker,
body[data-signed-out="true"] #qe-profile-guide-toggle,
body[data-signed-out="true"] #qe-claude-budget-notice,
body[data-signed-out="true"] #qe-published-refresh,
body[data-signed-out="true"] #qe-command-toggle,
body[data-signed-out="true"] #qe-settings-toggle,
body[data-signed-out="true"] #qe-alerts-toggle,
body[data-signed-out="true"] #qe-keyboard-help-toggle,
body[data-signed-out="true"] #qe-original-macro-source,
body[data-signed-out="true"] #qe-tools-rail,
body[data-signed-out="true"] .qe-main > :not(#qe-global-status),
body[data-signed-out="true"] .qe-bottom-bar { display: none !important; }
#v33-top .qe-header-status #qe-published-refresh,
#v33-top .qe-header-status #qe-settings-toggle {
  background: var(--qe-bg);
  border-color: var(--qe-border);
  border-radius: 6px;
  color: var(--qe-text);
  font-size: 11px;
  padding: 5px 11px;
}
#v33-top .qe-header-status #qe-settings-toggle::before { content: "⚙ "; }
#v33-top > .qe-original-news-strip {
  background: transparent;
  border-bottom: 0;
  min-height: 0;
  padding: 0;
}
#v33-top .qe-original-news-label::before { content: "📰"; }
#v33-top .qe-original-news-toggle {
  margin-left: 0;
  background: transparent;
  border: 0;
  padding-inline: 4px;
  /* The donor's "click to expand" is the header's own sans at 11px, muted. */
  color: #a7afbc;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
}
#v33-top .qe-index-ribbon {
  background: var(--qe-bg);
  border: 0;
  border-radius: 0;
}

/* The original section is one bordered cabinet: title, two cards, verbose
   mode, and evidence stay in that linear flow instead of escaping into
   unrelated tool panels. */
#qe-primary-frame {
  background: var(--qe-card);
  border-color: var(--qe-border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 14px 18px;
}
#qe-primary-frame > .qe-original-workflow {
  border-bottom: 1px solid var(--qe-border);
  padding: 0 0 10px;
}
#qe-primary-frame > .qe-original-workflow .qe-original-recommendation-label {
  flex: 0 0 auto;
  overflow: visible;
  text-overflow: clip;
}
#qe-primary-frame > .qe-original-workflow .qe-original-workflow-state,
#qe-primary-frame > .qe-original-workflow .qe-original-workflow-note {
  min-width: 0;
}
#qe-primary-frame > .qe-original-recommendation { margin-top: 12px; }
#qe-original-recommendation-card,
#qe-original-recommendation-card h2 { letter-spacing: normal; }
body[data-original-saas-primary="mounted"] .qe-product-tabs,
body[data-original-saas-primary="mounted"] #qe-primary-frame { display: none !important; }
#original-saas-primary-nav-root { order: 20; }
#original-saas-primary-main-root { order: 30; }
body[data-original-saas-quant="etf_quant"] #original-saas-primary-main-root,
body[data-original-saas-quant="investing_quant"] #original-saas-primary-main-root { display: none !important; }
#product-cabinet:has(#panel-quant-etf) { grid-column: 1 / -1; }

/* The five compact macro panels fill the entire strip. */
@media (min-width: 591px) {
  #v33-macro-row > div#v33-macro-tiles {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

/* Five data cards need room for dated refusals as well as short numbers. */
@media (min-width: 591px) and (max-width: 900px) {
  #v33-macro-row { flex-wrap: wrap !important; }
  #v33-macro-row > div#v33-macro-tiles {
    order: 3;
    flex: 1 0 100% !important;
    width: 100%;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
  #v33-macro-row > div#v33-macro-tiles > * { grid-column: span 2; }
  #v33-macro-row > div#v33-macro-tiles > :nth-child(n+4) { grid-column: span 3; }
}
.regal-strip-tile .regal-strip-label { flex-wrap: wrap; white-space: normal; }

/* Keep the donor's two fixed-width run controls beside Today's
   recommendation at the 1104px reference.  The original 332px width remains
   above this bounded scrollbar-constrained desktop range. */
@media (min-width: 769px) and (max-width: 1150px) {
  #v33-mainengine-header .run-engine-btn {
    flex-basis: 318px !important;
    max-width: 318px !important;
    min-width: 318px !important;
    width: 318px !important;
  }
}

.qe-bitcoin-research {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(223,187,100,.22);
  border-radius: 10px;
  background: #0b111c;
}
.qe-bitcoin-research p { color: #aab8cc; font-size: 12px; line-height: 1.6; }
.qe-bitcoin-research strong { color: #dfbb64; }
.qe-bitcoin-timing .v33-parity-asset-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qe-bitcoin-timing article { min-width: 0; gap: 9px; overflow-wrap: anywhere; }
.qe-bitcoin-timing article[data-quality="STRONG"], .qe-bitcoin-timing article[data-quality="GOOD"] { border-left-color: #9bbca9; }
.qe-bitcoin-timing article[data-quality="POOR"] { border-left-color: #cda5ab; }
.qe-bitcoin-timing article[data-quality="MIXED"] { border-left-color: #dfbb64; }
@media (max-width: 700px) {
  .qe-bitcoin-timing .v33-parity-asset-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .qe-bitcoin-timing .v33-parity-asset-tiles { grid-template-columns: minmax(0, 1fr); }
}
.qe-bitcoin-price-chart svg { display: block; width: 100%; height: auto; min-height: 180px; }
.qe-commodity-chart { margin:16px 0; padding:14px; background:#0d1117; border:1px solid #625435; border-radius:10px; min-width:0; }
.qe-commodity-chart-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:12px; }
.qe-commodity-chart-toolbar h4 { margin:0; }
.qe-commodity-chart-toolbar output { color:#efcf7b; margin-right:auto; font-variant-numeric:tabular-nums; }
.qe-commodity-chart-toolbar button { background:#202630; color:#f0d17b; border:1px solid #746239; border-radius:7px; padding:8px 12px; min-height:36px; }
.qe-commodity-chart-toolbar button:focus-visible { outline:2px solid #f0d17b; outline-offset:2px; }
.qe-commodity-chart-canvas { width:100%; min-width:0; height:300px; }
.qe-commodity-chart p, .qe-commodity-chart a { color:#aab8cc; font-size:12px; line-height:1.6; }
.qe-bitcoin-price-chart text { fill: #aab8cc; font: 11px system-ui, sans-serif; }
.qe-btc-grid { stroke: #263245; stroke-width: 1; stroke-dasharray: 3 5; }
.qe-btc-area { fill: rgba(223,187,100,.09); }
.qe-btc-line { fill: none; stroke: #dfbb64; stroke-width: 2; stroke-linejoin: round; }
.qe-bitcoin-miners { margin: 18px 0; }
.qe-bitcoin-miners p { color: #aab8cc; font-size: 12px; line-height: 1.6; }
.qe-bitcoin-miners .qe-research-table { min-width: 560px; }
.qe-bitcoin-miners .qe-research-table :is(th, td):not(:first-child),
.v33-parity-commodities .qe-research-table :is(th, td):not(:first-child) {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.v33-parity-commodities .qe-research-table td[data-tone="positive"] { color: #9bbca9; }
.v33-parity-commodities .qe-research-table td[data-tone="negative"] { color: #cda5ab; }
.qe-bitcoin-miners td[data-tone="positive"] { color: #9bbca9; }
.qe-bitcoin-miners td[data-tone="negative"] { color: #cda5ab; }

/* Phone header parity: keep the full original brand visible and reduce the
   lone Settings action to its icon.  The desktop donor labels remain literal;
   only the constrained 390/430px header presentation is compacted. */
@media (max-width: 590px) {
  #v33-top.qe-header {
    gap: 0 5px;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 30px;
  }
  #v33-top .qe-brand { max-width: 200px; }
  #v33-top .qe-brand-wordmark {
    font-size: 13px;
    overflow: visible;
    text-overflow: clip;
  }
  #v33-top .qe-header-status {
    gap: 0;
    max-width: 30px;
    overflow: visible;
    width: 30px;
  }
  #v33-top #profile-chip { display: none; }
  #v33-top .qe-header-status #qe-settings-toggle {
    flex: 0 0 30px;
    font-size: 0;
    height: 30px;
    min-width: 30px;
    overflow: hidden;
    padding: 5px;
    width: 30px;
  }
  #v33-top .qe-header-status #qe-settings-toggle::before {
    content: "⚙";
    font-size: 13px;
  }
}
/* Daily bond research: structured readings, no fabricated rate-path gauge. */
.qe-bond-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.qe-bond-groups > section { min-width:0; }
.qe-bond-groups h4 { margin:12px 0 8px; color:#dfbb64; }
.qe-bond-metrics { width:100%; min-width:0; }
.qe-bond-metrics th:first-child,.qe-bond-metrics td:first-child { text-align:left; width:60%; white-space:normal; }
.qe-bond-metrics td:last-child { white-space:normal; overflow-wrap:anywhere; }
.qe-bond-research > p { color:#b8bdc8; font-size:13px; line-height:1.5; }
.qe-bond-details { margin:16px 0; }
.qe-bond-details summary { cursor:pointer; color:#dfbb64; padding:10px 0; }
.qe-treasury-terms { margin:16px 0; }
.qe-treasury-terms h4 { color:#dfbb64; margin:8px 0; }
.qe-treasury-terms p { color:#b8bdc8; font-size:12px; }
.qe-treasury-terms .qe-research-table :is(th,td):not(:first-child) { text-align:right; font-variant-numeric:tabular-nums; }
.qe-gold-real-yield { border:1px solid #49402c; background:#141820; padding:14px; margin:14px 0; border-radius:8px; }
.qe-gold-real-yield h4 { margin:0 0 8px; color:#dfbb64; }
.qe-gold-real-yield > strong { font-size:24px; color:#eef1f5; font-variant-numeric:tabular-nums; }
.qe-gold-real-yield p,.v33-parity-commodities > p { font-size:12px; line-height:1.5; color:#b8bdc8; }
.qe-gold-real-yield a { color:#dfbb64; font-size:12px; }
.qe-gold-drivers th:first-child,.qe-gold-drivers td:first-child { width:55%; }
@media(max-width:700px) { .qe-bond-groups { grid-template-columns:1fr; } }
.qe-model-earnings { min-width: 110px; }
.qe-model-earnings summary { color: #dfbb64; cursor: pointer; white-space: nowrap; }
.qe-model-earnings dl { display: grid; grid-template-columns: auto auto; gap: 6px 12px; padding: 10px; margin: 8px 0; border: 1px solid #30363d; background: #111820; }
.qe-model-earnings dt { color: #94a3b8; }
.qe-model-earnings dd { margin: 0; color: #eef2f8; text-align: right; }
.qe-verbose-close { display: block; margin: 0 0 10px auto; min-width: 36px; min-height: 36px; font-size: 22px; color: #eef2f8; background: #18212d; border: 1px solid #dfbb64; border-radius: 6px; }

/* Consistent, readable research panels; balanced rows use the available width. */
.qe-context-dialog-card { width: min(1200px, calc(100vw - 40px)) !important; max-width: 1200px !important; font-size: 14px; }
#qe-context-dialog-heading { font-size: 22px; }
.qe-context-dialog-card .v33-parity-tool { font-size: 14px; line-height: 1.55; }
.qe-context-dialog-card .v33-parity-tool h4 { font-size: 16px; }
.qe-context-dialog-card .v33-parity-meta { font-size: 12px; }
.qe-context-dialog-card .v33-parity-tool :is(p, li, td, th, dd, dt) { font-size: 14px; }
.qe-context-dialog-card :is(.v33-parity-risk-grid article > span, .v33-parity-smart-grid span, .v33-parity-smart-totals span) { font-size: 14px; }
.qe-context-dialog-card .v33-parity-risk-grid article { min-height: 90px; }
.qe-context-dialog-card :is(.v33-parity-sequence article span, .v33-parity-feature-cards, .qe-bond-details, .v33-parity-detectors article small) { font-size: 14px; }
.qe-context-dialog-actions button, #qe-context-dialog-close { font-size: 14px; min-height: 36px; }
.qe-tools-rail .v33-tool-btn { font-size: 14px !important; line-height: 1.4; min-height: 38px; }
:is(.v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-feature-cards, .v33-parity-detectors) { --research-columns: 4; display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
:is(.v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-feature-cards, .v33-parity-detectors) > * { flex: 1 1 calc((100% - (var(--research-columns) - 1) * 12px) / var(--research-columns)); min-width: 0; box-sizing: border-box; }
:is(.v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-feature-cards, .v33-parity-detectors):has(> :nth-child(5):last-child),
:is(.v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-feature-cards, .v33-parity-detectors):has(> :nth-child(10):last-child) { --research-columns: 5; }
:is(.v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-feature-cards, .v33-parity-detectors):has(> :nth-child(6):last-child),
:is(.v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-feature-cards, .v33-parity-detectors):has(> :nth-child(9):last-child) { --research-columns: 3; }
.v33-parity-detectors article { padding: 16px; gap: 8px; }
.v33-parity-detectors article strong { font-size: 16px; }
.v33-parity-detectors article b { position: static; align-self: flex-start; font-size: 24px; color: var(--text); border: 0; padding: 0; }
.v33-parity-detectors article p { margin: 0; color: var(--text2); }
.qe-geo-exposures { padding: 14px 16px; margin-top: 16px; border: 1px solid var(--border); border-radius: 8px; }
.qe-context-dialog-card details, .qe-watchlist-dialog-card details { margin: 12px 0; padding: 12px 16px; border: 1px solid #3c4655; border-radius: 8px; background: #111820; }
.qe-context-dialog-card summary, .qe-watchlist-dialog-card summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; font-size: 14px; line-height: 1.5; color: #dfbb64; }
.qe-context-dialog-card summary::-webkit-details-marker, .qe-watchlist-dialog-card summary::-webkit-details-marker { display: none; }
.qe-context-dialog-card summary::before, .qe-watchlist-dialog-card summary::before { content: '+'; display: inline-grid; place-items: center; flex: 0 0 26px; height: 26px; border: 1px solid #64748b; border-radius: 5px; }
.qe-context-dialog-card details[open] > summary::before, .qe-watchlist-dialog-card details[open] > summary::before { content: '−'; }
.qe-context-dialog-card summary:focus-visible, .qe-watchlist-dialog-card summary:focus-visible { outline: 2px solid #dfbb64; outline-offset: 4px; }
.qe-model-refresh-controls { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.qe-model-refresh-controls #qe-published-refresh { display: inline-flex !important; background: #18212d; color: #eef2f8; padding: 8px 14px; border: 1px solid #64748b; border-radius: 6px; min-height: 36px; }
.mv-header .mv-refresh { flex: 0 0 auto; align-self: flex-start; padding: 8px 12px; color: #eef2f8; background: #18212d; }
@media(max-width:900px) { :is(.v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-feature-cards, .v33-parity-detectors) { --research-columns: 3 !important; } }
@media(max-width:620px) { :is(.v33-parity-sequence > div, .v33-parity-risk-grid, .v33-parity-smart-grid, .v33-parity-feature-cards, .v33-parity-detectors) { --research-columns: 1 !important; } .qe-context-dialog-card { padding: 16px; } }
.qe-model-details td[data-tone="positive"] { color: #67d6a0; font-weight: 650; }
.qe-model-details td[data-tone="negative"] { color: #fb929c; font-weight: 650; }
.qe-model-chip { display: inline-block; padding: 4px 8px; border-radius: 5px; background: #273344; color: #d9e4f5; font-size: 12px; font-weight: 700; }
.qe-model-chip[data-case="HIGH"] { background: #163c2d; color: #91e2b8; }
.qe-model-chip[data-case="CAUTION"], .qe-model-chip[data-case="LOW"], .qe-model-chip[data-case="SPECULATIVE"] { background: #4a3020; color: #ffd199; }
.qe-model-chip[data-case="MED"] { background: #363522; color: #e4d791; }
.qe-model-action[data-action="STOCK"] > span { color: #8dbdf9; }
.qe-model-action[data-action="CORE"] > span { color: #e3c477; }
.qe-model-action > span { display: block; font-size: 11px; margin-bottom: 4px; }
.qe-model-details .qe-model-row-toggle { min-height: 30px; font-size: 12px; }
.qe-model-inline-row[hidden] { display: none !important; }
.qe-model-inline-row > td { padding: 0 12px 14px !important; text-align: left !important; white-space: normal !important; }
.qe-inline-model-panel { background: #10151d; border: 1px solid #665638; border-left: 3px solid #d7b85e; border-radius: 8px; padding: 16px; color: #e5eaf2; font-size: 14px; line-height: 1.5; }
.qe-inline-model-panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qe-inline-model-panel h3 { font-size: 18px; margin: 0; color: #f1d27b; }
.qe-inline-model-panel button { background: #202a38; color: #f1d27b; border: 1px solid #766445; border-radius: 6px; min-height: 36px; padding: 7px 12px; }
.qe-inline-model-panel button:focus-visible, .qe-model-row-toggle:focus-visible { outline: 2px solid #f1d27b; outline-offset: 3px; }
.qe-inline-model-summary { background: #1c2029; border-radius: 6px; padding: 12px; margin-top: 12px; }
.qe-inline-model-summary p { margin: 5px 0; }
.qe-inline-model-date, .qe-inline-model-summary small { color: #a9b5c6; }
.qe-inline-model-risk { border-left: 3px solid #e6a252; padding: 8px 12px; background: #352719; color: #f4ce9f; }
.qe-inline-model-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.qe-inline-model-grid > section { box-sizing: border-box; flex: 1 1 220px; min-width: 0; background: #171e29; border: 1px solid #344052; border-radius: 7px; padding: 12px; }
.qe-inline-model-grid h4 { color: #bfd5f3; font-size: 14px; margin: 0 0 8px; }
.qe-inline-model-grid dl { margin: 0; }
.qe-inline-model-grid dl > div { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #2b3646; padding: 6px 0; }
.qe-inline-model-grid dt { color: #aebbd0; overflow-wrap: anywhere; }
.qe-inline-model-grid dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.qe-inline-model-unavailable { color: #c6ccd7; }
@media (max-width: 768px) {
  .qe-inline-model-panel { box-sizing: border-box; max-width: calc(100vw - 60px); position: sticky; left: 0; padding: 12px; }
  .qe-inline-model-grid > section { flex-basis: 100%; }
}
/* Bounded research-alert popup: below dialogs, above the footer, no inline styles. */
#es-active-warnings { position:fixed; right:16px; bottom:calc(var(--voyager-help-bottom, 18px) + 48px); z-index:200; width:min(420px,calc(100% - 32px)); color:#e5e7eb; font-size:14px; color-scheme:dark; }
#es-active-warnings button { background:#202630; color:#f0d17b; border:1px solid #746239; border-radius:8px; padding:8px 12px; font-size:14px; cursor:pointer; min-height:36px; }
#es-active-warnings button:focus-visible { outline:2px solid #f0d17b; outline-offset:3px; }
#qe-alerts-toggle { display:block; margin-left:auto; box-shadow:0 6px 22px #0009; }
#es-active-warnings .qe-alert-panel { background:#10141b; border:1px solid #746239; border-radius:12px; padding:14px; box-shadow:0 12px 35px #0009; max-height:min(480px,50dvh); overflow:auto; }
#es-active-warnings .qe-alert-panel > header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
#es-active-warnings h2 { font-size:18px; margin:0; }
#es-active-warnings h3 { font-size:15px; margin:0; flex:1; min-width:0; }
#es-active-warnings .qe-alert-cards { display:grid; gap:12px; }
#es-active-warnings .qe-alert-card { background:#181e27; padding:14px; border:1px solid #465162; border-left:4px solid #8eaaca; border-radius:9px; }
#es-active-warnings .qe-alert-card[data-severity="HIGH"] { border-left-color:#c396a2; }
#es-active-warnings .qe-alert-card[data-severity="ELEVATED"] { border-left-color:#f5c45a; }
#es-active-warnings .qe-alert-card-heading { display:flex; align-items:center; gap:8px; }
#es-active-warnings .qe-alert-card-heading button { flex:none; padding:3px 9px; font-size:20px; }
#es-active-warnings .qe-alert-severity { font-size:11px; color:#b8c9df; }
#es-active-warnings [data-severity="HIGH"] .qe-alert-severity { color:#fda4af; }
#es-active-warnings [data-severity="ELEVATED"] .qe-alert-severity { color:#f5c45a; }
#es-active-warnings p { font-size:14px; line-height:1.5; margin:10px 0; overflow-wrap:anywhere; }
#es-active-warnings .qe-alert-evidence, #es-active-warnings .qe-alert-note { color:#aebace; font-size:12px; }
@media(max-width:480px) {
  #es-active-warnings { right:10px; width:calc(100% - 20px); }
  #es-active-warnings .qe-alert-panel { padding:10px; }
  #es-active-warnings .qe-alert-card-heading { flex-wrap:wrap; }
}
.qe-gold-cycle { margin:16px 0; padding:18px; border:1px solid var(--border-2,#66552b); border-radius:12px; background:var(--card,#11151b); }
.qe-gold-cycle > header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.qe-gold-cycle h4, .qe-gold-cycle h5 { margin:0; }
.qe-gold-cycle > header > strong { color:var(--gold,#e7c45b); font-size:20px; }
.qe-gold-cycle-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.qe-gold-cycle-grid > section { min-width:0; padding:14px; border:1px solid var(--border,#343b46); border-radius:9px; background:var(--bg,#0b0e13); overflow-wrap:anywhere; }
.qe-gold-cycle-grid h5 { color:var(--text2,#b4bdc9); font-size:14px; line-height:1.4; font-weight:500; }
.qe-gold-cycle-grid strong { display:block; margin-top:10px; font-size:20px; color:var(--text,#edf0f5); }
@media (max-width:1000px) { .qe-gold-cycle-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* The retained Voyager hover detail (original_saas_macro.css 196-213).
   Fixed rather than absolute so it floats above the z-9999 tool popups, which
   is the fix the original records: an absolute popover at z-index 200 rendered
   BEHIND those popups, so a tile appeared to do nothing when it had in fact
   fired.
   It is a tooltip -- it opens on hover or keyboard focus and closes when the
   pointer leaves what it describes -- so it never takes a click. Drawn under
   a rail button, it covered the next two, and a click there did nothing: the
   press landed on the tooltip (found 2026-09-26, closing a sidebar tool by
   clicking outside it and reaching for the next). */
.popover-float {
  pointer-events: none;
  position: fixed; z-index: 10010; min-width: 220px; max-width: 360px;
  background: var(--qe-card, #11151b); border: 1px solid var(--qe-border, #353942);
  border-radius: 8px; padding: 12px 14px;
  font-size: 12px; color: var(--qe-text, #e5e7eb); line-height: 1.55;
  box-shadow: 0 8px 24px rgb(0 0 0 / 45%);
  max-height: calc(100vh - 24px); overflow-y: auto;
}
.popover-float .head {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--qe-muted, #a1a1aa); font-weight: 600; margin-bottom: 4px;
}
.popover-float .body { color: var(--qe-text, #e5e7eb); }
.popover-float .body p { margin: 0; }
.popover-float .body p + p { margin-top: 6px; }

/* ─── Tools rail ──────────────────────────────────────────────────────────
   The rail was a flat list: transparent buttons, one grey for every label,
   an invisible 2px left border reserved for a state that was never set, and
   section headings at the same weight as the items under them. Nothing told
   a reader which tool was open, which group they were in, or that the icons
   meant anything.

   Rebuilt on the deck's own vocabulary rather than invented: the card ground
   (#161b22) it already sits on, the gold accent (--qe-accent) the header and
   tiles use, the mono small-caps treatment the macro strip labels use, and
   the same 3px inset bar the macro tiles use to carry state. Nothing new is
   introduced; the rail simply now speaks the language the rest of the deck
   already speaks. */
.qe-tools-rail {
  background: linear-gradient(180deg, #161b22 0%, #12171e 100%);
  border-right: 1px solid var(--qe-border);
  padding: 6px 0 22px;
}
.qe-rail-heading {
  color: #6e7681;
  font: 600 9px/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .14em;
  margin-top: 4px;
  padding: 15px 14px 6px;
  text-transform: uppercase;
}
/* A hairline above each group except the first, so the groups read as groups
   rather than as one long list with occasional small text in it. */
.qe-rail-heading + * { margin-top: 0; }
.qe-rail-heading:not(:first-of-type) {
  border-top: 1px solid rgb(48 54 61 / 55%);
  margin-top: 8px;
  padding-top: 15px;
}
.qe-tools-rail button,
.qe-tools-rail .qe-rail-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0 5px 5px 0;
  color: #b3bcc7;
  cursor: pointer;
  display: flex;
  font-size: 12.5px;
  gap: 10px;
  letter-spacing: .1px;
  line-height: 1.35;
  margin-right: 8px;
  min-height: 34px;
  padding: 7px 12px 7px 11px;
  text-align: left;
  text-decoration: none;
  transition: background-color .13s ease, color .13s ease, border-color .13s ease;
  width: calc(100% - 8px);
}
.qe-tools-rail .v33-tico {
  color: #7d8895;
  flex: 0 0 auto;
  height: 15px;
  transition: color .13s ease;
  width: 15px;
}
.qe-tools-rail button:hover,
.qe-tools-rail .qe-rail-link:hover {
  background: rgb(223 187 100 / 7%);
  border-left-color: rgb(223 187 100 / 45%);
  color: var(--qe-text);
}
.qe-tools-rail button:hover .v33-tico,
.qe-tools-rail .qe-rail-link:hover .v33-tico { color: var(--qe-accent); }
.qe-tools-rail button:focus-visible,
.qe-tools-rail .qe-rail-link:focus-visible {
  background: rgb(223 187 100 / 9%);
  outline: 2px solid var(--qe-accent);
  outline-offset: -2px;
}
/* The open tool. The rail had no way to say which one that was. */
.qe-tools-rail [aria-current="true"],
.qe-tools-rail [aria-expanded="true"],
.qe-tools-rail .is-current {
  background: rgb(223 187 100 / 11%);
  border-left-color: var(--qe-accent);
  color: var(--qe-text);
  font-weight: 600;
}
.qe-tools-rail [aria-current="true"] .v33-tico,
.qe-tools-rail [aria-expanded="true"] .v33-tico,
.qe-tools-rail .is-current .v33-tico { color: var(--qe-accent); }
/* Collapsed: icons only, centred, and the label must not leave a gap. */
body.qe-rail-collapsed .qe-tools-rail button,
body.qe-rail-collapsed .qe-tools-rail .qe-rail-link {
  gap: 0;
  justify-content: center;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

/* ─── Engine verbose rows ─────────────────────────────────────────────────
   Thirteen columns rendered in one flat #f2f4f8. A weight, a percentile, a
   multiple, a fund name and the word "n/a" all looked identical, so nothing
   could be scanned down a column and the eye had no anchor. Only the case
   chip and the return carried any colour at all.

   Treated the way the deck already treats numbers elsewhere: the macro tiles
   use gold for the reading and grey for the provenance, the strip uses
   tabular figures, and --qe-good / --qe-danger already carry direction. That
   vocabulary is applied here rather than a new one invented. */
.qe-model-details tbody tr:hover > td { background: rgb(223 187 100 / 4%); }
.qe-model-details tbody tr[data-details="open"] > td { background: rgb(223 187 100 / 7%); }
.qe-model-details td[data-kind] { font-variant-numeric: tabular-nums; }
/* The target weight is the number the table exists to show. */
.qe-model-details td[data-kind="weight"] {
  color: var(--qe-accent);
  font-weight: 650;
  text-align: right;
}
.qe-model-details td[data-kind="rank"],
.qe-model-details td[data-kind="multiple"],
.qe-model-details td[data-kind="staying"] { color: #c3ccd7; text-align: right; }
.qe-model-details td[data-kind="bucket"] { color: var(--qe-muted); }
.qe-model-details td[data-kind="sector"] { color: #aab4c0; }
.qe-model-details td[data-tone="positive"] { color: var(--qe-good); font-weight: 600; }
.qe-model-details td[data-tone="negative"] { color: var(--qe-danger); font-weight: 600; }
.qe-model-details td[data-tone="mixed"] { color: var(--qe-warn); }
/* Absent is not a measurement and should not read like one. */
.qe-model-details td[data-tone="absent"] { color: #5c6570; }
/* CORE / STOCK / CASH was plain text above the Details button. It is a
   classification, so it looks like one -- and the three read apart at a
   glance instead of only on reading. */
.qe-model-details td.qe-model-action > span {
  border: 1px solid transparent;
  border-radius: 3px;
  display: inline-block;
  font: 600 8.5px/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .1em;
  margin-bottom: 4px;
  padding: 3px 5px;
}
.qe-model-details td[data-action="CORE"] > span {
  background: rgb(63 185 80 / 13%); border-color: rgb(63 185 80 / 38%); color: #7ee397;
}
.qe-model-details td[data-action="STOCK"] > span {
  background: rgb(223 187 100 / 13%); border-color: rgb(223 187 100 / 38%); color: var(--qe-accent);
}
.qe-model-details td[data-action="CASH"] > span,
.qe-model-details td[data-action="TARGET"] > span {
  background: rgb(139 148 158 / 13%); border-color: rgb(139 148 158 / 34%); color: var(--qe-muted);
}

/* ─── Engine model facts ──────────────────────────────────────────────────
   The decision facts under the allocation chart -- regime, level, risk
   state, cadence, decision reason, anchor -- were built as a bare <dl> with
   no class, so they rendered with the browser's default: every label on its
   own line and every value indented under it, stacked fourteen lines deep
   beside a neatly tiled backtest card. Same data, and it read as an
   afterthought next to it.

   This is the label/value treatment the tool panel tables use, for the same
   reason: the label is mono small caps and recedes, the value is the thing
   being read, and a hairline separates one fact from the next. Two columns,
   so the block is half as tall and scans down the values. */
dl.qe-quant-facts {
  display: grid;
  gap: 0 18px;
  /* A fixed label column rather than `auto 1fr`, so the value sits beside
     the label the way it does in the panel tables. Auto-sizing put the
     labels hard left and the values hard right, 540px apart across the
     card, which is a long way to track a line for "Lvl 1". */
  grid-template-columns: 148px minmax(0, 1fr);
  margin: 14px 0 0;
}
dl.qe-quant-facts dt {
  align-self: center;
  border-top: 1px solid rgb(48 54 61 / 55%);
  color: var(--qe-muted);
  font: 500 9px/1 "IBM Plex Mono", monospace;
  letter-spacing: .05em;
  padding: 8px 0;
  text-transform: uppercase;
}
dl.qe-quant-facts dd {
  align-self: center;
  border-top: 1px solid rgb(48 54 61 / 55%);
  color: var(--qe-text);
  font-size: 11.5px;
  margin: 0;
  padding: 8px 0;
}
dl.qe-quant-facts dt:first-of-type,
dl.qe-quant-facts dd:first-of-type { border-top: 0; }

/* ─── Buttons the stylesheet never reached ────────────────────────────────
   77 buttons on the deck were rendering with the browser's defaults: grey
   rgb(107,107,107), a 2px outset white bevel and no radius. Every ticker in
   the model table, every favourite star, "Analyze My Portfolio", "Reload
   Watchlist" -- raw Windows-95 buttons on a dark financial deck, next to the
   38 button groups that do have the product's own treatment.

   The cause is plain once looked at: they are built in JS with
   createElement('button') and no class, so every class-based rule in the
   deck misses them.

   This is written with :where(), which contributes zero specificity, so it is
   a floor rather than an override -- every one of those 38 existing
   treatments still wins without needing !important or a more specific
   selector. Adding a class to one of these buttons later silently upgrades
   it; nothing here has to be removed first. */
:where(.qe-workspace button) {
  background: #16171d;
  border: 1px solid #6f5c2c;
  border-radius: 4px;
  color: #e6edf3;
  cursor: pointer;
  /* No font here on purpose. `button, input, select, textarea { font: inherit }`
     is an element selector, so it outranks :where() and would win anyway --
     and inheriting the surrounding type is the right answer for these. The
     two places that genuinely need their own typography ask for it below,
     with just enough specificity to beat that one rule and no more. */
  padding: 5px 10px;
  transition: background-color .13s ease, border-color .13s ease, color .13s ease;
}
:where(.qe-workspace button:hover:not(:disabled)) {
  background: #1e2029;
  border-color: #dfbb64;
  color: #f2f4f8;
}
:where(.qe-workspace button:disabled) { cursor: not-allowed; opacity: .5; }
:where(.qe-workspace button:focus-visible) { outline: 2px solid #dfbb64; outline-offset: 1px; }

/* A ticker is the row's identity and its way into the ticker page, so it
   reads as the name it is rather than as a control wrapped around one. */
.qe-workspace td button:not([class]):not([aria-label^="Favorite"]) {
  background: transparent;
  border: 1px solid transparent;
  color: #dfbb64;
  font: 600 11.5px/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .04em;
  padding: 4px 7px;
}
:where(.qe-workspace td button:not([aria-label^="Favorite"]):hover) {
  background: #dfbb6414;
  border-color: #dfbb6459;
  color: #f0d79a;
}

/* The star is a toggle, not a button-shaped box: the glyph carries the
   state, so a border around it is noise in every row of the table. */
.qe-workspace button[aria-label^="Favorite"]:not([class]) {
  background: transparent;
  border: 1px solid transparent;
  color: #6e7681;
  font-size: 15px;
  line-height: 1;
  padding: 3px 6px;
}
:where(.qe-workspace button[aria-label^="Favorite"]:hover:not(:disabled)),
:where(.qe-workspace button[aria-label^="Favorite"][aria-pressed="true"]) {
  background: transparent;
  border-color: transparent;
  color: #dfbb64;
}

/* Two buttons appended next to each other by JS have no whitespace between
   them and no gap from a parent that is display:block, so they render edge to
   edge -- "Reload Watchlist" ended exactly where "Ask Claude about Watchlist"
   began. Scoped to classless buttons, which is the same population that had
   no styling at all: every deliberate toolbar in the deck is a flex container
   with its own gap, and must not have a margin added on top of it. */
:where(.qe-workspace button:not([class]) + button:not([class])) { margin-left: 8px; }

/* The model row is the control.
   The owner asked for the Details button to go and for one click on the row to
   open its detail panel. The button stays in the markup, visually hidden,
   because it carries the aria-expanded / aria-controls relationship that tells
   a screen reader what the row does -- a bare <tr> with a click handler tells
   it nothing and cannot be reached by keyboard at all. .qe-sr-only alone lost
   to the toggle's own padding and border, which left a 2x30 sliver in the
   action cell. */
.qe-model-details .qe-model-row-toggle.qe-sr-only,
.qe-model-row-toggle.qe-sr-only {
  border: 0;
  padding: 0;
  height: 1px;
  min-height: 0;
  width: 1px;
  min-width: 0;
}
.qe-model-row-clickable { cursor: pointer; }
.qe-model-row-clickable:hover > td { background: rgb(223 187 100 / 6%); }
.qe-model-row-clickable:focus-within > td { background: rgb(223 187 100 / 9%); }
/* The controls inside the row mean something else, so they keep their own
   pointer and do not inherit the row's. */
.qe-model-row-clickable button,
.qe-model-row-clickable a { cursor: pointer; }

/* Every disclosure looks like one.
   Six summaries on the deck -- the company look-through, its two nested
   sections, the historical diagnostic and its two -- had no hover state and
   cursor: auto, so nothing about them said they could be opened. The deck
   already styles .qe-bond-details and .qe-model-earnings summaries this way;
   this is the same treatment for the rest, as one rule rather than a seventh
   special case. */
summary {
  cursor: pointer;
  border-radius: 4px;
  transition: background .1s, color .1s;
}
summary:hover,
summary:focus-visible {
  background: rgb(223 187 100 / 8%);
  color: var(--qe-accent, #dfbb64);
}

/* The pie's slices and legend rows are controls.
   Both carry tabindex 0 and open the ticker on Enter, and neither had any
   focus treatment -- a keyboard reader tabbed through twenty-two stops with
   nothing moving on screen. The JS highlight now fires on focus as well as
   hover, and this is the ring that says which one has it. */
.es-incard-pie [data-sym]:focus-visible {
  outline: 2px solid var(--qe-accent, #dfbb64);
  outline-offset: 2px;
  border-radius: 4px;
}
/* The chart attribution is an outbound link and read as static text. */
.qe-backtest-credit { text-decoration: none; }
.qe-backtest-credit:hover,
.qe-backtest-credit:focus-visible {
  color: var(--qe-accent, #dfbb64);
  text-decoration: underline;
}

/* A select gets the browser's own focus ring, which on Windows is the same
   default chrome the tooltips were replaced for. Every other control on the
   deck answers focus in the deck's accent; the risk-profile select in Settings
   was the one that did not. Written for the bare element, since the failure
   was a class-based rule missing the control nobody named. */
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  border-color: var(--qe-accent, #dfbb64);
}

/* 'ETF' in a stock-only column is the answer, not a missing value.
   It used to carry the absent tone, which both said the wrong thing and put it
   at 3.42:1 against the table -- under the 4.5 a reader needs at 11px. Quieter
   than a number, legible as a statement. */
[data-tone="category"] {
  color: var(--qe-text2, #8b949e);
  font-variant-numeric: normal;
}
/* The five rail headings sat at 4.41:1, a hair under the same threshold.
   --qe-muted is the deck's dimmest text token and is right everywhere else;
   these are section headings on the darkest surface on the page, so they take
   the donor's own --text2 instead of a colour invented for them. */
.qe-rail-heading { color: var(--qe-text2, #8b949e); }

/* Portfolio verdicts (portfolio_verdicts.js). The card rows reuse the donor's
   #v33-me-portfolio rules above; these add what the verdict list needs beside
   them, and give the private review the room a six-column table takes. */
#v33-me-portfolio .es-portfolio-warning { color: #fbbf24; font-size: 11px; font-weight: 600; margin: 0 0 6px; }
#v33-me-portfolio .es-portfolio-legend { color: var(--text2); font-size: 9px; letter-spacing: .06em; margin: 0 0 4px; }
#v33-me-portfolio .tkr-hit { background: none; border: 0; color: var(--text); cursor: pointer; font: inherit; font-weight: 700; padding: 0; }
#v33-me-portfolio .tkr-hit:hover, #v33-me-portfolio .tkr-hit:focus-visible { color: var(--blue); }
#v33-me-portfolio .es-model-more { background: none; border: 0; cursor: pointer; font: inherit; font-size: 10px; padding: 0; text-align: left; }
#v33-me-portfolio .es-model-more:hover { color: var(--blue); }
#v33-me-portfolio .es-model-delta[data-action="HOLD"] { color: var(--text2); }
#v33-me-portfolio .es-portfolio-pie { min-height: 208px; }
#regal-analyze-portfolio { margin-top: 8px; }

#regal-private-dialog .qe-command-palette-card { max-width: min(1180px, 96vw); }
.regal-verdicts { margin: 14px 0 18px; }
.regal-verdicts h3 { font-size: 13px; letter-spacing: .08em; margin: 0 0 10px; text-transform: uppercase; }
.regal-verdict-headline { border: 1px solid var(--qe-border, #30363d); border-left: 3px solid #fbbf24; border-radius: 6px; margin-bottom: 12px; padding: 10px 12px; }
.regal-verdict-headline > strong { color: var(--qe-text, #eef2f8); display: block; font-size: 16px; margin-bottom: 4px; }
.regal-verdict-headline p { color: var(--text2, #a7afbc); font-size: 12px; margin: 3px 0; }
.regal-verdict-headline .regal-verdict-warning { color: #fbbf24; font-weight: 600; }
.regal-verdict-headline .regal-verdict-meta { font-size: 11px; }
.regal-verdict-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.regal-verdict-filter { background: transparent; border: 1px solid var(--qe-border, #30363d); border-radius: 999px; color: var(--text2, #a7afbc); cursor: pointer; font-size: 11px; font-weight: 600; padding: 4px 10px; }
.regal-verdict-filter[aria-pressed="true"] { border-color: var(--qe-accent, #dfbb64); color: var(--qe-text, #eef2f8); }
.regal-verdict-filter[data-action="SELL"] { color: #bf929a; }
.regal-verdict-filter[data-action="BUY_NEW"] { color: #8fad9d; }
.regal-verdict-filter[data-action="ADD"] { color: #a4bdb0; }
.regal-verdict-filter[data-action="TRIM"] { color: #fbbf24; }
.regal-verdict-filter:disabled { cursor: default; opacity: .4; }
.regal-verdict-pies { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.regal-verdict-pies figure { border: 1px solid var(--qe-border, #30363d); border-radius: 6px; margin: 0; padding: 10px 12px; }
.regal-verdict-pies figcaption { color: var(--text2, #a7afbc); font-size: 11px; font-weight: 600; letter-spacing: .04em; margin-bottom: 6px; text-transform: uppercase; }
.regal-verdict-scroll { overflow-x: auto; }
.regal-verdict-table { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; width: 100%; }
.regal-verdict-table th { border-bottom: 1px solid var(--qe-border, #30363d); color: var(--text2, #a7afbc); font-size: 10px; letter-spacing: .06em; padding: 6px 8px; text-align: left; text-transform: uppercase; }
.regal-verdict-table td { border-bottom: 1px solid rgb(255 255 255 / 6%); padding: 7px 8px; vertical-align: top; }
.regal-verdict-table tr[data-action="EXIT"] td { background: rgb(191 146 154 / 6%); }
.regal-verdict-table tr[data-action="BUY_NEW"] td, .regal-verdict-table tr[data-action="ADD"] td { background: rgb(143 173 157 / 5%); }
.regal-verdict-table tr[data-action="TRIM"] td { background: rgb(251 191 36 / 6%); }
.regal-verdict-table tfoot td { border-top: 1px solid var(--qe-border, #30363d); color: var(--text2, #a7afbc); font-weight: 700; }
.regal-verdict-table .tkr-hit { background: none; border: 0; color: var(--qe-text, #eef2f8); cursor: pointer; font: inherit; font-weight: 700; padding: 0; }
.regal-verdict-table .tkr-hit:hover, .regal-verdict-table .tkr-hit:focus-visible { color: var(--qe-accent, #dfbb64); }
.regal-verdict-gap { white-space: nowrap; }
.regal-verdict-gap[data-action="SELL"] { color: #bf929a; }
.regal-verdict-gap[data-action="BUY_NEW"] { color: #8fad9d; }
.regal-verdict-gap[data-action="ADD"] { color: #a4bdb0; }
.regal-verdict-gap[data-action="TRIM"] { color: #fbbf24; }
.regal-verdict-why { color: var(--text2, #a7afbc); }
.regal-verdicts .es-action-pill { border: 1px solid rgb(148 163 184 / 33%); border-radius: 6px; color: #94a3b8; display: inline-block; font-size: 9px; font-weight: 600; min-width: 56px; padding: 1px 5px; text-align: center; }
.regal-verdicts .es-action-pill[data-action="BUY_NEW"] { background: rgb(143 173 157 / 13%); border-color: rgb(143 173 157 / 33%); color: #8fad9d; }
.regal-verdicts .es-action-pill[data-action="ADD"] { background: rgb(134 239 172 / 13%); border-color: rgb(134 239 172 / 33%); color: #a4bdb0; }
.regal-verdicts .es-action-pill[data-action="TRIM"] { background: rgb(251 191 36 / 13%); border-color: rgb(251 191 36 / 33%); color: #fbbf24; }
.regal-verdicts .es-action-pill[data-action="SELL"] { background: rgb(191 146 154 / 13%); border-color: rgb(191 146 154 / 33%); color: #bf929a; }
.regal-verdict-holdings, .regal-verdict-sources { margin: 10px 0; }
.regal-verdict-holdings > summary, .regal-verdict-sources > summary { color: var(--text2, #a7afbc); cursor: pointer; font-size: 12px; }
.regal-verdict-holdings > summary .es-portfolio-verbose-heading { display: inline-flex; margin: 0; }
@media (max-width: 700px) { .regal-verdict-pies { grid-template-columns: 1fr; } }

/* The deck's MODEL TARGET card, drawn as the donor's list (07-model-target-card.png),
   and the model table's account columns (09-model-holdings-table.png). */
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-row { align-items:center; display:flex; font-variant-numeric:tabular-nums; gap:6px; padding:2px 0; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-symbol { flex:1; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-sleeve { color:var(--text2); font-size:10px; letter-spacing:.04em; min-width:64px; text-transform:uppercase; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-allocation { color:var(--text2); font-size:11px; min-width:118px; text-align:right; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-allocation b { color:var(--text); }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-delta { color:var(--text2); font-size:11px; min-width:58px; text-align:right; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-delta[data-action="BUY_NEW"] { color:#8fad9d; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-delta[data-action="ADD"] { color:#a4bdb0; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-delta[data-action="TRIM"] { color:#fbbf24; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-delta[data-action="SELL"] { color:#bf929a; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-more { background:none; border:0; color:var(--text2); cursor:pointer; font-size:10px; margin-top:4px; padding:0; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-total { border-top:1px solid var(--border); display:flex; font-size:11px; font-variant-numeric:tabular-nums; justify-content:space-between; margin-top:5px; padding-top:5px; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-total > span { color:var(--text2); font-weight:700; letter-spacing:.04em; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-model-total > strong { color:#fbbf24; font-weight:700; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-portfolio-legend { color:var(--text2); font-size:9.5px; letter-spacing:.05em; margin:0 0 4px; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .es-action-pill, .qe-model-action .es-action-pill { border:1px solid var(--border); border-radius:5px; display:inline-block; font-size:9.5px; font-weight:700; letter-spacing:.04em; min-width:64px; padding:1px 6px; text-align:center; }
:is(#v33-me-model, #qetf-model-summary, #ltc-model-summary, .qe-model-action) .es-action-pill[data-action="BUY_NEW"] { background:rgb(143 173 157 / 13%); border-color:rgb(143 173 157 / 33%); color:#8fad9d; }
:is(#v33-me-model, #qetf-model-summary, #ltc-model-summary, .qe-model-action) .es-action-pill[data-action="ADD"] { background:rgb(134 239 172 / 13%); border-color:rgb(134 239 172 / 33%); color:#a4bdb0; }
:is(#v33-me-model, #qetf-model-summary, #ltc-model-summary, .qe-model-action) .es-action-pill[data-action="TRIM"] { background:rgb(251 191 36 / 13%); border-color:rgb(251 191 36 / 33%); color:#fbbf24; }
:is(#v33-me-model, #qetf-model-summary, #ltc-model-summary, .qe-model-action) .es-action-pill[data-action="SELL"] { background:rgb(191 146 154 / 13%); border-color:rgb(191 146 154 / 33%); color:#bf929a; }
:is(#v33-me-model, #qetf-model-summary, #ltc-model-summary, .qe-model-action) .es-action-pill[data-action="HOLD"] { color:var(--text2); }
.qe-model-details tr[data-verdict="BUY_NEW"], .qe-model-details tr[data-verdict="ADD"] { background:rgb(143 173 157 / 6%); }
.qe-model-details tr[data-verdict="TRIM"] { background:rgb(251 146 60 / 7%); }
.qe-model-details tr[data-verdict="SELL"] { background:rgb(191 146 154 / 7%); }
.qe-model-details td .qe-model-shares { color:var(--text2); display:block; font-size:10px; margin-top:2px; }
.qe-model-details tfoot td { border-top:1px solid var(--border); color:var(--text2); font-size:11px; font-weight:600; padding-top:8px; }
.qe-model-details tfoot td.weight { color:var(--text); }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .tkr-hit { background: none; border: 0; color: var(--text); cursor: pointer; font: inherit; font-weight: 700; padding: 0; }
:is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .tkr-hit:hover, :is(#v33-me-model,#qetf-model-summary,#ltc-model-summary) .tkr-hit:focus-visible { color: var(--blue); }

/* In the card's heading row, the same button as the Stocks card's Pie view. */
.qe-model-pie-toggle { align-self:center; background:transparent; border:1px solid var(--border); border-radius:5px; color:var(--blue); cursor:pointer; flex:0 0 auto; font-size:10px; letter-spacing:.02em; margin:0 0 0 auto; padding:2px 9px; white-space:nowrap; }
.qe-model-pie-toggle:hover, .qe-model-pie-toggle:focus-visible { color:var(--text); border-color:var(--text2); }

/* The donor's paused-buys banner (01-dashboard-top.png). */
.regal-buys-paused { align-items:center; background:rgb(251 191 36 / 7%); border:1px solid rgb(251 191 36 / 30%); border-radius:8px; color:var(--text); display:flex; flex-wrap:wrap; font-size:12.5px; gap:8px 12px; margin:10px 0 14px; padding:11px 16px; }
.regal-buys-paused strong { color:#fbbf24; }
.regal-buys-paused button { background:none; border:1px solid rgb(251 191 36 / 55%); border-radius:6px; color:#fbbf24; cursor:pointer; font-size:12px; font-weight:700; margin-left:auto; padding:6px 12px; }
.regal-buys-paused button:hover, .regal-buys-paused button:focus-visible { background:rgb(251 191 36 / 12%); }
.regal-verdict-export { align-items:center; display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.regal-verdict-download { background:none; border:1px solid var(--border); border-radius:6px; color:var(--text); cursor:pointer; font-size:12px; padding:6px 12px; }
.regal-verdict-download:hover, .regal-verdict-download:focus-visible { border-color:var(--text2); }

/* The watchlist as the donor's facts table. */
.qe-watchlist-table td, .qe-watchlist-table th { white-space:nowrap; }
/* Text columns read left like the ticker beside them; figures stay right (owner audit 2026-10-31). */
.qe-watchlist-table :is(th,td)[data-kind=sector], .qe-watchlist-table thead th:nth-child(2) { text-align:left; }
.qe-watchlist-table td:first-child button { background:none; border:0; color:var(--text); cursor:pointer; font:inherit; font-weight:700; padding:0; }
.qe-watchlist-table td.qe-watchlist-none { color:var(--text2); font-size:10.5px; white-space:normal; }
.qe-watchlist-table .es-action-pill { border:1px solid var(--border); border-radius:5px; font-size:9.5px; font-weight:700; padding:1px 6px; }
.qe-watchlist-table .es-action-pill[data-action="BUY_NEW"], .qe-watchlist-table .es-action-pill[data-action="ADD"] { color:#8fad9d; border-color:rgb(143 173 157 / 40%); }
.qe-watchlist-table .es-action-pill[data-action="TRIM"] { color:#fbbf24; border-color:rgb(251 191 36 / 40%); }
.qe-watchlist-table .es-action-pill[data-action="SELL"] { color:#bf929a; border-color:rgb(191 146 154 / 40%); }

/* The donor's risk radar corner widget (dashboard-main-core-state.js
   esRenderActiveWarnings, v37.185): a pill in the bottom-right corner that
   opens upward into its cards and minimises back. It sits just left of the
   compact launcher, which keeps the corner itself. It lives on <body>,
   outside the deck's colour variables, so the donor's colours are literal.
   It stacks over the page and under everything that opens over the page:
   the floating macro panel and its backdrop (60 and 47), and every dialog
   (the rail's at 80, chat at 90, Settings at 1000). At 200 it sat on the
   screener's last column, and over the macro panel it sat on whichever tile
   the panel scrolled into the corner -- Real PCE on 2026-09-26, whose click
   went to the pill. */
.regal-radar-dock { position:fixed; right:148px; bottom:56px; z-index:45; width:min(360px, calc(100vw - 32px)); display:flex; flex-direction:column; align-items:flex-end; pointer-events:none; }
.regal-radar-dock > * { pointer-events:auto; }
.regal-radar-dock[hidden] { display:none; }
.regal-radar-pill { display:flex; align-items:center; gap:7px; background:#101117; border:1px solid #6f5c2c; border-radius:20px; padding:7px 13px; cursor:pointer; box-shadow:0 8px 24px rgba(0,0,0,.4); color:#eef2f8; font:inherit; font-size:12px; font-weight:600; }
.regal-radar-pill:hover, .regal-radar-pill:focus-visible { border-color:#dfbb64; }
.regal-radar-dot { color:#d4a548; }
.regal-radar-count { color:#a7afbc; font-weight:400; }
/* Kept below the product tabs, as the donor keeps it (its v37 note: an open
   stack over the tabs intercepted them); Regal's tabs sit lower, under the
   paused-buys banner. */
.regal-radar-panel { display:flex; flex-direction:column; gap:8px; max-height:calc(100vh - 470px); min-height:200px; overflow:auto; padding-bottom:2px; width:100%; overscroll-behavior:contain; }
.regal-radar-bar { display:flex; align-items:center; gap:8px; background:#101117; border:1px solid #6f5c2c; border-radius:9px; padding:8px 12px; box-shadow:0 12px 34px rgba(0,0,0,.4); position:sticky; top:0; z-index:1; }
.regal-radar-bar strong { flex:1; color:#eef2f8; font-size:12px; font-weight:700; }
.regal-radar-min { background:transparent; border:1px solid #4a3d1e; color:#a7afbc; border-radius:6px; cursor:pointer; font:inherit; font-size:13px; line-height:1; padding:2px 9px; }
.regal-radar-min:hover, .regal-radar-min:focus-visible { color:#eef2f8; border-color:#6f5c2c; }
.regal-radar-card { background:#101117; border:1px solid rgba(124,147,179,.33); border-left:3px solid #7c93b3; border-radius:9px; padding:11px 12px; }
.regal-radar-card[data-level="HIGH"] { border-color:rgba(249,115,22,.33); border-left-color:#f97316; }
.regal-radar-card[data-level="ELEVATED"] { border-color:rgba(212,165,72,.33); border-left-color:#d4a548; }
.regal-radar-head { display:flex; align-items:flex-start; gap:8px; }
.regal-radar-icon { font-size:14px; line-height:1.1; }
.regal-radar-head strong { flex:1; min-width:0; color:#eef2f8; font-size:12.5px; font-weight:700; line-height:1.3; }
.regal-radar-level { font-family:'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace; font-size:8.5px; font-weight:800; letter-spacing:.05em; color:#7c93b3; background:rgba(124,147,179,.12); border:1px solid #7c93b3; border-radius:4px; padding:1px 5px; white-space:nowrap; }
.regal-radar-card[data-level="HIGH"] .regal-radar-level { color:#f97316; background:rgba(249,115,22,.12); border-color:#f97316; }
.regal-radar-card[data-level="ELEVATED"] .regal-radar-level { color:#d4a548; background:rgba(212,165,72,.12); border-color:#d4a548; }
.regal-radar-dismiss { background:transparent; border:none; color:#a7afbc; cursor:pointer; font:inherit; font-size:16px; line-height:1; padding:0 1px; flex:none; }
.regal-radar-dismiss:hover, .regal-radar-dismiss:focus-visible { color:#eef2f8; }
.regal-radar-card p { color:#a7afbc; font-size:10.5px; line-height:1.5; margin:5px 0 0; }
.regal-radar-card p.regal-radar-basis { color:#6e7682; font-size:9.5px; }
.regal-radar-chips { display:flex; flex-wrap:wrap; margin-top:5px; }
.regal-radar-chip { display:inline-flex; padding:1px 6px; margin:3px 4px 0 0; border-radius:4px; background:#060608; border:1px solid #4a3d1e; color:#eef2f8; cursor:pointer; font:inherit; font-size:10px; font-weight:700; }
.regal-radar-chip:hover, .regal-radar-chip:focus-visible { border-color:#a7afbc; }
.regal-radar-note { color:#6e7682; font-size:9.5px; line-height:1.5; margin:0; padding:0 4px; }
@media (max-width: 700px) { .regal-radar-dock { right:16px; bottom:104px; } }

/* The donor's sections under the model table (02-dashboard-full.png): an
   uppercase title with its meta line over open content -- the companies the
   model is in, the earnings, the historical results and the trade history. */
#regal-deck-sections { display:block; min-width:0; }
#regal-deck-sections > div:empty { display:none; }
.regal-deck-section { border-top:1px solid #4a3d1e; margin:18px 0 0; min-width:0; padding:16px 0 4px; }
.regal-deck-section-head { align-items:baseline; display:flex; flex-wrap:wrap; gap:4px 10px; margin:0 0 8px; }
.regal-deck-section-head h3 { color:#eef2f8; font-size:13px; font-weight:700; letter-spacing:.04em; margin:0; text-transform:uppercase; }
.regal-deck-section-meta { color:#a7afbc; font-size:10.5px; }
.regal-deck-lead { color:#a7afbc; font-size:11.5px; line-height:1.55; margin:4px 0 10px; max-width:1100px; }
.regal-deck-subcard { background:#101117; border:1px solid #4a3d1e; border-radius:8px; margin:12px 0 0; min-width:0; overflow-x:auto; padding:12px 14px; }
.regal-deck-subcard h4 { color:#d6dbe3; font-size:11px; font-weight:600; letter-spacing:.08em; margin:0 0 2px; text-transform:uppercase; }
.regal-deck-subcard .regal-deck-lead { font-size:11px; margin:2px 0 8px; }
.regal-deck-section table.qe-ticker-financial-table { display:table; width:100%; }
.regal-deck-section table.qe-ticker-financial-table th { border-bottom:1px solid #6f5c2c; color:#a7afbc; font-size:10px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; }
.regal-deck-section table.qe-ticker-financial-table td { border-bottom:1px solid rgba(255,255,255,.05); font-size:12px; }
/* The ticker page's table type (mono 9px heads, every column but the first
   right-aligned) is its own; here the heads are the donor's sans and the
   words columns read left to right. */
.regal-deck-section table.qe-ticker-financial-table thead th { font-family:inherit; line-height:1.3; padding:7px 8px; }
.regal-deck-section table.qe-ticker-financial-table td { color:#d6dbe3; padding:6px 8px; }
.regal-lookthrough table:has(tr > :nth-child(6)) :is(th,td):is(:nth-child(2), :nth-child(6)) { text-align:left; }
/* "What is not in this list": holding, its share, and the reason, which
   reads left to right and wraps. */
.regal-lookthrough .regal-deck-subcard:last-of-type table :is(th,td):nth-child(3) { text-align:left; white-space:normal; }
/* The donor's company cell: ticker, the Engine-pick mark, the name under it. */
/* The name wraps under the ticker, so a long one ("Taiwan Semiconductor
   Manufacturing Co L") does not hold the column wide and push the shares
   past the edge of a phone. */
.regal-lookthrough td.regal-company-cell { line-height:1.3; min-width:110px; white-space:normal; }
.regal-lookthrough table thead th { white-space:normal; }
.regal-lookthrough .regal-company-head { align-items:baseline; display:inline-flex; gap:4px; }
.regal-lookthrough .regal-pick-mark { color:#dfbb64; cursor:help; font-size:10px; }
.regal-lookthrough .regal-company-also { color:#8b95a3; font-size:10.5px; }
.regal-lookthrough .regal-company-name { color:#8b95a3; display:block; font-size:10.5px; font-weight:400; margin-top:1px; }
.regal-lookthrough table:has(tr > :nth-child(6)) :is(th,td):first-child { color:#8b95a3; width:28px; }
.regal-deck-section .qe-model-toggle { background:none; border:0; border-radius:0; color:#eef2f8; cursor:pointer; font:inherit; font-weight:700; min-height:0; padding:0; }
.regal-deck-section .qe-model-toggle:hover, .regal-deck-section .qe-model-toggle:focus-visible { color:#dfbb64; }
.regal-deck-disclosure { color:#a7afbc; font-size:11px; line-height:1.5; margin:12px 0 0; }
.regal-deck-disclosure strong { color:#d6dbe3; font-weight:600; }
.regal-deck-disclosure ul { margin:4px 0 0; padding-left:18px; }
.regal-deck-smallprint { color:#6e7682; font-size:10px; line-height:1.5; margin:10px 0 0; overflow-wrap:anywhere; }
.regal-trade-history .regal-verdict-export { align-items:center; display:flex; flex-wrap:wrap; gap:8px 12px; justify-content:flex-end; margin-top:10px; }
.regal-csv-button { background:transparent; border:1px solid #4a3d1e; border-radius:5px; color:#eef2f8; cursor:pointer; font:inherit; font-size:11px; padding:4px 10px; }
.regal-csv-button:hover, .regal-csv-button:focus-visible { border-color:#6f5c2c; }
.regal-trade-history .regal-verdict-meta { color:#a7afbc; font-size:11px; }

/* The donor's earnings tables: date, ticker, a source pill, the account's
   position and the beat or miss, one row per print. */
.regal-earnings-sub { color:#a7afbc; font-size:10.5px; font-weight:600; letter-spacing:.06em; margin:10px 0 4px; text-transform:uppercase; }
.regal-earnings-scroll { min-width:0; overflow-x:auto; }
.regal-earnings-table { border-collapse:collapse; font-variant-numeric:tabular-nums; width:100%; }
.regal-earnings-table th { border-bottom:1px solid #6f5c2c; color:#a7afbc; font-size:10px; font-weight:600; letter-spacing:.05em; padding:6px 10px; text-align:left; text-transform:uppercase; white-space:nowrap; }
.regal-earnings-table td { border-bottom:1px solid rgba(255,255,255,.05); color:#eef2f8; font-size:12px; padding:6px 10px; white-space:nowrap; }
.regal-earnings-table th:nth-child(n+4), .regal-earnings-table td.regal-earnings-num { text-align:right; }
.regal-earnings-table td.regal-earnings-day { color:#a7afbc; }
.regal-earnings-table .tkr-hit { background:none; border:0; color:#eef2f8; cursor:pointer; font:inherit; font-weight:700; padding:0; }
.regal-earnings-table .tkr-hit:hover, .regal-earnings-table .tkr-hit:focus-visible { color:#dfbb64; }
.regal-earnings-ticker { display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; }
.regal-earnings-scroll.is-expanded .regal-source-inline { display:none; }
.regal-source-pill { border:1px solid #6f5c2c; border-radius:4px; color:#d4a548; font-size:9.5px; font-weight:600; letter-spacing:.04em; padding:1px 6px; }
.regal-source-pill[data-source="both"] { border-color:rgba(46,230,154,.45); color:#8fad9d; }
.regal-source-pill[data-source="model"] { border-color:rgba(45,212,191,.45); color:#90b8b2; }
.regal-source-pill[data-source="funds"] { border-color:rgba(148,163,184,.45); color:#a3acb9; }
.regal-earnings-verdict { color:#a7afbc; font-size:11px; }
.regal-earnings-verdict b { font-weight:600; margin-right:2px; }
.regal-earnings-verdict[data-tone="good"] { color:#8dad9b; }
.regal-earnings-verdict[data-tone="bad"] { color:#b48690; }
.regal-calendar-note { color:#a7afbc; font-size:10.5px; line-height:1.5; margin:8px 0 0; }
/* Shock detectors on Geopolitical Shocks (geopolitical_shocks.js), donor v33-popups colours */
.regal-shocks{display:grid;gap:10px;margin-bottom:14px}
.regal-shocks .regal-shocks-hint,.regal-shocks .regal-shocks-note{margin:0;color:#aab4c4;font-size:12px;line-height:1.5}
.regal-shocks .regal-shocks-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}
.regal-shocks .regal-shock{display:grid;gap:5px;align-content:start;padding:11px 13px;border:1px solid #26303b;border-left:3px solid #94a3b8;border-radius:8px;background:#111820}
.regal-shocks .regal-shock[data-state=HEALTHY]{border-left-color:#8fad9d}.regal-shocks .regal-shock[data-state=ELEVATED]{border-left-color:#d4a548}
.regal-shocks .regal-shock[data-state=ACTIVE]{border-left-color:#f97316}.regal-shocks .regal-shock[data-state=CRISIS]{border-left-color:#bf929a}
.regal-shocks .regal-shock-head{display:flex;align-items:center;gap:8px}
.regal-shocks .regal-shock-head strong{flex:1;color:#eef2f8;font-size:13px;font-weight:700}
.regal-shocks .regal-shock-badge{padding:2px 7px;border:1px solid #94a3b8;border-radius:5px;background:rgba(148,163,184,.1);color:#94a3b8;font-size:9.5px;font-weight:800;letter-spacing:.06em}
.regal-shocks .regal-shock[data-state=HEALTHY] .regal-shock-badge{border-color:#8fad9d;color:#8fad9d;background:rgba(46,230,154,.1)}
.regal-shocks .regal-shock[data-state=ELEVATED] .regal-shock-badge{border-color:#d4a548;color:#d4a548;background:rgba(212,165,72,.12)}
.regal-shocks .regal-shock[data-state=ACTIVE] .regal-shock-badge{border-color:#f97316;color:#f97316;background:rgba(249,115,22,.14)}
.regal-shocks .regal-shock[data-state=CRISIS] .regal-shock-badge{border-color:#bf929a;color:#bf929a;background:rgba(248,81,73,.16)}
.regal-shocks .regal-shock-measure{margin:0;color:#8b95a3;font-size:10.5px;line-height:1.45}
.regal-shocks .regal-shock-reading{margin:0;color:#c9d1dc;font-size:11.5px;font-variant-numeric:tabular-nums}
.regal-shocks .regal-shock-pending{margin:0;color:#d4a548;font-size:10.5px}
.regal-shocks .regal-shocks-summary{margin:0;color:#aab4c4;font-size:12px}
.regal-shocks .regal-shocks-charts{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin-top:10px}
.regal-shocks .regal-shocks-charts h4{margin:0 0 6px;color:#c9d1dc;font-size:12px}
.qe-tradingview-mini{display:block;width:100%;border:1px solid #26303b;border-radius:8px;background:#0d131a}
.qe-bond-chart{display:grid;gap:6px;margin:12px 0}
.qe-bond-chart h4{margin:0;color:#c9d1dc;font-size:12px}
/* Risk picker served-plan rows (risk_profile_chooser.js) */
.rp-card .rp-stats{display:grid;gap:6px;margin:10px 0 4px}
.rp-card .rp-stat{display:grid;grid-template-columns:minmax(92px,auto) minmax(0,1fr) auto;align-items:center;gap:8px;font-size:11.5px;color:#aab4c4}
.rp-card .rp-stat .lbl{color:#8b95a3;font-size:10.5px;letter-spacing:.04em;text-transform:uppercase}
.rp-card .rp-stat .val{color:#eef2f8;font-weight:700;font-variant-numeric:tabular-nums;text-align:right}
.rp-card .rp-stat .val.muted{color:#c9d1dc;font-weight:600}
.rp-card .rp-stat .bar-track{height:6px;border-radius:3px;background:#1b232d;overflow:hidden}
.rp-card .rp-stat .bar-fill{height:100%;border-radius:3px}
.rp-card .rp-stat-note{color:#8b95a3;font-size:10.5px}
/* Backtest stress windows and bootstrap (quant_backtests.js) */
.qe-backtest-stress{display:grid;gap:8px;margin-top:14px}
.qe-backtest-stress h4{margin:6px 0 0;color:#c9d1dc;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.qe-backtest-stress table{width:100%;border-collapse:collapse;font-size:12px}
.qe-backtest-stress th,.qe-backtest-stress td{padding:6px 8px;border-bottom:1px solid #1b232d;text-align:right;font-variant-numeric:tabular-nums;color:#c9d1dc}
.qe-backtest-stress thead th{color:#8b95a3;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.qe-backtest-stress tbody th{text-align:left;color:#eef2f8;font-weight:600}
/* The row labels are left-aligned, so their heading is: "Episode" sat at the
   right edge of its column, 360 px from the names under it. */
.qe-backtest-stress thead th:first-child{text-align:left}
.qe-backtest-stress tbody th small{display:block;color:#8b95a3;font-weight:400;font-size:10.5px}
.qe-backtest-stress td[data-tone=positive]{color:#8fad9d}.qe-backtest-stress td[data-tone=negative]{color:#bf929a}
.qe-backtest-stress p{margin:0;color:#8b95a3;font-size:11.5px;line-height:1.5}
/* Custom Screener (custom_screener.js) */
.qe-screen{display:grid;gap:10px;margin-bottom:18px}
.qe-screen .qe-screen-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.qe-screen .qe-screen-field{display:grid;gap:4px;color:#8b95a3;font-size:11px;letter-spacing:.04em;text-transform:uppercase}
.qe-screen .qe-screen-field input,.qe-screen .qe-screen-field select{color-scheme:dark}
.qe-screen .qe-screen-field input:focus,.qe-screen .qe-screen-field select:focus{border-color:#dfbb64}
.qe-screen .qe-screen-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.qe-screen .qe-screen-meta{color:#aab4c4;font-size:12px}
.qe-screen .qe-screen-table td[data-tone=positive]{color:#8fad9d}.qe-screen .qe-screen-table td[data-tone=negative]{color:#bf929a}
.qe-screen .qe-screen-symbol{padding:2px 8px;min-height:0;font-weight:700}
.qe-screener-next-heading{margin:8px 0 0;color:#c9d1dc;font-size:13px}
/* Settings form controls in the deck's dark style (owner QA 2026-09-24, P2 #17) */
.qe-original-settings-modal input[type=checkbox],.qe-original-settings-modal input[type=radio]{width:16px;height:16px;min-height:0;margin:0 8px 0 0;vertical-align:-3px;accent-color:#dfbb64;cursor:pointer}
.qe-original-settings-modal input[type=number],.qe-original-settings-modal input[type=text],.qe-original-settings-modal input[type=email],.qe-original-settings-modal select{color-scheme:dark}
.qe-original-settings-modal input[type=number]{width:110px;text-align:right;font-variant-numeric:tabular-nums}
.qe-original-settings-modal input:focus-visible,.qe-original-settings-modal select:focus-visible{border-color:#dfbb64}
.qe-original-settings-modal fieldset{margin:12px 0;padding:12px 14px;border:1px solid #26303b;border-radius:8px;background:#0f151c}
.qe-original-settings-modal legend{padding:0 6px;color:#c9d1dc;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.qe-original-settings-modal label{color:#c9d1dc;font-size:13px;cursor:pointer}
/* Intraday Flow within today (intraday_flow.js) */
.qe-flow-live{display:grid;gap:8px;margin-bottom:16px;padding:12px 14px;border:1px solid #3a4655;border-left:3px solid #dfbb64;border-radius:8px;background:#0f151c}
.qe-flow-live h4{margin:0;color:#f0d17b;font-size:12px;letter-spacing:.06em;text-transform:uppercase}
/* Model trade history (published_workspace_panels.js publishedTradeHistory) */
.regal-trade-history .regal-trade-action{font-weight:700;letter-spacing:.03em}
.regal-trade-history .regal-trade-action[data-action=buy_new],.regal-trade-history .regal-trade-action[data-action=add]{color:#8fad9d}
.regal-trade-history .regal-trade-action[data-action=sell],.regal-trade-history .regal-trade-action[data-action=trim]{color:#bf929a}
/* Compare risk presets: the reader's own preset (quant_backtests.js) */
.qe-backtest-presets tr[data-active=true] > th,.qe-backtest-presets tr[data-active=true] > td{background:rgb(223 187 100 / 8%)}
.qe-backtest-presets tr[data-active=true] > th small{color:#dfbb64;font-weight:600}
.qe-quant-cabinet .qe-quant-performance-card{margin:0 0 14px}
/* ─── Owner QA 2026-09-24/25: type scale, cards and layout ──────────────────
   The layers below snap sizes and restore layouts over inline styles and
   earlier sheets, so some of them do need !important; the button floor above
   stays a :where() floor. */
/* One type scale (owner QA 2026-09-24, P2 #17) */
/* The main tab printed text at twelve sizes from 8.5 to 22 px, half of them
   fractional, in three faces -- the tab labels and the rail's buttons fell
   back to the browser's Arial. Measured on the rendered deck and the ETF tab
   (type census, 2026-09-25), each odd size is snapped to the scale below and
   every control takes the deck's own face. */
button, input, select, textarea, optgroup { font-family: inherit; }
.v33-cab-tab, #qe-rail-toggle { font-family: inherit !important; }
/* 10 px is the smallest reading size (was 8.5, 9 and 9.5). */
.es-action-pill, .es-portfolio-legend, .regal-radar-level, .qe-rail-heading, .qe-rail-controls > span,
#regal-model-table th, .qe-quant-facts dt,
[style*="font-size:8px"], [style*="font-size: 8px"], [style*="font-size:8.5px"], [style*="font-size: 8.5px"],
[style*="font-size:9px"], [style*="font-size: 9px"], [style*="font-size:9.5px"], [style*="font-size: 9.5px"] { font-size: 10px !important; }
/* 11 px (was 10.5). */
.regal-radar-basis, .qe-bottom-bar span, .qe-bottom-bar b, .regal-calendar-column h4, th > small,
[style*="font-size:10.5px"], [style*="font-size: 10.5px"] { font-size: 11px !important; }
/* 12 px (was 11.5). */
.regal-calendar-figure, .regal-calendar-day, .regal-calendar-row .tkr-hit, .qe-quant-facts dd, .qe-backtest-stress > p,
#regal-model-table td > button,
[style*="font-size:11.5px"], [style*="font-size: 11.5px"] { font-size: 12px !important; }
/* 13 px: body prose in cards, and the odd 12.5 and 13.5. */
#qe-rail-toggle, .action-btn .re-main, details.regal-card > p, details.regal-card li,
[style*="font-size:12.5px"], [style*="font-size: 12.5px"], [style*="font-size:13.5px"], [style*="font-size: 13.5px"] { font-size: 13px !important; }
/* 18 px: headline values (was 17). */
[style*="font-size:17px"], [style*="font-size: 17px"] { font-size: 18px !important; }
/* The rail's own header and group labels (owner QA 2026-09-24, P3) */
/* The collapse control carries aria-expanded="true" -- the rail is open --
   and the open-tool rule above matched it, so it drew as a selected tool: a
   rail-wide grey box with a gold edge beside the word TOOLS. It is a small
   icon button. */
.qe-tools-rail .qe-rail-controls #qe-rail-toggle {
  background: transparent; border: 0; box-shadow: none; color: var(--qe-muted);
  font-weight: 400; min-height: 0; padding: 2px 6px; width: auto;
}
.qe-tools-rail .qe-rail-controls #qe-rail-toggle:hover,
.qe-tools-rail .qe-rail-controls #qe-rail-toggle:focus-visible { background: rgb(223 187 100 / 9%); color: var(--qe-text); }
/* A group label at the 10 px floor ran to two lines ("RISKS &" /
   "OPPORTUNITIES") inside a fixed 24 px box and drew over the tool under it.
   The box grows with its text, and the tracking is eased so one line fits. */
.qe-tools-rail .qe-rail-heading { height: auto; letter-spacing: .06em; line-height: 1.25; }
/* The model and its backtest statistics side by side, each as tall as its
   own content: a stretched model card opened a band of empty space above its
   facts (P1 #13). */
.qe-quant-card-row { align-items: flex-start !important; }
/* Tables inside the deck's published cards */
/* The trade history and look-through tables sat at their content's width in
   a full-width card, each ticker in a boxed button. They span the card, and a
   ticker reads as the deck's ticker links do everywhere else. */
details.regal-card .qe-ticker-financial-table { width: 100%; }
/* A block-level table (so it can scroll on a phone) keeps its rows at their
   content's width; on a wide screen it is a table again. */
@media (min-width: 700px) { details.regal-card .qe-ticker-financial-table { display: table; } }
details.regal-card td > button.qe-model-toggle { background: none; border: 0; color: var(--text, #eef2f8); cursor: pointer; font: inherit; font-weight: 700; padding: 0; }
details.regal-card td > button.qe-model-toggle:hover, details.regal-card td > button.qe-model-toggle:focus-visible { color: var(--blue, #dfbb64); }
/* The Custom Screener dialog's width */
/* Its ten columns need the room, and its form sat in a 200 px column of a
   1,100 px card because the section around it shrank to its content. */
.qe-screener-dialog .qe-screener-dialog-card { max-width: min(1240px, calc(100vw - 48px)); width: 100%; }
#qe-custom-screener, #qe-custom-screener .qe-screen, #qe-custom-screener .qe-screen-form { display: block; width: 100%; }
#qe-custom-screener .qe-screen-grid { display: grid; }
/* Short tables fill their panel (six columns or fewer) */
/* A financial table is block-level so a wide one can scroll
   (target_workspace_responsive.css), which left every short one -- the
   factor values, the contribution breakdown, the trade history -- at its
   content's width inside a full-width border. A table of six columns or
   fewer does not need the scroll on a wide screen, so it is a table again. */
@media (min-width: 700px) {
  table.qe-ticker-financial-table:not(:has(tr > :nth-child(7))) { display: table; width: 100%; }
}

/* The donor's tools rail (dashboard_ui.html #v33-tools-rail, dashboard.css
   .v33-tool-btn v37.110): the near-black ground with the gold hairline, 8px
   letter-spaced group labels, and uniform 32px rows of 11px/600 single-line
   labels with 16px icons. The first Voyager shell had set 14px/38px rows,
   which wrapped "Custom Screener", "Geopolitical Shocks" and "Smart Money
   Watch" onto two lines, on a lighter slate ground with rules between groups. */
.qe-tools-rail { background:#0e0f13; border-right:1px solid #4a3d1e; padding:10px 0 36px; }
.qe-tools-rail .qe-rail-controls { border-bottom:1px solid #4a3d1e; padding:6px 10px 8px 14px; }
.qe-rail-heading, .qe-rail-heading:not(:first-of-type), .qe-tools-rail .qe-rail-heading {
  border-top:0; color:#a7afbc; font-family:inherit; font-size:8px; font-weight:400; letter-spacing:.14em;
  line-height:1; margin:0; padding:10px 14px 4px; text-transform:uppercase; white-space:nowrap;
}
.qe-tools-rail .v33-tool-btn, .qe-tools-rail button.v33-tool-btn, .qe-tools-rail .qe-rail-link.v33-tool-btn {
  border-left:2px solid transparent; border-radius:0; color:#a7afbc; font-size:11px !important; gap:10px;
  line-height:normal; margin:0; min-height:32px; padding:8px 14px; white-space:nowrap; width:100%;
}
.qe-tools-rail .v33-tool-btn > span { font-weight:600; letter-spacing:.1px; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.qe-tools-rail .v33-tool-btn .v33-tico { color:#6e7682; flex:0 0 16px; height:16px; width:16px; }
/* The open tool keeps Regal's gold marker over the donor's rows. */
.qe-tools-rail .v33-tool-btn[aria-expanded="true"], .qe-tools-rail .v33-tool-btn[aria-current="true"], .qe-tools-rail .v33-tool-btn.is-current { background:rgb(223 187 100 / 11%); border-left-color:#dfbb64; color:#eef2f8; }
.qe-tools-rail .v33-tool-btn[aria-expanded="true"] .v33-tico, .qe-tools-rail .v33-tool-btn[aria-current="true"] .v33-tico { color:#dfbb64; }

/* The status and explanation sections are live regions that stay empty on
   the published deck, and each empty one still took a grid row: two row gaps
   drew a ~30px band between the product tabs and the ETF and Investing
   cabinets. Out of the flow while empty, still in the accessibility tree so
   their first announcement is heard. */
.qe-command-grid > section:empty { clip:rect(0 0 0 0); clip-path:inset(50%); height:1px; margin:-1px; overflow:hidden; position:absolute; width:1px; }

/* The rail dialogs in the donor's compact type (its screener filter desk,
   watchlist and chat): 11.5px leads, a boxed five-column filter desk of 30px
   inputs with a gold Run, full-width tables with sans heads and plain ticker
   links, one "Esc ✕" close, and the page dimmed behind the chat. The 14px
   dialog type and 44px inputs came from the first Voyager shell. */
#qe-custom-screener .qe-screen > p.qe-muted, #qe-watchlist-dialog-summary, #qe-watchlist-dialog .qe-screener-dialog-description { color:#a7afbc; font-size:11.5px; line-height:1.55; margin:2px 0 0; }
#qe-custom-screener .qe-screen-form { background:#0e0f13; border:1px solid #4a3d1e; border-radius:8px; padding:14px 16px; }
#qe-custom-screener .qe-screen-grid { gap:8px 13px; grid-template-columns:repeat(5, minmax(0, 1fr)); }
#qe-custom-screener .qe-screen-field { color:#a7afbc; font-size:10px; font-weight:600; gap:4px; letter-spacing:.04em; }


#qe-custom-screener .qe-screen-actions { margin-top:12px; }
#qe-custom-screener .qe-screen-actions > button[type="submit"] { background:#dfbb64; border:0; border-radius:6px; box-shadow:0 4px 12px rgb(223 187 100 / 30%); color:#241a05; font-size:12px; font-weight:700; min-height:0; padding:7px 18px; }
#qe-custom-screener .qe-screen-actions > button[type="button"] { background:transparent; border:1px solid #4a3d1e; border-radius:6px; color:#a7afbc; font-size:12px; min-height:0; padding:7px 14px; }
#qe-custom-screener .qe-screen-meta { color:#a7afbc; font-size:11px; }
table.qe-screen-table, #qe-watchlist-dialog table.qe-watchlist-table { display:table; width:100%; }
.qe-screen-table thead th, #qe-watchlist-dialog .qe-watchlist-table thead th { color:#a7afbc; font-family:inherit; font-size:10px; font-weight:600; letter-spacing:.05em; line-height:1.3; }
.qe-screen-table td, #qe-watchlist-dialog .qe-watchlist-table td { font-size:12px; }
.qe-screen-symbol { background:none; border:0; color:#eef2f8; font-weight:700; min-height:0; padding:0; }
.qe-screen-symbol:hover, .qe-screen-symbol:focus-visible { color:#dfbb64; }


#qe-watchlist-form #qe-watchlist-submit { background:#dfbb64; border:0; border-radius:6px; color:#241a05; font-size:12px; font-weight:700; height:32px; min-height:0; padding:0 16px; }
#qe-watchlist-status { font-size:11.5px; }
/* The donor gives its panel-backed popups 1100px; the watchlist's facts
   table needs it, and at 900px it ran past the card's edge. */
@media (min-width: 769px) { .qe-watchlist-dialog-card { width:1100px; } }
#qe-watchlist-dialog .table-scroll { max-width:100%; overflow-x:auto; }
/* The Custom Screener's results table in the same wrapper never scrolled: at 768 px its 767 px table ran
   past the dialog card, which clipped the last columns (QA, 2026-10-02). */
.qe-screen .table-scroll { max-width:100%; overflow-x:auto; }
#qe-watchlist-dialog-content > button { font-size:12px; min-height:0; padding:6px 12px; }
#qe-watchlist-status[data-state="CURRENT"] { color:#a7afbc; }
#qe-watchlist-dialog-close, #qe-research-chat-close { background:transparent; border:1px solid #4a3d1e; border-radius:8px; color:#a7afbc; font-size:10px; min-height:0; padding:5px 11px; }
#qe-watchlist-dialog-close:hover, #qe-research-chat-close:hover, #qe-watchlist-dialog-close:focus-visible, #qe-research-chat-close:focus-visible { border-color:#6f5c2c; color:#eef2f8; }
body[data-workspace-view="research_chat"] .qe-research-chat { box-shadow:0 0 0 100vmax rgb(3 5 10 / 62%), 0 24px 60px rgb(0 0 0 / 55%); height:min(880px, calc(100vh - 110px)); z-index:90; }
/* The donor's suggestions: one column of equal rounded pills, 11px/600. */
.qe-research-chat-suggestions { align-items:stretch; max-width:552px; }
.qe-research-chat-suggestions button { border:1px solid #4a3d1e; border-radius:20px; box-sizing:border-box; font-size:11.5px; font-weight:600; margin:0; min-height:0; padding:7px 14px; width:100%; }

/* The donor's Sector \00b7 Theme cell (v33-tables.js _v33SectorThemeCell): a
   13px glyph before a 10-11px muted label, and a small tag for a theme the
   Engine reads as weakening or broken. */
td[data-kind="sector"] { color:#a7afbc; white-space:nowrap; }
td[data-kind="sector"] .qe-sector-icon { display:inline-block; font-size:13px; line-height:1; margin-right:5px; vertical-align:-1px; }
.qe-theme-state { border:1px solid currentColor; border-radius:3px; display:inline-block; font-size:9px; font-weight:700; letter-spacing:.04em; line-height:1; margin-left:6px; padding:2px 4px; text-transform:uppercase; vertical-align:1px; }
.qe-theme-state[data-state="weakening"] { color:#d4a548; }
.qe-theme-state[data-state="broken"] { color:#f97316; }

/* The donor's screener table (dashboard.css .sc-table, runScreener): the
   rank, symbol, sector and theme read left, the measurements right; the
   theme's name over its state; returns and Altman Z in the donor's softer
   green and red, and a grey-zone Z in amber. */
.qe-screen-table :is(th, td):nth-child(-n+3) { text-align:left; }
.qe-screen-table :is(th, td):nth-child(n+4) { text-align:right; }
.qe-screen-table td:is(:nth-child(1), :nth-child(3)) { color:#a7afbc; }
.qe-screen-table td > small { color:#6e7682; display:block; font-size:10px; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qe-screen-table td:nth-child(4) > span { color:#dfbb64; font-weight:700; }
.qe-screen-table td[data-tone=positive] { color:#a4bdb0; }
.qe-screen-table td[data-tone=negative] { color:#fca5a5; }
.qe-screen .qe-screen-check { flex-direction:row; align-items:center; gap:8px; }
.qe-screen .qe-screen-check input { width:auto; min-height:0; }

/* Background navigation cannot cover or take focus from an open panel. */
body:has(.qe-command-palette:not([hidden]), #qe-settings-panel:not([hidden]), .regal-macro-backdrop) #qe-mobile-rail-toggle,
body:has(.qe-command-palette:not([hidden]), #qe-settings-panel:not([hidden]), .regal-macro-backdrop) #regal-risk-radar {
  visibility:hidden !important; pointer-events:none !important;
}
/* Chat's dimmed page sits over the risk radar (70) as every other dialog's
   does; at 55 the radar pill stayed lit beside the chat box. */
body[data-workspace-view="research_chat"]::before { z-index:75; }

/* The donor's tool popup (v33-popups.js v33OpenPopup) is as tall as its
   content up to the window less a margin, and scrolls inside past that. The
   rail's context dialog was a fixed 648px box -- Intraday Flow's sector map
   ran on under its bottom edge with a third of the window unused below it --
   and the private review had no ceiling at all, so its lower half sat under
   the window's edge. Both keep a fixed top, so a card that grows moves only
   its bottom edge, and neither shrinks below the 648px it had. */
#qe-context-dialog, #regal-private-dialog { align-items:flex-start; padding-top:30px; padding-bottom:30px; }
#qe-context-dialog .qe-context-dialog-card { height:auto !important; min-height:min(648px, calc(100vh - 60px)); max-height:calc(100vh - 60px) !important; }
#regal-private-dialog .qe-command-palette-card { box-sizing:border-box; max-height:var(--qe-dialog-room, calc(100vh - 60px)); overflow-y:auto; }

/* The donor strip's hover hints (v33-core.js): an \24d8 at the right of each
   tile's label, and "most important" before it on the Risk Meter. Drawn here
   rather than in the label, so the label reads as the tile's name alone. */
.regal-strip-label { align-items:center; display:flex; gap:6px; white-space:nowrap; }
.regal-strip-label::after { color:#6e7682; content:"\24d8"; font-size:9px; font-weight:400; letter-spacing:0; margin-left:auto; opacity:.7; text-transform:none; }
.regal-strip-tile[data-lead] .regal-strip-label::after { content:"most important \24d8"; font-size:8px; letter-spacing:.03em; opacity:1; }

/* The Engine's run (engine_progress.js), after the donor's progress card
   (dashboard_ui.html #engine-flow-css): a pill in the header that always says
   what ran last or what is running, and one panel beneath it -- the pipeline,
   the live line, the bar and the plain-words log together. */
.regal-engine-pill { align-items:center; background:#0e0f13; border:1px solid #4a3d1e; border-radius:14px; color:#a7afbc; cursor:pointer; display:inline-flex; flex:none; font-size:11px; font-weight:600; gap:7px; height:28px; line-height:1; margin-right:8px; min-height:0; overflow:hidden; padding:0 12px; position:relative; white-space:nowrap; }
.regal-engine-pill:hover, .regal-engine-pill:focus-visible { border-color:#dfbb64; color:#eef2f8; outline:none; }
.regal-engine-pill[aria-expanded="true"] { border-color:#dfbb64; }
.regal-engine-dot { background:#6e7682; border-radius:50%; flex:none; height:7px; width:7px; }
.regal-engine-pill[data-state="DONE"] .regal-engine-dot { background:#8fad9d; }
.regal-engine-pill[data-state="FAILED"] .regal-engine-dot, .regal-engine-pill[data-state="STALLED"] .regal-engine-dot { background:#f97316; }
.regal-engine-pill[data-state="RUNNING"] { border-color:#dfbb64; color:#e7c877; }
.regal-engine-pill[data-state="RUNNING"] .regal-engine-dot { animation:regalEngineDot 1.35s ease-out infinite; background:#dfbb64; }
.regal-engine-pill-bar { background:rgba(223,187,100,.15); bottom:0; display:none; height:2px; left:0; position:absolute; right:0; }
.regal-engine-pill[data-state="RUNNING"] .regal-engine-pill-bar { display:block; }
.regal-engine-pill-fill { background:linear-gradient(90deg,#dfbb64,#8bb4af); display:block; height:100%; transition:width .6s ease; width:0; }
.regal-engine-panel { background:linear-gradient(180deg,rgba(223,187,100,.06),rgba(20,184,166,.04)), #101117; border:1px solid #6f5c2c; border-radius:12px; box-shadow:0 18px 50px rgba(0,0,0,.55); box-sizing:border-box; color:#eef2f8; overflow:hidden; padding:16px 18px 14px; position:fixed; right:16px; top:54px; width:min(640px, calc(100vw - 32px)); z-index:75; }
.regal-engine-panel[hidden] { display:none; }
.regal-engine-panel::before { background:radial-gradient(900px 120px at 10% -10%,rgba(223,187,100,.12),transparent 60%); content:""; inset:0; pointer-events:none; position:absolute; }
.regal-engine-head { align-items:center; display:flex; gap:12px; margin-bottom:14px; position:relative; }
.regal-engine-title { -webkit-background-clip:text; background:linear-gradient(90deg,#e7c877,#8bb4af); background-clip:text; color:transparent; font-size:11px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; }
.regal-engine-stage { background:rgba(148,163,184,.12); border:1px solid #4a3d1e; border-radius:20px; color:#cbd5e1; font-size:10px; font-weight:700; letter-spacing:.08em; padding:2px 9px; text-transform:uppercase; white-space:nowrap; }
.regal-engine-spacer { flex:1; }
.regal-engine-count { color:#a7afbc; font-size:10px; font-variant-numeric:tabular-nums; letter-spacing:.04em; }
.regal-engine-min { background:transparent; border:1px solid #4a3d1e; border-radius:6px; color:#a7afbc; cursor:pointer; font-size:15px; height:26px; line-height:1; min-height:0; padding:0; width:26px; }
.regal-engine-min:hover, .regal-engine-min:focus-visible { border-color:#dfbb64; color:#eef2f8; outline:none; }
.regal-engine-track { align-items:flex-start; display:flex; overflow-x:auto; padding-bottom:4px; position:relative; }
.regal-engine-node { align-items:center; display:flex; flex:0 0 auto; flex-direction:column; gap:6px; min-width:74px; text-align:center; transition:opacity .4s ease, transform .35s cubic-bezier(.4,0,.2,1); }
.regal-engine-ico { align-items:center; background:#0e0f13; border:1.5px solid #4a3d1e; border-radius:50%; color:#a7afbc; display:flex; height:38px; justify-content:center; transition:all .45s cubic-bezier(.4,0,.2,1); width:38px; }
.regal-engine-ico svg { display:block; height:19px; width:19px; }
.regal-engine-lbl { color:#a7afbc; font-size:9.5px; font-weight:700; letter-spacing:.03em; line-height:1.2; max-width:72px; }
.regal-engine-conn { background:#4a3d1e; border-radius:2px; flex:1 1 auto; height:2px; margin-top:18px; min-width:18px; overflow:hidden; position:relative; }
.regal-engine-conn::after { background:linear-gradient(90deg,transparent,#dfbb64,#8bb4af,transparent); content:""; inset:0; position:absolute; transform:translateX(-100%); }
.regal-engine-conn[data-state="done"] { background:rgba(143,173,157,.5); }
.regal-engine-conn[data-state="flowing"]::after { animation:regalEngineFlow 1.25s linear infinite; }
.regal-engine-node[data-state="pending"] { opacity:.42; }
.regal-engine-node[data-state="done"] .regal-engine-ico { background:rgba(143,173,157,.16); border-color:#8fad9d; color:#a4bdb0; }
.regal-engine-node[data-state="done"] .regal-engine-lbl { color:#eef2f8; }
.regal-engine-node[data-state="active"] { transform:scale(1.08); }
.regal-engine-node[data-state="active"] .regal-engine-ico { animation:regalEngineNode 1.35s ease-out infinite; background:rgba(223,187,100,.34); border-color:#e7c877; border-width:2.5px; color:#fff; }
.regal-engine-node[data-state="active"] .regal-engine-lbl { color:#e7c877; font-weight:800; text-shadow:0 0 9px rgba(223,187,100,.6); }
.regal-engine-node[data-state="stopped"] .regal-engine-ico { border-color:#f97316; color:#fdba74; }
.regal-engine-live { align-items:center; background:rgba(0,0,0,.22); border:1px solid #4a3d1e; border-radius:7px; color:#d6dbe3; display:flex; font-size:11.5px; gap:9px; line-height:1.45; margin-top:12px; min-height:16px; padding:7px 11px; position:relative; }
.regal-engine-live-dot { background:#6e7682; border-radius:50%; flex:none; height:7px; width:7px; }
.regal-engine-panel[data-state="RUNNING"] .regal-engine-live-dot { animation:regalEngineBlink 1.1s ease-in-out infinite; background:#8bb4af; }
.regal-engine-panel[data-state="DONE"] .regal-engine-live-dot { background:#8fad9d; }
.regal-engine-panel[data-state="FAILED"] .regal-engine-live-dot, .regal-engine-panel[data-state="STALLED"] .regal-engine-live-dot { background:#f97316; }
.regal-engine-thru { background:#0e0f13; border-radius:4px; height:4px; margin-top:10px; overflow:hidden; position:relative; }
.regal-engine-thru-fill { background:linear-gradient(90deg,#dfbb64,#8bb4af); border-radius:4px; height:100%; transition:width .6s ease; width:0; }
.regal-engine-log { background:rgba(0,0,0,.25); border:1px solid rgba(74,61,30,.7); border-radius:8px; color:#c3cad5; font:11px/1.6 "IBM Plex Mono", ui-monospace, monospace; list-style:none; margin:12px 0 0; max-height:176px; overflow-y:auto; padding:8px 10px; position:relative; }
.regal-engine-line { display:flex; gap:10px; }
.regal-engine-at { color:#6e7682; flex:none; font-variant-numeric:tabular-nums; }
.regal-engine-line[data-stage="portfolios"] span, .regal-engine-line[data-stage="done"] span { color:#a4bdb0; }
.regal-engine-empty { color:#6e7682; }
.regal-engine-foot { color:#a7afbc; font-size:10.5px; margin:10px 0 0; position:relative; }
.regal-engine-checks { color:#a7afbc; display:flex; flex-wrap:wrap; font-size:10.5px; gap:4px 12px; margin:10px 0 0; position:relative; }
.regal-engine-checks[hidden] { display:none; }
.regal-engine-checks-title { color:#cbd5e1; font-weight:700; letter-spacing:.04em; }
.regal-engine-check[data-ok="false"] { color:#f97316; }
@keyframes regalEngineNode { 0% { box-shadow:0 0 16px 3px rgba(223,187,100,.7), 0 0 0 0 rgba(223,187,100,.6); } 70% { box-shadow:0 0 16px 3px rgba(223,187,100,.5), 0 0 0 16px rgba(223,187,100,0); } 100% { box-shadow:0 0 16px 3px rgba(223,187,100,.7), 0 0 0 0 rgba(223,187,100,0); } }
@keyframes regalEngineFlow { 0% { transform:translateX(-100%); } 100% { transform:translateX(100%); } }
@keyframes regalEngineBlink { 0%, 100% { opacity:1; } 50% { opacity:.25; } }
@keyframes regalEngineDot { 0% { box-shadow:0 0 0 0 rgba(223,187,100,.6); } 70% { box-shadow:0 0 0 7px rgba(223,187,100,0); } 100% { box-shadow:0 0 0 0 rgba(223,187,100,0); } }
@media (prefers-reduced-motion: reduce) {
  .regal-engine-node[data-state="active"] .regal-engine-ico, .regal-engine-conn[data-state="flowing"]::after,
  .regal-engine-panel[data-state="RUNNING"] .regal-engine-live-dot, .regal-engine-pill[data-state="RUNNING"] .regal-engine-dot { animation:none; }
}

/* The two cards and their full tables as pairs (wireFullTables): the card
   whose table is open is lit gold, and the open table's title names its card
   in the same gold. The tables themselves keep one look. */
#v33-me-2col > .es-eng-card[data-active="true"] { border-color:#dfbb64 !important; box-shadow:0 0 0 1px rgba(223,187,100,.35), 0 0 22px rgba(223,187,100,.10); }
#v33-me-2col > .es-eng-card[data-active="false"]:hover { border-color:#6f5c2c !important; }
.regal-full-table-title { align-items:baseline; display:flex; flex-wrap:wrap; gap:4px 14px; margin:14px 0 10px; }
.regal-full-table-title h3, #regal-portfolio-table .regal-verdicts > h3 { color:#dfbb64; font-size:13px; letter-spacing:.08em; margin:0; text-transform:uppercase; }
#regal-portfolio-table .regal-verdicts > h3 { margin:0 0 10px; }
.regal-full-table-meta { color:#a7afbc; font-size:11px; }

/* Analyze My Portfolio and Details under the portfolio card's list, and the
   review's quote, terms and run in the card itself (private_review.js
   mountReviewWorkflow). The buttons keep the deck's base treatment; the run
   reads as part of the card, in its type sizes. */
.regal-review-strip { margin-top:8px; }
.regal-review-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.regal-review-buttons > #regal-analyze-portfolio { margin-top:0; }
.regal-review-buttons > button[aria-busy="true"] { cursor:progress; }
.regal-review-run { border-top:1px solid var(--border); margin-top:10px; padding-top:8px; }
.regal-review-run[hidden] { display:none; }
.regal-review-run-status { color:var(--text); font-size:12px; line-height:1.45; margin:0 0 6px; }
.regal-review-run[data-phase="DONE"] .regal-review-run-status { color:#a4bdb0; }
.regal-review-run .qe-private-engine-flow { margin:6px 0 8px; }
.regal-review-decision h4 { color:#dfbb64; font-size:12px; letter-spacing:.06em; margin:4px 0 6px; outline:none; text-transform:uppercase; }
.regal-review-decision table { border-collapse:collapse; font-size:12px; margin:0 0 6px; width:100%; }
.regal-review-decision th, .regal-review-decision td { border-bottom:1px solid var(--border); padding:4px 6px; text-align:left; }
.regal-review-decision th { color:var(--text2); font-weight:600; }
.regal-review-decision p { color:var(--text2); font-size:11px; margin:0 0 8px; }
.regal-review-choices { display:flex; flex-wrap:wrap; gap:8px; }
.regal-review-compared { cursor:help; }

/* The SELL disclaimer (owner, 2026-09-26): large, in the deck's caution
   amber, wherever the deck says SELL (portfolio_verdicts.js sellDisclaimer). */
.regal-sell-disclaimer { background:rgba(251,191,36,.08); border:1px solid rgba(251,191,36,.55); border-radius:8px; margin:8px 0 10px; padding:11px 13px; }
.regal-sell-disclaimer > strong { color:#fbbf24; display:block; font-size:14px; font-weight:700; letter-spacing:.01em; line-height:1.35; margin:0 0 5px; }
.regal-sell-disclaimer > p { color:var(--text, #eef2f8); font-size:13px; line-height:1.55; margin:0; }
.regal-sell-disclaimer-compact { padding:9px 11px; }
.regal-sell-disclaimer-compact > strong { font-size:13px; }
.regal-sell-disclaimer-compact > p { font-size:12.5px; }
.regal-verdict-headline .regal-sell-disclaimer { margin:10px 0 8px; }

/* The header index ribbon shows one reading at a time and turns every six
   seconds. Each reading names the close it belongs to ("-0.31% · Sep 24
   close", about 200 px) and the ribbon was fixed at 132 px, so it printed
   "-0.31% · S". The three readings share one grid cell and the two waiting
   keep their width invisibly (over the workspace's [hidden] rule), so the
   ribbon is as wide as the widest reading and does not change width as it
   turns.
   Live QA 2026-10-01 (F10): the date was dropped below 1440 px, so during a
   session an index reading read as live, and below about 1300 px the strip
   could not hold the ribbon and the news expander at all -- they were clipped,
   at 769 px to a 38 px sliver. What gives way is now ordered: the headline
   count first (below 1600 px), then the update time (below 1490 px); the
   reading keeps its date at every width. Below 1340 px the header takes the
   second row phones and tablets already use, for the index leg and the news. */
@media (min-width: 769px) {
  .qe-header > .qe-original-news-strip .qe-index-ribbon:not([hidden]) { display:grid; flex:0 0 auto; justify-items:center; }
  .qe-header > .qe-original-news-strip .qe-index-ribbon > .qe-index-leg { grid-area:1 / 1; }
  .qe-header > .qe-original-news-strip .qe-index-ribbon > .qe-index-leg[hidden] { display:flex !important; visibility:hidden; }
}
@media (min-width: 769px) and (max-width: 1599px) {
  .qe-header > .qe-original-news-strip .qe-original-news-state { display:none; }
}
@media (min-width: 1340px) and (max-width: 1489px) {
  .qe-header > .qe-original-news-strip .qe-original-news-note { display:none; }
}
@media (min-width: 769px) and (max-width: 1339px) {
  .qe-header { display: grid !important; height: 76px !important; max-height: 76px !important; align-content: start;
    grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 48px 28px !important; gap: 0 12px !important; padding-block: 0 !important; }
  .qe-header > .qe-brand { grid-column: 1 !important; grid-row: 1 !important; align-self: center; }
  .qe-header > .qe-header-status { grid-column: 2 !important; grid-row: 1 !important; align-self: center; justify-self: end; }
  .qe-header > .qe-original-news-strip { grid-column: 1 / -1 !important; grid-row: 2 !important; display: flex !important;
    min-width: 0; max-width: 100%; min-height: 0; overflow-x: auto; overflow-y: hidden; gap: 12px; align-items: center;
    justify-content: flex-start !important; scrollbar-width: none; white-space: nowrap; padding: 0 2px; }
  .qe-header > .qe-original-news-strip .qe-index-ribbon { position: static !important; transform: none !important; order: -1; height: 24px; }
  .qe-header > .qe-original-news-strip .qe-original-news-state { display: inline !important; flex: 0 0 auto; }
  .qe-header > .qe-original-news-strip .qe-original-news-note { display: inline !important; flex: 0 0 auto; }
  .qe-header > .qe-original-news-strip .qe-original-news-toggle { margin-left: 0; flex: 0 0 auto; }
  .qe-original-news-details { top: 76px; }
}
/* Above 900 px the header is fixed, and what sits below it moves down with it;
   at 900 px and below it is in the page's flow (target_workspace_shell.css). */
@media (min-width: 901px) and (max-width: 1339px) {
  .qe-workspace { padding-top: 76px !important; }
  .qe-tools-rail { top: 76px !important; }
}
/* Where the "updated" time shows, it keeps its width and the headline count,
   which has room to spare, gives way: shrunk in proportion to their bases the
   time lost 4 px at 1366 while the count sat 29 px wider than its text. */
@media (min-width: 1351px) {
  .qe-header > .qe-original-news-strip .qe-original-news-note { flex-shrink:0; }
}

/* The corner stack (Alerts) is fixed over the bottom-right
   of the page, and the page ended 44 px above the bottom bar, so scrolled to
   the end it covered the deck's last sentence ("All four books, 16 rows ...
   no order is placed.") at 1600 px and at 375 px. The page now ends clear of
   the stack. */
body.qe-workspace .qe-main { padding-bottom:128px !important; }

/* The 10-year tile's day move beside the level, as the donor draws it:
   rising yields red, falling green. */
.mv-yield-day { font-size:11px; font-weight:600; margin-left:6px; }
.mv-yield-day[data-direction="up"] { color:#bf929a; }
.mv-yield-day[data-direction="down"] { color:#8fad9d; }
.mv-yield-day[data-direction="flat"] { color:#a7afbc; }

/* Phones and tablets (QA 2026-09-28). The wordmark could not fit beside the
   engine and profile chips and was cut to a sliver; the index ribbon, the
   news strip and its expander were display:none with nothing in their place,
   so a reader on a phone could not see the indices or the news at all; and
   the alerts pill sat on the model table's right-hand
   column. The header grows a second row for the index leg and the news
   expander (everything the fixed header offsets moves with it), the mark
   stands alone, and each pill keeps its mark and count without its word. */
@media (max-width: 768px) {
  .qe-header .qe-brand-wordmark { display: none; }
  .qe-header { height: 116px !important; max-height: 116px !important; grid-template-rows: 48px 28px 40px !important; align-content: start; }
  .qe-header > .qe-brand, .qe-header > .qe-header-status { grid-row: 1 !important; align-self: center; }
  .qe-header > .qe-original-news-strip { display: flex !important; grid-column: 1 / -1 !important; grid-row: 2 !important;
    min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; gap: 12px; align-items: center;
    justify-content: flex-start !important; scrollbar-width: none; white-space: nowrap; padding: 0 2px; }
  .qe-header > .qe-original-news-strip .qe-index-ribbon { display: flex !important; position: static !important; order: -1; flex: 0 0 auto; gap: 12px; }
  .qe-header > .qe-original-news-strip .qe-original-news-toggle { display: flex !important; flex: 0 0 auto; width: auto !important; max-width: none !important; min-width: 0; margin-left: 0; }
  .qe-header > .qe-original-news-strip .qe-original-news-state { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .qe-header > .qe-original-news-strip .qe-original-news-toggle::before { margin-right: 5px; }
  .qe-workspace { padding-top: 116px !important; }
  .qe-tools-rail { top: 116px !important; }
  /* Utilities occupy the header's third row, clear of scrolling content. */
  .qe-mobile-rail-toggle { top: 80px !important; bottom: auto !important; z-index:120; }
  .regal-radar-dock[data-state="min"] { top:80px; bottom:auto; right:68px; width:auto; z-index:120; }
  .regal-radar-dock[data-state="open"] { top:124px; bottom:auto; right:8px; z-index:120; max-height:calc(100dvh - 180px); overflow-y:auto; }
  .regal-radar-word { display: none; }
  .regal-radar-pill { padding: 7px 11px; }
}

/* Original parity at no read: ticker chips in Claude's answers, the chat's
   "How it works" note, a leveraged fund's multiple, and the latest close's
   model changes. */
.qe-research-chat-bubble .qe-research-chat-ticker { background: rgb(223 187 100 / 12%); border: 1px solid rgb(223 187 100 / 40%); border-radius: 4px; color: inherit; cursor: pointer; font: 600 0.92em/1.3 "IBM Plex Mono", monospace; margin: 0 1px; padding: 0 4px; }
.qe-research-chat-bubble .qe-research-chat-ticker:hover, .qe-research-chat-bubble .qe-research-chat-ticker:focus-visible { background: rgb(223 187 100 / 24%); }
.qe-research-chat-how { border-bottom: 1px solid var(--qe-border); color: var(--qe-muted); font-size: 11px; padding: 6px 14px; }
.qe-research-chat-how summary { cursor: pointer; }
.qe-research-chat-how p { line-height: 1.5; margin: 6px 0 2px; }
.regal-lever { border: 1px solid currentColor; border-radius: 3px; color: #e8a33d; font: 700 9px/1.4 "IBM Plex Mono", monospace; letter-spacing: .04em; margin-left: 4px; padding: 0 3px; }
.regal-trade-history .regal-trade-latest { font-weight: 600; }

/* Sorting headings on every table (workspace_support/table_sort.js). The model
   table's button fills its heading cell; these sit inline in headings of any
   padding, and the arrow is a narrow one, so no table grows to take it. */
.qe-sort-button.qe-sort-any { display: inline; width: auto; margin: 0; padding: 0; text-align: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.qe-sort-button.qe-sort-any::after { content: "\2195"; font-size: 9px; margin-left: 3px; opacity: .55; }
th[aria-sort="ascending"] .qe-sort-button.qe-sort-any::after { content: "\2191"; opacity: 1; }
th[aria-sort="descending"] .qe-sort-button.qe-sort-any::after { content: "\2193"; opacity: 1; }
.qe-sort-button.qe-sort-any:focus-visible { outline: 2px solid var(--qe-accent, #dfbb64); outline-offset: 2px; }
/* Where a list moved or a name changed, the deck says so (owner, 2026-09-30) */
.qe-moved-note{margin:10px 0 0;font-size:11px}
.qe-moved-note .qe-moved-link{background:none;border:0;padding:0;color:var(--blue);cursor:pointer;font:inherit}
.qe-moved-note .qe-moved-link:hover,.qe-moved-note .qe-moved-link:focus-visible{text-decoration:underline}
.regal-theme-renamed{color:var(--text2);font-size:11px;margin:4px 0 8px}

/* Daily report opt-in: readable controls within the existing Settings card. */
.qe-daily-email p,.qe-daily-email-form label{font-size:14px;line-height:1.6}
.qe-daily-email h3{font-size:18px}
.qe-daily-email-form{display:grid;gap:14px;max-width:640px;margin:20px 0}
.qe-daily-email-form label{display:grid;gap:6px}
.qe-daily-email-form input:not([type=checkbox]),.qe-daily-email-form select{box-sizing:border-box;width:100%;min-height:42px;font:inherit;padding:8px 10px}
.qe-daily-email-form .qe-daily-email-consent{display:flex;align-items:flex-start;gap:10px}
.qe-daily-email-consent input{flex:none;margin-top:5px}
.qe-daily-email-form button{justify-self:start;min-height:42px}
.qe-daily-email-form p{margin:0}

/* Shared dialog spacing: compact rows, readable fields, and one padded frame.
   The command list owns its scroll so its search and Close stay in view. */
.qe-command-palette { --qe-dialog-room: calc(100dvh - 32px); padding: 16px; }
.qe-command-palette .qe-command-palette-card {
  box-sizing: border-box; padding: 20px; border-radius: 10px;
  height: auto; min-height: 0; max-height: calc(100dvh - 96px); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #4b4c55 transparent;
}
.qe-command-palette-card > .qe-panel-heading {
  align-items: center; gap: 12px; margin: 0 0 16px; padding: 0 0 12px;
  border-bottom: 1px solid var(--qe-border);
}
.qe-command-palette-card > .qe-panel-heading h2 { font-size: 18px; line-height: 1.35; margin: 0; }
.qe-command-palette-card > .qe-panel-heading > div { min-width: 0; }
.qe-command-palette-card > .qe-panel-heading > button {
  flex: 0 0 auto; min-height: 32px; min-width: 32px; margin: 0 0 0 auto; padding: 6px 10px;
  font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--qe-muted); background: transparent;
  border: 1px solid var(--qe-border); border-radius: 6px; cursor: pointer;
}
.qe-command-palette-card > .qe-panel-heading > button:hover { background: var(--qe-raised); color: var(--qe-text); }
.qe-command-palette-card > .qe-panel-heading > button:focus-visible { outline: 2px solid var(--qe-accent); outline-offset: 2px; }
.qe-command-palette-card > p { margin: 0 0 12px; line-height: 1.5; }
.qe-command-palette-card label { line-height: 1.4; }
.qe-command-palette-card input:not([type=checkbox]):not([type=radio]),
.qe-command-palette-card select { box-sizing: border-box; min-height: 36px; padding: 8px 10px; }
#qe-command-palette .qe-command-palette-card {
  display: flex; flex-direction: column; max-height: min(640px, calc(100dvh - 96px)); overflow: hidden;
}
#qe-command-palette .qe-panel-heading, #qe-command-query { flex: 0 0 auto; }
#qe-command-palette label { font-size: 12px; margin: 0 0 6px; }
#qe-command-query { min-height: 40px; font-size: 13px; }
#qe-command-results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin: 12px -6px -6px; padding: 4px 6px 6px; }
#qe-command-results .qe-command-result { margin: 0; padding: 7px 10px; min-height: 36px; font-size: 13px; line-height: 20px; border-radius: 6px; }
#qe-command-results .qe-command-section { padding: 14px 10px 5px; line-height: 14px; }
#qe-command-results .qe-command-section:first-child { padding-top: 0; }
#qe-command-results .qe-command-result:hover { background: rgb(223 187 100 / 8%); }
.qe-shortcuts { gap: 0; margin: 0 0 12px; }
.qe-shortcuts > div { min-height: 36px; padding: 8px 0; gap: 16px; }
.qe-profile-guide-options { margin-top: 12px; gap: 12px; }
.qe-profile-guide-options button { padding: 12px 14px; line-height: 1.4; }
#qe-settings-panel .modal { box-sizing: border-box; padding: 20px; scrollbar-width: thin; }
#qe-settings-panel #qe-settings-content { max-width: none; }
#qe-settings-panel .qe-original-settings-head { margin-bottom: 12px; }
#qe-settings-panel .qe-original-settings-head button { min-width: 32px; min-height: 32px; padding: 6px; }
#qe-settings-panel .set-tabs { margin: 0 0 16px; gap: 4px; }
#qe-settings-panel .set-tab { min-height: 38px; padding: 9px 14px; }
#qe-settings-panel .qe-settings-section h3 { font-family: inherit; font-size: 13px; line-height: 1.4; margin: 0 0 12px; }
#qe-settings-panel .qe-settings-section > p { margin: 8px 0 0; }
#qe-settings-panel [role=status]:empty { display: none; }
#qe-settings-panel label:has(> input:not([type=checkbox]):not([type=radio])),
#qe-settings-panel label:has(> select) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
#qe-settings-panel input:not([type=checkbox]):not([type=radio]), #qe-settings-panel select {
  box-sizing: border-box; min-height: 36px; max-width: 100%; padding: 8px 10px; border-radius: 6px; font-size: 12px;
}
#qe-settings-panel input[type=number] { width: 100px; }
#qe-settings-panel label:has(> input[type=checkbox]) { display: flex; align-items: center; gap: 8px; line-height: 1.45; }
#qe-settings-panel input[type=checkbox] { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; }
#qe-settings-panel .qe-broker-account { padding: 10px 12px; gap: 12px; }
#qe-settings-panel .qe-broker-add { margin-top: 10px; padding: 12px; }
#qe-settings-panel .qe-broker-add-title { margin-bottom: 8px; }
#qe-settings-panel .qe-broker-add input { margin-bottom: 8px; }
#qe-settings-panel .actions-row { border-top: 1px solid var(--qe-border); margin-top: 16px; padding-top: 12px; gap: 8px; }
@media (max-width: 600px) {
  .qe-command-palette { --qe-dialog-room: calc(100dvh - 24px); padding: 12px; }
  .qe-command-palette .qe-command-palette-card { padding: 16px; max-height: calc(100dvh - 24px); }
  #qe-command-palette .qe-command-palette-card { max-height: calc(100dvh - 24px); }
  .qe-command-palette-card > .qe-panel-heading h2 { font-size: 16px; }
  #qe-settings-panel .modal { padding: 16px; max-height: calc(100dvh - 24px); }
  #qe-settings-panel .set-tab { padding: 9px 10px; }
  #qe-settings-panel .qe-donor-profile-section > label { align-items: flex-start; flex-direction: column; }
  #qe-settings-panel .qe-donor-profile-section select { width: 100%; }
}
@media (pointer: coarse) {
  #qe-command-results .qe-command-result, .qe-command-palette-card > .qe-panel-heading > button,
  #qe-settings-panel .set-tab, #qe-settings-panel .qe-original-settings-head button { min-height: 44px; }
}

/* Chat settings: balance beside spending controls, full terms and receipts on demand. */
#qe-settings-panel .qe-ai-usage-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
#qe-settings-panel .qe-ai-usage-heading h3 { margin: 0; font-size: 16px; }
#qe-settings-panel .qe-ai-usage-content p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--qe-muted); }
#qe-settings-panel .qe-ai-usage-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--regal-gap); align-items: start; }
#qe-settings-panel .qe-ai-usage-wallet h4 { margin: 0; font-size: 12px; font-weight: 600; color: var(--qe-muted); }
#qe-settings-panel .qe-ai-usage-wallet .qe-ai-usage-balance { font-size: 22px; line-height: 1.3; font-weight: 650; color: var(--qe-text); font-variant-numeric: tabular-nums; }
#qe-settings-panel .qe-ai-usage-form { min-width:0; }
#qe-settings-panel .qe-ai-limit-pair { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
#qe-settings-panel .qe-ai-limit-pair label.qe-ai-limit { display:grid;gap:6px;font-size:12px;min-width:0; }
#qe-settings-panel .qe-ai-limit-pair input { width:100%;min-width:0;box-sizing:border-box; }
#qe-settings-panel .qe-ai-limit-pair output { display:none; }
#qe-settings-panel .qe-ai-usage-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#qe-settings-panel .qe-ai-usage-form legend { font-size: 13px; font-weight: 650; margin-bottom: 6px; padding: 0; }
#qe-settings-panel .qe-ai-usage-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
#qe-settings-panel .qe-ai-usage-row label { margin: 0; font-size: 12px; }
#qe-settings-panel .qe-ai-usage-form .qe-ai-usage-hint { font-size: 11.5px; }
#qe-settings-panel .qe-ai-usage-form .qe-ai-usage-row + .qe-ai-usage-hint { margin-top: -4px; }
#qe-settings-panel :is(.qe-ai-usage-settings,.qe-ai-daily-allowance,.qe-daily-email) button {
  padding: 8px 12px; min-height: 34px; font-family: inherit; font-size: 12px; line-height: 1.4;
  background: var(--qe-raised); color: var(--qe-text); border: 1px solid var(--qe-border); border-radius: 6px; cursor: pointer;
}
#qe-settings-panel .qe-ai-usage-form button[type=submit] { background: var(--qe-accent); color: #241a05; border-color: var(--qe-accent); font-weight: 600; }
#qe-settings-panel :is(.qe-ai-usage-settings,.qe-ai-daily-allowance) button:disabled { opacity: .55; cursor: not-allowed; }
#qe-settings-panel :is(.qe-ai-usage-settings,.qe-ai-daily-allowance) button:focus-visible { outline: 2px solid var(--qe-accent); outline-offset: 2px; }
#qe-settings-panel .qe-ai-usage-terms { margin-top: 2px; }
#qe-settings-panel :is(.qe-ai-usage-terms,.qe-ai-usage-receipts) summary { cursor: pointer; font-size: 12px; color: var(--qe-accent); padding: 6px 0; }
#qe-settings-panel :is(.qe-ai-usage-terms,.qe-ai-usage-receipts) p { margin-top: 8px; }
#qe-settings-panel .qe-ai-usage-receipts { border-top: 1px solid var(--qe-border); margin-top: 16px; padding-top: 10px; }
#qe-settings-panel .qe-ai-usage-receipts ul { margin: 8px 0 0; padding: 0; list-style: none; }
#qe-settings-panel .qe-ai-usage-receipts li { padding: 8px 0; border-top: 1px solid var(--qe-border); font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; }
#qe-settings-panel .qe-ai-daily-allowance { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--qe-border); }
#qe-settings-panel .qe-ai-daily-allowance h3 { margin: 0 0 6px; }
#qe-settings-panel .qe-ai-daily-allowance > p { margin: 0 0 10px; }
#qe-settings-panel .qe-ai-daily-allowance .qe-ai-usage-row + p { margin-top: 8px; }
#qe-settings-panel .qe-daily-email p { font-size: 12px; line-height: 1.5; }
#qe-settings-panel .qe-daily-email-form { gap: 12px; margin: 16px 0; }
@media (max-width: 700px) {
  #qe-settings-panel .qe-ai-usage-overview { grid-template-columns: minmax(0, 1fr); }
  #qe-settings-panel .qe-ai-usage-heading { align-items: flex-start; flex-wrap: wrap; }
}

#qe-settings-panel .set-tabpanel > .qe-donor-settings-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
#qe-settings-panel .qe-ai-daily-allowance .qe-ai-usage-row { align-items: flex-end; }
#qe-settings-panel .qe-ai-daily-allowance .qe-ai-usage-row label { flex-direction: column; align-items: flex-start; gap: 6px; }
#qe-settings-panel .qe-ai-usage-receipts .qe-ai-usage-receipt { display: grid; grid-template-columns: 145px minmax(0, 1fr) 60px; gap: 12px; color: var(--qe-text); padding: 0; }
#qe-settings-panel .qe-ai-usage-receipt span:first-child { color: var(--qe-muted); }
#qe-settings-panel .qe-ai-usage-receipt span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  #qe-settings-panel .qe-ai-usage-receipts .qe-ai-usage-receipt { grid-template-columns: minmax(0, 1fr) 60px; gap: 4px 8px; }
  #qe-settings-panel .qe-ai-usage-receipt span:first-child { grid-column: 1 / -1; }
}

.qe-command-palette-card :is(button, input, select, textarea) { font-family: inherit; }
.qe-profile-guide-options button { font-size: 13px; }
#qe-settings-panel .qe-ai-usage-form fieldset { background: transparent; }

/* An empty ticker lookup is a form; the full research view still fills its frame. */
#qe-ticker-dialog .qe-ticker-dialog-card:not(:has(.regal-ticker)) { height: auto; min-height: 0; max-width: 680px; }
#qe-ticker-dialog .qe-ticker-dialog-card:not(:has(.regal-ticker)) #qe-ticker-dialog-result { min-height: 0; flex: none; }

/* A concise SELL note opens the complete explanation without stretching the card. */
.regal-sell-disclaimer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 9px 12px; margin: 8px 0 10px; border-radius: 6px; }
.regal-sell-disclaimer > span { color: #fbbf24; font-size: 12px; line-height: 1.4; }
.regal-sell-disclaimer > button { margin-left: auto; padding: 4px 0; border: 0; background: transparent; color: #fbbf24; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.regal-sell-disclaimer > button:focus-visible { outline: 2px solid #dfbb64; outline-offset: 3px; }
#qe-popover-card { inset: 50% auto auto 50%; transform: translate(-50%, -50%); box-sizing: border-box; width: 480px; max-width: calc(100vw - 32px); padding: 20px; max-height: calc(100dvh - 32px); overflow-y: auto; }
#qe-popover-card .qe-panel-heading { align-items: flex-start; gap: 16px; margin-bottom: 12px; }
#qe-popover-card h2 { font-size: 15px; line-height: 1.4; }
#qe-popover-card p { font-size: 13px; line-height: 1.6; margin: 0; }
#qe-popover-card button { flex: none; min-width: 32px; min-height: 32px; padding: 6px; border: 1px solid var(--qe-border); border-radius: 6px; background: var(--qe-raised); color: var(--qe-text); cursor: pointer; }

@media(min-width:769px){#qe-ticker-dialog .qe-ticker-dialog-card:has(.regal-ticker) { max-width:1600px; width:calc(100vw - 48px); }}
.regal-exposure-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:12px 0 16px; }
.regal-exposure-stats > div { border:1px solid var(--qe-border); border-radius:6px; padding:12px 14px; }
.regal-exposure-stats span { display:block; color:var(--qe-muted); font-size:11px; }
.regal-exposure-stats strong { display:block; margin-top:4px; font-size:20px; color:var(--qe-text); }
.regal-exposure-leaders { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin:10px 0 16px; }
.regal-exposure-leaders > div { display:flex; justify-content:space-between; gap:8px; padding:10px; border-bottom:2px solid #bca66c; font-variant-numeric:tabular-nums; }
.regal-exposure-detail summary,.regal-deck-disclosure summary,.qe-backtest-comparison summary { cursor:pointer; padding:8px 0; color:var(--qe-accent); font-size:12px; }
.regal-earnings-boards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:stretch; }
.regal-earnings-boards > section { border:1px solid var(--qe-border); border-radius:8px; padding:12px; min-width:0; }
.regal-earnings-scroll:not(.is-expanded) :is(th,td):nth-child(3),.regal-earnings-scroll:not(.is-expanded) :is(th,td):nth-child(4) { display:none; }
.regal-section-more { background:transparent; border:0; color:var(--qe-accent); padding:10px 0 0; cursor:pointer; font:inherit; font-size:12px; }
.qe-inline-model-grid { align-items:stretch; }
.qe-inline-model-grid > section { height:100%; box-sizing:border-box; }
.qe-backtest-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.qe-backtest-metrics > div { padding:12px; }
@media(max-width:800px){.regal-earnings-boards {grid-template-columns:minmax(0,1fr)}.regal-exposure-leaders {grid-template-columns:repeat(2,minmax(0,1fr))}.qe-backtest-metrics {grid-template-columns:repeat(2,minmax(0,1fr))}} .qe-quant-performance-card{container-type:inline-size} @container (max-width:479px){.qe-backtest-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Research chat puts the conversation first and groups actions beside the composer. */
.qe-research-chat-shell { max-width:1200px; margin-inline:auto; }
.qe-research-chat-strip { padding:14px 18px; }
.qe-research-chat-strip p { margin:4px 0 0; font-size:12px; }
.qe-research-chat-budget { padding:9px 18px; font-size:12px; line-height:1.5; }
.qe-research-chat-empty { padding:16px 12px; min-height:0; }
.qe-research-chat-empty-mark { display:none; }
.qe-research-chat-empty h3 { font-size:20px; margin:0 0 8px; }
.qe-research-chat-empty p { margin:0 0 18px; max-width:52ch; }
.qe-research-chat-suggestions { display:flex; flex-direction:row; flex-wrap:wrap; justify-content:center; gap:8px; max-width:800px; }
.qe-research-chat-suggestions button { border-radius:6px; width:auto; padding:9px 12px; font-size:12px; }
.qe-research-chat-composer { padding:14px 18px; gap:10px; align-items:end; }


.qe-research-chat-composer > button { min-height:40px; padding:10px 16px; }
.qe-research-chat-validation { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin:0; font-size:12px; }
.qe-research-chat-validation button { padding:7px 12px; min-height:32px; }

#qe-settings-panel .qe-ai-usage-row label.qe-ai-limit, #qe-settings-panel .qe-ai-daily-allowance .qe-ai-usage-row label.qe-ai-limit { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; width:100%; }
#qe-settings-panel .qe-ai-limit input[type=range] { grid-column:1/-1; grid-row:2; width:100%; min-height:24px; margin:0; padding:0; accent-color:#c4ac73; cursor:pointer; }
#qe-settings-panel .qe-ai-limit output { grid-column:2; grid-row:1; color:var(--qe-text); font-variant-numeric:tabular-nums; }

#qe-settings-panel .qe-subscription-plans { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
#qe-settings-panel .qe-subscription-plan { display:flex; flex-direction:column; gap:12px; padding:16px; border:1px solid var(--qe-border); border-radius:8px; }
#qe-settings-panel .qe-subscription-plan h3 { margin:0; font-size:16px; }
#qe-settings-panel .qe-subscription-plan p { margin:0; line-height:1.5; color:var(--qe-muted); font-size:12px; flex:1; }
#qe-settings-panel .qe-subscription-settings button { min-height:36px; padding:8px 12px; border:1px solid var(--qe-border); border-radius:6px; background:var(--qe-raised); color:var(--qe-text); font:inherit; font-size:12px; cursor:pointer; }
#qe-settings-panel .qe-subscription-settings button:disabled { opacity:.5; cursor:not-allowed; }
#qe-settings-panel .qe-subscription-settings .danger { color:#bf929a; }
#qe-settings-panel .qe-subscription-note { color:var(--qe-muted); font-size:12px; line-height:1.5; margin:12px 0; }
#qe-settings-panel .qe-subscription-confirm { border:1px solid #a38d56; border-radius:8px; padding:16px; margin-top:16px; }
@media(max-width:600px){#qe-settings-panel .qe-subscription-plans {grid-template-columns:minmax(0,1fr)}}

.qe-chat-spendbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; padding:10px 18px; border-bottom:1px solid var(--qe-border); font-size:12px; }
#qe-chat-price-quote { flex:1 1 240px; color:var(--qe-text); font-variant-numeric:tabular-nums; }
#qe-chat-model-label { display:flex; align-items:center; gap:8px; color:var(--qe-muted); }
#qe-chat-model-label[hidden] { display:none; }
#qe-chat-model,#qe-chat-credit { background:var(--qe-raised); color:var(--qe-text); border:1px solid var(--qe-border); border-radius:6px; padding:7px 10px; font:inherit; font-size:12px; }
#qe-chat-credit { cursor:pointer; }

@media(min-width:769px){#qe-ticker-dialog .qe-ticker-dialog-card:has(.regal-ticker) {max-width:none; width:calc(100vw - 60px)}}
.regal-earnings-boards .regal-earnings-table { min-width:0; font-size:12px; }
.regal-earnings-boards .regal-earnings-table :is(th,td) { padding:8px 7px; }
body[data-workspace-view="research_chat"] .qe-research-chat { height:min(680px,calc(100dvh - 96px)); }
.qe-screener-dialog-card,.qe-watchlist-dialog-card { width:min(1100px,calc(100vw - 40px)); max-width:1100px; box-sizing:border-box; }
.regal-context .regal-tool-smallprint > p { margin:0; }
.regal-context .regal-tool-smallprint details { padding:6px 0 0; }
.regal-context .regal-tool-smallprint summary { font-size:11px; }
#qe-context-dialog .regal-tool-smallprint details { margin:4px 0 0; padding:0; background:transparent; border:0; box-shadow:none; }
/* Explanatory notes use the shared inset disclosure in features/context.css. */
body:not([data-workspace-hydrated="true"]) :is(#qe-original-news-state,#qe-original-news-note,#qe-profile-picker,#qe-sign-in-toggle) { visibility:hidden; }
/* A signed-out visitor never hydrates; Sign in is then the one control that
   must show, or closing the panel strands them (2026-10-27). */
body[data-signed-out="true"] #qe-sign-in-toggle:not([hidden]) { visibility:visible; }
body:has(.qe-command-palette:not([hidden])),body[data-workspace-view="research_chat"] { overflow:hidden; }

/* News occupies its content width; unused space may flex, never reserves a fixed blank. */
@media(min-width:1101px){#v33-top > .qe-original-news-strip{flex:0 1 auto;min-width:0;width:auto;margin-right:0}#v33-top .qe-header-status{margin-left:auto}}

/* Owner: fit tool names instead of adding a horizontal scrollbar. */
.qe-tools-rail { overflow-x:hidden; }
.qe-tools-rail .qe-rail-heading { white-space:normal; line-height:1.25; }
@media (min-width:769px) {
  body.qe-workspace:not(.qe-rail-collapsed) { padding-left:208px; }
  body.qe-workspace:not(.qe-rail-collapsed) .qe-tools-rail { width:208px; }
  body.qe-workspace:not(.qe-rail-collapsed) .qe-bottom-bar { left:208px; }
  body.qe-workspace:not(.qe-rail-collapsed) .qe-original-news-details { left:222px; }
}

/* One pricing block for chat, shared by desktop and mobile. */
.qe-chat-spendbar { align-items:center; gap:12px; padding:14px 18px; }
.qe-chat-pricing-copy { flex:1 1 260px; min-width:0; }
.qe-chat-pricing-copy #qe-chat-price-quote { display:inline; font-size:13px; font-weight:600; line-height:1.6; }
.qe-chat-pricing-copy .qe-research-chat-budget { display:inline; margin:0 0 0 10px; padding:0; border:0; background:none; font-size:13px; }
.qe-chat-pricing-help { margin:5px 0 0; color:var(--qe-muted); font-size:12px; line-height:1.5; }
body[data-mobile-app] .qe-chat-pricing-copy .qe-research-chat-budget { margin:0 0 0 8px; padding:0; font-size:12px; }

/* One compact signal-family illustration for both ETF-only products. */
.regal-quant-signals {margin-block:0 var(--regal-gap);min-width:0}
.regal-signal-heading {display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--regal-space-1) var(--regal-space-3);margin-bottom:var(--regal-space-3)}
.regal-signal-heading h3 {margin:0;font-size:16px;line-height:1.4;color:var(--text)}
.regal-signal-heading p,.regal-signal-caption {margin:0;font-size:12px;line-height:1.5;color:var(--text2)}
.regal-signal-flow {display:grid;grid-template-columns:minmax(0,2fr) 22px minmax(0,1fr) 22px minmax(0,1fr);align-items:center;gap:var(--regal-space-2)}
.regal-signal-inputs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--regal-space-2);min-width:0}
.regal-signal-input {display:flex;align-items:flex-start;gap:var(--regal-space-2);min-width:0;padding:var(--regal-space-2) 0}
.regal-signal-input svg {width:22px;height:22px;flex:none;color:var(--regal-accent)}
.regal-signal-input strong {display:block;font-size:13px;line-height:1.4;color:var(--text)}
.regal-signal-input span {display:block;font-size:12px;line-height:1.4;color:var(--text2);margin-top:2px}
.regal-signal-arrow {text-align:center;font-size:24px;color:var(--regal-accent)}
.regal-signal-arrow::before {content:'→'}
.regal-signal-stage {min-width:0;border-inline-start:1px solid var(--border);padding-inline-start:var(--regal-space-3)}
.regal-signal-step {font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--regal-accent)}
.regal-signal-stage h4 {margin:var(--regal-space-1) 0!important;font-size:14px;line-height:1.4;color:var(--text)}
.regal-signal-stage p {margin:0!important;font-size:13px;line-height:1.5;color:var(--text2)}
.regal-signal-caption {margin-top:var(--regal-space-2)!important}
.regal-context [data-information-for] {display:inline-flex;align-items:center;justify-content:center;margin-left:5px;min-width:28px;min-height:28px;color:var(--regal-accent);vertical-align:middle}
.regal-context [data-information-for]:focus-visible {outline:2px solid var(--regal-accent);outline-offset:2px}
.regal-ownership-tabs {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:12px 0}
.regal-context .regal-ownership-tabs [role="tab"] {min-height:72px!important;padding:14px 10px!important;white-space:normal;font-size:15px!important;line-height:1.25;font-weight:700;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--text2)}
.regal-ownership-tabs [aria-selected="true"] {color:var(--regal-accent);border-color:var(--regal-accent);background:rgba(223,187,100,.2);box-shadow:inset 0 -3px 0 var(--regal-accent)}
.regal-ownership-tabs [role="tab"]:focus-visible {outline:2px solid var(--regal-accent);outline-offset:2px}
@media(max-width:600px){.regal-ownership-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.regal-ownership-tabs [role="tab"]:last-child{grid-column:1/-1}}
@media(max-width:1100px){.regal-signal-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:768px){
 .regal-signal-heading{display:block}.regal-signal-heading p{margin-top:var(--regal-space-1)}
 .regal-signal-flow{grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr)}
 .regal-signal-inputs{grid-column:1/-1}.regal-signal-inputs+.regal-signal-arrow{grid-column:1/-1;line-height:1}
 .regal-signal-inputs+.regal-signal-arrow::before{content:'↓'}
 .regal-signal-stage{padding-inline-start:0;border-inline-start:0}
}

/* Shared research metadata stays readable in narrow desktop cards and phones. */
body.qe-workspace .regal-ticker .regal-thesis-source,body.qe-workspace .regal-ticker .regal-thesis-generation {font-size:13px;line-height:1.5;margin:0}
body.qe-workspace .regal-ticker .regal-thesis-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
body.qe-workspace[data-mobile-app] .regal-thesis-source::after {font-size:12px;line-height:1.5}

/* Owner, 2026-10-31: "at certain widths it looks weird". From 769 to 900 px the header sat in the
   page flow beside the 208 px rail, so it started at x=208, its pills wrapped onto two clipped rows
   and the brand drifted right. It is now fixed and full width there too, like 901-1339 px. */
@media (min-width: 769px) and (max-width: 900px) {
  .qe-header { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; width: auto !important; margin: 0 !important; }
  body.qe-workspace { padding-top: 76px !important; }
  .qe-tools-rail { top: 76px !important; bottom: 0 !important; }
}
/* The news and index row is centred, not pushed to one side (owner, 2026-10-31). */
@media (min-width: 769px) and (max-width: 1339px) {
  .qe-header > .qe-original-news-strip { justify-content: safe center !important; }
}
@media (min-width: 1340px) {
  #v33-top > .qe-original-news-strip { margin-left: auto; }
}
/* The Daily update panel opened under a 48 px header at every width, so below 1340 px its top
   (title, Complete badge) slid under the header's second row. It opens below the header now, and
   scrolls inside itself rather than running off the bottom of the window. */
.regal-engine-panel { max-height: calc(100vh - 66px); overflow-y: auto; }
@media (min-width: 769px) and (max-width: 1339px) {
  .regal-engine-panel { top: 84px; max-height: calc(100vh - 96px); }
}
@media (max-width: 768px) {
  .regal-engine-panel { top: 124px; max-height: calc(100vh - 136px); }
}
/* 901-1365 px: five macro cards in one row left about 100-133 px each, so "Risk meter" and
   "Positioning & sentiment" broke over three lines. They take the same 3 + 2 rows as tablets. The bound is
   1365.98 px so a fractional width such as 1199.5 px still matches (owner audit 2026-10-31). */
@media (min-width: 901px) and (max-width: 1365.98px) {
  #v33-macro-row { flex-wrap: wrap !important; }
  #v33-macro-row > div#v33-macro-tiles { order: 3; flex: 1 0 100% !important; width: 100%; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  #v33-macro-row > div#v33-macro-tiles > * { grid-column: span 2; }
  #v33-macro-row > div#v33-macro-tiles > :nth-child(n+4) { grid-column: span 3; }
}
/* A portfolio card's refresh button stays on its title line instead of dropping onto a row of its own. */
.regal-portfolio-heading-copy { flex-wrap: nowrap; }
.regal-portfolio-heading-copy > span:not(.regal-panel-refresh) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regal-portfolio-heading-copy > .regal-panel-refresh { flex: 0 0 auto; }
/* Phones wrap the holdings line instead of cutting it (320px, 2026-11-06: 'Aggressive + Margin · 7 positions' showed as 'Aggressive + Margin · 7 positi…'); the layered phone rule in density.css loses to the ellipsis rule above. */
@media(max-width:768px){body[data-mobile-app] .regal-portfolio-heading-copy > span:not(.regal-panel-refresh){white-space:normal;overflow:visible;text-overflow:clip}}
/* Phone readability (2026-10-31 UI refinement): small labels on phones were 9-9.5 px (bottom tool bar, Plan pill,
   status chips, tile captions). Nothing on a phone is smaller than 10 px now. */
body[data-mobile-app] :is(.regal-mobile-publication, .regal-mobile-only > span, .regal-lever, .regal-shock-badge, .regal-rot-tile > span, .regal-heat-state, .regal-context small) { font-size: 10px !important; }
/* Desktop too: tile captions, time-window buttons, status badges, leverage tags and gauge scales were 8.5-9.5 px. */
body.qe-workspace :is(.qe-donor-settings-opt, .regal-lever, .regal-rot-horizon > button, .regal-rot-tile > span, .regal-heat-sub, .regal-shock-badge, .regal-gauge-scale > span, .regal-gauge-edge) { font-size: 10px !important; }
body[data-signed-out="true"] #qe-original-macro-source,
body[data-signed-out="true"] #qe-original-news-strip,
body[data-signed-out="true"] #qe-tools-rail,
body[data-signed-out="true"] .qe-main > :not(#qe-global-status),
body[data-signed-out="true"] .regal-mobile-topbar,
body[data-signed-out="true"] .regal-mobile-nav,
body[data-signed-out="true"] #regal-engine-panel { display:none !important; }
/* Testing-mode feedback is deliberately separate from production navigation. */
#regal-feedback-open{position:fixed;right:18px;bottom:18px;z-index:1190;padding:10px 15px;border:1px solid #d6ad50;border-radius:10px;background:#171c22;color:#f1d27b;font:600 14px system-ui,sans-serif;cursor:pointer;box-shadow:0 6px 22px #0009}
#regal-feedback-open[hidden],#regal-feedback-overlay[hidden]{display:none!important}
#regal-feedback-overlay{position:fixed;inset:0;z-index:1600;display:grid;place-items:center;padding:16px;background:#000b}
.regal-feedback-card{width:min(100%,440px);max-height:calc(100dvh - 32px);overflow:auto;padding:20px;border:1px solid #d6ad50;border-radius:14px;background:#11171e;color:#e7edf3;box-shadow:0 18px 60px #000c}
.regal-feedback-card h2{font-size:20px;margin:0 0 10px}.regal-feedback-card p{font-size:14px;line-height:1.4}
.regal-feedback-card textarea{display:block;box-sizing:border-box;width:100%;min-height:120px;margin:12px 0;padding:12px;border:1px solid #55606b;border-radius:8px;background:#090e13;color:#fff;font:16px/1.4 system-ui,sans-serif;resize:vertical}
.regal-feedback-card button{min-height:40px;margin:3px 8px 3px 0;padding:8px 14px;border:1px solid #d6ad50;border-radius:7px;background:#252018;color:#f2d27e;cursor:pointer}.regal-feedback-card button:disabled{opacity:.5;cursor:default}
@media(max-width:768px){#regal-feedback-open{right:12px;bottom:calc(76px + env(safe-area-inset-bottom));padding:9px 12px}.regal-feedback-card{padding:16px}}
/* With chat open on a phone the chip sat on the Ask Claude button (live 2026-11-06, 375 px: chip 698-736, button 678-710). Above the composer. */
@media(max-width:768px){body[data-chat-open=true] #regal-feedback-open{bottom:calc(164px + env(safe-area-inset-bottom))}}
/* Owner, 2026-11-02: top bar single line, left-aligned news and market live, centered chat, top-right info tab icons, and responsive macro cards */
@media (min-width: 769px) {
  #v33-top.qe-header { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; height: 48px !important; max-height: 48px !important; padding: 0 12px !important; gap: 12px !important; }
  #v33-top.qe-header > .qe-brand { flex: 0 0 auto; }
  #v33-top.qe-header > .qe-original-news-strip { flex: 0 1 auto !important; min-width: 0; width: auto !important; height: auto !important; max-height: none !important; margin: 0 auto 0 12px !important; padding: 0 !important; border-top: 0 !important; justify-content: flex-start !important; order: 0 !important; }
  #v33-top #qe-original-news-toggle { order: 0 !important; margin: 0 !important; flex: 0 0 auto !important; }
  #v33-top #qe-index-ribbon { order: 1 !important; margin: 0 !important; flex: 0 0 auto !important; position: static !important; transform: none !important; }
  #v33-top.qe-header > .qe-header-status { flex: 0 0 auto; margin-left: auto !important; }
  body.qe-workspace { padding-top: 48px !important; }
  .qe-tools-rail { top: 48px !important; }
  .qe-original-news-details { top: 52px !important; }
  .regal-engine-panel { top: 54px !important; max-height: calc(100vh - 66px) !important; }
}

/* Research Chat empty state (owner, 2026-11-02): centered in chat */
.qe-research-chat-empty { text-align: center !important; margin: 0 auto !important; }
.qe-research-chat-empty h3 { text-align: center !important; }
.qe-research-chat-empty p { text-align: center !important; margin: 0 auto 18px !important; max-width: 52ch !important; }
.qe-research-chat-suggestions { justify-content: center !important; }

/* Product cabinet tabs (owner, 2026-11-02): info icon in top right to save vertical space */
#v33-cabinet > .v33-cab-tab {
  position: relative !important;
  padding: 10px 14px !important;
  min-height: 52px !important;
}
#v33-cabinet > .v33-cab-tab .regal-tab-info {
  position: absolute !important;
  top: 8px !important;
  right: 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--qe-accent, #c1a75d) !important;
  line-height: 1 !important;
  cursor: help !important;
}

/* Macro strip zoom layout (owner, 2026-11-02): clean fit across zoom levels and widths */
#v33-macro-row {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#v33-macro-tiles {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
  align-items: stretch !important;
}
#v33-macro-tiles > .regal-strip-tile {
  box-sizing: border-box !important;
  min-width: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 8px 10px !important;
}
#v33-macro-tiles > .regal-strip-tile .regal-strip-label {
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: clamp(8px, 0.65vw, 9.5px) !important;
  line-height: 1.2 !important;
}
#v33-macro-tiles > .regal-strip-tile[data-lead] .regal-strip-label {
  font-size: clamp(7.5px, 0.58vw, 8.5px) !important;
}

/* Gold section / card loader for model and screens (owner, 2026-11-02) */
.regal-section-loader, .regal-card-loader {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  min-height: 160px !important;
  margin: 16px auto !important;
  padding: 24px !important;
  text-align: center !important;
  font: 500 14px/1.4 Inter,system-ui,-apple-system,'Segoe UI',sans-serif !important;
  letter-spacing: .04em !important;
  color: #c9cfd8 !important;
}
.regal-section-loader::before, .regal-card-loader::before {
  content: '' !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 3px solid #dfbb6426 !important;
  border-top-color: #dfbb64 !important;
  border-right-color: #dfbb6499 !important;
  box-shadow: 0 0 20px #dfbb6422 !important;
  animation: regal-boot-spin .9s cubic-bezier(.55,.15,.45,.85) infinite !important;
}
.regal-position-label{display:inline;color:#e3b867;font-size:10px;line-height:1;margin-left:5px;white-space:nowrap}

.regal-product-help {display:none}
@media (hover:none), (pointer:coarse), (max-width:768px) {
  .regal-product-help {display:block;margin:2px 0 2px auto;min-height:32px;padding:3px 10px;color:var(--qe-accent);font:inherit}
}

/* How each profile reacts to the market (features/risk_rules_guide.js; owner, Nov 9). The table uses the deck's
   shared frame (.regal-data-table, .regal-table-scroll, cells data-wrap); only its width and cell alignment are set here. */
body.qe-workspace .regal-risk-rules { min-width:0;font-size:12px;line-height:1.4; }
body.qe-workspace .regal-risk-rules>summary { cursor:pointer;font-weight:700;color:var(--regal-accent); }
body.qe-workspace .regal-risk-rules .regal-risk-rules-scroll { margin-top:8px; }
body.qe-workspace .regal-risk-rules .regal-risk-rules-table { min-width:640px; }
body.qe-workspace .regal-risk-rules .regal-risk-rules-table :is(th,td) { vertical-align:top;text-align:left; }
body.qe-workspace .regal-risk-rules .regal-risk-rules-table tbody th small { display:block;font-weight:400;opacity:.7; }
body.qe-workspace .regal-risk-rules .regal-risk-rules-notes { display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 8px;margin:8px 0 0; }
body.qe-workspace .regal-risk-rules .regal-risk-rules-notes dt { font-weight:700; }
body.qe-workspace .regal-risk-rules .regal-risk-rules-notes dd { margin:0; }
body.qe-workspace .regal-risk-rules .regal-risk-rules-small { margin:6px 0 0;opacity:.7; }
@media (max-width:640px) { body.qe-workspace .regal-risk-rules .regal-risk-rules-notes { grid-template-columns:1fr; } }
