/* =========================================================================
   explorer-wide.css — the Explorer's RESULTS screen on wide windows only.
   Below 1000px nothing here applies, so phones and tablets are unchanged.

   The results screen was a single 760px column. On a laptop or desktop that
   left most of the window empty and squeezed the chart. Here the page grows to
   the same width as the homepage, and the drill-down becomes two columns:
   the four key numbers on the left (they stay in view while you scroll a long
   trade log) and the tabs, chart and trade log on the right.

   Scoped to body[data-view="results"] so the setup screen is untouched.
   ========================================================================= */

@media (min-width: 1000px) {
  .wrap {
    max-width: min(1680px, calc(100vw - 64px));
  }

  /* Setup screen: strategy header card on the left, scenario console on the right */
  body[data-view="setup"] .wrap {
    display: grid;
    grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
    column-gap: 28px;
    align-items: start;
  }

  body[data-view="setup"] .top-nav,
  body[data-view="setup"] #out {
    grid-column: 1 / -1;
  }

  body[data-view="setup"] .strategy-header {
    grid-column: 1;
    background: var(--surface);
    border: 1px solid #e3eaf3;
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 20px;
    margin-bottom: 0;
  }

  body[data-view="setup"] .strategy-header .rules-strip {
    grid-template-columns: 1fr;
  }

  body[data-view="setup"] .scenario-console {
    grid-column: 2;
    padding: 24px 28px;
    box-shadow: var(--shadow-card);
    border-color: #e3eaf3;
    margin-bottom: 0;
  }

  body[data-view="results"] .results-card {
    padding: 28px 32px;
  }

  body[data-view="results"] .drilldown-container {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    column-gap: 28px;
    align-items: start;
  }

  body[data-view="results"] .drilldown-header,
  body[data-view="results"] .verdict-banner {
    grid-column: 1 / -1;
  }

  /* One column of four tiles, pinned while the right side scrolls. */
  body[data-view="results"] .kpi-grid {
    grid-column: 1;
    grid-row: 3 / span 6;
    grid-template-columns: 1fr;
    margin-bottom: 0;
    position: sticky;
    top: 16px;
  }

  body[data-view="results"] .result-tabs,
  body[data-view="results"] #paneChart,
  body[data-view="results"] #paneTrades,
  body[data-view="results"] #panePatterns,
  body[data-view="results"] #paneAttrib {
    grid-column: 2;
  }
}
