/* co dashboard: co-tokens.css. The one source of colour, type, shape and spacing
   values for co.oroboro.com (design-system's tokens plan, step 2, 2026-11-12;
   ~/agents/design-system/handoff/co-web-design-tokens-plan.md).
   Load it first, before co-base.css. Pages use var(--co-*) and never a literal;
   deliberate exceptions carry a `*-ok` comment once the lints are enrolled.
   Colours are GitHub Primer (light), matching the github-markdown-css the site loads.
   /cover is not covered here: its theme is kapk's. tone.py stays generated. */

:root {
  /* ── Surfaces ─────────────────────────────────────────────── */
  --co-bg-page:    #f6f8fa;  /* grey page behind cards */
  --co-bg-surface: #ffffff;  /* cards, header, menus */
  --co-bg-subtle:  #f6f8fa;  /* fills inside cards: table head, hover, inline code */
  --co-bg-muted:   #eaeef2;  /* pressed or selected fills, neutral pill */
  --co-bg-reading: #fcfcfb;  /* chat transcript: off-white against white composer and cards */
  --co-bg-inverse: #1f2328;  /* dark toasts and tooltips (text-on-accent on it, 15.8:1) */
  --co-bg-handle:  #c9ced4;  /* scrollbar thumbs, sheet grabbers */
  --co-bg-overlay: rgba(31, 35, 40, .45);  /* scrim behind modals */

  /* ── Text ─────────────────────────────────────────────────── */
  --co-text-primary:   #1f2328;  /* 15.8:1 on white */
  --co-text-secondary: #656d76;  /* 5.25:1 on white, 4.9:1 on page grey */
  --co-text-tertiary:  #8c959f;  /* 3.0:1: hints and timestamps only, never body copy */
  --co-text-on-accent: #ffffff;

  /* ── Borders ──────────────────────────────────────────────── */
  --co-border-default: #d1d9e0;
  --co-border-muted:   #e5e8eb;  /* row separators */

  /* ── Accent and status: foreground + pale background pairs ── */
  --co-accent:       #0969da;  --co-accent-bg:    #ddf4ff;
  --co-accent-hover: #0550ae;
  --co-success:      #1a7f37;  --co-success-bg:   #dafbe1;
  --co-attention:    #9a6700;  --co-attention-bg: #fff8c5;
  --co-danger:       #cf222e;  --co-danger-bg:    #ffebe9;
  --co-done:         #8250df;  --co-done-bg:      #fbefff;
  /* -strong: status text that must read as body copy (agent card names and states);
     all >= 7:1 on white */
  --co-success-strong:   #116329;
  --co-danger-strong:    #a40e26;
  --co-attention-strong: #7d4e00;
  --co-done-strong:      #3b2a6b;
  /* -border: the edge of a status box drawn on its -bg */
  --co-accent-border:    #9cc3f0;  /* also hover and drag highlights */
  --co-danger-border:    #ff8182;
  --co-attention-border: #d4a72c;
  --co-success-solid:    #1f883d;  /* filled green call-to-action, white text 4.5:1 */

  /* ── Chat bubbles (chat page and the workspace stand-in) ──── */
  --co-bubble-me:    #e9f1fb;  /* the signed-in person */
  --co-bubble-agent: #f1edf9;  /* another agent */
  --co-bubble-out:   #eaf4ec;  /* outgoing from this agent */

  /* ── Chart series (one categorical set for every chart) ───── */
  --co-chart-1: #0969da;
  --co-chart-2: #1a7f37;
  --co-chart-3: #bf8700;
  --co-chart-4: #cf222e;
  --co-chart-5: #8250df;
  --co-chart-6: #e16f24;

  /* ── Type ─────────────────────────────────────────────────── */
  --co-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --co-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Size + paired line height. Option A (one step larger than today, every width)
     is the default here; option B is the [data-co-scale="b"] block below.
     Rafael picks one (plan §6, decision 4); the other block is then deleted. */
  --co-text-xs:   12px; --co-lh-xs:   16px;  /* pills, chart axes */
  --co-text-sm:   13px; --co-lh-sm:   20px;  /* meta lines, section labels */
  --co-text-md:   14px; --co-lh-md:   21px;  /* tables, dense lists, mono data */
  --co-text-base: 15px; --co-lh-base: 23px;  /* body */
  --co-text-lg:   17px; --co-lh-lg:   24px;  /* header title, card titles */
  --co-text-xl:   21px; --co-lh-xl:   28px;  /* page titles */
  --co-text-2xl:  28px; --co-lh-2xl:  36px;  /* hero numbers, profile name */

  --co-weight-normal: 400;
  --co-weight-medium: 500;
  --co-weight-bold:   600;

  /* ── Shape and depth ──────────────────────────────────────── */
  --co-radius-sm:   4px;   /* small chips, inline code, dense-row inputs */
  --co-radius-md:   6px;   /* buttons, inputs, tags */
  --co-radius-lg:   8px;   /* cards, menus, popovers (the most-used radius today) */
  --co-radius-xl:   12px;  /* large panels, chat cards, modals */
  --co-radius-pill: 999px; /* badges, pills, round buttons */

  --co-shadow-sm: 0 0 2px 0 rgba(31, 35, 40, .08), 0 2px 4px 0 rgba(31, 35, 40, .16);  /* cards (the ops/svn/workspace card shadow) */
  --co-shadow-md: 0 1px 3px rgba(31, 35, 40, .06), 0 6px 18px rgba(31, 35, 40, .07);
  --co-shadow-lg: 0 8px 24px rgba(31, 35, 40, .12);  /* menus, popovers */
  --co-shadow-xl: 0 12px 32px rgba(31, 35, 40, .25); /* modals, dialogs */

  /* ── Space ────────────────────────────────────────────────── */
  --co-space-1: 4px;
  --co-space-2: 8px;
  --co-space-3: 12px;
  --co-space-4: 16px;
  --co-space-6: 24px;
  --co-space-8: 32px;

  /* ── Layout ───────────────────────────────────────────────── */
  --co-width-reading:   960px;   /* centred column: profile, cron, tokens */
  --co-width-dashboard: 1400px;  /* full dashboards: ops, agents index */
  --co-gutter:          var(--co-space-6);
}

/* Option B: today's desktop sizes, one step up on phones. */
:root[data-co-scale="b"] {
  --co-text-xs:   11px; --co-lh-xs:   16px;
  --co-text-sm:   12px; --co-lh-sm:   18px;
  --co-text-md:   13px; --co-lh-md:   20px;
  --co-text-base: 14px; --co-lh-base: 21px;
  --co-text-lg:   16px; --co-lh-lg:   24px;
  --co-text-xl:   20px; --co-lh-xl:   28px;
}
@media (max-width: 600px) {
  :root[data-co-scale="b"] {
    --co-text-xs:   12px; --co-lh-xs:   16px;
    --co-text-sm:   13px; --co-lh-sm:   20px;
    --co-text-md:   14px; --co-lh-md:   21px;
    --co-text-base: 16px; --co-lh-base: 24px;
    --co-text-lg:   17px; --co-lh-lg:   24px;
    --co-text-xl:   21px; --co-lh-xl:   28px;
  }
}
