/* Hallmark · surface: desk · macrostructure: n/a desk · theme: preserve
 * Taste · desk preserve · V3 M2 D8
 * pre-emit critique: P4 H4 E4 S4 R4 V3
 * Operate: portal as cockpit, job = scan then act, chrome quieter than the work.
 *
 * Mix: 70% institutional density · 20% Apple polish · 10% overlay glass.
 * Plates are objects (table, chart, brief, toolbar) — not a metric mosaic.
 * One radius (8px). Pills only on chips / nav / FAB.
 */

:root {
  --r-control: 8px;
  --control-h: 32px;
  --row-h: 28px;
}

/* ---------- Numbers ---------- */
table,
.wl-table,
.mkt-table,
.th-table,
.pf-table,
.sc-table,
.mv-table,
.strip-price,
.strip-pct,
.wl-pct,
.qp-price,
.qp-change,
.mh-price,
.mh-change,
.pos, .neg, .up, .dn,
.pf-kpi-value,
td.num, th.num,
.wl-col-num,
.wl-price,
.mv-price, .mv-pct {
  font-variant-numeric: tabular-nums;
}
table td:is(.num, .wl-col-num, .wl-pct, .wl-price, .mv-price, .mv-pct, [data-num]),
.wl-table td.wl-col-num,
.wl-table .wl-pct,
.wl-table .wl-price,
.mv-table .mv-price,
.mv-table .mv-pct,
.mkt-table td.num {
  text-align: right;
  font-family: var(--font-mono), var(--font-sans);
}

/* ==========================================================================
   Control kit — one height, one radius, color hover, press 0.98
   ========================================================================== */
body[data-oc-shell] .btn,
body[data-oc-shell] .btn-primary,
body[data-oc-shell] .btn-secondary,
body[data-oc-shell] .btn-ghost,
body[data-oc-shell] .btn-danger,
body[data-oc-shell] .im-btn-primary,
body[data-oc-shell] .im-btn-secondary,
body[data-oc-shell] .im-btn-danger,
body[data-oc-shell] .pf-btn,
body[data-oc-shell] .cal-btn,
body[data-oc-shell] .dd-btn,
body[data-oc-shell] .wl-row-btn,
body[data-oc-shell] .wl-btn-primary,
body[data-oc-shell] .wl-btn-secondary,
body[data-oc-shell] .ask-oceanus-btn,
body[data-oc-shell] .an-btn,
body[data-oc-shell] .mem-btn,
body[data-oc-shell] .dash-ask-follow,
body[data-oc-shell] .dash-quick-btn,
body[data-oc-shell] .cew-chip,
body[data-oc-shell] .tab-btn,
body[data-oc-shell] .mv-tab,
body[data-oc-shell] .dash-tl-tab {
  border-radius: var(--r-control) !important;
  min-height: var(--control-h);
  height: auto;
}
body[data-oc-shell] .chip,
body[data-oc-shell] .badge,
body[data-oc-shell] .crit,
body[data-oc-shell] .nav-item,
body[data-oc-shell] .chat-fab,
body[data-oc-shell] #chat-fab,
body[data-oc-shell] .wl-pill {
  border-radius: var(--r-full) !important;
}

body[data-oc-shell] .ico-btn,
body[data-oc-shell] .mh-action,
body[data-oc-shell] .qp-watch,
body[data-oc-shell] .mkt-strip-refresh,
body[data-oc-shell] .wl-mbar-ico {
  width: var(--control-h);
  height: var(--control-h);
  min-height: var(--control-h);
  border-radius: var(--r-control) !important;
  padding: 0;
}

body[data-oc-shell] input[type="text"],
body[data-oc-shell] input[type="password"],
body[data-oc-shell] input[type="email"],
body[data-oc-shell] input[type="number"],
body[data-oc-shell] input[type="search"],
body[data-oc-shell] select {
  height: var(--control-h);
  min-height: var(--control-h);
  border-radius: var(--r-control) !important;
  box-sizing: border-box;
}
body[data-oc-shell] textarea {
  border-radius: var(--r-control) !important;
}
body[data-oc-shell] input:focus-visible,
body[data-oc-shell] textarea:focus-visible,
body[data-oc-shell] select:focus-visible,
body[data-oc-shell] .btn:focus-visible,
body[data-oc-shell] .btn-primary:focus-visible,
body[data-oc-shell] .tab-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
  box-shadow: none !important;
}

.top-bar,
[data-theme="light"] .top-bar {
  border-bottom: none !important;
}

