/* Global token styles */

:root {
  --hub-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --hub-font-body: "Avenir Next", "Segoe UI", sans-serif;
  --hub-radius: 14px;
  --hub-shadow: 0 10px 30px rgba(28, 36, 32, 0.08);
  /*
   * Color fallbacks only - active theme :root is injected AFTER this file in Shell.
   * Do not load another stylesheet that redefines these after #hub-theme-vars.
   */
  --hub-primary: #0f5c4c;
  --hub-primary-hover: #0c4a3d;
  --hub-bg: #f3f1ec;
  --hub-bg-accent: #e7e2d7;
  --hub-nav-bg: #fffcf7;
  --hub-text: #1c2420;
  --hub-surface: #fffcf7;
  --hub-surface-muted: #f0ebe3;
  /* Alias used by people/group chips & pickers - follows active theme muted surface */
  --hub-surface-2: var(--hub-surface-muted);
  --hub-border: #cfc8ba;
  --hub-muted: #5c675f;
  --hub-nav-link: #1c2420;
  --hub-hover: #ebe6dc;
  --hub-accent: #c45c26;
  --hub-danger: #8b1e1e;
  --hub-ok: #1f6b3a;
  --hub-warn: #8a5a00;
  --hub-brand-ink: #f4fff9;
  --hub-border-subtle: #e0d9cc;
  --hub-dropdown-bg: #fffcf7;
  --hub-input-bg: #fffcf7;
  --hub-accent-bg: #e2efe9;

  /*
   * Density scale (comfortable = 1). Compact = 0.5, Loose = 1.5 for spacing.
   * Text uses a milder --hub-text-scale so Compact/Loose nudge type without
   * crushing readability (html font-size so rem-based UI follows).
   */
  --hub-density: 1;
  --hub-text-scale: 1;
  --hub-space-2xs: calc(0.25rem * var(--hub-density));
  --hub-space-xs: calc(0.35rem * var(--hub-density));
  --hub-space-sm: calc(0.5rem * var(--hub-density));
  --hub-space-md: calc(0.75rem * var(--hub-density));
  --hub-space-lg: calc(1rem * var(--hub-density));
  --hub-space-xl: calc(1.25rem * var(--hub-density));
  --hub-pad-cell-y: calc(0.35rem * var(--hub-density));
  --hub-pad-cell-x: calc(0.55rem * var(--hub-density));
  --hub-pad-btn-y: calc(0.4rem * var(--hub-density));
  --hub-pad-btn-x: calc(0.95rem * var(--hub-density));
  --hub-pad-btn-sm-y: calc(0.28rem * var(--hub-density));
  --hub-pad-btn-sm-x: calc(0.7rem * var(--hub-density));
  --hub-pad-chrome-y: calc(0.12rem * var(--hub-density));
  --hub-pad-chrome-x: calc(0.4rem * var(--hub-density));
  --hub-control-min: calc(2rem * var(--hub-density));
  --hub-control-sm: calc(1.75rem * var(--hub-density));
  /* List filter / pager / header search - keep compact even at comfortable density */
  --hub-control-xs: max(1.3rem, calc(1.45rem * var(--hub-density)));
  --hub-hit: calc(1.25rem * var(--hub-density));
  --hub-check: calc(1.05rem * var(--hub-density));
  --hub-check-border: max(1.5px, calc(2px * var(--hub-density)));
  --hub-check-radius: calc(4px * var(--hub-density));
}

html[data-ui-density="compact"],
body[data-ui-density="compact"] {
  --hub-density: 0.5;
  --hub-text-scale: 0.9;
}

html[data-ui-density="comfortable"],
body[data-ui-density="comfortable"] {
  --hub-density: 1;
  --hub-text-scale: 1;
}

html[data-ui-density="loose"],
body[data-ui-density="loose"] {
  --hub-density: 1.5;
  --hub-text-scale: 1.1;
}

html {
  font-size: calc(100% * var(--hub-text-scale));
}
