/* The Compute Market Console at /compute/explore/. DAP brand 2026: carbon
   first, graphite panels, warm white ink, lines not shadows, square corners.
   The one red line in each view is the redline under the view's heading.
   Data marks use the --viz neutral ramp from tokens.css. Bands sit on the
   site's .wrap grid so the console lines up with the header and footer.
   Every class starts cx-. */
.cx { color: var(--ink); background: var(--bg); font: 15px/1.5 var(--font-sans); }
.cx-meta { font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin: 0; }
.cx-label { font-family: var(--font-sans); font-weight: 600; font-size: 11px; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }

/* Opening band: the page title in Raleway Light, the snapshot stamp in mono. */
.cx-open { border-bottom: 1px solid var(--hairline); }
.cx-open-in { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; padding-top: 56px; padding-bottom: 32px; }
.cx-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(36px, 4vw, 54px); line-height: 1.05; letter-spacing: -0.01em; margin: 12px 0 0; }
.cx-title a, .cx-crumb { color: inherit; text-decoration: none; }
.cx-crumb:hover { color: var(--ink); }
.cx-stamp { display: flex; gap: 8px 32px; flex-wrap: wrap; margin: 0; }
.cx-stamp div { display: flex; flex-direction: column; gap: 6px; }
.cx-stamp dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.cx-stamp dd { margin: 0; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: var(--ink); }
.cx-preview dd { border-bottom: 1px dashed var(--rule); padding-bottom: 2px; }

/* Filter band: graphite, controls drawn as lines. */
.cx-filters { background: var(--surface); border-bottom: 1px solid var(--hairline); }
.cx-filters-in { display: flex; gap: 16px 28px; flex-wrap: wrap; align-items: flex-end; padding-top: 18px; padding-bottom: 18px; }
.cx-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cx-sel { position: relative; display: inline-block; max-width: 100%; }
.cx-sel::after { content: ""; position: absolute; right: 2px; top: 50%; width: 6px; height: 6px; margin-top: -6px; border-right: 1px solid var(--ink-muted); border-bottom: 1px solid var(--ink-muted); transform: rotate(45deg); pointer-events: none; }
.cx select, .cx input[type="search"] { font: 15px/1.4 var(--font-sans); padding: 4px 22px 7px 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--ink); appearance: none; max-width: 100%; min-width: 120px; transition: border-color 0.3s ease; }
.cx select:hover, .cx input[type="search"]:hover { border-bottom-color: var(--ink); }
.cx select option { background: var(--surface); color: var(--ink); }
.cx input[type="search"] { padding-right: 0; min-width: 220px; }
.cx input[type="search"]::placeholder { color: var(--ink-muted); }
.cx-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 0 6px; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--ink); font: 600 11px/16px var(--font-sans); letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: opacity 0.3s ease; }
.cx-btn:hover { opacity: 0.7; }
.cx-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-muted); align-self: center; text-transform: uppercase; }
.cx-ftoggle { display: none; }

/* Shell: the view rail and the working canvas. */
.cx-shell { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 48px; min-height: 70vh; }
.cx-rail { padding: 40px 0; border-right: 1px solid var(--hairline); align-self: stretch; }
.cx-rail a { display: flex; gap: 14px; align-items: baseline; padding: 10px 0 10px 16px; margin-left: -1px; color: var(--ink-muted); text-decoration: none; border-left: 1px solid transparent; transition: color 0.3s ease; }
.cx-rail a span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; width: 18px; }
.cx-rail a:hover { color: var(--ink); }
.cx-rail a[aria-current="page"] { color: var(--ink); border-left-color: var(--ink); }
.cx-railsel { display: none; }
.cx-main { min-width: 0; padding: 40px 0 96px; }

/* A view: mono eyebrow, Raleway heading, the redline, then panels. */
.cx-vhead { margin-bottom: 32px; }
.cx-h2 { font-family: var(--font-display); font-weight: 300; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.12; letter-spacing: -0.01em; margin: 12px 0 0; text-wrap: balance; }
.cx-redline { width: 64px; height: 3px; background: var(--signal); margin-top: 20px; }
.cx-lede { color: var(--ink-muted); max-width: 66ch; margin: 18px 0 0; font-size: 16px; line-height: 26px; }
.cx-panel { background: var(--surface); border: 1px solid var(--hairline); border-top-color: var(--rule); padding: 24px; min-width: 0; }
.cx-panel h3 { font: 600 15px/22px var(--font-sans); margin: 0; }
.cx-sub { color: var(--ink-muted); font-size: 13px; line-height: 20px; margin: 4px 0 0; }
.cx-ptop { display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.cx-ctrls { display: flex; gap: 16px 24px; flex-wrap: wrap; }
.cx-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cx-grid3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.cx-stack { display: grid; gap: 24px; }
.cx-chart { width: 100%; overflow-x: auto; }
.cx-chart svg { display: block; }
.cx-gap { margin-top: 16px; }
.cx-note { font-size: 13px; line-height: 20px; color: var(--ink-muted); margin: 12px 0 0; }
.cx-noscript { max-width: 64ch; }
.cx-noscript a { color: inherit; }
.cx-draftnote { margin: 24px 0 0; }

/* Headline numbers */
.cx-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--hairline); }
.cx-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 24px; }
.cx-kpi { padding: 20px 24px 24px 0; min-width: 0; }
.cx-kpi + .cx-kpi { padding-left: 24px; border-left: 1px solid var(--hairline); }
.cx-v { font-family: var(--font-display); font-weight: 300; font-size: 48px; line-height: 54px; font-variant-numeric: tabular-nums; margin: 10px 0 0; }
.cx-unit { font-size: 20px; }
.cx-s { font-size: 13px; line-height: 20px; color: var(--ink-muted); margin: 4px 0 0; max-width: 30ch; }
.cx-s b { color: var(--ink); font-weight: 600; }