/* Dashboard: page title + greeting + clock on one top-bar row */
html body .top-bar-title-wrap:has(#dash-greeting-text) {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
html body .dash-top-greet {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
html body .dash-top-greet::before {
  content: "";
  width: 1px;
  height: 14px;
  background: var(--border-default);
  flex-shrink: 0;
  align-self: center;
}
html body .dash-top-greet #dash-greeting-text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
html body .dash-top-greet .dash-date {
  font-size: var(--fs-xs);
  font-family: var(--font-mono), var(--font-sans);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  html body .top-bar-title-wrap:has(#dash-greeting-text) {
    flex-direction: row !important;
    white-space: nowrap;
  }
  html body .top-bar-title-wrap:has(#dash-greeting-text) #page-title {
    display: none !important;
  }
  html body .dash-top-greet {
    display: inline-flex !important;
    flex: 1 1 auto;
  }
  html body .dash-top-greet #dash-greeting-text {
    max-width: 46vw;
  }
  html body .dash-top-greet::before {
    display: none;
  }
}

/* Segmented control (tabs that are a switch, not a row of pills) */
html body .dash-tl-scopes,
html body .movers-tabs,
html body .mkt-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--r-control);
}
html body .mkt-tabs {
  margin: 8px 10px 0;
  padding: 2px;
  border-bottom: 1px solid var(--border-default);
  width: fit-content;
}
html body .dash-tl-tab,
html body .mv-tab,
html body .mkt-tabs .tab-btn {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  border-radius: 6px !important;
  min-height: 26px;
  height: 26px;
  padding: 0 10px !important;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0;
}
html body .dash-tl-tab.is-active,
html body .mv-tab.active,
html body .mkt-tabs .tab-btn.active {
  background: var(--bg-elevated-2) !important;
  color: var(--text-primary) !important;
}
html body .dash-tl-tab:hover,
html body .mv-tab:hover,
html body .mkt-tabs .tab-btn:hover {
  color: var(--text-primary) !important;
  background: color-mix(in srgb, var(--text-primary) 6%, transparent) !important;
}
html body .dash-tl-chip {
  border-radius: 6px !important;
  text-transform: none;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   News tape — activity feed (time | rail | headline). Not nested cards.
   Hallmark · component-scope · Linear/Apple scan, not SaaS bubbles.
   ========================================================================== */
html body .dash-tl-toolbar {
  border-bottom: 1px solid var(--border-muted);
  padding: 6px 12px 8px;
  gap: 6px;
}
html body .dash-tl-imp {
  border: 0 !important;
  background: transparent !important;
  min-height: 26px;
  height: 26px;
  padding: 0 8px !important;
  margin-left: auto;
  border-radius: 6px !important;
  font-weight: var(--fw-medium);
  color: var(--text-muted) !important;
}
html body .dash-tl-imp:hover {
  color: var(--text-primary) !important;
  background: color-mix(in srgb, var(--text-primary) 6%, transparent) !important;
}
html body .dash-tl-imp.is-active {
  color: var(--warning) !important;
  background: color-mix(in srgb, var(--warning) 12%, transparent) !important;
  border-color: transparent !important;
}
html body .dash-tl-body {
  padding: 0 8px 10px !important;
}
html body .dash-tl-entries {
  padding-left: 0;
}
html body .dash-tl-entries::before {
  content: none;
  display: none;
}
html body .dash-tl-date-sep {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 6px 0;
  margin: 0;
  background: var(--bg-elevated);
}
html body .dash-tl-date-sep span {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
  background: transparent;
  padding: 0;
}
html body .dash-tl-date-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-muted);
}
html body .dash-tl-entry {
  display: grid;
  grid-template-columns: 4.6rem 12px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  margin: 0;
  padding: 7px 8px 7px 4px;
  max-width: 100%;
  border-radius: 6px;
  transition: background var(--dur-ui) var(--ease-out, ease);
}
html body .dash-tl-entry:hover,
html body .dash-tl-entry:focus-within {
  background: color-mix(in srgb, var(--text-primary) 5%, transparent);
}
html body .dash-tl-entry__time {
  grid-column: 1;
  font-family: var(--font-mono), var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  text-align: right;
  line-height: 1.35;
  padding-top: 1px;
  margin: 0;
  max-width: none;
  overflow: visible;
  letter-spacing: 0;
}
html body .dash-tl-entry__rail {
  grid-column: 2;
  position: relative;
  width: 12px;
  flex: none;
  align-self: stretch;
  min-height: 18px;
}
html body .dash-tl-entry__rail::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-muted);
}
html body .dash-tl-entry__dot {
  position: absolute;
  left: 2px;
  top: 5px;
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--bg-elevated);
  z-index: 1;
  box-sizing: border-box;
}
html body .dash-tl-entry:hover .dash-tl-entry__dot {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-primary) 5%, var(--bg-elevated));
}
html body .dash-tl-entry__main,
html body .dash-tl-entry__bubble {
  grid-column: 3;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  min-width: 0;
}
html body .dash-tl-entry__head {
  display: none;
}
html body .dash-tl-entry__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text-primary);
  -webkit-line-clamp: 2;
}
html body .dash-tl-entry__title-link:hover {
  color: var(--accent);
  text-decoration: none;
}
html body .dash-tl-entry__title-link:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
  border-radius: 2px;
}
html body .dash-tl-entry__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  min-width: 0;
  overflow: hidden;
}
html body .dash-tl-entry__kind {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: var(--fw-medium);
  font-size: var(--fs-xs);
  line-height: 1.3;
}
html body .dash-tl-entry__site,
html body .dash-tl-entry__age {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
html body .dash-tl-entry__snippet {
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.35;
  -webkit-line-clamp: 1;
}
html body .dash-tl-entry--ticker .dash-tl-entry__snippet,
html body .dash-tl-entry--grade .dash-tl-entry__snippet,
html body .dash-tl-entry--has-sym .dash-tl-entry__snippet {
  -webkit-line-clamp: 1;
}
html body .dash-tl-sym {
  font-family: var(--font-mono), var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: var(--fw-semibold);
  padding: 0 5px;
  height: 16px;
  line-height: 16px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
html body .dash-tl-entry.is-new .dash-tl-entry__main,
html body .dash-tl-entry.is-new .dash-tl-entry__bubble {
  animation: none;
}
html body .dash-tl-entry.is-new {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  html body .dash-tl-entry.is-new {
    animation: oc-tl-flash 1.4s ease-out;
  }
}
@keyframes oc-tl-flash {
  0% { background: color-mix(in srgb, var(--accent) 16%, transparent); }
  100% { background: transparent; }
}
html body .dash-live-dot {
  box-shadow: none;
  animation: none;
}
@media (prefers-reduced-motion: no-preference) {
  html body .dash-live-meta:not(.is-stale):not(.is-error) .dash-live-dot {
    animation: dash-live-pulse 2.2s ease-out infinite;
  }
}
html body .dash-tl-new {
  border-radius: 6px;
  margin: 6px 12px 0;
}
html body .dash-live-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-family: var(--font-mono), var(--font-sans);
  white-space: nowrap;
}
html body .dash-card-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Markets go-to tape — larger type, thicker rail, internal scroll. */
html body .mkt-timeline {
  scroll-margin-top: 48px;
  display: flex;
  flex-direction: column;
  min-height: min(52vh, 560px);
  max-height: min(72vh, 840px);
}
html body .mkt-timeline .mkt-timeline__head h3 {
  font-size: var(--fs-md) !important;
  font-weight: var(--fw-semibold) !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}
html body .mkt-timeline .dash-tl-toolbar {
  flex: 0 0 auto;
}
html body .mkt-timeline .dash-tl-body,
html body .mkt-timeline .mkt-timeline__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px 16px !important;
}
html body .mkt-timeline .dash-tl-entry {
  grid-template-columns: 5.8rem 16px minmax(0, 1fr);
  column-gap: 12px;
  padding: 12px 10px 12px 4px;
}
html body .mkt-timeline .dash-tl-entry__time {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding-top: 3px;
}
html body .mkt-timeline .dash-tl-entry__rail {
  width: 16px;
}
html body .mkt-timeline .dash-tl-entry__rail::before {
  left: 7px;
  width: 2px;
  background: color-mix(in srgb, var(--text-primary) 16%, var(--border-muted));
}
html body .mkt-timeline .dash-tl-entry__dot {
  left: 3px;
  top: 8px;
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 4px var(--bg-elevated);
}
html body .mkt-timeline .dash-tl-entry__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  -webkit-line-clamp: 3;
}
html body .mkt-timeline .dash-tl-entry__snippet {
  margin-top: 6px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.45;
  -webkit-line-clamp: 3;
}
html body .mkt-timeline .dash-tl-date-sep {
  padding: 18px 8px 10px 0;
}
html body .mkt-timeline .dash-tl-date-sep span {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

/* ==========================================================================
   Work plates — opaque elevated + 8px, no outer frame.
   Fill vs canvas is the edge. Inner hairlines, controls, overlays stay.
   ========================================================================== */
html body .content-left .card,
html body .content-left .panel,
html body .dash.dash--studio .dash-card,
html body .dash.dash--studio .dash-quick,
html body .dash.dash--studio .dash-strip,
html body .dash.dash--studio .dash-strip--merged,
html body .dash.dash--studio .dash-card--hero,
html body .mkt-card,
html body .mkt-strip,
html body .mkt-header,
html body .th-masthead,
html body .th-pg .panel,
html body .th-chart-card,
html body .th-row > .th-main-col > .th-chart-card,
html body .th-row > .th-main-col > .panel,
html body .th-row > .th-side-col > .panel,
html body .th-pg > .grid-2 > *,
html body #th-exec-strip,
html body #th-chat-panel,
html body .th-pg .panel#th-chat-panel,
html body .wl-header,
html body .wl-root .wl-header,
html body .wl-table-wrap,
html body .pipelines-page .pp-toolbar,
html body .pw-card,
html body .pw-uni-table,
html body .research-filter-strip,
html body .settings-header,
html body .settings-nav,
html body .settings-content > section > .card,
html body .settings-content > section > .cards > .card,
html body .scout-toolbar,
html body .scout-progress,
html body .ind-header,
html body .ind-table-wrap,
html body .finder,
html body .hp-toc,
html body .hp-agent-card,
html body .an-root--desk .an-workspace,
html body .an-root--desk .an-persona-section {
  background: var(--bg-elevated) !important;
  border: none !important;
  border-radius: var(--r-md) !important;
  box-shadow: none !important;
}

/* Ticker copilot — AI object. Filament bloom, not a neon stroke.
   Hallmark · component-scope · desk · preserve tokens
   Taste · desk preserve · V3 M2 D8 · one accent, no spin, no purple, no sheen.
   Operate: company page as Detail, job = inspect then ask, copilot is the live channel.
   Light radiates (even 0 0 shadows). Hairline is mixed into the plate so the
   object is defined by emission, not a 2px gamer box. */
html body #th-chat-panel,
html body .content-left .panel#th-chat-panel,
html body .th-pg .panel#th-chat-panel,
html body .th-pg > .grid-2 > #th-chat-panel,
html body #th-chat-panel.is-minimized,
html body .content-left .panel#th-chat-panel.is-minimized,
html body .th-pg .panel#th-chat-panel.is-minimized,
html body > #th-chat-panel,
html body > #th-chat-panel.is-maximized {
  position: relative;
  z-index: 2;
  border: 1px solid color-mix(in srgb, var(--accent-ai, var(--accent)) 18%, var(--bg-elevated)) !important;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent-ai, var(--accent)) 10%, var(--bg-elevated)) 0%,
      var(--bg-elevated) 56px
    ) !important;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent-ai, var(--accent)) 42%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent-ai, var(--accent)) 14%, transparent),
    inset 0 0 32px -10px color-mix(in srgb, var(--accent-ai, var(--accent)) 16%, transparent),
    0 0 18px color-mix(in srgb, var(--accent-ai, var(--accent)) 34%, transparent),
    0 0 48px color-mix(in srgb, var(--accent-ai, var(--accent)) 20%, transparent) !important;
}
html body > #th-chat-panel.is-maximized {
  z-index: 5000;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent-ai, var(--accent)) 42%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent-ai, var(--accent)) 14%, transparent),
    inset 0 0 32px -10px color-mix(in srgb, var(--accent-ai, var(--accent)) 16%, transparent),
    0 0 22px color-mix(in srgb, var(--accent-ai, var(--accent)) 36%, transparent),
    0 0 56px color-mix(in srgb, var(--accent-ai, var(--accent)) 22%, transparent),
    0 24px 64px -18px rgba(0, 0, 0, 0.55) !important;
}
@media (hover: hover) and (pointer: fine) {
  html body #th-chat-panel:hover,
  html body .content-left .panel#th-chat-panel:hover,
  html body > #th-chat-panel:hover {
    border-color: color-mix(in srgb, var(--accent-ai, var(--accent)) 32%, var(--bg-elevated)) !important;
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, var(--accent-ai, var(--accent)) 52%, transparent),
      inset 0 0 0 1px color-mix(in srgb, var(--accent-ai, var(--accent)) 20%, transparent),
      inset 0 0 36px -8px color-mix(in srgb, var(--accent-ai, var(--accent)) 20%, transparent),
      0 0 22px color-mix(in srgb, var(--accent-ai, var(--accent)) 42%, transparent),
      0 0 56px color-mix(in srgb, var(--accent-ai, var(--accent)) 24%, transparent) !important;
  }
  html body > #th-chat-panel.is-maximized:hover {
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, var(--accent-ai, var(--accent)) 52%, transparent),
      inset 0 0 0 1px color-mix(in srgb, var(--accent-ai, var(--accent)) 20%, transparent),
      inset 0 0 36px -8px color-mix(in srgb, var(--accent-ai, var(--accent)) 20%, transparent),
      0 0 24px color-mix(in srgb, var(--accent-ai, var(--accent)) 44%, transparent),
      0 0 60px color-mix(in srgb, var(--accent-ai, var(--accent)) 26%, transparent),
      0 24px 64px -18px rgba(0, 0, 0, 0.55) !important;
  }
}
html body #th-chat-panel:focus-within,
html body .content-left .panel#th-chat-panel:focus-within,
html body .th-pg .panel#th-chat-panel:focus-within,
html body > #th-chat-panel:focus-within {
  border-color: color-mix(in srgb, var(--accent-ai, var(--accent)) 46%, var(--bg-elevated)) !important;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent-ai, var(--accent)) 62%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent-ai, var(--accent)) 26%, transparent),
    inset 0 0 40px -6px color-mix(in srgb, var(--accent-ai, var(--accent)) 24%, transparent),
    0 0 26px color-mix(in srgb, var(--accent-ai, var(--accent)) 48%, transparent),
    0 0 64px color-mix(in srgb, var(--accent-ai, var(--accent)) 28%, transparent) !important;
}
html body > #th-chat-panel.is-maximized:focus-within {
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent-ai, var(--accent)) 62%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent-ai, var(--accent)) 26%, transparent),
    inset 0 0 40px -6px color-mix(in srgb, var(--accent-ai, var(--accent)) 24%, transparent),
    0 0 28px color-mix(in srgb, var(--accent-ai, var(--accent)) 50%, transparent),
    0 0 68px color-mix(in srgb, var(--accent-ai, var(--accent)) 30%, transparent),
    0 24px 64px -18px rgba(0, 0, 0, 0.55) !important;
}
html[data-theme="light"] body #th-chat-panel,
html[data-theme="light"] body .content-left .panel#th-chat-panel,
html[data-theme="light"] body .th-pg .panel#th-chat-panel,
html[data-theme="light"] body > #th-chat-panel {
  border: 1px solid color-mix(in srgb, var(--accent-ai, var(--accent)) 26%, var(--border-default)) !important;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent-ai, var(--accent)) 7%, var(--bg-elevated)) 0%,
      var(--bg-elevated) 48px
    ) !important;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent-ai, var(--accent)) 28%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent-ai, var(--accent)) 10%, transparent),
    0 0 14px color-mix(in srgb, var(--accent-ai, var(--accent)) 16%, transparent),
    0 0 32px color-mix(in srgb, var(--accent-ai, var(--accent)) 10%, transparent) !important;
}
html[data-theme="light"] body #th-chat-panel:focus-within,
html[data-theme="light"] body > #th-chat-panel:focus-within {
  border-color: color-mix(in srgb, var(--accent-ai, var(--accent)) 44%, var(--border-default)) !important;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent-ai, var(--accent)) 40%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent-ai, var(--accent)) 16%, transparent),
    0 0 18px color-mix(in srgb, var(--accent-ai, var(--accent)) 22%, transparent),
    0 0 36px color-mix(in srgb, var(--accent-ai, var(--accent)) 12%, transparent) !important;
}

