/* AXIS Obsidian System — final application-wide visual authority. */
:root {
  --axis-obsidian-0: #000;
  --axis-obsidian-1: #000;
  --axis-obsidian-2: #000;
  --axis-obsidian-3: #000;
  --axis-obsidian-soft: #000;
  --axis-gold: #d8aa4a;
  --axis-gold-bright: #f0cf78;
  --axis-gold-line: rgba(216, 170, 74, .34);
  --axis-gold-line-soft: rgba(216, 170, 74, .21);
  --axis-platinum: #e6e1d7;
  --axis-copy: #a9a49a;
  --axis-muted: #77736b;
  --axis-ui-font: "Avenir Next", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --axis-data-font: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --axis-card-radius: 12px;
  --axis-panel-radius: 14px;
  --axis-card-shadow: inset 0 1px 0 rgba(255, 255, 255, .018);
}

body:not([data-route="home"]):not([data-route="login"]),
body[data-axis-market],
body[data-route="dashboard"],
body[data-route="macro"],
body[data-route="journal"],
body[data-route="sentinel"] {
  color: var(--axis-platinum);
  background: #000 !important;
  font-family: var(--axis-ui-font);
  font-size: 13px;
  line-height: 1.42;
  letter-spacing: -.008em;
}

body:not([data-route="home"]):not([data-route="login"]) :is(button, input, select, textarea) {
  font: inherit;
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  .site-header, .site-nav, .top-nav, .market-hub, .axis-workspace-rail,
  .site-main, .app-shell, .page-shell, .workspace-shell, .dashboard-shell,
  .macro-shell, .macro-workspace, .journal-shell, .sentinel-shell,
  .intel-shell, .intel-page, .intel-content, .institutional-page,
  .positioning-page, .market-metric-page, .rates-carry-page, .relative-value-page
) {
  background-color: #000 !important;
  background-image: none !important;
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  .market-hub-trigger, .market-hub-link, .axis-workspace-link, .workspace-link,
  .nav-link, .selector, .selector-trigger, .selector-trigger-market,
  button, input, select, textarea
) {
  background-color: #000 !important;
  background-image: none !important;
  border-color: var(--axis-gold-line-soft) !important;
  color: var(--axis-platinum);
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  .market-hub-trigger, .market-hub-link, .axis-workspace-link, .workspace-link,
  .nav-link, .selector, .selector-trigger, .selector-trigger-market, button
):is(:hover, :focus-visible, .is-active, [aria-current="page"], [aria-expanded="true"]) {
  background-color: #000 !important;
  border-color: rgba(240, 207, 120, .44) !important;
  color: var(--axis-gold-bright) !important;
}

/* The indicator row owns its selection/hover fill. Keep the ON/OFF button
   transparent; only its rounded inner switch should paint a background.
   This also outranks the generic OLED button hover/focus rules above. */
body:not([data-route="home"]):not([data-route="login"])
  .indicator-catalog-item > .indicator-catalog-item-status {
  background: transparent !important;
}

/* True-black surfaces: hairlines and typography create hierarchy, not grey slabs. */
/* Chart legends are text over the plot, not black cards. Keep hover/focus
   transparent too; use an outline for keyboard focus without covering data. */
