/* LimoDoc login theme - design tokens (Phase-31/Welle-c/Task-39).
 * The theme's own token set: the handover's --ld-* / --ct-* names (Citrin v7) with values from Peridot v2
 * (design-input/design-system/v2/project/tokens.json). This file is the ONLY place in the theme that holds colour,
 * type-size, radius and shadow literals; login.css, components.css, signin.css and status.css read var(--...) only.
 * Each line names its Peridot counterpart; "snap" = the handover value replaced by the Peridot role value;
 * "no counterpart" = kept from the handover, listed in the design record (KEYCLOAK-LOGIN-THEME-DESIGN-RECORD.md § Tokens).
 * Dark mode follows prefers-color-scheme (no class toggle). deploy/twin/landing/tokens.css is a byte copy. */

:root {
  color-scheme: light dark;
  --ct-cap: #a5bd32; /* L = lime-400; D = lime-400 / fg-accent / chip-lime-fg */
  --ct-cap-glow: rgba(165, 189, 50, 0.3); /* L = lime-point-glow; D = lime-point-glow */
  --ct-cap-w: 56px;
  --ct-card-border: #e2e5f0; /* L snap #e0e2ec -> border-default #e2e5f0; D snap rgba(165, 180, 252, 0.16) -> border-default #222845 */
  --ct-card-fill: #ffffff; /* L snap #fbfbff -> bg-sheet #ffffff; D snap #0c0e20 -> bg-sheet #10132a */
  --ct-card-highlight: rgba(255, 255, 255, 1); /* L = surface-0 / bg-sheet / bg-raised; D no counterpart (decorative top highlight of the card (dark); no Peridot role) */
  --ct-card-pad: 20px;
  --ct-card-sheen: rgba(255, 255, 255, 1); /* L = surface-0 / bg-sheet / bg-raised; D no counterpart (decorative top sheen of the card (dark); no Peridot role) */
  --ct-card-w: 464px; /* auth-card-width 464 */
  --ct-chip-bg: #f4fbe0; /* L = lime-50 / chip-lime-bg; D = chip-lime-bg */
  --ct-chip-border: rgba(144, 166, 33, 0.3); /* L = chip-lime-border; D = chip-lime-border */
  --ct-chip-ink: #5b6c0a; /* L = lime-700 / chip-lime-fg; D = lime-400 / fg-accent / chip-lime-fg */
  --ct-chip-shadow: 0 1px 2px rgba(30, 27, 75, 0.06); /* snap -> shadow-1 (handover: light 0 1px 2px rgba(30, 27, 75, 0.05); dark none) */
  --ct-dur-card: 250ms; /* duration-slow */
  --ct-dur-content: 150ms; /* duration-fast */
  --ct-ease: cubic-bezier(0.2, 0, 0, 1); /* ease-standard */
  --ct-elev-1: 0 1px 2px rgba(30, 27, 75, 0.06); /* shadow-1 */
  --ct-elev-2: 0 1px 2px rgba(30, 27, 75, 0.08), 0 8px 24px -8px rgba(30, 27, 75, 0.14); /* shadow-2 */
  --ct-elev-3: 0 1px 2px rgba(30, 27, 75, 0.05), 0 8px 24px -8px rgba(30, 27, 75, 0.1), 0 32px 64px -24px rgba(30, 27, 75, 0.2); /* shadow-3 */
  --ct-focus-glow: rgba(79, 70, 229, 0.12); /* L no counterpart (soft halo beside the 2 px focus ring; Peridot names the ring only); D no counterpart (soft halo beside the 2 px focus ring; Peridot names the ring only) */
  --ct-grid: rgba(79, 70, 229, 0.05); /* L no counterpart (5 % indigo grid on the ground; decoration); D no counterpart (5 % indigo grid on the ground; decoration) */
  --ct-ground-a: #f5f8ef; /* L = bg-ground; D = surface-950 / bg-ground / bg-control */
  --ct-ground-b: #f1f2f8; /* L = bg-ground-end; D = bg-ground-end */
  --ct-ink: #0f172a; /* L = surface-900 / fg-default; D = surface-100 / fg-default */
  --ct-ink-2: #334155; /* L = surface-700 / fg-secondary; D = surface-200 / fg-secondary */
  --ct-ink-muted: #526178; /* L snap #475569 -> fg-muted #526178; D = surface-300 / neutral-on-subtle */
  --ct-lamp: rgba(234, 245, 196, 0.4); /* L no counterpart (soft lime light on the ground; decoration); D no counterpart (soft lime light on the ground; decoration) */
  --ct-lamp-2: rgba(244, 251, 224, 0.22); /* L no counterpart (soft lime light on the ground; decoration); D no counterpart (soft lime light on the ground; decoration) */
  --ct-light: rgba(199, 210, 254, 0.3); /* L no counterpart (soft indigo light on the ground; decoration); D no counterpart (soft indigo light on the ground; decoration) */
  --ct-light-2: rgba(255, 255, 255, 0.75); /* L no counterpart (soft light on the ground; decoration); D no counterpart (soft light on the ground; decoration) */
  --ct-lime-100: #eaf5c4; /* L = lime-100; D = lime-100 */
  --ct-lime-200: #d7e893; /* L = lime-200; D = lime-200 */
  --ct-lime-300: #bed456; /* L = lime-300 / mark-bloom; D = lime-300 / mark-bloom */
  --ct-lime-400: #a5bd32; /* L = lime-400; D = lime-400 / fg-accent / chip-lime-fg */
  --ct-lime-50: #f4fbe0; /* L = lime-50 / chip-lime-bg; D = lime-50 */
  --ct-lime-500: #90a621; /* L = lime-500; D = lime-500 */
  --ct-lime-600: #7e9210; /* L = lime-600; D = lime-600 */
  --ct-lime-650: #5f780c; /* L = lime-650 / fg-accent; D = lime-650 */
  --ct-lime-700: #5b6c0a; /* L = lime-700 / chip-lime-fg; D = lime-700 */
  --ct-lime-800: #4b5907; /* L = lime-800; D = lime-800 */
  --ct-lime-900: #3d4900; /* L = lime-900; D = lime-900 */
  --ct-pill-bg: #ffffff; /* L = surface-0 / bg-sheet / bg-raised; D snap #0e1127 -> bg-sheet #10132a */
  --ct-pill-border: #e2e5f0; /* L snap #e0e2ec -> border-default #e2e5f0; D snap rgba(165, 180, 252, 0.18) -> border-default #222845 */
  --ct-pill-current: #eef2ff; /* L = indigo-50 / bg-selected / primary-soft; D snap rgba(129, 140, 248, 0.18) -> bg-selected #1c2048 */
  --ct-pill-current-ink: #3730a3; /* L = indigo-800 / primary-active; D = indigo-100 */
  --ct-r-cap: 2px; /* radius-cap */
  --ct-r-card: 20px; /* radius-xl */
  --ct-r-card-sm: 14px; /* radius-lg */
  --ct-rule: #e2e5f0; /* L snap #e0e3ea -> border-default #e2e5f0; D snap rgba(165, 180, 252, 0.14) -> border-default #222845 */
  --ld-accent-text: #5f780c; /* L = lime-650 / fg-accent; D = lime-400 / fg-accent / chip-lime-fg */
  --ld-border: #e2e5f0; /* L = surface-200 / border-default / neutral-border; D = surface-700 / border-default / neutral-border */
  --ld-border-strong: #cbd2e1; /* L = surface-300 / border-strong; D = surface-600 / border-strong */
  --ld-brand-mark-bg: #4f46e5; /* L = indigo-600 / fg-link / focus-ring; D = indigo-600 / mark-tile */
  --ld-brand-mark-fg: #ffffff; /* L = surface-0 / bg-sheet / bg-raised; D = surface-0 / mark-sheet / neutral-on-solid */
  --ld-btn-h: 48px; /* control-lg 48 */
  --ld-btn-shadow: 0 1px 2px rgba(30, 27, 75, 0.16), 0 8px 20px -10px rgba(79, 70, 229, 0.55); /* shadow-button */
  --ld-control-bg: #ffffff; /* L = surface-0 / bg-sheet / bg-raised; D snap #070918 -> bg-control #080b21 */
  --ld-control-bg-readonly: #f1f3f9; /* L = bg-readonly; D = bg-readonly */
  --ld-control-border: #64748b; /* L = surface-500 / border-control / neutral-solid; D = surface-500 / fg-disabled / border-control */
  --ld-control-border-hover: #526178; /* L snap #475569 -> border-control-hover #526178; D snap #94a3b8 -> border-control-hover #9aa8bd */
  --ld-control-border-w: 1px;
  --ld-control-h: 48px; /* control-lg 48 */
  --ld-control-px: 14px;
  --ld-control-shadow: 0 1px 2px rgba(30, 27, 75, 0.06); /* snap -> shadow-1 (handover: light 0 1px 2px rgba(30, 27, 75, 0.06); dark none) */
  --ld-danger: #dc2626; /* L = border-invalid; D = chart-4 / danger-solid */
  --ld-danger-border: #fecaca; /* L = danger-border; D snap rgba(248, 113, 113, 0.35) -> danger-border rgba(185, 28, 28, 0.36) */
  --ld-danger-soft: #fee2e2; /* L snap #fef2f2 -> danger-subtle #fee2e2; D snap rgba(248, 113, 113, 0.12) -> danger-subtle rgba(239, 68, 68, 0.16) */
  --ld-danger-text: #b91c1c; /* L = fg-danger / danger-solid; D = fg-danger / border-invalid / danger-on-subtle */
  --ld-dur: 200ms; /* duration-base */
  --ld-dur-fast: 120ms;
  --ld-dur-slow: 320ms;
  --ld-ease: cubic-bezier(0.2, 0, 0, 1); /* ease-standard */
  --ld-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ld-field-gap: 20px;
  --ld-focus: #4f46e5; /* L = indigo-600 / fg-link / focus-ring; D = indigo-400 / focus-ring / focus-ring-on-scrim */
  --ld-focus-offset: 2px;
  --ld-focus-width: 2px;
  --ld-font: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --ld-font-display: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --ld-font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  --ld-heading: #0b1022; /* L = surface-950 / fg-heading; D = surface-50 / fg-heading */
  --ld-icon-size: 20px;
  --ld-icon-stroke: 1.75;
  --ld-info: #4f46e5; /* L = indigo-600 / fg-link / focus-ring; D = indigo-400 / focus-ring / focus-ring-on-scrim */
  --ld-info-border: #c7d2fe; /* L = indigo-200 / primary-soft-border / mark-soft; D snap rgba(129, 140, 248, 0.35) -> primary-soft-border rgba(165, 180, 252, 0.42) */
  --ld-info-soft: #eef2ff; /* L = indigo-50 / bg-selected / primary-soft; D = primary-soft */
  --ld-info-text: #3730a3; /* L = indigo-800 / primary-active; D = indigo-200 / fg-link-hover / primary-active */
  --ld-input-size: 16px; /* body-lg 16 */
  --ld-label-size: 14px; /* label 14 */
  --ld-lead-color: #64748b; /* L = surface-500 / border-control / neutral-solid; D snap #8796ad -> fg-muted #9aa8bd */
  --ld-lead-pad: 44px;
  --ld-lead-size: 15.5px; /* auth-lead 15.5 */
  --ld-lead-x: 14px;
  --ld-leading: 1.55;
  --ld-leading-tight: 1.2;
  --ld-link: #4f46e5; /* L = indigo-600 / fg-link / focus-ring; D = indigo-300 / fg-link / primary-hover */
  --ld-link-hover: #4338ca; /* L = indigo-700 / fg-link-hover / primary-hover; D = indigo-200 / fg-link-hover / primary-active */
  --ld-on-primary: #ffffff; /* L = surface-0 / bg-sheet / bg-raised; D snap #0f172a -> fg-on-primary #10132a */
  --ld-otp-cell-h: 56px;
  --ld-otp-digit-size: 24px; /* title-lg 24 */
  --ld-otp-gap: 8px;
  --ld-otp-group-gap: 10px;
  --ld-otp-max-w: 380px;
  --ld-page-bg: #f5f8ef; /* L = bg-ground; D = surface-950 / bg-ground / bg-control */
  --ld-primary: #4f46e5; /* L = indigo-600 / fg-link / focus-ring; D = indigo-400 / focus-ring / focus-ring-on-scrim */
  --ld-primary-active: #3730a3; /* L = indigo-800 / primary-active; D = indigo-200 / fg-link-hover / primary-active */
  --ld-primary-hover: #4338ca; /* L = indigo-700 / fg-link-hover / primary-hover; D = indigo-300 / fg-link / primary-hover */
  --ld-primary-soft: #eef2ff; /* L = indigo-50 / bg-selected / primary-soft; D = primary-soft */
  --ld-primary-text: #4338ca; /* L = indigo-700 / fg-link-hover / primary-hover; D = indigo-300 / fg-link / primary-hover */
  --ld-qr-bg: #ffffff; /* L = surface-0 / bg-sheet / bg-raised; D = surface-0 / mark-sheet / neutral-on-solid */
  --ld-qr-fg: #0f172a; /* L = surface-900 / fg-default; D no counterpart (fixed QR ink in both schemes (= surface-900 light)) */
  --ld-radius-card: 20px; /* radius-xl */
  --ld-radius-control: 10px; /* radius-md */
  --ld-radius-lg: 14px; /* radius-lg */
  --ld-radius-md: 10px; /* radius-md */
  --ld-radius-pill: 9999px; /* snap 999px -> 9999px (radius-pill) */
  --ld-radius-sm: 6px; /* radius-sm */
  --ld-shadow-card: 0 1px 2px rgba(30, 27, 75, 0.05), 0 8px 24px -8px rgba(30, 27, 75, 0.1), 0 32px 64px -24px rgba(30, 27, 75, 0.2); /* snap -> shadow-3 (handover: light 0 1px 2px rgba(30, 27, 75, 0.06); dark none) */
  --ld-shadow-sm: 0 1px 2px rgba(30, 27, 75, 0.06); /* snap -> shadow-1 (handover: light 0 1px 2px rgba(15, 23, 42, 0.06); dark 0 1px 2px rgba(0, 0, 0, 0.4)) */
  --ld-space-1: 4px;
  --ld-space-10: 64px;
  --ld-space-2: 8px;
  --ld-space-3: 12px;
  --ld-space-4: 16px;
  --ld-space-5: 20px;
  --ld-space-6: 24px;
  --ld-space-7: 32px;
  --ld-space-8: 40px;
  --ld-space-9: 48px;
  --ld-stack-gap: 24px;
  --ld-strength-fair: #b45309; /* L = chart-3 / warn-solid; D = chart-3 / warn-solid */
  --ld-strength-good: #16a34a; /* L no counterpart (password-strength segment (Task 40); no Peridot role); D = chart-2 / success-solid */
  --ld-strength-strong: #15803d; /* L = chart-2 / success-solid; D = chart-2 / success-solid */
  --ld-strength-weak: #dc2626; /* L = border-invalid; D = chart-4 / danger-solid */
  --ld-subtitle-size: 16px; /* title-sm 16 */
  --ld-success: #15803d; /* L = chart-2 / success-solid; D = chart-2 / success-solid */
  --ld-success-border: #bbf7d0; /* L = success-border; D snap rgba(74, 222, 128, 0.3) -> success-border rgba(21, 128, 61, 0.36) */
  --ld-success-soft: #dcfce7; /* L snap #f0fdf4 -> success-subtle #dcfce7; D snap rgba(74, 222, 128, 0.12) -> success-subtle rgba(34, 197, 94, 0.16) */
  --ld-success-text: #15803d; /* L = chart-2 / success-solid; D = success-on-subtle */
  --ld-surface: #ffffff; /* L = surface-0 / bg-sheet / bg-raised; D = surface-900 / bg-sheet / fg-on-primary */
  --ld-surface-2: #f6f7fb; /* L snap #f4f5fb -> bg-subtle #f6f7fb; D = bg-readonly */
  --ld-text: #0f172a; /* L = surface-900 / fg-default; D = surface-100 / fg-default */
  --ld-text-muted: #526178; /* L = surface-600 / fg-muted / border-control-hover; D = surface-400 / fg-muted / border-control-hover */
  --ld-text-size: 14px; /* snap 15px -> 14px (body) */
  --ld-text-sm: 14px; /* body / label 14 */
  --ld-text-xs: 14px; /* body / label 14 (equals the prototype; see REC) */
  --ld-title-size: clamp(26px, 20px + 1.2cqi, 32px); /* auth-title 32 (clamp from 26) */
  --ld-track: #e2e5f0; /* L snap #e2e6f1 -> border-default #e2e5f0; D snap #272d4b -> border-default #222845 */
  --ld-tracking-title: -0.025em;
  --ld-warning: #b45309; /* L = chart-3 / warn-solid; D = chart-3 / warn-solid */
  --ld-warning-border: #fde68a; /* L = warn-border; D snap rgba(251, 191, 36, 0.3) -> warn-border rgba(180, 83, 9, 0.36) */
  --ld-warning-soft: #fef3c7; /* L snap #fffbeb -> warn-subtle #fef3c7; D snap rgba(251, 191, 36, 0.12) -> warn-subtle rgba(245, 158, 11, 0.16) */
  --ld-warning-text: #92400e; /* L = warn-on-subtle; D = warn-on-subtle */
  --ld-weight-medium: 500;
  --ld-weight-regular: 400;
  --ld-weight-semibold: 600;
  --ld-weight-title: 600; /* title weight 600 */
  --ld-text-caption: 12px; /* caption 12 (footer; prototype 13 px - Peridot has 13 px only as mono, never for prose) */
  --ld-radius-xs: 4px; /* radius-xs (link hit-box rounding; prototype 3 px) */
  --ct-r-chip: 10px; /* radius-md (fact chip; prototype 9 / 8 px) */
  --ct-word-size: 18px; /* the wordmark at every width: Peridot BrandMark README:13 "18 px in the sidebar", on the design bar's scale 12/14/16/18/20/24/32 (design-bar-phase-31.md:111); tokens.json names no wordmark style (cto 2026-10-22, 1a/1b) */
  --ct-word-weight: 650;
  --ct-word-tracking: -0.022em;
  --ct-card-shadow: inset 0 1px 0 var(--ct-card-highlight), var(--ld-shadow-card); /* card: highlight + shadow-3 (prototype: highlight + --ct-elev-3, identical) */
  --ct-cap-shadow: 0 1px 6px var(--ct-cap-glow); /* lime-point-glow (tokens.json:532 "Soft glow under the lime cap") on the approved sign-in geometry (cto 2026-10-22, 1d) */
  --ct-focus-halo: 0 0 0 6px var(--ct-focus-glow); /* decorative ring beside the 2 px focus outline, which is the indicator (cto 2026-10-22, 1e) */
  --ct-pill-shadow: inset 0 0 0 1px var(--ct-pill-border), var(--ct-elev-1); /* pill outline + shadow-1 */
  --ct-pill-current-shadow: inset 0 0 0 1px var(--ld-primary); /* selected option outline in primary (indigo-600 / indigo-400), >= 3:1 for 9.1.4.11 */
  --ct-chip-ring: inset 0 0 0 1px var(--ct-chip-border), var(--ct-chip-shadow); /* chip outline + shadow-1 */
  --ld-invalid-ring: inset 0 0 0 1px var(--ld-danger); /* invalid control: a second pixel of the danger border */
  --ct-grid-mask: #000000; /* no counterpart: mask alpha of the ground grid (not a painted colour) */
  --ct-grid-mask-mid: rgba(0, 0, 0, 0.4); /* no counterpart: mask alpha of the ground grid (not a painted colour) */
  --ct-mark-halo: #a5b4fc; /* L = D = indigo-300: the dark hairline around the mark tile (tokens.json:492; BrandMark README:16); drawn in dark only */
  --ct-mark-filter: none; /* light: no effect on the mark (BrandMark README:10 "never add effects"; cto 2026-10-22, 1c) */
}