html body .dash.dash--studio {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html body .dash.dash--studio .dash-grid,
html body .dash.dash--studio .dash-grid-2,
html body .dash.dash--studio .dash-grid-3 {
  gap: 8px;
  margin-bottom: 0;
}
html body .dash.dash--studio .dash-hero {
  gap: 8px;
  margin-bottom: 0;
  align-items: stretch;
}
html body .dash.dash--studio .dash-card,
html body .dash.dash--studio .dash-quick {
  margin-bottom: 0 !important;
}
html body .dash.dash--studio .dash-card-head {
  background: transparent;
  border-bottom: 1px solid var(--border-muted);
  padding: 10px 12px 8px;
}
html body .dash.dash--studio .dash-card-body {
  padding: 8px 12px 12px;
}
html body .dash.dash--studio .dash-card--hero .dash-card-head {
  padding: 10px 12px 8px;
}
html body .dash.dash--studio .dash-card--hero .dash-card-body {
  padding: 8px 12px 14px;
  min-height: 72px;
  font-size: var(--fs-sm);
}
html body .dash.dash--studio .dash-card--hero .dash-card-head h2 {
  text-transform: none !important;
  letter-spacing: -0.01em !important;
  font-weight: var(--fw-semibold) !important;
  font-size: var(--fs-md) !important;
  color: var(--text-primary) !important;
}
html body .dash.dash--studio .dash-strip,
html body .dash.dash--studio .dash-strip--merged {
  min-height: 40px;
  margin-bottom: 0 !important;
  overflow: hidden;
}

html body .dash.dash--studio .dash-quick {
  padding: 10px 8px 10px 10px !important;
  gap: 2px !important;
}
html body .dash-quick-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  padding: 2px 8px 6px;
}
html body .dash-quick-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  justify-content: flex-start !important;
  padding: 0 8px !important;
  min-height: var(--control-h);
  color: var(--text-secondary) !important;
  font-weight: var(--fw-medium) !important;
}
html body .dash-quick-btn:hover,
html body .dash-quick-btn--ai:hover {
  background: var(--btn-wash, color-mix(in srgb, var(--text-primary) 6%, transparent)) !important;
  color: var(--text-primary) !important;
}
html body .dash-quick-btn--ai { color: var(--text-primary) !important; }
html body .dash-ai-chip,
html body .dash-quick-mark {
  background: var(--accent) !important;
  background-image: none !important;
  box-shadow: none !important;
}
html body .dash-ask-follow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  background: transparent !important;
  border: 1px solid var(--border-default) !important;
  color: var(--text-secondary) !important;
  font-weight: var(--fw-medium) !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
  line-height: 1 !important;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}
