/* WestCoast Charts parity gallery (Copyright (c) 2026 West Coast Software, MIT) */
:root {
  color-scheme: light;
  --g-bg: #f3f5f8; --g-surface: #ffffff; --g-text: #172033; --g-muted: #5b6577;
  --g-line: rgba(15, 23, 42, .08); --g-accent: #2563eb;
  font-family: Inter, Geist, "IBM Plex Sans", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
html[data-mode='dark'] {
  color-scheme: dark;
  --g-bg: #070d18; --g-surface: #0d1626; --g-text: #e6eaf0; --g-muted: #9aa5b8;
  --g-line: rgba(255, 255, 255, .07); --g-accent: #60a5fa;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--g-bg); color: var(--g-text); }
a { color: var(--g-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.g-head { max-width: 1180px; margin: 0 auto; padding: 22px 24px 4px; }
.g-crumb { font-size: 12.5px; color: var(--g-muted); }
.g-head h1 { font-size: 22px; font-weight: 650; letter-spacing: -.015em; margin: 4px 0 6px; }
.g-desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--g-muted); max-width: 72ch; }
.g-status { display: none; }
html[data-review='1'] .g-status { display: inline-block; margin-top: 8px; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--g-line); }
#stage { max-width: 1180px; margin: 0 auto; padding: 14px 24px 32px; display: flex; flex-direction: column; gap: 14px; }
.g-chart { background: var(--g-surface); border: 1px solid var(--g-line); border-radius: 14px; padding: 14px 12px 6px; min-width: 0; }
.g-chart h3 { margin: 0 6px 4px; font-size: 13px; font-weight: 600; color: var(--g-muted); }
.g-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(var(--min, 0px), 1fr)); gap: 12px; }
.g-cell { padding: 10px 8px 2px; }
.g-note { margin: 0; font-size: 13px; color: var(--g-muted); }
.g-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.g-controls button {
  font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--g-line); background: var(--g-surface); color: var(--g-text);
}
.g-controls button[aria-pressed='true'] { border-color: var(--g-accent); color: var(--g-accent); }
.g-controls button:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
html[data-embed='1'] .g-head { display: none; }
html[data-embed='1'] #stage { padding: 8px; max-width: none; }
html[data-embed='1'] .g-note, html[data-embed='1'] .g-controls, html[data-embed='1'] .wcc-share { display: none; }
#stage > .wcc-share { margin: 0; font-size: 13px; color: var(--g-text); }
@media (max-width: 720px) {
  .g-grid { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); }
  #stage, .g-head { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 460px) { .g-grid { grid-template-columns: 1fr; } }
.g-kpi { background: var(--g-surface); color: var(--g-text); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.06); border: 1px solid var(--g-line, rgba(127,127,127,.18)); }
.g-kpi-l { font-size: 12px; opacity: .72; }
.g-kpi-v { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.g-kpi-d { font-size: 12px; font-variant-numeric: tabular-nums; }
.g-kpi-d[data-dir='up'] { color: #16a34a; }
.g-kpi-d[data-dir='down'] { color: #dc2626; }
[data-mode='dark'] .g-kpi-d[data-dir='up'] { color: #4ade80; }
[data-mode='dark'] .g-kpi-d[data-dir='down'] { color: #f87171; }
.g-span2 { grid-column: span 2; }
@media (max-width: 720px) { .g-span2 { grid-column: auto; } }

/* inside the showcase grid (?embed=sc): the showcase card is the surface */
html[data-sc='1'] body { background: transparent; }
html[data-sc='1'] .g-head { display: none; }
html[data-sc='1'] #stage { padding: 4px 2px 6px; max-width: none; gap: 10px; }
html[data-sc='1'] #stage:not(:has(> .g-chart ~ .g-chart, > .g-grid)) > .g-chart { border: 0; padding: 0; background: transparent; }
html[data-sc='1'] .g-note { font-size: 12.5px; }
