/* Fillo design system v3 · tokens (the one source)
   Direction: Blend A, 3 Nov 2026. White, air, bold geometric sans, black pills, lime only where
   something is filled, frosted glass as a floating layer, one data line, one hand-drawn mark.
   Namespace --f-, cascade layers as in v2 so the app's own unlayered CSS always wins.
   Night = the app's dark home: data-theme="night" on <html> or .f-night on any element.
   Every number follows RULES.md: 4/8 px scale, proximity tiers, 44 px targets, 4 px line heights. */
@layer f.tokens, f.base, f.components, f.motion;

@layer f.tokens {
:root {
  /* @group space  4 px base, 8 px rhythm. Nothing off this list, anywhere. */
  --f-space-1: 4px;   --f-space-2: 8px;   --f-space-3: 12px;  --f-space-4: 16px;  --f-space-6: 24px;
  --f-space-8: 32px;  --f-space-12: 48px; --f-space-16: 64px; --f-space-24: 96px; --f-space-32: 128px;
  /* proximity tiers: each tier at least 2x the one below, so grouping reads without borders */
  --f-gap-el: 8px;       /* inside one element: label to field, icon to text, number to unit */
  --f-gap-group: 16px;   /* between siblings of one group: list items, fields, rows */
  --f-gap-block: 32px;   /* between groups inside a block: copy to actions, head to body */
  --f-gap-head: 48px;    /* section head to section content */
  --f-section: clamp(64px, 9vw, 128px);   /* between sections: 64 phone, 128 desktop */
  --f-gutter: clamp(16px, 4vw, 48px);     /* page edge: 16 on phones, 48 on desktop */
  --f-measure: 65ch;         /* body text: 50 to 75 characters a line */
  --f-measure-lead: 48ch;    /* lead paragraphs at 20 px */

  /* @group colour.core */
  --f-paper: #FFFFFF;      /* page and card */
  --f-cloud: #F2F3F0;      /* panels, booked cells, disabled */
  --f-line: #E3E5DF;       /* hairlines, outlines */
  --f-ink: #111111;        /* text, primary buttons, eyes */
  --f-ink-60: #6B7068;     /* secondary text, labels: 5.3:1 on paper, 4.9:1 on cloud */
  --f-ink-30: #B9BDB6;     /* placeholders, tertiary. Never the only label. */
  --f-lime: #C6FF00;       /* filled. nothing else. never a text colour. */
  --f-lime-shade: #9DD100; /* lime's shadow side: Fillo's shade, the depth of the fill */
  --f-mint: #DFFFB0;       /* lime wash: filled area in charts, selected row */
  --f-night: #111111;      /* the app's dark surface */
  --f-night-2: #1A1B19;    /* raised surface on night */
  --f-night-line: #30332E;   /* hairlines on night: visible on both night surfaces */

  /* @group colour.roles  (Day) */
  --f-bg: var(--f-paper);
  --f-surface: var(--f-paper);
  --f-surface-2: var(--f-cloud);
  --f-text: var(--f-ink);
  --f-text-muted: var(--f-ink-60);
  --f-border: var(--f-line);
  --f-focus: var(--f-ink);

  /* @group colour.states  open / booked / filled / peak */
  --f-open-bg: var(--f-paper); --f-open-line: var(--f-line);
  --f-booked-bg: var(--f-cloud); --f-booked-line: var(--f-cloud);
  --f-filled-bg: var(--f-lime); --f-filled-text: var(--f-ink);
  --f-peak-stripe: repeating-linear-gradient(135deg, var(--f-paper) 0 6px, var(--f-cloud) 6px 12px);

  /* @group colour.semantic  one negative system (film r8 rule); positive = filled. Text colours pass 4.5:1 on their bg. */
  --f-ok: #3A6B00;         --f-ok-bg: var(--f-mint);                           /* filled, confirmed: 6.4:1 on paper */
  --f-warn: #80551A;       --f-warn-bg: #FFF4DF;                               /* open, pending, needs a look: 6.2:1 */
  --f-danger: #973A29;     --f-danger-bg: #FFF7F5;  --f-danger-line: #E9C6BE;  /* dropped, cancelled, no-show, errors: 7.1:1 */
  --f-skeleton: #ECEEE9;   --f-skeleton-hi: #F7F8F5;
  --f-btn-primary-bg: var(--f-ink); --f-btn-primary-text: #FFFFFF;             /* night: white pill, ink text */
  --f-scrim: rgba(17,17,17,.40);

  /* @group material  three glasses, one family (glass.css, RULES.md 9). Tints alone carry 4.5:1 on the worst backdrop. */
  --f-glass: rgba(255,255,255,.70);          /* frosted: anything with a paragraph. Ink text: 9:1 over black */
  --f-glass-blur: 24px;
  --f-glass-edge: 1px solid rgba(255,255,255,.90);
  --f-glass-liquid: rgba(255,255,255,.55);   /* liquid: refracting rim, specular, pointer light. Ink text: 5.6:1 over black */
  --f-glass-blur-lens: 12px;                 /* body blur when the rim refracts (less, so the lens shows) */
  --f-glass-clear: rgba(255,255,255,.22);    /* clear: an icon or a label over a photo, always with --dim */
  --f-glass-dim: rgba(17,17,17,.60);         /* the dim behind clear glass: white text 4.9:1 over a white photo */
  --f-glass-rim: rgba(255,255,255,.95);      /* specular edge, top-left */
  --f-glass-glow: rgba(255,255,255,.28);     /* inner glow */
  --f-glass-light: rgba(255,255,255,.55);    /* the light that follows the pointer */
  --f-glass-solid: rgba(255,255,255,.94);    /* reduced transparency / more contrast: glass becomes this */
  --f-lens-strength: 1;                      /* 0 to 2: how far the rim bends the backdrop */
  --f-shadow-soft: 0 8px 24px rgba(17,17,17,.08);
  --f-shadow-lift: 0 12px 32px rgba(17,17,17,.12);
  --f-contact: 0 2px 6px rgba(17,17,17,.10);

  /* @group targets  Apple 44 pt hit region, Material 8 dp between targets, WCAG 2.5.8 floor 24 */
  --f-control-h: 44px;      /* default control and input */
  --f-control-h-md: 40px;   /* button in a bar; still inside a 44 target */
  --f-control-h-sm: 32px;   /* dense app tables only, never the only path */
  --f-control-h-lg: 52px;
  --f-target-min: 44px;

  /* @group shape  controls follow the mark: radius = 0.28 x height. One ladder. */
  --f-radius-ratio: .28;
  --f-r-control: calc(var(--f-control-h, 44px) * var(--f-radius-ratio));  /* 12 at 44 */
  --f-r-xs: 6px;        /* 24 px things: small chips, week cells */
  --f-r-sm: 8px;        /* 28 to 32 px things: labels on photos */
  --f-r-chip: 9px;      /* 32 px chip */
  --f-r-md: 12px;       /* inputs, bubbles, toasts, 44 px buttons */
  --f-r-media: 16px;
  --f-r-card: 24px;     /* cards, photo cards, glass layers */
  --f-r-lg: 32px;       /* full-width blocks with 48 px padding */
  --f-r-pill: 999px;

  /* @group type  roles only, line heights on the 4 px grid, body at 1.5 */
  --f-font-display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-font-body: var(--f-font-display);
  --f-font-data: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-display: 800 clamp(2.5rem, 5vw, 4.5rem)/1 var(--f-font-display);     /* 40 to 72 / 1.0 */
  --f-h2: 800 clamp(2rem, 2.8vw, 2.5rem)/1.1 var(--f-font-display);         /* 32 to 40 / 44 */
  --f-h3: 800 1.5rem/1.3334 var(--f-font-display);                          /* 24 / 32 */
  --f-h4: 700 1.125rem/1.3334 var(--f-font-display);                        /* 18 / 24 */
  --f-body-lg: 500 1.25rem/1.4 var(--f-font-body);                          /* 20 / 28  leads */
  --f-body: 500 1rem/1.5 var(--f-font-body);                                /* 16 / 24 */
  --f-small: 500 .875rem/1.4286 var(--f-font-body);                         /* 14 / 20  notes, hints */
  --f-label: 700 .875rem/1.4286 var(--f-font-display);                      /* 14 / 20  form labels, nav, chips */
  --f-eyebrow: 700 .8125rem/1.2308 var(--f-font-display);                   /* 13 / 16 */
  --f-btn-text: 700 .9375rem/1 var(--f-font-display);                       /* 15 in a 44 button */
  --f-data: 400 .8125rem/1.5385 var(--f-font-data);                         /* 13 / 20  mono: numbers, times, sample data */
  --f-data-sm: 400 .75rem/1.3334 var(--f-font-data);                        /* 12 / 16  the floor, chart axes */
  --f-tracking-display: -.03em;
  --f-tracking-tight: -.02em;

  /* @group motion  one direction: things fill from the bottom and settle */
  --f-dur-fast: 120ms; --f-dur-base: 180ms; --f-dur-slow: 240ms; --f-dur-reveal: 480ms;
  --f-dur-fill: 900ms;
  --f-ease-out: cubic-bezier(.2,.7,.2,1);
  --f-ease-move: cubic-bezier(.4,0,.2,1);
  --f-spring: cubic-bezier(.34,1.2,.44,1);
}

[data-theme="night"], .f-night {
  --f-bg: var(--f-night);
  --f-surface: var(--f-night-2);
  --f-surface-2: #222420;
  --f-text: #F2F3F0;
  --f-text-muted: #A3A89F;
  --f-border: var(--f-night-line);
  --f-focus: #F2F3F0;
  --f-open-bg: transparent; --f-open-line: #474B44;   /* dashed gaps must read on night */
  --f-booked-bg: #262824; --f-booked-line: #262824;
  --f-peak-stripe: repeating-linear-gradient(135deg, transparent 0 6px, #262824 6px 12px);
  --f-glass: rgba(17,17,17,.66);             /* white text 5.5:1 over a white photo */
  --f-glass-edge: 1px solid rgba(255,255,255,.08);
  --f-glass-liquid: rgba(17,17,17,.64);      /* white text 5.1:1 over a white photo */
  --f-glass-clear: rgba(17,17,17,.22);
  --f-glass-dim: rgba(0,0,0,.60);
  --f-glass-rim: rgba(255,255,255,.22);
  --f-glass-glow: rgba(255,255,255,.05);
  --f-glass-light: rgba(255,255,255,.12);
  --f-glass-solid: rgba(26,27,25,.96);
  --f-shadow-soft: 0 8px 24px rgba(0,0,0,.35);
  --f-ok: #BFEF5A; --f-ok-bg: #243300;
  --f-warn: #F2C97D; --f-warn-bg: #2E2410;
  --f-danger: #F4A08C; --f-danger-bg: #2E1A16; --f-danger-line: #4A2A24;
  --f-skeleton: #222420; --f-skeleton-hi: #2C2E2A;
  --f-btn-primary-bg: #F2F3F0; --f-btn-primary-text: #111111;
  --f-scrim: rgba(0,0,0,.55);
  color-scheme: dark;
}
}