html body .dash-ask-follow:hover {
  color: var(--text-primary) !important;
  border-color: var(--border-strong) !important;
  background: var(--btn-wash, color-mix(in srgb, var(--text-primary) 6%, transparent)) !important;
  text-decoration: none !important;
}

html body .dash-adage {
  display: none !important;
}
html body .dash-adage::before,
html body .dash-adage::after { content: none !important; }

html body .dash.dash--studio .dash-card-head h2,
html body .mkt-card-head h3 {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: var(--fw-medium);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
html body .dash.dash--studio .dash-card--hero .dash-card-head h2 {
  font-size: var(--fs-md) !important;
  color: var(--text-primary) !important;
  font-weight: var(--fw-semibold) !important;
}

/* ==========================================================================
   Markets — search+quote as one header plate; cards as objects
   ========================================================================== */
html body .mkt-shell {
  gap: 8px !important;
  padding: 8px !important;
}
html body .mkt-strip {
  height: 36px;
  overflow: hidden;
  align-items: center;
}
html body .mkt-strip-kicker,
html body .mkt-strip-seq,
html body .mkt-strip .idx-tile {
  display: flex;
  align-items: center;
  height: 100%;
}
html body .mkt-strip .idx-tile {
  line-height: 1;
  padding-top: 0;
  padding-bottom: 0;
}
html body .mkt-strip-track {
  animation: mkt-tape var(--tape-s, 36s) linear infinite;
}
html body .mkt-strip:hover .mkt-strip-track,
html body .mkt-strip:focus-within .mkt-strip-track {
  animation-play-state: paused;
}
html body .mkt-strip-refresh:hover { transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  html body .mkt-strip-track {
    animation: none !important;
    transform: none !important;
  }
}
html body .mkt-header {
  gap: 12px !important;
  padding: 8px 10px;
  align-items: center;
}
html body .mkt-quote-pill {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  height: auto;
  min-height: var(--control-h);
  padding: 0;
}
html body .mkt-search { height: var(--control-h); }
html body .mkt-search input {
  height: var(--control-h) !important;
  border-radius: var(--r-control) !important;
  background: var(--bg-base) !important;
  box-shadow: none !important;
}
html body .mkt-search input:focus,
html body .mkt-search input:focus-visible {
  box-shadow: none !important;
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}
html body .qp-watch:hover { transform: none !important; }
html body .mkt-grid { gap: 8px !important; }
html body .mkt-col { gap: 8px !important; }
html body .mkt-card-head {
  padding: 10px 12px 8px;
  background: transparent;
}

/* ==========================================================================
   Ticker — security header + section plates
   ========================================================================== */
html body .th-pg {
  gap: 8px !important;
  padding: 8px !important;
}
html body .th-masthead {
  padding: 12px 14px !important;
}
html body .th-pg > .grid-2,
html body .th-row,
html body .th-row > .th-main-col,
html body .th-row > .th-side-col {
  gap: 8px !important;
}
html body .th-pg .panel:not(#th-chat-panel) > h2,
html body .th-pg > .panel > h2,
html body .th-pg > .grid-2 > .panel > h2,
html body .th-pg > .th-row > .th-side-col > .panel > h2,
html body .th-pg > .th-row > .th-main-col > .panel > h2 {
  border-radius: 0 !important;
  background: transparent !important;
  padding: 10px 12px 6px !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  font-weight: var(--fw-medium) !important;
  font-size: var(--fs-xs) !important;
  color: var(--text-muted) !important;
  border-bottom: 1px solid var(--border-muted) !important;
}
html body #th-exec-strip {
  gap: 0 !important;
  padding: 8px 12px !important;
}
html body #th-exec-strip .ex-cell {
  padding: 0 16px 0 0;
  border-right: 1px solid var(--border-muted);
}
html body #th-exec-strip .ex-cell:last-child { border-right: none; }
html body #th-exec-strip .ex-cell b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
html body #th-chat-panel > h2,
html body .th-pg #th-chat-panel > h2,
html body .content-left .panel#th-chat-panel > h2 {
  font-size: var(--fs-sm) !important;
  color: var(--text-primary) !important;
  text-transform: none !important;
}

