
/* Skip artifact shell — fixed styles served beside every artifact.
   Complements basecoat; artifacts override --accent for their own identity. */
:root {
  color-scheme: light dark;
  --accent: #2563eb;
  --accent-contrast: #ffffff;
  --accent-text: color-mix(in srgb, var(--accent) 72%, #000);
  --bg: #f8f9fb;
  --surface: #ffffff;
  --text: #14171f;
  --text-muted: #5b6472;
  --border: rgba(20, 23, 31, 0.10);
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 23, 31, 0.08);
  --space: 16px;
}
/* Theme resolution. Without data-theme the viewer's system preference decides,
   as it always did. With it, the artifact's own choice wins in BOTH directions:
   a page that hardcodes one palette must not be handed the opposite set of
   tokens by the machine it happens to be opened on. The dark values appear
   twice because a media query cannot be folded into a selector list.
   The attribute sits inside :where() so these blocks keep the specificity of a
   bare :root — the page's own <style> is linked after this file and must go on
   overriding any token it wants, exactly as it could before. */
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --accent-text: color-mix(in srgb, var(--accent) 78%, #fff);
    --bg: #101318;
    --surface: #181c23;
    --text: #eef1f6;
    --text-muted: #9aa4b2;
    --border: rgba(238, 241, 246, 0.12);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}
:root:where([data-theme="dark"]) {
  color-scheme: dark;
  --accent-text: color-mix(in srgb, var(--accent) 78%, #fff);
  --bg: #101318;
  --surface: #181c23;
  --text: #eef1f6;
  --text-muted: #9aa4b2;
  --border: rgba(238, 241, 246, 0.12);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
:root:where([data-theme="light"]) { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }

.shell-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.shell-section { padding: calc(var(--space) * 2) 0; }
.shell-grid { display: grid; gap: var(--space); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.shell-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: var(--space); }
.shell-footer { padding: 24px 0 40px; color: var(--text-muted); font-size: 13px; }

.shell-hero { padding: calc(var(--space) * 3) 0 calc(var(--space) * 2); }
.shell-hero h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.15; margin: 0 0 10px; text-wrap: balance; }
.shell-hero p { color: var(--text-muted); max-width: 60ch; margin: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space);
}

.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .kpi-value { font-size: 28px; font-weight: 650; line-height: 1.1; }
.kpi .kpi-label { font-size: 13px; color: var(--text-muted); }
.kpi .kpi-delta { font-size: 12.5px; font-weight: 600; }
.kpi .kpi-delta.up { color: #0a8f3c; }
.kpi .kpi-delta.down { color: #cf3131; }

table.shell-table { border-collapse: collapse; width: 100%; font-size: 14px; }
table.shell-table th {
  text-align: left; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600;
}
table.shell-table th, table.shell-table td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--border); }
table.shell-table td.num, table.shell-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.shell-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }

.chart-box { width: 100%; min-height: 220px; }
.chart-box svg { width: 100%; height: auto; display: block; }

.muted { color: var(--text-muted); }
.accent { color: var(--accent-text); }
.shell-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-text);
}

@media (prefers-reduced-motion: no-preference) {
  .shell-fade { animation: shell-fade 400ms ease both; }
  @keyframes shell-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

