/*
 * Design tokens, copied from docs/design/Tokens.dc.html.
 *
 * Every colour, font, radius and control height of the site lives here and
 * nowhere else: components only ever reference `var(--...)`, so repainting the
 * product is an edit to this one file. Light is the base palette; the dark
 * block below is selected by the explicit theme preference, initialized before paint.
 */

:root {
  color-scheme: light;
  /* Palette (light) */
  --color-bg: #f6f5f2;
  --color-surface: #ffffff;
  --color-header-fill: #f0eee9;
  --color-border: #e3e0da;
  --color-border-strong: #cfcbc3;
  --color-muted: #6f6c66;
  --color-text: #1f1e1b;
  --color-accent: #1ea47c;
  --color-accent-hover: #018563;
  /* Filled landing controls: enough contrast for their white text. */
  --color-landing-button: #168263;
  --color-landing-button-hover: #126e53;
  --color-on-accent: #ffffff;
  /* The accent as a fill: the selected tab of the PDF page strip. */
  --color-accent-tint: #e2f3ee;
  /* The fill of a selected range of cells in the editor's grid. */
  --color-range-fill: #e2f3ee;
  --color-suspicious: #c98b1a;
  --color-danger: #b3261e;

  /* Derived surfaces used by the editor artboard */
  --color-image-bg: #ebe9e4;
  --color-splitter-grip: #b9b2a5;
  --color-notice-bg: #fbf1dc;
  --color-notice-text: #7a5410;
  /* The amber pill of Auth.dc.html is the one notice with a border of its own. */
  --color-notice-border: #f1d9a3;
  /* The focus ring of the account inputs: the accent at 15 %. */
  --color-focus-ring: rgba(1, 133, 99, 0.15);
  --color-gutter-active: #e3e0da;
  --color-overlay: rgba(31, 30, 27, 0.32);
  --color-scrim: rgba(255, 255, 255, 0.88);
  --color-skeleton: #eceae5;

  --shadow-floating: 0 8px 24px rgba(31, 30, 27, 0.12), 0 1px 2px rgba(31, 30, 27, 0.06);
  --shadow-hairline: 0 1px 2px rgba(31, 30, 27, 0.06);
  --shadow-card: 0 12px 40px rgba(31, 30, 27, 0.12);

  /* Type */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --text-cell: 400 13px/1.35 var(--font-mono);
  --text-body: 400 13px/1.5 var(--font-sans);
  --text-label: 500 14px/1.4 var(--font-sans);
  --text-control: 500 13px/1 var(--font-sans);
  --text-small: 400 12px/1.5 var(--font-sans);
  --text-gutter: 500 11px/1 var(--font-sans);

  /* Shape */
  --radius: 8px;
  --radius-small: 6px;
  --radius-large: 12px;
  --radius-pill: 999px;
  --control-height: 32px;
  --cta-height: 44px;
  --header-height: 48px;
  --footer-height: 36px;
  --cell-height: 32px;
  --cell-padding: 10px;
  --gutter-width: 40px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --color-bg: #16171a;
    --color-surface: #1e2024;
    --color-header-fill: #24272c;
    --color-border: #2c2f35;
    /* The token sheet has no dark "border strong"; one step above border. */
    --color-border-strong: #3a3e45;
    --color-muted: #9b998f;
    --color-text: #ecebe7;
    --color-accent: #44bf96;
    --color-accent-hover: #75d4b0;
    --color-landing-button: var(--color-accent);
    --color-landing-button-hover: var(--color-accent-hover);
    --color-on-accent: #16171a;
    --color-accent-tint: #1b2826;
    /* The accent at 18 % over the surface: the tint alone is 3 points of
       lightness off the cells and a range all but disappears in it. */
    --color-range-fill: #253d38;
    --color-suspicious: #e0a63a;
    --color-danger: #e5534b;

    --color-image-bg: #101114;
    --color-splitter-grip: #4a4e55;
    --color-notice-bg: #302818;
    --color-notice-text: #e0a63a;
    --color-notice-border: #4a3d22;
    --color-focus-ring: rgba(68, 191, 150, 0.22);
    --color-gutter-active: #3a3e45;
    --color-overlay: rgba(0, 0, 0, 0.55);
    --color-scrim: rgba(22, 23, 26, 0.88);
    --color-skeleton: #24272c;

    --shadow-floating: 0 8px 24px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-hairline: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.45);
}