/* Watchlist: toolbar plate + tape/table as one object */
html body .wl-root {
  padding: 8px !important;
  gap: 8px !important;
}
html body .wl-header,
html body .wl-root .wl-header {
  padding: 10px 12px !important;
  margin-bottom: 0 !important;
}
html body .wl-idx {
  background: var(--bg-elevated) !important;
  border: none !important;
  border-radius: var(--r-md) var(--r-md) 0 0 !important;
  margin-bottom: 0 !important;
}
html body .wl-table-wrap {
  border-radius: 0 0 var(--r-md) var(--r-md) !important;
  border-top: none !important;
}
html body .wl-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-elevated);
}
html body .wl-table thead th:first-child,
html body .wl-table thead th:last-child { border-radius: 0 !important; }
html body .wl-table tbody td {
  padding-top: 4px;
  padding-bottom: 4px;
  height: var(--row-h);
}

html body .pipelines-page .pp-toolbar {
  padding: 10px 12px !important;
  margin-bottom: 12px !important;
}
html body .research-filter-strip {
  padding: 10px 12px !important;
}

/* Object cards: same fill, no frame. Hover is wash, not a stronger box. */
html body .note-card,
html body .board-card,
html body .vtl-card,
html body .sc-card,
html body .pp-card,
html body .pw-note,
html body .an-persona-card,
html body .ind-sector-card,
html body .scout-result {
  border: none !important;
  border-radius: var(--r-md);
  box-shadow: none !important;
  transform: none !important;
}
html body .note-card:hover,
html body .board-card:hover,
html body .vtl-card:hover,
html body .sc-card:hover,
html body .pp-card:hover,
html body .pw-note:hover,
html body .an-persona-card:hover,
html body .ind-sector-card:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
html body .an-persona-card:hover:not(.is-active),
html body .ind-sector-card:hover,
html body .pp-card:hover,
html body .pw-note:hover,
html body .note-card:hover,
html body .board-card:hover,
html body .vtl-card:hover,
html body .sc-card:hover {
  background: var(--bg-elevated-2);
}
html body .pp-card-cover { width: 1px !important; }

