/*
 * Uostas platform theme — served by core at /platform/theme.css.
 *
 * PLATFORM UI CONTRACT v1: every page (core's and every plugin's) loads this
 * file at runtime, so changing a value here restyles the whole platform with
 * no plugin rebuild. The variable NAMES and the .uostas-* role classes are the
 * contract: rename or remove one only with a new contract version. Adding is fine.
 *
 * The default look is Datana: an ink ground, parchment type, hairline rules,
 * square corners and one oxblood accent, spent as 2px rules and button fills
 * (never as small text: it reads 1.9:1 on ink). Dark only.
 *
 * A dashboard may use a plugin's own theme (/d/<plugin>/themes/<id>.css),
 * loaded after this file: it overrides any of these variables and inherits
 * the rest.
 */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Source+Sans+3:ital,wght@0,400;0,600;1,400&family=Source+Code+Pro:wght@400;500&display=swap');

:root {
  color-scheme: dark;

  /* Surfaces and text */
  --uostas-bg: #1a1a2e; /* ink: the ground */
  --uostas-surface: #16213e; /* deep navy: inputs, menus, dialogs */
  --uostas-surface-2: rgba(22, 33, 62, 0.5); /* a raised block on the ground */
  --uostas-hover: rgba(245, 242, 235, 0.05);
  --uostas-fg: #f5f2eb; /* parchment, 15:1 */
  --uostas-muted: rgba(212, 208, 200, 0.75); /* secondary text, 7:1 */
  --uostas-faint: #8a8a9a; /* labels and captions, 5:1 */
  --uostas-line: rgba(212, 208, 200, 0.15); /* hairlines */
  --uostas-line-strong: rgba(212, 208, 200, 0.3); /* field borders, chart baselines */

  /* The one accent: fills and rules only */
  --uostas-accent: #8b2500;
  --uostas-accent-fg: #fefcf6;
  --uostas-accent-wash: rgba(139, 37, 0, 0.08); /* active tab / selected row fill */
  --uostas-link: #f5f2eb; /* links are parchment, underlined: the accent is too dark for text */
  --uostas-rule: 2px; /* width of accent rules (active tab, quote, verdict) */

  /* Status */
  --uostas-danger: #e8826a;
  --uostas-good: #82b482;

  /* Type: three families, one job each */
  --uostas-font: 'Source Sans 3', Calibri, 'Helvetica Neue', sans-serif; /* the interface */
  --uostas-font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif; /* words and headings */
  --uostas-font-mono: 'Source Code Pro', Consolas, 'Courier New', monospace; /* numbers, data */
  --uostas-font-heading: var(--uostas-font-serif);
  --uostas-heading-weight: 400;
  --uostas-heading-transform: uppercase;
  --uostas-heading-tracking: 0.05em;
  --uostas-font-numeric: var(--uostas-font-mono);
  --uostas-label-transform: uppercase;
  --uostas-label-tracking: 0.1em;

  /* Shape */
  --uostas-radius: 0;
  --uostas-max-width: 80rem; /* content width shared by the header and page bodies */

  /* Charts: categorical slots in fixed order (validated on the ink ground) */
  --uostas-viz-1: #3080bc;
  --uostas-viz-2: #cd7e35;
  --uostas-viz-3: #208562;
  --uostas-viz-4: #c178a9;
  --uostas-viz-5: #725aae;
  --uostas-viz-6: #a4932e;
  --uostas-viz-7: #8a8a9a;
  --uostas-viz-8: #f5f2eb;
  /* Sequential: one hue, faint → strong */
  --uostas-viz-seq-0: rgba(245, 242, 235, 0.12);
  --uostas-viz-seq-1: rgba(245, 242, 235, 0.3);
  --uostas-viz-seq-2: rgba(245, 242, 235, 0.5);
  --uostas-viz-seq-3: rgba(245, 242, 235, 0.72);
  --uostas-viz-seq-4: rgba(245, 242, 235, 0.95);
  --uostas-viz-grid: rgba(212, 208, 200, 0.08);
  --uostas-viz-axis: rgba(212, 208, 200, 0.3);
}

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

/* Role classes: components say what text IS; the theme decides how it looks. */
.uostas-heading {
  font-family: var(--uostas-font-heading);
  font-weight: var(--uostas-heading-weight);
  text-transform: var(--uostas-heading-transform);
  letter-spacing: var(--uostas-heading-tracking);
}
.uostas-label {
  text-transform: var(--uostas-label-transform);
  letter-spacing: var(--uostas-label-tracking);
}
.uostas-num {
  font-family: var(--uostas-font-numeric);
  font-variant-numeric: tabular-nums;
}
.uostas-prose {
  font-family: var(--uostas-font-serif);
}
.uostas-link {
  color: var(--uostas-link);
  text-decoration: underline;
  text-decoration-color: var(--uostas-line-strong);
  text-underline-offset: 3px;
}
.uostas-link:hover {
  text-decoration-color: currentColor;
}
