/* Lowki design tokens. Import once; style components through these variables only.
   Light is the default; dark follows prefers-color-scheme unless data-theme forces one. */
:root {
  /* Brand */
  --lk-lime: #B5F23D;          /* action, brand mark, focus on dark */
  --lk-lime-hover: #A2E024;
  --lk-lime-press: #8FCB16;
  --lk-on-lime: #0F1B0D;       /* text and icons on lime; never put lime text on light surfaces */
  --lk-lauki: #C9DCA6;         /* bottle-gourd skin: soft brand tint, leaf */
  --lk-lauki-soft: #E4EDCF;
  --lk-flesh: #F1F5E4;         /* gourd flesh: quiet tinted surface */
  --lk-ink: #0F1B0D;           /* deep green-black */

  /* Surfaces and text */
  --lk-bg: #F6F8EF;
  --lk-surface: #FFFFFF;
  --lk-surface-2: #F1F5E4;
  --lk-line: #DCE4CB;
  --lk-line-strong: #C3CFAE;
  --lk-text: #0F1B0D;
  --lk-text-muted: #5C6A52;
  --lk-text-faint: #8A9680;
  --lk-accent-text: #3F6B12;   /* links and accents on light surfaces (5.8:1 on bg) */
  --lk-focus: #3F6B12;

  /* Private (shielded) state: always reads as "sealed" */
  --lk-private-bg: #0F1B0D;
  --lk-private-fg: #B5F23D;
  --lk-private-text: #E8EFDD;  /* body text on the private surface (both themes) */
  --lk-private-muted: #9AA88E;
  --lk-private-line: #2E3F25;

  /* Semantic (separate from the brand accent) */
  --lk-danger: #C8402F;
  --lk-danger-soft: #FBE7E3;
  --lk-warning: #A56A12;
  --lk-warning-soft: #FBF0D9;
  --lk-success: #2F7A3A;

  /* Type */
  --lk-font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --lk-font-text: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --lk-font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --lk-text-xs: 0.75rem;   /* 12 captions, meta */
  --lk-text-sm: 0.875rem;  /* 14 secondary, labels */
  --lk-text-md: 1rem;      /* 16 body, buttons */
  --lk-text-lg: 1.25rem;   /* 20 sheet titles */
  --lk-text-xl: 1.75rem;   /* 28 balances */
  --lk-text-2xl: 2.5rem;   /* 40 hero numbers */
  --lk-leading: 1.5;
  --lk-tracking-label: 0.06em;

  /* Space (4px base) */
  --lk-space-1: 4px;  --lk-space-2: 8px;  --lk-space-3: 12px; --lk-space-4: 16px;
  --lk-space-5: 20px; --lk-space-6: 24px; --lk-space-8: 32px; --lk-space-10: 40px; --lk-space-14: 56px;

  /* Shape: soft but not bubbly; pills echo the gourd neck */
  --lk-radius-sm: 8px;
  --lk-radius-md: 12px;    /* buttons, inputs */
  --lk-radius-lg: 20px;    /* sheets, cards */
  --lk-radius-pill: 999px; /* chips, status, address */
  --lk-border: 1px solid var(--lk-line);

  /* Elevation: green-tinted, low */
  --lk-shadow-1: 0 1px 2px rgb(15 27 13 / 0.06), 0 1px 1px rgb(15 27 13 / 0.04);
  --lk-shadow-sheet: 0 24px 48px -16px rgb(15 27 13 / 0.22), 0 2px 6px rgb(15 27 13 / 0.08);

  /* Motion: calm, never bouncy */
  --lk-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --lk-dur-fast: 120ms;
  --lk-dur: 200ms;
  --lk-dur-slow: 320ms;

  /* Layout */
  --lk-sheet-width: 400px;
  --lk-tap: 44px;           /* minimum touch target */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lk-lime-hover: #C4F75E;
    --lk-lime-press: #D2FA7F;
    --lk-lauki: #3B4A2C;
    --lk-lauki-soft: #263220;
    --lk-flesh: #172214;
    --lk-bg: #0A1109;
    --lk-surface: #111A0F;
    --lk-surface-2: #172214;
    --lk-line: #26331F;
    --lk-line-strong: #34442B;
    --lk-text: #E8EFDD;
    --lk-text-muted: #9AA88E;
    --lk-text-faint: #6F7C66;
    --lk-accent-text: #B5F23D;
    --lk-focus: #B5F23D;
    --lk-private-bg: #1D2A17;
    --lk-private-fg: #B5F23D;
    --lk-danger: #F07163;
    --lk-danger-soft: #3A1915;
    --lk-warning: #E8B04B;
    --lk-warning-soft: #33280F;
    --lk-success: #6FCF7F;
    --lk-shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --lk-shadow-sheet: 0 24px 48px -16px rgb(0 0 0 / 0.6), 0 0 0 1px #26331F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --lk-lime-hover: #C4F75E;
  --lk-lime-press: #D2FA7F;
  --lk-lauki: #3B4A2C;
  --lk-lauki-soft: #263220;
  --lk-flesh: #172214;
  --lk-bg: #0A1109;
  --lk-surface: #111A0F;
  --lk-surface-2: #172214;
  --lk-line: #26331F;
  --lk-line-strong: #34442B;
  --lk-text: #E8EFDD;
  --lk-text-muted: #9AA88E;
  --lk-text-faint: #6F7C66;
  --lk-accent-text: #B5F23D;
  --lk-focus: #B5F23D;
  --lk-private-bg: #1D2A17;
  --lk-private-fg: #B5F23D;
  --lk-danger: #F07163;
  --lk-danger-soft: #3A1915;
  --lk-warning: #E8B04B;
  --lk-warning-soft: #33280F;
  --lk-success: #6FCF7F;
  --lk-shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
  --lk-shadow-sheet: 0 24px 48px -16px rgb(0 0 0 / 0.6), 0 0 0 1px #26331F;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root { --lk-dur-fast: 0ms; --lk-dur: 0ms; --lk-dur-slow: 0ms; }
}