body:not([data-route="home"]):not([data-route="login"]) .indicator-overlay .indicator-badge-main,
body:not([data-route="home"]):not([data-route="login"]) .indicator-overlay .indicator-badge-main:is(:hover, :focus-visible, .is-active, [aria-expanded="true"]),
body:not([data-route="home"]):not([data-route="login"]) .indicator-overlay .is-open .indicator-badge-main {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body:not([data-route="home"]):not([data-route="login"]) .indicator-overlay .indicator-badge-main:focus-visible {
  outline: 1px solid var(--axis-gold-line) !important;
  outline-offset: 1px;
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  .dashboard-workspace-bar, .dashboard-header, .dashboard-toolbar,
  .dashboard-tile, .dashboard-card, .market-dashboard-tile,
  .intel-shell, .intel-hero, .intel-panel, .intel-card, .intel-metric,
  .intel-reading, .intel-story, .intel-table-wrap, .institutional-card,
  .macro-command, .macro-panel, .macro-card, .macro-stat, .macro-metric,
  .macro-event, .macro-event-row, .macro-news-card, .macro-news-summary,
  .macro-calendar-workbench, .macro-reactions-workbench, .macro-reaction-table,
  .macro-reaction-detail, .macro-release-news-panel, .macro-filter-bar,
  .macro-summary-strip, .macro-hero, .macro-section, .macro-workbench,
  .journal-panel, .journal-card, .journal-metric, .journal-summary,
  .sentinel-panel, .sentinel-card, .sentinel-metric, .sentinel-kpi,
  .paper-panel, .social-card, .knowledge-card,
  .cd, .sc, .tc, .detail-cell, .api-card,
  [class$="-panel"], [class*="-panel "],
  [class$="-card"], [class*="-card "],
  [class$="-tile"], [class*="-tile "],
  [class$="-metric"], [class*="-metric "],
  [class$="-stat"], [class*="-stat "],
  [class$="-summary"], [class*="-summary "],
  [class$="-workbench"], [class*="-workbench "]
) {
  background-color: #000 !important;
  background-image: none !important;
  border-color: var(--axis-gold-line-soft) !important;
  box-shadow: var(--axis-card-shadow) !important;
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  .dashboard-tile, .dashboard-card, .market-dashboard-tile,
  .intel-card, .intel-metric, .intel-reading, .institutional-card,
  .macro-card, .macro-stat, .macro-metric, .macro-event, .macro-event-row,
  .macro-news-card, .journal-card, .journal-metric,
  .sentinel-card, .sentinel-metric, .sentinel-kpi,
  .cd, .sc, .tc, .detail-cell, .api-card
) {
  border-radius: var(--axis-card-radius) !important;
  transition: border-color 180ms ease, box-shadow 180ms ease !important;
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  .dashboard-tile, .dashboard-card, .market-dashboard-tile,
  .intel-card, .intel-metric, .intel-reading, .institutional-card,
  .macro-card, .macro-stat, .macro-metric, .macro-event, .macro-event-row,
  .macro-news-card, .journal-card, .journal-metric,
  .sentinel-card, .sentinel-metric, .sentinel-kpi,
  .cd, .sc, .tc, .detail-cell, .api-card
)::before {
  animation: none !important;
}

@media (hover: hover) and (pointer: fine) {
  body:not([data-route="home"]):not([data-route="login"]) :is(
    .dashboard-tile, .dashboard-card, .market-dashboard-tile,
    .intel-card, .intel-metric, .intel-reading, .institutional-card,
    .macro-card, .macro-stat, .macro-metric, .macro-event, .macro-event-row,
    .macro-news-card, .journal-card, .journal-metric,
    .sentinel-card, .sentinel-metric, .sentinel-kpi,
    .cd, .sc, .tc, .detail-cell, .api-card
  ):hover {
    border-color: rgba(240, 207, 120, .34) !important;
    box-shadow: inset 0 1px 0 rgba(240, 207, 120, .055) !important;
  }
}

/* Dashboard modules share one compact rhythm; content gets the saved space. */
body[data-route="dashboard"] .dashboard-grid,
body:has(.dashboard-grid) .dashboard-grid {
  align-items: stretch !important;
  grid-auto-rows: 340px !important;
  gap: 10px !important;
}

body[data-route="dashboard"] .dashboard-tile,
body:has(.dashboard-grid) .dashboard-tile {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 340px !important;
  min-height: 340px !important;
  overflow: hidden !important;
  padding: 10px !important;
}

/* The motion runtime owns hover transforms. This overrides older lift-only
   dashboard rules while preserving the live pointer variables. */
body:not([data-route="home"]):not([data-route="login"]) .axis-motion-tilt {
  transform: perspective(1100px) rotateX(var(--axis-tilt-x, 0deg))
    rotateY(var(--axis-tilt-y, 0deg))
    translate3d(0, var(--axis-tilt-lift, 0), 0) !important;
}

body[data-route="dashboard"] .dashboard-tile:not(.axis-motion-tilt):hover {
  transform: none !important;
}

body[data-route="dashboard"] .dashboard-tile :is(canvas, svg, .module-chart, .dashboard-chart),
body:has(.dashboard-grid) .dashboard-tile :is(canvas, svg, .module-chart, .dashboard-chart) {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-route="macro"] :is(.macro-view, .macro-content, .macro-main, .macro-layout),
body[data-route="macro"] :is(.macro-calendar-head, .macro-table-head, .macro-reaction-head, .macro-news-head) {
  background: #000 !important;
  background-image: none !important;
  border-color: var(--axis-gold-line-soft) !important;
  box-shadow: none !important;
}

/* The positioning terminal must not inherit its former blue-grey shell. */
body[data-route="fund-positions"] :is(
  .flow-terminal-main, .fund-position-terminal-shell, .fund-terminal-toolbar,
  .fund-regime-ribbon, .fund-terminal-layout, .fund-history-panel,
  .fund-landscape-panel, .fund-data-section, .flow-summary-block,
  .fund-regime-primary, .fund-regime-signal, .fund-history-chart-frame
),
body[data-route="fund-positions"] .fund-group-grid > * {
  background: #000 !important;
  background-image: none !important;
  border-color: var(--axis-gold-line-soft) !important;
  box-shadow: none !important;
}

/* Journal typography is the system reference. */
body:not([data-route="home"]):not([data-route="login"]) :is(h1, .page-title, .workspace-title) {
  font-family: var(--axis-ui-font) !important;
  font-size: clamp(21px, 1.45vw, 29px) !important;
  line-height: 1.08 !important;
  font-weight: 640 !important;
  letter-spacing: -.03em !important;
}

body:not([data-route="home"]):not([data-route="login"]) :is(h2, .panel-title, .card-title, .module-title) {
  font-family: var(--axis-ui-font) !important;
  font-size: clamp(14px, .92vw, 18px) !important;
  line-height: 1.18 !important;
  font-weight: 620 !important;
  letter-spacing: -.016em !important;
}

body:not([data-route="home"]):not([data-route="login"]) :is(p, .description, .subtitle, .helper, .meta) {
  line-height: 1.44;
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  .eyebrow, .kicker, .label, th, .metric-label, .stat-label,
  [class$="-label"], [class*="-label "]
) {
  font-family: var(--axis-data-font) !important;
  font-size: 10px;
  color: #9b8a68;
  letter-spacing: .1em;
  text-transform: uppercase;
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  code, pre, table, .metric-value, .stat-value, .price, .value,
  [class$="-value"], [class*="-value "],
  [class$="-number"], [class*="-number "]
) {
  font-family: var(--axis-data-font) !important;
  font-variant-numeric: tabular-nums lining-nums;
}

body:not([data-route="home"]):not([data-route="login"]) :is(
  .dashboard-toolbar, .dashboard-workspace-bar, .macro-filter-bar,
  .terminal-toolbar, .chart-toolbar, .axis-drawing-toolbar-slot
) {
  min-height: 0 !important;
  gap: 6px !important;
}

body:not([data-route="home"]):not([data-route="login"]) :is(.divider, hr) {
  border-color: var(--axis-gold-line-soft) !important;
  background-color: var(--axis-gold-line-soft) !important;
}

@media (max-width: 900px) {
  body[data-route="dashboard"] .dashboard-grid,
  body:has(.dashboard-grid) .dashboard-grid {
    grid-auto-rows: 380px !important;
  }

  body[data-route="dashboard"] .dashboard-tile,
  body:has(.dashboard-grid) .dashboard-tile {
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;
  }
}

/* Cascade lock: legacy page styles contain route-specific !important material
   fills. Keep this final authority more specific so no grey/blue slab survives. */
body[data-route]:not([data-route="home"]):not([data-route="login"]) :is(
  .site-background.site-background, .site-header.site-header, .site-nav.site-nav,
  .market-hub.market-hub, .site-main.site-main, .view.view,
  .dashboard-view.dashboard-view, .dashboard-grid.dashboard-grid,
  .dashboard-workspace.dashboard-workspace,
  .dashboard-workspace-bar.dashboard-workspace-bar,
  .dashboard-cockpit.dashboard-cockpit, .dashboard-lens.dashboard-lens,
  .dashboard-header.dashboard-header, .dashboard-toolbar.dashboard-toolbar,
  .dashboard-tile.dashboard-tile,
  .dashboard-card.dashboard-card, .dashboard-module.dashboard-module,
  .dashboard-tile-head.dashboard-tile-head,
  .market-metric-chart-frame.market-metric-chart-frame,
  .open-interest-chart-frame.open-interest-chart-frame,
  .flow-module-chart.flow-module-chart,
  .intel-hero.intel-hero, .intel-panel.intel-panel, .intel-card.intel-card,
  .macro-command.macro-command, .macro-command-bar.macro-command-bar,
  .macro-summary-strip.macro-summary-strip,
  .macro-hero.macro-hero, .macro-section.macro-section,
  .macro-filter-bar.macro-filter-bar,
  .macro-panel.macro-panel, .macro-card.macro-card, .macro-stat.macro-stat,
  .journal-panel.journal-panel, .journal-card.journal-card,
  .sentinel-panel.sentinel-panel, .sentinel-card.sentinel-card,
  .cd.cd, .sc.sc, .tc.tc, .detail-cell.detail-cell,
  [class][class$="-panel"], [class][class*="-panel "],
  [class][class$="-card"], [class][class*="-card "],
  [class][class$="-tile"], [class][class*="-tile "],
  [class][class$="-metric"], [class][class*="-metric "],
  [class][class$="-stat"], [class][class*="-stat "],
  [class][class$="-summary"], [class][class*="-summary "],
  [class][class$="-workbench"], [class][class*="-workbench "],
  [class][class*="chart-frame"]
) {
  background-color: #000 !important;
  background-image: none !important;
  border-color: var(--axis-gold-line-soft) !important;
  box-shadow: var(--axis-card-shadow) !important;
}

body[data-route="macro"] .macro-panel::before,
body[data-route="macro"] .macro-panel::after {
  background-color: transparent !important;
  background-image: none !important;
}

body[data-route]:not([data-route="home"]):not([data-route="login"]) .site-background :is(
  .background-grid, .background-glow
) {
  display: none !important;
}

/* Whole-site OLED lock, including landing, login, locked states and legacy
   terminal strips that do not use the newer semantic card class names. */
body,
body :is(
  .site-background.site-background, .site-header.site-header,
  .axis-workspace-nav.axis-workspace-nav, .axis-motion-surface.axis-motion-surface,
  .axis-hero-terminal.axis-hero-terminal,
  .axis-hero-terminal-screen.axis-hero-terminal-screen,
  .sentinel-locked.sentinel-locked,
  .journal-metrics-bar.journal-metrics-bar, .nav.nav,
  .dom-market-strip.dom-market-strip, .dom-execution-strip.dom-execution-strip,
  .dashboard-fund-positioning-chart.dashboard-fund-positioning-chart,
  .fund-panel-head.fund-panel-head,
  [class][class$="-strip"], [class][class*="-strip "]
) {
  background-color: #000 !important;
  background-image: none !important;
}

body [class][class*="chart-frame"] {
  background-color: #000 !important;
  background-image: none !important;
}

/* Chart canvases are composited in transparent layers. Giving every canvas an
   opaque CSS background makes the top drawing/interaction layer cover candles,
   axes, OHLC and footprint data underneath it. The chart host owns the black
   surface; every canvas layer must stay transparent. */
body canvas {
  background-color: transparent !important;
  background-image: none !important;
}

/* Data colours are functional controls, not material surfaces. Keep the OLED
   reset away from palette buttons so their actual runtime colour remains visible. */
body:not([data-route="home"]):not([data-route="login"]) :is(
  .chart-appearance-swatch,
  .axis-color-preset-swatch,
  .indicator-color-swatch,
  .axis-drawing-color-swatch,
  .axis-drawing-settings-color-preset,
  .axis-theme-color-swatch
) {
  background-image: none !important;
}

body:not([data-route="home"]):not([data-route="login"]) .chart-appearance-swatch {
  background-color: var(--chart-appearance-swatch, #d8aa4a) !important;
}

body:not([data-route="home"]):not([data-route="login"]) .axis-color-preset-swatch {
  background-color: var(--axis-color-preset, #d8aa4a) !important;
}

body:not([data-route="home"]):not([data-route="login"]) .indicator-color-swatch {
  background-color: var(--indicator-swatch-color, #d8aa4a) !important;
}

body:not([data-route="home"]):not([data-route="login"]) .axis-drawing-color-swatch {
  background-color: var(--axis-swatch-color, #d8aa4a) !important;
}

body:not([data-route="home"]):not([data-route="login"]) .axis-drawing-settings-color-preset {
  background-color: var(--drawing-preset-color, #d8aa4a) !important;
}

body:not([data-route="home"]):not([data-route="login"])
  button.axis-drawing-settings-color-preset:is(:hover, :focus-visible, .is-active) {
  background-color: var(--drawing-preset-color, #d8aa4a) !important;
}

body:not([data-route="home"]):not([data-route="login"]) .axis-theme-color-swatch {
  background-color: var(--axis-theme-swatch-color, #d8aa4a) !important;
}

/* Active drawing tools need a non-colour cue and decisive contrast against the
   black toolbar. Gold fill + black glyph is readable on OLED and IPS alike. */
body:not([data-route="home"]):not([data-route="login"]) .axis-drawing-tool.is-active,
body:not([data-route="home"]):not([data-route="login"]) .axis-drawing-group.is-active {
  background-color: var(--axis-gold) !important;
  border-color: var(--axis-gold-bright) !important;
  color: #050505 !important;
  box-shadow: 0 0 0 2px rgba(216, 170, 74, .14) !important;
}

/* Final OLED structural lock. The preceding unified theme deliberately uses
   three-class !important selectors, so a normal late override is not enough.
   Duplicate the route attribute to reach the same specificity and keep every
   large application surface true black while preserving semantic data fills,
   chart canvases, palette swatches and active drawing controls. */
body[data-route][data-route] :is(
  .site-shell, .site-main, .view, .axis-intel,
  .dashboard-manager-bar, .chart-shell,
  .flow-terminal-shell, .fund-position-terminal-shell,
  .market-metric-terminal-shell, .open-interest-page-shell,
  .options-chain-shell, .footprint-shell, .spot-depth-shell,
  .orderbook-terminal-shell, .orderbook-chart-shell,
  .axis-watchlist-drawer, .dom-execution-drawer, .dom-chart-stage,
  .macro-screen, .macro-rail, .sentinel-boot,
  [class][class$="-shell"], [class][class*="-shell "],
  [class][class$="-drawer"], [class][class*="-drawer "],
  [class][class$="-screen"], [class][class*="-screen "],
  [class][class$="-surface"], [class][class*="-surface "]
) {
  background-color: #000 !important;
  background-image: none !important;
  border-color: var(--axis-gold-line-soft) !important;
  box-shadow: var(--axis-card-shadow) !important;
}

/* The homepage/login shells do not all expose a route, but they still belong
   to the same black-and-gold material system. */
body > .site-shell,
body > .site-background,
body > .site-shell > .site-main {
  background-color: #000 !important;
  background-image: none !important;
}

body:not([data-route="home"]):not([data-route="login"]) .axis-drawing-group.is-active :is(
  .axis-drawing-group-primary,
  .axis-drawing-group-trigger,
  .axis-drawing-group-caret
) {
  color: #050505 !important;
}

body:not([data-route="home"]):not([data-route="login"]) .axis-drawing-group.is-active .axis-drawing-group-caret {
  border-top-color: #050505 !important;
}

body figcaption {
  background-color: #000 !important;
  background-image: none !important;
}

body :is(
  .chart-embed.chart-embed,
  .spot-depth-canvas-shell.spot-depth-canvas-shell,
  .options-chain-table.options-chain-table,
  .options-chain-table.options-chain-table th,
  .dom-toast.dom-toast,
  .replay-hero-status.replay-hero-status,
  .replay-definition.replay-definition > div
) {
  background-color: #000 !important;
  background-image: none !important;
}

body[data-route="macro"] .macro-panel span {
  background-color: #000 !important;
  background-image: none !important;
}

body[data-route="journal"][data-route="journal"] .chart-embed.chart-embed,
body[data-route="options-chain"][data-route="options-chain"] .options-chain-table.options-chain-table,
body[data-route="options-chain"][data-route="options-chain"] .options-chain-table.options-chain-table th,
body[data-route="spot-depth"][data-route="spot-depth"] .spot-depth-canvas-shell.spot-depth-canvas-shell,
body[data-route="macro"][data-route="macro"] :is(
  .macro-context-strip.macro-context-strip > span,
  .macro-pulse-lens-grid.macro-pulse-lens-grid > div,
  .macro-now-next-grid.macro-now-next-grid > div,
  .macro-history-loading.macro-history-loading
) {
  background-color: #000 !important;
  background-image: none !important;
}

body[data-route="macro"] :is(
  [data-macro-refresh], .macro-intelligence-notice, .macro-history-loading
) {
  display: none !important;
}

@media (max-width: 720px) {
  body[data-route="macro"] .macro-top-nav.macro-top-nav {
    position: relative !important;
    top: 0 !important;
    margin-bottom: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body * { scroll-behavior: auto !important; }
  body :is(.dashboard-tile, .dashboard-card, .market-dashboard-tile,
    .intel-card, .intel-metric, .macro-card, .macro-stat, .macro-metric,
    .journal-card, .sentinel-card, .cd, .sc, .tc, .detail-cell) {
    transition: none !important;
    transform: none !important;
  }
}

/* Journal navigation is the reference UI voice across AXIS: compact Avenir,
   medium weight, sentence case and restrained tracking. Data readouts keep the
   mono face; this rule owns application chrome only. */
body[data-route] :is(
  .market-hub-trigger, .market-hub-link,
  .axis-workspace-link, .workspace-link, .nav-link, .nav-t,
  .dashboard-help-trigger, .dashboard-settings-trigger,
  .dashboard-settings-actions button, [role="tab"], .btn
) {
  font-family: var(--axis-ui-font) !important;
  font-size: 13px !important;
  font-weight: 520 !important;
  line-height: 1 !important;
  letter-spacing: .04em !important;
  text-transform: none !important;
}

/* Rounded controls must clip their own painted layers. Menus are siblings of
   their triggers throughout AXIS, so clipping the control does not clip a
   dropdown; it only prevents square child/pseudo corners escaping the radius. */
body :is(
  button, [role="button"], .selector-trigger, .selector-item,
  .market-hub-link, .axis-workspace-link, .workspace-link, .nav-link,
  .hero-button, .btn
) {
  background-clip: padding-box !important;
  isolation: isolate;
  overflow: hidden;
}

body :is(
  button, [role="button"], .selector-trigger, .selector-item,
  .market-hub-link, .axis-workspace-link, .workspace-link, .nav-link,
  .hero-button, .btn
)::before,
body :is(
  button, [role="button"], .selector-trigger, .selector-item,
  .market-hub-link, .axis-workspace-link, .workspace-link, .nav-link,
  .hero-button, .btn
)::after {
  border-radius: inherit;
}

/* Keep the workspace active marker inside the rounded control. */
.axis-workspace-link.is-active::after,
.axis-workspace-group.is-active > .axis-workspace-link::after {
  right: 12px !important;
  bottom: 0 !important;
  left: 12px !important;
}

/* Hidden really means hidden. This deliberately outranks the shared flex tile
   layout, fixing both the tile × action and Overview settings toggles. */
body[data-route="dashboard"][data-route="dashboard"] .dashboard-tile[hidden],
body[data-route="dashboard"][data-route="dashboard"] [data-dashboard-tile][hidden] {
  display: none !important;
}

/* Final specificity lock: route-level component rules must not restore neutral
   gray borders over the obsidian/gold system. Semantic status colors remain. */
body[data-route="journal"][data-route="journal"] .chart-embed.axis-countdown-host,
body[data-route="options-chain"][data-route="options-chain"] :is(
  .options-chain-search.options-chain-search,
  .options-chain-segmented.options-chain-segmented,
  .options-chain-select.options-chain-select
) {
  border-color: var(--axis-gold-line-soft) !important;
}

/* Terminal first paint is final paint: never hide the already usable shell
   while background preferences, symbols and live streams hydrate. */
html.axis-motion-booting body[data-route="terminal"] {
  opacity: 1 !important;
}

/* The generic *-label typography rule must not recolor the price pill. */
body[data-route="terminal"] .axis-terminal-crosshair-label.is-price {
  color: #000000 !important;
  font-weight: 750 !important;
  text-shadow: none !important;
}

/* Drawing groups are one rounded control made from a primary tool and a caret.
   The parent owns every fill, while the two inner buttons stay transparent.
   Do not clip the parent: each group's tool menu is positioned below it and
   overflow:hidden made the menu exist semantically but remain invisible. */
body:not([data-route="home"]):not([data-route="login"]) .axis-drawing-group {
  overflow: visible !important;
  background-clip: padding-box !important;
  isolation: isolate;
}

body:not([data-route="home"]):not([data-route="login"])
  .axis-drawing-group > :is(.axis-drawing-group-primary, .axis-drawing-group-trigger),
body:not([data-route="home"]):not([data-route="login"])
  .axis-drawing-group.is-active > :is(.axis-drawing-group-primary, .axis-drawing-group-trigger) {
  background: transparent !important;
  box-shadow: none !important;
}

/* Optical rather than font-baseline centring for the dashboard remove action. */
body[data-route="dashboard"] .dashboard-tile-remove {
  top: 0 !important;
  right: 0 !important;
  display: grid !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  place-items: center !important;
  border-radius: 8px !important;
  line-height: 0 !important;
}

body[data-route="dashboard"] .dashboard-tile-remove > span {
  display: grid !important;
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 1px solid rgba(255, 93, 96, .72) !important;
  border-radius: 6px !important;
  background: #000 !important;
  color: var(--axis-gold-bright) !important;
  line-height: 0 !important;
}

body[data-route="dashboard"] .dashboard-tile-remove svg {
  display: block;
  width: 12px;
  height: 12px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
}

/* One journal command rail: workspace tabs on the left, live KPIs on the right. */
body[data-route="journal"] .journal-command-row {
  position: sticky;
  top: 70px;
  z-index: 80;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-width: 0;
  background: #000 !important;
  border-bottom: 1px solid var(--axis-gold-line-soft) !important;
}

body[data-route="journal"] .journal-command-row .nav {
  position: relative !important;
  top: auto !important;
  z-index: auto !important;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 14px !important;
  border: 0 !important;
  background: #000 !important;
  backdrop-filter: none !important;
}

body[data-route="journal"] .journal-command-row .journal-metrics-bar {
  position: relative !important;
  z-index: auto !important;
  flex: 0 0 auto;
  min-width: max-content;
  gap: 18px !important;
  padding: 6px 16px !important;
  border: 0 !important;
  border-left: 1px solid var(--axis-gold-line-soft) !important;
  background: #000 !important;
}

body[data-route="journal"] .journal-command-row .nav-t {
  min-height: 48px;
  padding: 0 14px !important;
}

@media (max-width: 1100px) {
  body[data-route="journal"] .journal-command-row {
    overflow-x: auto;
    scrollbar-width: none;
  }
  body[data-route="journal"] .journal-command-row::-webkit-scrollbar { display: none; }
}

@media (max-width: 860px) {
  body[data-route="journal"] .journal-command-row { top: 92px; }
}

@media (max-width: 520px) {
  body[data-route="journal"] .journal-command-row { top: 88px; }
}

/* Replace the remaining neutral/platinum UI dividers found by the full-route
   computed-style audit. Semantic red/green/cyan data borders are excluded. */
body :is(
  .axis-watchlist-row, .tile-badge, .volume-panel-label,
  .dom-quick-value, .dom-quick-field, .dom-quick-state,
  .dom-segmented, .dom-layout-presets, .dom-execution-strip,
  .dom-timeframes, .dom-chart-zoom, .dom-chart-footer,
  .dom-ladder-footer, .dom-execution-footer,
  .chart-embed, .be-toggle, .liquidation-chart-interaction-hint,
  .replay-secondary-action, .options-chain-search,
  .options-chain-segmented, .options-chain-select,
  .paper-archive-button, .paper-trades-table
) {
  border-color: var(--axis-gold-line-soft) !important;
}