/* Meaning, not chrome — keep after border:none */
html body .note-card.is-shared {
  border-left: 3px solid var(--clr-purple) !important;
}
html body .sc-card.sc-status-promoted {
  border: 1px dashed var(--border-default) !important;
}
html body .scout-result-ok { border-left: 4px solid #10b981 !important; }
html body .scout-result-empty { border-left: 4px solid #f59e0b !important; }
html body .scout-result-skipped { border-left: 4px solid #3b82f6 !important; }
html body .scout-result-error { border-left: 4px solid #ef4444 !important; }
html body .cal-grid { border: none !important; }
html body .settings-content .card-danger {
  border: 1px solid rgba(248, 81, 73, 0.35) !important;
  background: linear-gradient(180deg, var(--danger-bg) 0%, var(--bg-elevated) 100%) !important;
}

html body .settings-header { padding: 14px 16px !important; }
html body .settings-nav { padding: 8px !important; }
html body .settings-content > section > .card,
html body .settings-content > section > .cards > .card {
  padding: 16px !important;
}
html body .settings-avatar {
  background: var(--accent) !important;
  box-shadow: none !important;
}

html body .wl-table tbody tr:hover,
html body table tbody tr:hover,
html body .mv-table tr:hover td,
html body .mkt-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
html body .wl-table tbody tr.is-selected,
html body .wl-table tbody tr[aria-selected="true"] {
  background: var(--accent-muted);
}

/* ==========================================================================
   States — skeleton, empty, overlay
   ========================================================================== */
@keyframes oc-desk-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
html body .dash-loading,
html body .strip-loading,
html body .mkt-strip-skeleton,
html body .t-empty {
  position: relative;
  color: transparent !important;
  min-height: 44px;
  overflow: hidden;
}
html body .dash-loading::after,
html body .strip-loading::after,
html body .mkt-strip-skeleton::after,
html body .t-empty::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 10px;
  width: 64%;
  border-radius: 4px;
  background: var(--bg-elevated-2);
  background-image: linear-gradient(
    90deg,
    var(--bg-elevated-2) 0%,
    color-mix(in srgb, var(--accent) 10%, var(--bg-elevated-2)) 50%,
    var(--bg-elevated-2) 100%
  );
  background-size: 200% 100%;
  animation: oc-desk-shimmer 1.6s ease-in-out infinite;
}
html body .dash-empty,
html body .im-empty,
html body .wl-empty,
html body .cal-empty,
html body .pp-empty,
html body .th-empty,
html body .chart-empty {
  text-align: left;
  padding: 14px 4px;
}
html body .dash-empty::before,
html body .im-empty::before,
html body .wl-empty::before,
html body .cal-empty::before,
html body .pp-empty::before,
html body .th-empty::before {
  content: none !important;
}

/* Overlay glass: temporary layers only */
html body .oc-cmdp__panel,
html body .oc-sheet__panel,
html body .oc-pop,
html body .user-menu,
html body .lang-pop-menu,
html body .oc-ss-popup,
html body .persona-popover,
html body .chat-pop,
html body .chat-sessions-pop,
html body .chat-model-pop,
html body .chat-tier-pop,
html body .mkt-search-results,
html body .ck-dd__menu {
  background: var(--overlay-fill) !important;
  border: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent) !important;
  border-radius: 10px !important;
  box-shadow: var(--overlay-shadow) !important;
  backdrop-filter: var(--overlay-filter) !important;
  -webkit-backdrop-filter: var(--overlay-filter) !important;
}
@media (prefers-reduced-transparency: reduce) {
  html body .oc-cmdp__panel,
  html body .oc-sheet__panel,
  html body .oc-pop,
  html body .user-menu,
  html body .lang-pop-menu,
  html body .oc-ss-popup,
  html body .persona-popover,
  html body .chat-pop,
  html body .chat-sessions-pop,
  html body .chat-model-pop,
  html body .chat-tier-pop,
  html body .mkt-search-results,
  html body .ck-dd__menu {
    background: var(--bg-elevated) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

html body .chat-drawer,
html body #chat-drawer,
html body .content-right,
html body .sidebar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Chat empty: utility, not a landing hero */
html body .chat-empty-welcome {
  align-items: flex-start !important;
  text-align: left !important;
  gap: 6px !important;
  padding: 12px 14px 8px !important;
  transform: none !important;
}
html body .chat-empty-welcome .cew-icon {
  display: none !important;
  animation: none !important;
}
html body .chat-empty-welcome .cew-title {
  font-size: var(--fs-md) !important;
  font-weight: var(--fw-semibold) !important;
  letter-spacing: -0.01em;
}
html body .chat-empty-welcome .cew-sub {
  font-size: var(--fs-xs) !important;
  max-width: none;
}
html body .chat-empty-welcome .cew-actions { margin-top: 8px !important; }
html body .chat-empty-welcome .cew-chip {
  min-height: var(--control-h) !important;
  padding: 0 12px !important;
}

html body .chat-fab:hover,
html body .chat-toggle-fab:hover,
html body #chat-fab:hover,
html body .chat-fab:focus-visible,
html body .chat-toggle-fab:focus-visible,
html body #chat-fab:focus-visible {
  transform: none !important;
  box-shadow: none !important;
}
html body .chat-fab:hover .chat-fab-ico,
html body #chat-fab:hover .chat-fab-ico,
html body .chat-toggle-fab:hover .chat-fab-ico {
  transform: none !important;
}

.oc-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
}
.oc-kpi-strip > div,
.oc-kpi-strip > dl {
  padding: 8px 12px 8px 0;
  border-right: 1px solid var(--border-muted);
  margin: 0;
}
.oc-kpi-strip > :last-child { border-right: none; }
.oc-kpi-strip dt,
.oc-kpi-strip .kpi-lbl {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
  margin-bottom: 2px;
}
.oc-kpi-strip dd,
.oc-kpi-strip .kpi-val {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  line-height: 1.2;
}
html body .pf-kpis { gap: 0; }
html body .pf-kpi {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-muted);
  border-radius: 0;
  padding: 8px 12px 8px 0;
}

body[data-oc-shell] {
  scrollbar-color: color-mix(in srgb, var(--text-dim) 55%, transparent) transparent;
}

@media (max-width: 900px) {
  html body .dash.dash--studio .dash-hero { grid-template-columns: 1fr; }
  :root { --control-h: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html body .dash-loading::after,
  html body .strip-loading::after,
  html body .mkt-strip-skeleton::after,
  html body .t-empty::after,
  html body .oc-cmdp__panel,
  html body .chat-fab,
  html body #chat-fab,
  html body .chat-empty-welcome {
    animation: none !important;
    transition: none !important;
  }
}

.tb-desk-btn__ico {
  width: 18px;
  height: 18px;
  display: block;
}