@media (prefers-color-scheme: dark) {
  :root {
    --ct-cap-glow: rgba(165, 189, 50, 0.32);
    --ct-card-border: #222845;
    --ct-card-fill: #10132a;
    --ct-card-highlight: rgba(199, 210, 254, 0.08);
    --ct-card-sheen: rgba(199, 210, 254, 0.05);
    --ct-chip-bg: rgba(165, 189, 50, 0.12);
    --ct-chip-border: rgba(165, 189, 50, 0.22);
    --ct-chip-ink: #a5bd32;
    --ct-chip-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --ct-elev-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --ct-elev-2: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px -8px rgba(0, 0, 0, 0.55);
    --ct-elev-3: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px -8px rgba(0, 0, 0, 0.5), 0 32px 64px -24px rgba(0, 0, 0, 0.75);
    --ct-focus-glow: rgba(129, 140, 248, 0.2);
    --ct-grid: rgba(165, 180, 252, 0.045);
    --ct-ground-a: #080b21;
    --ct-ground-b: #0d1017;
    --ct-ink: #f1f5f9;
    --ct-ink-2: #d5dbea;
    --ct-ink-muted: #b4bfdc;
    --ct-lamp: rgba(165, 189, 50, 0.1);
    --ct-lamp-2: rgba(165, 189, 50, 0.035);
    --ct-light: rgba(79, 70, 229, 0.12);
    --ct-light-2: rgba(99, 102, 241, 0.06);
    --ct-pill-bg: #10132a;
    --ct-pill-border: #222845;
    --ct-pill-current: #1c2048;
    --ct-pill-current-ink: #e0e7ff;
    --ct-rule: #222845;
    --ld-accent-text: #a5bd32;
    --ld-border: #222845;
    --ld-border-strong: #353c60;
    --ld-btn-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 20px -10px rgba(129, 140, 248, 0.45);
    --ld-control-bg: #080b21;
    --ld-control-bg-readonly: #12152d;
    --ld-control-border-hover: #9aa8bd;
    --ld-control-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --ld-danger: #f87171;
    --ld-danger-border: rgba(185, 28, 28, 0.36);
    --ld-danger-soft: rgba(239, 68, 68, 0.16);
    --ld-danger-text: #fca5a5;
    --ld-focus: #818cf8;
    --ld-heading: #f8fafc;
    --ld-info: #818cf8;
    --ld-info-border: rgba(165, 180, 252, 0.42);
    --ld-info-soft: rgba(129, 140, 248, 0.14);
    --ld-info-text: #c7d2fe;
    --ld-lead-color: #9aa8bd;
    --ld-link: #a5b4fc;
    --ld-link-hover: #c7d2fe;
    --ld-on-primary: #10132a;
    --ld-page-bg: #080b21;
    --ld-primary: #818cf8;
    --ld-primary-active: #c7d2fe;
    --ld-primary-hover: #a5b4fc;
    --ld-primary-soft: rgba(129, 140, 248, 0.14);
    --ld-primary-text: #a5b4fc;
    --ld-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px -8px rgba(0, 0, 0, 0.5), 0 32px 64px -24px rgba(0, 0, 0, 0.75);
    --ld-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --ld-strength-fair: #fbbf24;
    --ld-strength-good: #4ade80;
    --ld-strength-strong: #4ade80;
    --ld-strength-weak: #f87171;
    --ld-success: #4ade80;
    --ld-success-border: rgba(21, 128, 61, 0.36);
    --ld-success-soft: rgba(34, 197, 94, 0.16);
    --ld-success-text: #86efac;
    --ld-surface: #10132a;
    --ld-surface-2: #12152d;
    --ld-text: #f1f5f9;
    --ld-text-muted: #9aa8bd;
    --ld-track: #222845;
    --ld-warning: #fbbf24;
    --ld-warning-border: rgba(180, 83, 9, 0.36);
    --ld-warning-soft: rgba(245, 158, 11, 0.16);
    --ld-warning-text: #fcd34d;
    --ct-mark-filter: drop-shadow(0 0 0.5px var(--ct-mark-halo));
  }
}
