/* ============================================================
     PAGE / SHELL
     ============================================================ */
  body {
    margin: 0;
    background: #F2F2F7;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    color: #000;
    -webkit-font-smoothing: antialiased;
  }
  main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* ============================================================
     PAGE HEADER (Kujaku brand + status)
     ============================================================ */
  .page-header { padding: 4px 4px 0; }
  .header-row-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .brand {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.4px;
    color: #000;
    margin: 0;
  }
  .header-row-ops {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #3C3C43;
  }
  .header-sep {
    width: 1px;
    height: 12px;
    background: rgba(60, 60, 67, 0.18);
    flex-shrink: 0;
  }
  .brand-sub {
    font-size: 12px;
    font-weight: 500;
    color: #8E8E93;
  }
  @media (min-width: 720px) {
    .page-header { padding: 8px 4px 0; }
    .brand { font-size: 30px; }
  }

  .op-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #000;
    font-size: 12px;
  }
  .op-status .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .op-status.running .dot { background: #30B65A; }
  .op-status.paused  .dot { background: #FF9500; }
  .op-status.killed  .dot { background: #FF3B30; }
  .op-status.paused  { color: #B45A00; }
  .op-status.killed  { color: #C82C24; }
  .op-meta {
    font-size: 11px;
    color: #8E8E93;
    font-variant-numeric: tabular-nums;
  }

  .pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: 0.2px;
    background: #F2F2F7;
    color: #3C3C43;
    border: none;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
  }
  .pill-log      { background: #F2F2F7; color: #3C3C43; cursor: pointer; }
  .pill-log.warn { background: #FFF4E5; color: #A25C09; }
  .pill-log.err  { background: #FFE5E3; color: #C82C24; }
  .pill-log:hover { filter: brightness(0.97); }

  /* Risk tier badge (header) */
  .op-tier {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 11px;
  }
  .tier-num {
    background: #E8F1FF;
    color: #0A66C2;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
  }
  .tier-max {
    color: #8E8E93;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }

  /* Feed health row + cycle status (header sub-rows) */
  .feed-status {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    color: #3C3C43;
  }
  .feed-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
  }
  .feed-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .feed-ok   .feed-dot { background: #30B65A; }
  .feed-warn .feed-dot { background: #FF9500; }
  .feed-err  .feed-dot { background: #FF3B30; }
  .feed-warn { color: #B45A00; }
  .feed-err  { color: #C82C24; }
  .feed-age {
    color: #8E8E93;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    margin-left: 1px;
  }
  .cycle-status {
    margin-top: 4px;
    font-size: 11px;
    color: #3C3C43;
  }
  .cycle-label {
    color: #8E8E93;
    font-weight: 500;
    margin-right: 4px;
  }
  .cycle-text {
    font-weight: 500;
  }
  .cycle-text .cycle-reason {
    color: #8E8E93;
    font-weight: 400;
  }

  /* Log drawer (toggled by WARN/ERR pill click) */
  .log-drawer {
    background: #FFFFFF;
    border-radius: 14px;
    border: 0.5px solid rgba(60, 60, 67, 0.16);
    padding: 14px 18px;
  }
  @media (min-width: 720px) {
    .log-drawer { padding: 14px 22px; }
  }
  .log-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
  }
  .log-drawer-title {
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #8E8E93;
    font-weight: 500;
  }
  .log-drawer-close {
    font-size: 11px;
    font-weight: 500;
    color: #0A66C2;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
  }
  .log-drawer-close:hover { background: rgba(10,102,194,0.08); }
  .log-list {
    display: flex;
    flex-direction: column;
  }
  .log-entry {
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    gap: 10px;
    padding: 7px 0;
    border-top: 0.5px solid rgba(60, 60, 67, 0.06);
    font-size: 11.5px;
    align-items: baseline;
    line-height: 1.4;
  }
  .log-entry:first-child { border-top: none; }
  .log-time {
    color: #8E8E93;
    font-variant-numeric: tabular-nums;
    font-size: 10.5px;
    white-space: nowrap;
  }
  .log-level {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
  }
  .log-warn .log-level { background: #FFF4E5; color: #A25C09; }
  .log-err  .log-level { background: #FFE5E3; color: #C82C24; }
  .log-info .log-level { background: #F2F2F7; color: #3C3C43; }
  .log-source {
    color: #8E8E93;
    font-size: 10.5px;
    font-style: italic;
    white-space: nowrap;
  }
  .log-msg {
    color: #1C1C1E;
    font-size: 11.5px;
  }
  .log-drawer-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 0.5px solid rgba(60, 60, 67, 0.06);
    text-align: center;
  }
  .log-show-all {
    font-size: 11px;
    font-weight: 500;
    color: #0A66C2;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: inherit;
  }
  .log-show-all:hover { background: rgba(10,102,194,0.08); }
  @media (max-width: 540px) {
    .log-entry {
      grid-template-columns: auto auto;
      grid-template-areas:
        "time level"
        "source source"
        "msg msg";
      gap: 4px 10px;
    }
    .log-time   { grid-area: time; }
    .log-level  { grid-area: level; justify-self: start; }
    .log-source { grid-area: source; }
    .log-msg    { grid-area: msg; }
  }

  /* ============================================================
     PANEL SHELL (used by every panel)
     ============================================================ */
  .summary-bar {
    background: #FFFFFF;
    border-radius: 14px;
    border: 0.5px solid rgba(60, 60, 67, 0.16);
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
  }
  .bar-content.collapsed { display: none; }
  .hidden { display: none !important; }

  .bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.08);
  }
  .summary-bar:has(.bar-content.collapsed) .bar-header {
    border-bottom: none;
  }
  .bar-header-title {
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #8E8E93;
    font-weight: 500;
  }

  .collapse-btn {
    border: none;
    background: rgba(120, 120, 128, 0.12);
    padding: 6px 14px;
    cursor: pointer;
    color: #3C3C43;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .collapse-btn:hover { background: rgba(120, 120, 128, 0.20); color: #000; }
  .collapse-btn:focus-visible { outline: 2px solid #0A84FF; outline-offset: 2px; }
  .collapse-btn .chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px; height: 12px;
    transition: transform 0.2s ease;
  }
  .collapse-btn .chevron svg { width: 12px; height: 12px; display: block; }
  .collapse-btn.collapsed .chevron { transform: rotate(-90deg); }
  .collapse-btn .label-collapsed { display: none; }
  .collapse-btn.collapsed .label-expanded { display: none; }
  .collapse-btn.collapsed .label-collapsed { display: inline; }

  /* ============================================================
     OVERVIEW PANEL
     ============================================================ */
  .hero { padding: 18px 20px 6px; }
  .hero-label {
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #8E8E93;
    font-weight: 500;
  }
  .hero-value {
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.05;
    color: #000;
    margin-top: 2px;
  }
  .hero-change-primary {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .hero-change-primary .arrow { font-size: 11px; }
  .hero-change-primary.up   { color: #30B65A; }
  .hero-change-primary.down { color: #FF3B30; }
  .hero-change-primary.flat { color: #8E8E93; }
  .hero-change-primary .window-tag {
    font-size: 11px;
    letter-spacing: 0.3px;
    color: #8E8E93;
    font-weight: 500;
    margin-left: 4px;
  }
  .hero-change-secondary {
    margin-top: 4px;
    font-size: 12px;
    color: #8E8E93;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    flex-wrap: wrap;
  }
  .hero-change-secondary .arrow { font-size: 9px; }
  .hero-change-secondary .delta-up   { color: #30B65A; }
  .hero-change-secondary .delta-down { color: #FF3B30; }
  .hero-change-secondary .delta-flat { color: #8E8E93; }
  @media (min-width: 720px) {
    .hero { padding: 22px 24px 10px; }
    .hero-value { font-size: 38px; }
    .hero-change-primary { font-size: 16px; }
    .hero-change-secondary { font-size: 13px; }
  }

  /* Chart block (shared between overview portfolio chart and
     live session chart — same shell, different SVG content) */
  .chart-block { padding: 6px 12px 14px; }
  .chart-svg {
    width: 100%;
    height: 220px;
    display: block;
  }
  .session-chart-svg {
    height: auto;
  }
  /* v1.7.24: tone down the Kalshi implied-probability lines (YES green,
     NO red) so they read softer against the BTC line and the light
     background. Scoped to the kalshi-prob overlay's path elements only —
     BTC line, strike line, trade/trigger markers, axes and gridlines
     keep their existing opacity. */
  .session-chart-svg g[data-overlay="kalshi-prob"] path {
    stroke-opacity: 0.5;
  }
  .chart-meta {
    margin-top: 6px;
    padding: 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #8E8E93;
  }
  @media (min-width: 720px) {
    .chart-block { padding: 8px 18px 14px; }
    .chart-svg   { height: 300px; }
    .session-chart-svg { height: auto; }
  }

  /* Overview chart overlay — the "start" label + high/low readout are
     rendered as HTML over the SVG so they read at natural aspect (the SVG
     itself uses preserveAspectRatio="none" for the edge-to-edge area fill,
     which would x-stretch any inline <text>). */
  .chart-area {
    position: relative;
  }
  .chart-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    font-size: 10px;
    color: #8E8E93;
    font-variant-numeric: tabular-nums;
  }
  .chart-start {
    position: absolute;
    left: 12px;
    transform: translateY(-100%);
    white-space: nowrap;
  }
  .chart-hilo {
    position: absolute;
    top: 4px;
    right: 10px;
    white-space: nowrap;
  }

  /* Period toggle (All-time / 24h) + units toggle ($ / %), Overview only */
  .toggle-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
  }
  .period-toggle,
  .units-toggle {
    display: inline-flex;
    background: rgba(120, 120, 128, 0.12);
    border-radius: 9px;
    padding: 2px;
    user-select: none;
  }
  .period-toggle button,
  .units-toggle button {
    border: none;
    background: transparent;
    padding: 5px 18px;
    font-size: 12px;
    font-weight: 500;
    color: #3C3C43;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  }
  .period-toggle button.active,
  .units-toggle button.active {
    background: #FFFFFF;
    color: #000;
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.10);
  }
  .period-toggle button:focus-visible,
  .units-toggle button:focus-visible {
    outline: 2px solid #0A84FF;
    outline-offset: 1px;
  }

  /* Metrics row (Overview) */
  .metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 0.5px solid rgba(60, 60, 67, 0.08);
  }
  /* v1.7.47: Overview-specific variant — after v1.7.45 removed the
     Cont/Rev WR chips, the Overview panel has only a Skips chip, so
     it gets its own single-column template instead of being stranded
     in the left third of the 3-col .metrics grid. */
  .metrics-skips {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 0.5px solid rgba(60, 60, 67, 0.08);
  }
  /* v1.7.47: 4-chip variant for the Thesis × Side panel.
     Mobile: 2-col so the four bullish/bearish × continuation/reversal
     chips fit a phone viewport without wrapping awkwardly. Desktop
     (≥720px): 4-col single row. */
  .metrics-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 0.5px solid rgba(60, 60, 67, 0.08);
  }
  @media (min-width: 720px) {
    .metrics-4 {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  .metric {
    padding: 12px 14px 14px;
    border-right: 0.5px solid rgba(60, 60, 67, 0.08);
    min-width: 0;
  }
  .metric:last-child { border-right: none; }
  .metric-label {
    font-size: 10.5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #8E8E93;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .metric-value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
    color: #000;
  }
  .metric-value.warn   { color: #B45A00; }
  .metric-value.alert  { color: #C82C24; }
  .metric-value.wr-up  { color: #30B65A; }
  .metric-value.wr-down { color: #FF3B30; }
  .metric-value .unit {
    font-size: 13px;
    font-weight: 500;
    color: #8E8E93;
    margin-left: 1px;
  }
  .metric-sub {
    font-size: 11px;
    color: #8E8E93;
    margin-top: 4px;
  }
  @media (min-width: 720px) {
    .metric { padding: 14px 18px 16px; }
    .metric-label { font-size: 11px; }
    .metric-value { font-size: 24px; }
  }

  /* ============================================================
     LIVE SESSION PANEL
     ============================================================ */
  .session-strip {
    padding: 14px 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .session-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #8E8E93;
    flex-wrap: wrap;
    font-weight: 500;
  }
  .session-meta-row .ticker { color: #3C3C43; font-weight: 500; }
  .session-meta-row .closes-pulse {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3C3C43;
  }
  .session-meta-row .pulse-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #30B65A;
    animation: livePulse 1.6s ease-in-out infinite;
  }
  @keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }
  .session-data-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  .btc-block { display: flex; flex-direction: column; gap: 2px; }
  .btc-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8E8E93;
    font-weight: 500;
  }
  .btc-value {
    /* v1.7.23: BTC price is the dominant figure on the Live Session strip. */
    font-size: 44px;
    font-weight: 600;
    letter-spacing: -0.8px;
    line-height: 1.0;
    color: #000;
  }
  .btc-delta {
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .btc-delta .arrow { font-size: 9px; }
  .btc-delta.delta-up { color: #30B65A; }
  .btc-delta.delta-down { color: #FF3B30; }
  .btc-delta.delta-flat { color: #8E8E93; }
  .btc-delta .vs-strike {
    color: #8E8E93;
    font-weight: 500;
    margin-left: 2px;
  }
  .kalshi-block {
    display: flex;
    gap: 14px;
    align-items: flex-end;
  }
  .kalshi-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
  .kalshi-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8E8E93;
    font-weight: 500;
  }
  .kalshi-value {
    font-size: 16px;
    font-weight: 600;
    color: #000;
  }

  /* v1.7.23: BTC-prominence strip layout (replaces .session-data-row /
     .btc-block / .kalshi-block; those rules above are now unused). */
  .session-btc-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
  }
  .btc-tick-change {
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }
  .btc-tick-change .arrow { font-size: 9px; }
  .btc-tick-change.delta-up   { color: #30B65A; }
  .btc-tick-change.delta-down { color: #FF3B30; }
  .btc-tick-change.delta-flat { color: #8E8E93; }
  .session-strike-row {
    min-height: 16px;  /* keep the row's height when the strike line is empty */
  }
  .strike-line {
    /* sits on .btc-delta — inherits its delta-up/down/flat colours and
       .arrow sizing; this just bumps it to 13px and clears the inline-flex
       margin-top from .btc-delta. */
    font-size: 13px;
    margin-top: 0;
    flex-wrap: wrap;
  }
  .strike-line .strike-base { color: #8E8E93; font-weight: 500; }
  .strike-line .strike-sep  { color: #8E8E93; }
  .strike-line .strike-pct  { color: #8E8E93; margin-left: 2px; }
  .session-odds-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
  }
  .session-odds-row .kalshi-side {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }
  .session-odds-row .kalshi-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8E8E93;
    font-weight: 500;
  }
  .session-odds-row .kalshi-value {
    font-size: 18px;
    font-weight: 600;
    color: #000;
  }
  .session-odds-row .odds-sep { color: #C7C7CC; }
  /* v1.7.23 source chip on the meta row — plain muted inline text, no chip
     background; inherits .session-meta-row's colour, set explicitly for clarity. */
  .odds-source { color: #8E8E93; }

  @media (min-width: 720px) {
    .session-strip { padding: 16px 22px 10px; }
    .btc-value { font-size: 52px; }
  }

  .overlay-toggles {
    padding: 8px 14px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
  }
  .overlay-chip {
    border: 1px solid rgba(60, 60, 67, 0.18);
    background: #FFFFFF;
    padding: 5px 12px 5px 8px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: #3C3C43;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    user-select: none;
  }
  .overlay-chip:hover { border-color: rgba(60, 60, 67, 0.32); }
  .overlay-chip:focus-visible { outline: 2px solid #0A84FF; outline-offset: 2px; }
  .overlay-chip .swatch {
    width: 12px; height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
  }
  .overlay-chip[data-overlay="strike"]       .swatch { background: #FF9500; }
  .overlay-chip[data-overlay="btc"]          .swatch { background: #1C1C1E; }
  .overlay-chip[data-overlay="kalshi-prob"]  .swatch { background: linear-gradient(180deg, #1F7A38 50%, #C82C24 50%); }
  .overlay-chip[data-overlay="trades"]       .swatch {
    background: linear-gradient(90deg, #30B65A 50%, #FF3B30 50%);
  }
  .overlay-chip[data-overlay="triggers"]     .swatch {
    background: #FFFFFF;
    border: 1.5px dashed #6E6E73;
    border-radius: 50%;
    box-sizing: border-box;
  }
  .overlay-chip:not(.active) {
    color: #8E8E93;
    background: #F8F8FA;
    border-color: rgba(60, 60, 67, 0.12);
  }
  .overlay-chip:not(.active) .swatch { opacity: 0.28; }
  @media (min-width: 720px) {
    .overlay-toggles { padding: 10px 18px 18px; gap: 10px; }
  }

  /* Trade & trigger markers — labels hidden by default,
     revealed on hover for a clean default chart. */
  .trade-marker, .trigger-marker {
    cursor: default;
  }
  .trade-marker .trade-label,
  .trigger-marker .trade-label {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }
  .trade-marker:hover .trade-label,
  .trigger-marker:hover .trade-label,
  .trade-marker:focus-within .trade-label,
  .trigger-marker:focus-within .trade-label {
    opacity: 1;
  }

  /* ============================================================
     POSITIONS PANEL
     ============================================================ */
  .positions-section {
    padding: 14px 18px 6px;
    border-top: 0.5px solid rgba(60, 60, 67, 0.08);
  }
  .positions-section:first-child {
    border-top: none;
  }
  .positions-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
  }
  .positions-section-label {
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #8E8E93;
    font-weight: 500;
  }
  .positions-count {
    font-size: 11px;
    color: #C7C7CC;
    font-weight: 500;
  }
  .position-list {
    display: flex;
    flex-direction: column;
  }
  .position-row {
    padding: 10px 0;
    border-top: 0.5px solid rgba(60, 60, 67, 0.06);
  }
  .position-row:first-child { border-top: none; }
  .position-row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
  }
  .position-row-meta {
    margin-top: 4px;
    font-size: 11px;
    color: #8E8E93;
  }
  .position-identity {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
  }
  .side-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.4px;
  }
  .side-chip.side-yes { background: #DDF5E0; color: #1F7A38; }
  .side-chip.side-no  { background: #FFE5E3; color: #C82C24; }

  /* Thesis chip — v1.6.7 canonical thesis colors.
     Used everywhere thesis is displayed (positions, decisions,
     chart legends). Continuation = pale blue (neutral). Reversal =
     warm amber on cream with outline + heavier weight (v1.8.5.5
     Option A: make reversals visually obvious so the operator
     scans them at a glance — prior to v1.8.5.5 every chip
     collapsed to "continuation" because the SELECTs never JOINed
     thesis_classifications).
     v1.8.5.5: chip body is "[▲|▼] {Trend} {Pattern}" — the
     .thesis-trend-glyph span carries the bull/bear arrow with
     reduced opacity so it doesn't compete with the side chip. */
  .thesis-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
  }
  .thesis-chip.thesis-continuation { background: #E8F1FF; color: #0A66C2; }
  .thesis-chip.thesis-reversal {
    background: #FFE9CC;
    color: #B25400;
    border-color: #E59A3D;
    font-weight: 700;
  }
  /* v1.12 (2026-06-04) — trend-keyed chip classes for v1.12+ rows. The
     R1 thesis schema collapsed to trend-only (BULLISH→YES / BEARISH→NO)
     per V1_12_SPEC.md §R1, so v1.12 rows have pattern=NULL and route
     through these classes (via dashboard_helpers.thesis_chip_class +
     the mirror JS _thesisChipClass). Reuses the side-yes / side-no
     tokens since Bullish~YES and Bearish~NO are semantically aligned
     and the existing palette already passes accessibility checks. */
  .thesis-chip.thesis-bullish { background: #DDF5E0; color: #1F7A38; }
  .thesis-chip.thesis-bearish { background: #FFE5E3; color: #C82C24; }
  /* v1.9 Stage 4: neutral chip for missing/unknown pattern — replaces
     the prior false-"continuation" default. Muted gray on light gray;
     the chip body is the "—" em-dash. */
  .thesis-chip.thesis-unknown { background: #F1EFE8; color: #8A8A8E; }
  .thesis-trend-glyph {
    margin-right: 4px;
    opacity: 0.75;
  }

  /* v1.9 Stage 4 — action-type chip. Same shape as .thesis-chip; on
     R2 rows it takes the primary chip slot and the trend-pattern label
     demotes to .thesis-sub below. Colors reuse existing tokens
     (DASHBOARD_AUDIT_2026-05-27.md §5). */
  .action-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
  }
  /* v1.10 locked actions: only add (R1 winning, same side) + mitigate
     (R1 losing, opposite side) render an action chip. 'thesis' uses the
     trend-pattern chip instead. recoup/reverse/hold/fresh removed. */
  .action-chip.action-add      { background: #DDF5E0; color: #1F7A38; }  /* green — add to winner */
  .action-chip.action-mitigate { background: #FFE5E3; color: #C82C24; }  /* red — opposite-side offset */
  /* v1.11.x — hedge chip (replaces the retired standalone orange HEDGE
     badge). Reuses the existing --hedge* tokens; no new colors. */
  .action-chip.action-hedge {
    background:    var(--hedge-muted);
    color:         var(--hedge-text);
    border-color:  var(--hedge);
  }

  /* v1.9 Stage 4 — demoted trend-pattern sub-text on R2 rows. Carries
     "{Trend Pattern} · {r1_status}". #8A8A8E on the card background
     (#FFFFFF / #FBFAF7) meets WCAG AA for this 9.5px supporting text.
     The parent summary / position-identity are wrapping flex rows, so
     flex-basis:100% forces the sub-text onto its own line below the
     chip row rather than sitting inline with the chips. */
  .thesis-sub {
    flex-basis: 100%;
    font-size: 9.5px;
    color: #8A8A8E;
    margin-top: 2px;
  }
  .entry-type {
    color: #000;
    font-weight: 600;
    font-size: 13px;
    margin-right: 6px;
  }
  .position-type {
    font-size: 12px;
    color: #3C3C43;
    font-weight: 500;
  }
  .position-size {
    font-size: 13px;
    font-weight: 500;
    color: #000;
  }
  .position-size .size-sep {
    color: #C7C7CC;
    margin: 0 5px;
    font-weight: 400;
  }
  .position-fill {
    text-align: right;
    white-space: nowrap;
  }
  .fill-price {
    font-size: 17px;
    font-weight: 600;
    color: #000;
  }
  .fill-implied {
    font-size: 11px;
    color: #8E8E93;
    margin-left: 3px;
  }
  .trigger-condition {
    font-size: 12px;
    color: #6E6E73;
    font-weight: 500;
  }
  .trigger-price {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin-left: 4px;
  }
  .position-row.pending {
    opacity: 0.92;
  }
  .position-empty {
    font-size: 12px;
    color: #8E8E93;
    padding: 6px 0 14px;
  }

  @media (min-width: 720px) {
    .positions-section { padding: 16px 22px 8px; }
  }

  /* ============================================================
     RECENT SESSIONS PANEL
     ============================================================ */
  .session-card {
    padding: 14px 18px;
    border-top: 0.5px solid rgba(60, 60, 67, 0.10);
  }
  .session-card:first-child {
    border-top: none;
  }
  @media (min-width: 720px) {
    .session-card { padding: 16px 22px; }
  }

  .session-card-header {
    margin-bottom: 4px;
  }
  .session-time-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
  }
  .session-time {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.1px;
  }
  .session-pnl {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .session-pnl.pnl-up      { color: #30B65A; }
  .session-pnl.pnl-down    { color: #FF3B30; }
  .session-pnl.pnl-pending { color: #8E8E93; font-weight: 500; }
  .session-pnl .arrow      { font-size: 10px; }
  .session-pnl .pnl-pct    { font-size: 12px; font-weight: 500; margin-left: 4px; opacity: 0.85; }

  /* v1.7.23: removed a second ``.session-meta-row`` rule here. It conflicted
     with the canonical one in the LIVE SESSION PANEL block (font-size 11px
     vs 12px, + margin-top:3px, no font-weight); the canonical rule is kept.
     The Recent Sessions cards that also carry .session-meta-row now pick up
     the canonical 12px / font-weight 500 styling (cosmetic, minor). */
  .session-ticker {
    font-variant-numeric: tabular-nums;
  }
  .session-trade-count {
    margin-left: auto;
  }

  .session-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: lowercase;
  }
  .session-state.state-settling {
    background: #FFF4E5;
    color: #A25C09;
  }
  .session-state.state-settling .state-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #FF9500;
    animation: livePulse 1.6s ease-in-out infinite;
  }
  .session-state.state-settled {
    color: #8E8E93;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    padding: 0;
    background: transparent;
  }

  /* Trade list inside a session */
  .trade-list {
    margin-top: 10px;
  }
  .trade-row {
    border-top: 0.5px solid rgba(60, 60, 67, 0.06);
  }
  .trade-row:first-child {
    border-top: none;
  }
  .trade-row > summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
  }
  .trade-row > summary::-webkit-details-marker { display: none; }
  .trade-row > summary::marker { content: ""; }
  .trade-row-fill-mini {
    font-size: 12px;
    color: #8E8E93;
    font-weight: 500;
  }
  .trade-outcome {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .trade-outcome.won  { color: #30B65A; }
  .trade-outcome.lost { color: #FF3B30; }
  .trade-outcome.pending {
    color: #A25C09;
    font-weight: 500;
  }
  .trade-outcome .arrow { font-size: 9px; }

  .row-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px; height: 12px;
    color: #C7C7CC;
    transition: transform 0.2s ease, color 0.15s ease;
    margin-left: 4px;
  }
  .row-chevron svg { width: 12px; height: 12px; display: block; }
  .trade-row[open] > summary .row-chevron {
    transform: rotate(180deg);
    color: #8E8E93;
  }

  /* Expanded trade body — reasoning blocks */
  .trade-row-body {
    padding: 4px 0 16px;
  }

  .trade-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 10px 0 12px;
    border-top: 0.5px solid rgba(60, 60, 67, 0.06);
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.06);
    margin-bottom: 14px;
  }
  .trade-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .trade-stat-label {
    font-size: 9.5px;
    color: #8E8E93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
  }
  .trade-stat-value {
    font-size: 13px;
    color: #000;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  .reasoning-section {
    margin-bottom: 14px;
  }
  .reasoning-section:last-child {
    margin-bottom: 0;
  }
  .reasoning-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8E8E93;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .reasoning-body {
    font-size: 13px;
    color: #1C1C1E;
    line-height: 1.55;
  }

  .validator-warnings {
    background: #FFF8EC;
    border-left: 3px solid #FF9500;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 14px;
  }
  .validator-warnings .reasoning-label {
    color: #A25C09;
  }
  .validator-warnings ul {
    margin: 0;
    padding-left: 18px;
  }
  .validator-warnings li {
    font-size: 12px;
    color: #1C1C1E;
    line-height: 1.5;
    margin-bottom: 3px;
  }
  .validator-warnings li:last-child { margin-bottom: 0; }

  /* ============================================================
     PERFORMANCE CHARTS PANEL
     ============================================================ */
  .chart-card {
    padding: 14px 18px;
  }
  @media (min-width: 720px) {
    .chart-card { padding: 16px 22px; }
  }
  .chart-card-wide {
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.10);
  }

  .charts-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .charts-grid .chart-card {
    border-top: 0.5px solid rgba(60, 60, 67, 0.08);
  }
  .charts-grid .chart-card:first-child {
    border-top: none;
  }
  @media (min-width: 720px) {
    .charts-grid {
      grid-template-columns: 1fr 1fr;
    }
    .charts-grid .chart-card {
      border-right: 0.5px solid rgba(60, 60, 67, 0.08);
    }
    .charts-grid .chart-card:nth-child(2n) {
      border-right: none;
    }
    .charts-grid .chart-card:nth-child(-n+2) {
      border-top: none;
    }
  }

  .chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .chart-card-title {
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #8E8E93;
    font-weight: 500;
  }
  .chart-card-meta {
    font-size: 10px;
    color: #C7C7CC;
    font-weight: 500;
  }

  /* Smaller period toggle inside chart card headers */
  .period-toggle-mini button {
    padding: 3px 12px;
    font-size: 11px;
  }

  /* P&L compound toggles (period × mode) — mirror .period-toggle styling */
  .pnl-period-toggle, .pnl-mode-toggle {
    display: inline-flex;
    background: rgba(120, 120, 128, 0.12);
    border-radius: 9px;
    padding: 2px;
    user-select: none;
  }
  .pnl-period-toggle button, .pnl-mode-toggle button {
    border: none;
    background: transparent;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 500;
    color: #3C3C43;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  }
  .pnl-period-toggle button.active, .pnl-mode-toggle button.active {
    background: #FFFFFF;
    color: #000;
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.10);
  }
  .pnl-period-toggle button:focus-visible, .pnl-mode-toggle button:focus-visible {
    outline: 2px solid #0A84FF;
    outline-offset: 1px;
  }

  .chart-card-svg {
    width: 100%;
    display: block;
    height: auto;
  }

  .chart-legend {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 11px;
    color: #8E8E93;
    font-weight: 500;
  }
  .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
  }
  .legend-dash {
    width: 14px;
    height: 0;
    border-top: 1.5px dashed #C7C7CC;
    display: inline-block;
    flex-shrink: 0;
  }

  /* Thesis × outcome matrix layout */
  .thesis-matrix {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .thesis-matrix-section {
    /* one per thesis */
  }
  .thesis-matrix-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
  }
  .thesis-matrix-section-name {
    font-size: 12px;
    font-weight: 600;
  }
  .thesis-matrix-section-name.section-continuation { color: #0A66C2; }
  .thesis-matrix-section-name.section-reversal     { color: #6B45D9; }
  .thesis-matrix-wr {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    font-variant-numeric: tabular-nums;
  }
  .thesis-matrix-wr-meta {
    font-size: 11px;
    color: #8E8E93;
    font-weight: 500;
    margin-left: 4px;
  }
  .thesis-matrix-cells {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .thesis-cell {
    padding: 8px 10px 9px;
    border-radius: 6px;
  }
  .thesis-cell.cell-won  { background: #EAF7EC; }
  .thesis-cell.cell-lost { background: #FCEAEA; }
  .cell-outcome-label {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
  }
  .cell-outcome-label.label-won  { color: #1F7A38; }
  .cell-outcome-label.label-lost { color: #C82C24; }
  .cell-numbers {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 4px;
  }
  .cell-n {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    font-variant-numeric: tabular-nums;
  }
  .cell-pnl {
    font-size: 11px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }
  .cell-pnl.pnl-up   { color: #30B65A; }
  .cell-pnl.pnl-down { color: #FF3B30; }

  /* ============================================================
     SIGNAL × STRENGTH × THESIS HEATMAP
     ============================================================ */
  .heatmap-card {
    border-top: 0.5px solid rgba(60, 60, 67, 0.10);
  }

  /* v1.7.47: 2×2 grid of heatmap cards inside the Thesis × Side
     panel. Mobile: 1fr (cards stack vertically, each spans full
     viewport so its internal .heatmap-scroll handles the
     min-width:530px overflow with a single per-card horizontal
     scroll). Desktop (≥720px): 1fr 1fr (2×2 layout). Replaces the
     v1.7.45 inline `grid-template-columns:1fr 1fr` which forced two
     columns on phones where each ~165px column couldn't fit the
     inner heatmap. */
  .thesis-side-heatmap-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
  }
  @media (min-width: 720px) {
    .thesis-side-heatmap-grid {
      grid-template-columns: 1fr 1fr;
    }
  }

  .heatmap-section {
    margin-top: 18px;
  }
  .heatmap-section:first-of-type {
    margin-top: 4px;
  }

  details.heatmap-section > summary {
    cursor: pointer;
    list-style: none;
  }
  details.heatmap-section > summary::-webkit-details-marker { display: none; }
  details.heatmap-section > summary::marker { content: ""; }
  details.heatmap-section > summary::after {
    content: "▾";
    margin-left: auto;
    color: #8E8E93;
    font-size: 12px;
    transition: transform 0.18s ease;
  }
  details.heatmap-section[open] > summary::after {
    transform: rotate(-180deg);
  }

  .heatmap-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }
  .heatmap-section-name {
    font-size: 12px;
    font-weight: 600;
  }
  .heatmap-section-name.section-continuation { color: #0A66C2; }
  .heatmap-section-name.section-reversal     { color: #6B45D9; }
  .heatmap-section-meta {
    font-size: 11px;
    color: #8E8E93;
    font-weight: 500;
  }

  .heatmap-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -18px;
    padding: 0 18px;
  }
  @media (min-width: 720px) {
    .heatmap-scroll {
      margin: 0 -22px;
      padding: 0 22px;
    }
  }

  .heatmap-grid {
    display: grid;
    grid-template-columns: 150px repeat(4, minmax(80px, 1fr));
    gap: 1px;
    background: rgba(60, 60, 67, 0.10);
    border-radius: 8px;
    border: 0.5px solid rgba(60, 60, 67, 0.12);
    min-width: 530px;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
  }
  .heatmap-row { display: contents; }

  .heatmap-cell,
  .heatmap-signal-label,
  .heatmap-strength-label {
    background: #FFFFFF;
    padding: 6px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 30px;
  }
  .heatmap-signal-label {
    text-align: left;
    align-items: flex-start;
    padding: 6px 10px;
    background: #F8F8FA;
    color: #3C3C43;
    font-weight: 500;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .heatmap-strength-label {
    background: #F8F8FA;
    color: #8E8E93;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.4px;
  }
  .heatmap-cell .cell-wr {
    font-weight: 600;
    font-size: 11px;
    line-height: 1.05;
  }
  .heatmap-cell .cell-n {
    font-size: 9px;
    opacity: 0.7;
    line-height: 1.2;
    margin-top: 1px;
  }

  /* WR color tiers (light Apple-style tints matching chip palette) */
  .heatmap-cell.wr-strong-high { background: #B5E5BD; color: #145228; }
  .heatmap-cell.wr-high        { background: #DDF5E0; color: #1F7A38; }
  .heatmap-cell.wr-mid         { background: #F2F2F7; color: #3C3C43; }
  .heatmap-cell.wr-low         { background: #FFE5E3; color: #C82C24; }
  .heatmap-cell.wr-strong-low  { background: #FFC4BD; color: #8B1B14; }
  .heatmap-cell.wr-low-n       { background: #FAFAFA; color: #8E8E93; }
  .heatmap-cell.wr-empty       { background: #FAFAFA; color: #C7C7CC; }

/* ============================================================
   REFRESH INDICATOR
   ============================================================ */
#refresh-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  opacity: 0.65;
  margin-left: 8px;
}
.refresh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #888;
  flex-shrink: 0;
}
.refresh-dot.refresh-ok    { background: #4caf50; }
.refresh-dot.refresh-error { background: #e53935; }
.refresh-dot.refresh-init  {
  background: #888;
  animation: _rfpulse 1.2s ease-in-out infinite;
}
@keyframes _rfpulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* ============================================================
   v1.7.30 — hedge color tokens + panel surfaces
   ============================================================ */
:root {
  --hedge:       #f97316;   /* orange-500 */
  --hedge-muted: #fed7aa;   /* orange-200 */
  --hedge-text:  #7c2d12;   /* orange-900 */
}

/* v1.11.x — the standalone .chip-hedge HEDGE badge is retired; hedge
   identity now renders via .action-chip.action-hedge in the chip slot. */

.hedge-win-rate-bar {
  height:        8px;
  border-radius: 4px;
  background:    var(--hedge-muted);
  overflow:      hidden;
  min-width:     60px;
  flex:          0 0 60px;
}

.hedge-win-rate-bar-fill {
  height:     100%;
  background: var(--hedge);
}

/* v1.11.x — the orange hedge styling on the Positions/Pending
   position-type chip is retired (hedge identity moved to the
   .action-hedge chip). The data-trade-type="hedge" attribute stays on the
   span (rung/other CSS + future selectors rely on attribute presence);
   hedge rows now render the default grey .position-type styling. */

/* Hedge panel — same .summary-bar wrapper as every other panel.
   Distinct stat-row, bucket table, and chart-card spacing matches the
   visual contract of the Performance panel above it. */
.hedge-stats-row {
  display:       flex;
  flex-wrap:     wrap;
  gap:           18px 28px;
  padding:       8px 0 14px 0;
  align-items:   center;
}
.hedge-stat {
  display:        flex;
  flex-direction: column;
  gap:            2px;
  min-width:      120px;
}
.hedge-stat-label {
  font-size:      11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color:          #8E8E93;
}
.hedge-stat-value {
  font-size:      18px;
  font-weight:    600;
  color:          #000;
  display:        flex;
  align-items:    center;
  gap:            8px;
}
.hedge-stat-value.pnl-up   { color: #1F7A38; }
.hedge-stat-value.pnl-down { color: #C82C24; }

.hedge-bucket-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       12px;
  margin-top:      4px;
}
.hedge-bucket-table th,
.hedge-bucket-table td {
  padding:        6px 10px;
  text-align:     left;
  border-bottom:  1px solid rgba(60, 60, 67, 0.10);
}
.hedge-bucket-table th {
  font-weight:    500;
  color:          #8E8E93;
  text-transform: uppercase;
  font-size:      10.5px;
  letter-spacing: 0.04em;
}
.hedge-bucket-table td.numeric {
  font-variant-numeric: tabular-nums;
  text-align:           right;
}
.hedge-bucket-table td.bucket-label {
  font-weight: 500;
  color:       var(--hedge-text);
}

.hedge-empty-state {
  padding:    20px 4px;
  color:      #8E8E93;
  font-size:  13px;
  font-style: italic;
}

/* v1.7.31 — Active Window hedge status line. A single orange row
   inside the session-strip. */
.hedge-active-line {
  color:       var(--hedge);
  font-size:   0.85em;
  font-weight: 600;
  margin-top:  4px;
}

/* v1.7.59-patch1 — value_entry declaration chips.
   Inline numeric spans reused across the open-position row and the
   pending row (SSR _value_entry_chip_html + its JS mirror). The
   cc-* class names are retained for CSS back-compat. */
.cc-target,
.cc-buffer {
  color: #3C3C43;
  font-variant-numeric: tabular-nums;
}
.cc-target { color: #1c1c1e; }              /* darker primary tone */
.cc-buffer { color: #5F5E5A; font-size: 11px; }  /* slightly muted — secondary */

/* v1.8.5.3 — odds-trigger fidelity chip (open positions panel).
   Δ = target − fill_price_cents. Positive = filled below target (good
   fidelity); near 0 = ask reached target precisely; negative = filled
   above target (shouldn't happen given the ceiling trigger). Colour
   keys the cc-fidelity-delta so the operator can scan rows at a glance. */
.cc-fidelity {
  color: #1c1c1e;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.cc-fidelity-delta { font-size: 11px; margin-left: 2px; }
.cc-fidelity.fidelity-pos  { color: #1F7A38; }   /* filled below target */
.cc-fidelity.fidelity-flat { color: #5F5E5A; }   /* on target */
.cc-fidelity.fidelity-neg  { color: #C82C24; }   /* above target — anomaly */
