/* kinpaku-tokens.css - the Impeccable "Neo Kinpaku" token set, transcribed from
   01_Plugins/_source/impeccable/DESIGN.md. Values are OKLCH per the OKLCH-Only Rule.

   Dark lacquer is the canonical system. The light block below is an ADAPTATION, not a second
   brand: the ground stays a cool neutral (never beige, paper, or cream, per the Do Not list), and
   the gold ramp is deepened to kinpaku-deep so gold-on-light still clears WCAG AA for text. The
   accent hues are unchanged; only their lightness moves, which is what keeps the two themes
   recognisably the same object.

   Fonts are declared as stacks with no webfont fetch. The dashboard is behind a passkey gate on a
   private origin and must work with zero third-party requests, so Alumni Sans / Albert Sans render
   when present on the machine and fall back to the system geometric sans otherwise. */

:root {
  /* Brand anchors */
  --ks-kinpaku: oklch(84% 0.19 80.46);
  --ks-patina: oklch(70% 0.12 188);

  /* Surfaces */
  --ks-lacquer: oklch(7% 0.006 95);
  --ks-lacquer-deep: oklch(4% 0.004 95);
  --ks-raised: oklch(11% 0.006 95);
  --ks-graphite: oklch(15% 0.008 95);
  --ks-graphite-2: oklch(19% 0.008 95);

  /* Text */
  --ks-champagne: oklch(91% 0 0);
  --ks-text: oklch(88% 0 0);
  --ks-text-muted: oklch(72% 0 0);
  --ks-text-faint: oklch(62% 0 0);
  --ks-text-disabled: oklch(52% 0 0);

  /* Gold ramp */
  --ks-kinpaku-pale: oklch(86% 0.07 84);
  --ks-kinpaku-rich: oklch(77% 0.13 82);
  --ks-kinpaku-deep: oklch(61% 0.085 78);
  --ks-rule: oklch(78% 0 0 / 0.16);
  --ks-rule-strong: oklch(74% 0.09 82 / 0.6);

  /* Patina ramp */
  --ks-patina-pale: oklch(82% 0.07 188);
  --ks-patina-deep: oklch(49% 0.08 188);

  /* State. Vermilion is the warning colour and is used sparingly, per the Texture Budget and
     colour rules. In this dashboard it is reserved for the kill region and hard errors. */
  --ks-vermilion: oklch(58% 0.15 35);
  --ks-vermilion-pale: oklch(70% 0.16 35);

  /* Radii */
  --ks-r-xs: 2px;
  --ks-r-sm: 4px;
  --ks-r-md: 6px;
  --ks-r-lg: 8px;

  /* Spacing */
  --ks-s-xs: 8px;
  --ks-s-sm: 16px;
  --ks-s-md: 24px;
  --ks-s-lg: 32px;
  --ks-s-xl: 48px;
  --ks-s-2xl: 80px;

  /* Type */
  --ks-font-display: "Alumni Sans Pinstripe", "Albert Sans", Arial, sans-serif;
  --ks-font-wordmark: "Alumni Sans", "Albert Sans", Arial, sans-serif;
  --ks-font-body: "Albert Sans", "Avenir Next", "Helvetica Neue", Arial, system-ui, sans-serif;
  --ks-font-mono: SFMono-Regular, "Roboto Mono", Consolas, monospace;

  --ks-type-body-size: 1.02rem;
  --ks-type-body-line: 1.8;
  --ks-type-title-size: 1.18rem;
  --ks-type-eyebrow-size: 0.7rem;
  --ks-type-mono-size: 0.72rem;

  --ks-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Semantic aliases. Components below reference these, so the light adaptation only has to
     restate the aliases rather than every component rule. */
  --page-bg: var(--ks-lacquer);
  --panel-bg: var(--ks-raised);
  --inset-bg: var(--ks-lacquer-deep);
  --field-bg: var(--ks-graphite);
  --text: var(--ks-text);
  --text-strong: var(--ks-champagne);
  --text-muted: var(--ks-text-muted);
  --accent: var(--ks-kinpaku);
  --accent-ink: var(--ks-lacquer-deep);
  --accent-2: var(--ks-patina);
  --danger: var(--ks-vermilion-pale);
  --rule: var(--ks-rule);
  --rule-strong: var(--ks-rule-strong);
}

@media (prefers-color-scheme: light) {
  :root {
    --page-bg: oklch(96% 0.002 95);
    --panel-bg: oklch(99% 0.001 95);
    --inset-bg: oklch(93% 0.003 95);
    --field-bg: oklch(99% 0.001 95);
    --text: oklch(28% 0 0);
    --text-strong: oklch(16% 0 0);
    --text-muted: oklch(42% 0 0);
    /* Deepened so gold-as-text clears AA on a light ground. The hue is unchanged. */
    --accent: oklch(48% 0.105 78);
    --accent-ink: oklch(99% 0 0);
    --accent-2: oklch(44% 0.09 188);
    --danger: oklch(46% 0.16 30);
    --rule: oklch(30% 0 0 / 0.2);
    --rule-strong: oklch(48% 0.105 78 / 0.6);
  }
}
