/* site.css: the eperkey.org look for the DLBCL viewer.
 *
 * Two jobs. (1) The site's own palette and page chrome, the same values as the rest of the site
 * (src/App.css and the static pages under public/). (2) The handful of design tokens and helper
 * classes that the viewer's page stylesheets expect from their original host, filled in here.
 * The page stylesheets themselves are copied unchanged.
 */
:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --mute: #52514e;
  --rule: #e5e2db;
  --accent: #1757ac;
  --accent-soft: #e8f0fa;
  --chip: #efece6;
  --link: #1757ac;

  /* chart series, in a fixed order (validated for colour-blind separation, light surface) */
  --series-1: #257de0;
  --series-2: #f47230;
  --series-3: #00b894;
  --series-4: #f2a600;
  --series-5: #ee7fac;
  --series-6: #008a17;
  --series-7: #6a4ce2;
  --series-8: #ec4647;
  --chart-grid: #ebe8e1;
  --chart-ref: #8f8b82;
  --chart-muted: #a9a59c;
  --warn: #b06a00;
  --ok: #1d7a4c;
  --shadow: 0 6px 24px rgba(26, 26, 26, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15161a;
    --panel: #1c1e23;
    --ink: #e8e6e1;
    --mute: #9a948a;
    --rule: #2a2d33;
    --accent: #84b9f3;
    --accent-soft: #1b2a3d;
    --chip: #262830;
    --link: #84b9f3;
    --series-1: #338ced;
    --series-2: #e76624;
    --series-3: #00a888;
    --series-4: #d28e05;
    --series-5: #e24d8b;
    --series-6: #0aac23;
    --series-7: #9887ef;
    --series-8: #eb6263;
    --chart-grid: #2a2d33;
    --chart-ref: #7d786e;
    --chart-muted: #6a665f;
    --warn: #fbb315;
    --ok: #0aac23;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15161a;
  --panel: #1c1e23;
  --ink: #e8e6e1;
  --mute: #9a948a;
  --rule: #2a2d33;
  --accent: #84b9f3;
  --accent-soft: #1b2a3d;
  --chip: #262830;
  --link: #84b9f3;
  --series-1: #338ced;
  --series-2: #e76624;
  --series-3: #00a888;
  --series-4: #d28e05;
  --series-5: #e24d8b;
  --series-6: #0aac23;
  --series-7: #9887ef;
  --series-8: #eb6263;
  --chart-grid: #2a2d33;
  --chart-ref: #7d786e;
  --chart-muted: #6a665f;
  --warn: #fbb315;
  --ok: #0aac23;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* ---- tokens the page stylesheets expect ---------------------------------------------------- */
:root {
  --color-bg: var(--bg);
  --color-panel: var(--panel);
  --color-fg: var(--ink);
  --color-fg-muted: var(--mute);
  --color-border-line: var(--rule);
  --color-warn: var(--warn);
  --color-ok: var(--ok);
  --cds-text-secondary: var(--mute);
  --cds-border: var(--rule);
  --cds-surface-popover: var(--panel);
  --cds-shadow-popover: var(--shadow);
  --cds-chart-grid: var(--chart-grid);
  --cds-chart-reference: var(--chart-ref);
  --cds-chart-muted: var(--chart-muted);
  --cds-gap-sm: 8px;
  --cds-gap-md: 14px;
  --cds-gap-lg: 22px;
  --cds-gap-xl: 36px;
  --cds-pad-md: 12px;
  --cds-pad-lg: 20px;
  --cds-radius: 10px;
  --cds-font-size-caption: 13px;
  --cds-font-size-body: 15px;
  --cds-font-size-heading: 18px;
  --cds-font-size-title: 30px;
  --cds-font-weight-medium: 600;
  --cds-dur-slow: 420ms;
  --cds-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-anthropic-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-anthropic-serif: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---- page chrome ----------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(72px, calc(env(safe-area-inset-bottom, 0px) + 56px))
    max(16px, env(safe-area-inset-left, 0px));
}
header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 28px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
header.site .home {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--link);
  text-decoration: none;
}
header.site .home:hover { text-decoration: underline; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 14px; }
.site-nav a {
  color: var(--mute);
  text-decoration: none;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); background: var(--chip); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--panel); border-color: var(--rule); font-weight: 600; }
.site-nav a.out::after { content: " \2197"; }
.site-notice {
  margin: 0 0 28px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--panel);
  color: var(--mute);
  font-size: 14px;
  line-height: 1.5;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}
.site-notice b { color: var(--ink); font-weight: 600; }
footer.site {
  max-width: 1040px;
  margin: 44px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--mute);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  justify-content: space-between;
}
footer.site a, .site-notice a, a.site-link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.s6 a.site-link { color: var(--link); }
.site-onco[hidden] { display: none; }
noscript.site-noscript { display: block; max-width: 1040px; margin: 0 auto 24px; color: var(--mute); }

/* ---- the site's type on the page's own classes: Inter throughout, heavier display weights ---- */
#dash-root .s6-title { font-weight: 700; letter-spacing: -0.015em; }
#dash-root .s6-big, #dash-root .s6-wpct { font-weight: 600; letter-spacing: -0.02em; }

/* ---- helper classes the pages borrow from their host ---------------------------------------- */
.dash-select {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 7px 10px;
  min-height: 38px;
  max-width: 100%;
}
.dash-select:focus-visible, .site-nav a:focus-visible, header.site .home:focus-visible, a.site-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dash-skeleton { border-radius: 6px; }
.dash-skeleton:empty, b.dash-skeleton, span.dash-skeleton {
  background: var(--chip);
  color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .dash-skeleton { animation: site-pulse 1.4s ease-in-out infinite; }
}
@keyframes site-pulse { 50% { opacity: 0.45; } }

@media print {
  header.site .site-nav, .site-onco { display: none; }
  body { background: #fff; }
}
