/* The design tokens and page frame the report expects, resolved from the
   dashboard's own theme so the standalone page looks the same. */

:root {
  color-scheme: light dark;

  --font-anthropic-sans: "Anthropic Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-anthropic-serif: "Anthropic Serif", ui-serif, Georgia, "Times New Roman", serif;

  --cds-font-size-caption: .75rem;
  --cds-font-size-body: .875rem;
  --cds-font-size-heading: .9375rem;
  --cds-font-size-title: 1.375rem;
  --cds-font-weight-medium: 500;

  --cds-gap-xs: .5rem;
  --cds-gap-sm: .75rem;
  --cds-gap-md: 1rem;
  --cds-gap-lg: 1.75rem;
  --cds-gap-xl: 2.5rem;
  --cds-pad-xs: .375rem;
  --cds-pad-sm: .5rem;
  --cds-pad-md: .75rem;
  --cds-pad-lg: 1rem;
  --cds-pad-xl: 1.5rem;
  --cds-radius: .5rem;

  --cds-dur-slow: .45s;
  --cds-ease-out: cubic-bezier(.165, .84, .44, 1);

  /* light */
  --color-fg: #000000e6;
  --color-fg-muted: #0007;
  --color-bg: #f9f9f9;
  --color-panel: #fff;
  --color-border-line: #00000014;
  --color-ok: #006c10;
  --color-warn: #895902;
  --color-bad: #a42528;

  --cds-text-secondary: #0009;
  --cds-surface-popover: #fff;
  --cds-border: #00000014;
  --cds-shadow-popover: 0 8px 24px #0000001f, 0 2px 6px #00000014;

  --cds-chart-muted: #c2c2c2;
  --cds-chart-grid: #0b0b0b1a;
  --cds-chart-axis: #c2c2c2;
  --cds-chart-reference: #878787;
  --cds-chart-status-critical: #dc3c3d;
  --cds-chart-status-good: #0aac23;
  --cds-chart-status-warning: #fbb315;

  --cds-chart-categorical-1: #257de0;
  --cds-chart-categorical-2: #f47230;
  --cds-chart-categorical-3: #00b894;
  --cds-chart-categorical-4: #f2a600;
  --cds-chart-categorical-5: #ee7fac;
  --cds-chart-categorical-6: #008a17;
  --cds-chart-categorical-7: #6a4ce2;
  --cds-chart-categorical-8: #ec4647;

  --dash-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23000000a6' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-fg: #ffffffed;
    --color-fg-muted: #fff6;
    --color-bg: #0b0b0b;
    --color-panel: #1f1f1f;
    --color-border-line: #ffffff14;
    --color-ok: #53c556;
    --color-warn: #e49c06;
    --color-bad: #fa8080;

    --cds-text-secondary: #ffffff91;
    --cds-surface-popover: #303030;
    --cds-border: #ffffff1a;
    --cds-shadow-popover: 0 8px 24px #00000052, 0 2px 6px #0003;

    --cds-chart-muted: #5e5e5e;
    --cds-chart-grid: #ffffff1a;
    --cds-chart-axis: #383838;
    --cds-chart-reference: #959595;

    --cds-chart-categorical-1: #338ced;
    --cds-chart-categorical-2: #e76624;
    --cds-chart-categorical-3: #00a888;
    --cds-chart-categorical-4: #d28e05;
    --cds-chart-categorical-5: #e24d8b;
    --cds-chart-categorical-6: #0aac23;
    --cds-chart-categorical-7: #9887ef;
    --cds-chart-categorical-8: #eb6263;

    --dash-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23ffffffb3' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-anthropic-sans);
  -webkit-font-smoothing: antialiased;
}

#dash-root {
  color: var(--color-fg);
  font-size: 14px;
  line-height: 1.45;
  padding: clamp(var(--cds-pad-md), 4%, var(--cds-pad-xl));
  max-width: 1320px;
  margin: 0 auto;
}

.dash-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: var(--cds-font-size-body);
  color: var(--color-fg);
  background-color: var(--color-panel);
  background-image: var(--dash-chevron);
  background-repeat: no-repeat;
  background-position: right 9px center;
  border: 1px solid var(--color-border-line);
  border-radius: var(--cds-radius);
  padding: 6px 30px 6px 10px;
  line-height: 1.4;
  cursor: pointer;
}

.dash-select:focus-visible { outline: 2px solid var(--cds-chart-categorical-1); outline-offset: 1px; }

@media print {
  body { background: #fff; }
  #dash-root { max-width: none; padding: 0; }
}