/* Marks and chart text */
.cx-ax text, .cx-lab { fill: var(--ink-muted); font: 11px var(--font-mono); letter-spacing: 0.04em; }
.cx-ax line, .cx-ax path { stroke: var(--hairline); }
.cx-grid line { stroke: var(--hairline); }
.cx-val { fill: var(--ink); font: 500 11px var(--font-mono); }
.cx-name { fill: var(--ink); font: 13px var(--font-sans); }
.cx-name-sm { font-size: 12px; }
.cx-halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.cx-grp { fill: var(--ink-muted); font: 11px var(--font-mono); letter-spacing: 0.12em; }
.cx-now line { stroke: var(--rule); stroke-dasharray: 2 4; }
.cx-now text { fill: var(--ink-muted); font: 10px var(--font-mono); letter-spacing: 0.12em; }
.cx-due line { stroke: var(--ink); stroke-dasharray: 6 3; }
.cx-due text { fill: var(--ink); font: 600 10px var(--font-mono); letter-spacing: 0.12em; }
.cx-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-muted); margin-top: 16px; }
.cx-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; border: 1px solid var(--rule); }
.cx-chip { display: inline-block; font: 500 10px/14px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--rule); white-space: nowrap; color: var(--ink); }
.cx-chip-pending, .cx-chip-announced { border-style: dashed; color: var(--ink-muted); }
.cx-chip-listed, .cx-chip-approved, .cx-chip-published { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Tables */
.cx-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.cx-tbl th { text-align: left; font: 400 10px/14px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.cx-tbl th[data-k] { cursor: pointer; user-select: none; }
.cx-tbl th[data-k]:hover { color: var(--ink); }
.cx-tbl th[aria-sort="ascending"]::after { content: " \2191"; }
.cx-tbl th[aria-sort="descending"]::after { content: " \2193"; }
.cx-tbl td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; font-variant-numeric: tabular-nums; }
.cx-tbl td.cx-num { font-family: var(--font-mono); font-size: 13px; }
.cx-tbl td.cx-nw { white-space: nowrap; }
.cx-tbl a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cx-scroll { overflow-x: auto; }
.cx-log { max-height: 460px; overflow: auto; margin-top: 12px; }
.cx-empty { padding: 40px; text-align: center; color: var(--ink-muted); border: 1px dashed var(--hairline); }

.cx-tip { position: fixed; pointer-events: none; z-index: 40; background: var(--bg); color: var(--ink); border: 1px solid var(--rule); font-size: 13px; line-height: 19px; padding: 10px 12px; max-width: 300px; }
.cx-tip b { display: block; font-weight: 600; margin-bottom: 4px; }
.cx-tip span { color: var(--ink-muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; }

@media (max-width: 1180px) { .cx-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cx-kpi:nth-child(4) { padding-left: 0; border-left: 0; } .cx-grid2, .cx-grid3 { grid-template-columns: minmax(0, 1fr); } .cx-shell { gap: 32px; } }
@media (max-width: 760px) {
  .cx-open-in { padding-top: 40px; padding-bottom: 24px; }
  .cx-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cx-rail { display: none; }
  .cx-railsel { display: block; padding-top: 20px; }
  .cx-railsel .cx-sel, .cx-railsel select { width: 100%; }
  .cx-main { padding-top: 28px; }
  .cx-kpis, .cx-kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-kpi, .cx-kpi + .cx-kpi { padding: 16px 12px 16px 0; border-left: 0; border-bottom: 1px solid var(--hairline); }
  .cx-v { font-size: 38px; line-height: 44px; }
  .cx-panel { padding: 18px; }
  .cx-ftoggle { display: inline-flex; margin-top: 16px; }
  .cx-filters:not(.cx-shown) { display: none; }
  .cx input[type="search"] { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cx * { transition: none !important; animation: none !important; } }

/* Prices view: a change is the one signal mark; the crosshair and the index
   reference stay quiet. */
.cx-pchange { fill: var(--signal); stroke: var(--surface); stroke-width: 2; }
.cx-ref { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 3; }
.cx-cross { stroke: var(--rule); stroke-width: 1; pointer-events: none; }
