/* Sitekeeper design system: tokens (v1, 28.10.2026).
   Source of truth: brand card sitekeeper.yaml (mark A «pressed k», palette teal / paper / gold, Medeo Sans + Mono; the name in the logo is Medeo Sans 600 outlines).
   Brandbook: identity/BRANDBOOK.html. Everything a component needs is a variable here; components.css holds no raw colours; strokes, radii, spacing, heights and widths are tokens (only hairlines, optical offsets and breakpoints stay literal).
   Three shapes, three meanings: the PILL is what you say or do in one line (buttons, chips, one-line fields); the BUBBLE is longer speech (r21, one 5 corner to the speaker);
   the SHEET is the page (cards, windows, panels, sections). Sheet radii come from the mark: the leaning sheet is 76 units wide
   with a 13-unit corner (r = 0.171 × side), and the scale is the Fibonacci row 3 5 8 13 21 34. */

@font-face { font-family: "Medeo Sans"; src: url("../../fonts/MedeoSansVariable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Medeo Mono"; src: url("../../fonts/MedeoMonoVariable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Medeo Sans Fallback"; src: local("Liberation Sans"), local("Arial"), local("Helvetica"); size-adjust: 100.32%; ascent-override: 100.18%; descent-override: 29.41%; line-gap-override: 0%; }

:root {
  /* ---- Palette (brand card; hex values are not to be changed) ---- */
  --sk-paper: #F5EFE4;        /* page, light ground (60) */
  --sk-paper-2: #ECE3D2;      /* sunken well, hover tint on paper; ink 14.10:1, link 4.86:1 */
  --sk-white: #FFFFFF;        /* fields, cards that sit on paper */
  --sk-ink: #15171A;          /* text on paper 15.69:1, on white 17.96:1 */
  --sk-muted: #396267;        /* captions, placeholders: teal at 80 % on paper (no new grey); on paper 5.89:1, white 6.74:1, paper-2 5.29:1 */
  --sk-teal: #0A3F48;         /* the desk, the mark, dark fields, headings on paper 10.10:1 (30) */
  --sk-deep: #072F36;         /* deep sections, footer */
  --sk-gold: #B99A60;         /* the one accent (10): moving line, rules, foil. Never text on paper (2.34:1) */
  --sk-gold-light: #E0CCA1;   /* gold text on teal, any size 7.33:1 */
  --sk-gold-deep: #8A6A36;    /* gold detail on paper, large only 4.37:1 */
  --sk-link: #0E6B78;         /* links / accent text on paper 5.41:1, on white 6.19:1 */
  --sk-link-on-teal: #7FD1D6; /* links on teal 6.60:1, on deep 8.16:1 */
  --sk-mist: #BDD5D7;         /* secondary text, on teal only 7.52:1 */
  --sk-danger: #9E3424;       /* errors on paper 6.18:1, on white 7.07:1 */
  --sk-danger-on-teal: #F4B4A8; /* errors on teal 6.57:1 */
  --sk-line: #CFD3CB;         /* decorative rule on paper (teal 16 %) */
  --sk-line-ui: #688586;      /* field and control border: teal at 60 %; on paper 3.47:1, white 3.97:1, paper-2 3.12:1 (WCAG 1.4.11 ≥ 3:1) */
  --sk-line-on-teal: #305B61; /* decorative rule on teal (paper 16 %) */
  --sk-line-ui-on-teal: #8BA09E; /* control border on teal 4.19:1 */

  /* ---- Shape: Fibonacci radii from the mark (13 / 76 = 0.171) ---- */
  --sk-mark-ratio: 0.171;   /* square tiles and icons: r = 0.171 × side, snapped down to the row below */
  --sk-r-3: 3px;            /* tiles 18–28 px (checkbox), rule ends */
  --sk-r-5: 5px;            /* tiles 29–46 px, the speaker corner of a message */
  --sk-r-8: 8px;            /* tiles 47–75 px, tooltips, focus of the lockup */
  --sk-r-13: 13px;          /* tiles 76–122 px (the mark sheet itself), multi-line fields, menu items, media inside a card */
  --sk-r-21: 21px;          /* tiles 123–198 px; every card, window, dialog, plan, the player on phones (cap for components) */
  --sk-r-34: 34px;          /* ≥ 199 px; sheets: sections laid on the desk, the film from 768 px (cap for sheets) */
  --sk-stroke: 1.5px;       /* button, field and chip border; the struck and underlined line */
  --sk-w-talk: 380px;       /* a message column, the leaning page */
  --sk-w-card: 480px;       /* preview card */
  --sk-r-pill: 999px;       /* everything you say or do: buttons, chips, one-line fields, the language switch */
  /* nesting: inner radius = outer radius − gap, and the gap is the Fibonacci number two steps down (34 − 13 = 21, 21 − 8 = 13, 13 − 5 = 8) */
  --sk-tilt-mark: -9deg;    /* the logo sheet only */
  --sk-tilt-sheet: -8deg;   /* one illustrative page per screen; its words lie at its angle; reading text and pills never lean */

  /* ---- Space: Fibonacci × 8 px ---- */
  --sk-u: 8px;
  --sk-s-half: 4px;
  --sk-s-1: 8px;
  --sk-s-2: 16px;
  --sk-s-3: 24px;
  --sk-s-5: 40px;
  --sk-s-8: 64px;
  --sk-s-13: 104px;
  --sk-s-21: 168px;
  --sk-container: 1188px;   /* 21 + 13 columns */
  --sk-gutter: clamp(16px, 4vw, 40px);
  --sk-section-y: clamp(64px, 9vw, 104px);
  --sk-target: 44px;        /* minimum touch target */
  --sk-h-sm: 36px;          /* control heights: small (hit area still 44), medium, large; header bar */
  --sk-h-md: 48px;
  --sk-h-lg: 56px;
  --sk-h-header: 64px;
  --sk-icon-sm: 18px;
  --sk-icon: 20px;
  --sk-gap-inline: 10px;    /* icon ↔ label inside a pill */

  /* ---- Type: Medeo Sans (text, UI, headings), Medeo Mono (data). The logo name is Medeo Sans 600 as outlines; no other typeface. ---- */
  --sk-font-ui: "Medeo Sans", "Medeo Sans Fallback", Arial, system-ui, sans-serif;
  --sk-font-data: "Medeo Mono", ui-monospace, "Liberation Mono", Menlo, monospace;
  /* fluid modular scale: 390 px → base 16, ratio 1.2; 1440 px → base 17, ratio 1.25 */
  --sk-fs--1: clamp(0.833rem, 0.827rem + 0.025vw, 0.850rem);  /* 13.3 → 13.6 caption, label */
  --sk-fs-0: clamp(1.000rem, 0.977rem + 0.095vw, 1.062rem);   /* 16 → 17 body */
  --sk-fs-1: clamp(1.200rem, 1.152rem + 0.195vw, 1.328rem);   /* 19.2 → 21.3 lead, h4 */
  --sk-fs-2: clamp(1.440rem, 1.358rem + 0.335vw, 1.660rem);   /* 23 → 26.6 h3 */
  --sk-fs-3: clamp(1.728rem, 1.599rem + 0.529vw, 2.075rem);   /* 27.6 → 33.2 */
  --sk-fs-4: clamp(2.074rem, 1.880rem + 0.793vw, 2.594rem);   /* 33.2 → 41.5 h2 */
  --sk-fs-5: clamp(2.488rem, 2.208rem + 1.149vw, 3.242rem);   /* 39.8 → 51.9 */
  --sk-fs-6: clamp(2.986rem, 2.590rem + 1.626vw, 4.053rem);   /* 47.8 → 64.9 h1 */
  --sk-fs-7: clamp(3.583rem, 3.032rem + 2.260vw, 5.066rem);   /* 57.3 → 81 hero display */
  --sk-lh-body: 1.55;
  --sk-lh-lead: 1.4;
  --sk-lh-h3: 1.2;
  --sk-lh-h2: 1.1;
  --sk-lh-display: 1.03;
  --sk-track-display: -0.028em;
  --sk-track-heading: -0.018em;
  --sk-track-label: 0.06em;
  --sk-w-body: 400;
  --sk-w-ui: 560;
  --sk-w-heading: 600;
  --sk-measure: 66ch;
  --sk-measure-lead: 52ch;

  /* ---- Depth ---- */
  --sk-shadow-1: 0 1px 2px rgb(7 47 54 / .10), 0 3px 10px rgb(7 47 54 / .07);   /* cards on paper */
  --sk-shadow-2: 0 2px 6px rgb(7 47 54 / .12), 0 12px 32px rgb(7 47 54 / .16);  /* menus, dialogs, the pitch pill */
  --sk-shadow-pill: 0 1px 1px rgb(4 31 36 / .18), 0 6px 18px rgb(4 31 36 / .22); /* the light pill on teal, as in the film */
  --sk-backdrop: rgb(4 31 36 / .70);   /* behind dialogs and the mobile menu (figure-ground) */
  --sk-glass: rgb(4 31 36 / .42);        /* round pills over video */
  --sk-glass-hover: rgb(4 31 36 / .62);
  --sk-glass-on: rgb(4 31 36 / .72);
  --sk-scrim: linear-gradient(to top, rgb(4 31 36 / .72), rgb(4 31 36 / 0));
  --sk-gleam: radial-gradient(circle, rgb(255 236 196 / .95) 0 2px, rgb(224 204 161 / .55) 4px, rgb(185 154 96 / 0) 16px); /* the pen on the gold line */
  --sk-mark-shade: #000;                 /* the one-beat darkening of the mark (allowed extra in the card) */

  /* ---- Motion: «surfaced → landed → pressed» (MOTION.md) ---- */
  --sk-ease-out: cubic-bezier(.22, .8, .3, 1);     /* surfaced: out-cubic */
  --sk-ease-in: cubic-bezier(.55, 0, 1, .45);      /* landing: in-quad */
  --sk-ease-settle: cubic-bezier(.34, 1.36, .64, 1); /* one rebound, never more */
  --sk-ease-std: cubic-bezier(.2, 0, 0, 1);        /* UI state changes */
  --sk-dur-1: 120ms;   /* colour, opacity */
  --sk-dur-2: 200ms;   /* UI state: hover, press, open */
  --sk-dur-3: 350ms;   /* the arrow on hover, chips, accordion */
  --sk-dur-4: 560ms;   /* a block surfaces and lands on scroll */
  --sk-dur-press: 800ms; /* the mark: surfaced → landed → pressed */
  --sk-dur-undo: 640ms;  /* the same backwards, 1.25× */
  --sk-press-scale: .97;
  --sk-rise: 20px;       /* how far a block surfaces from */
}

:root, [data-surface="paper"], [data-surface="white"], .sk-surface-paper {
  /* Semantic roles: light (paper) surface; [data-surface="teal"] remaps them. Components read only --ds-* and --sk-* tokens. */
  --ds-bg: var(--sk-paper);
  --ds-surface: var(--sk-white);
  --ds-well: var(--sk-paper-2);
  --ds-fg: var(--sk-ink);
  --ds-fg-muted: var(--sk-muted);
  --ds-heading: var(--sk-teal);
  --ds-link: var(--sk-link);
  --ds-rule: var(--sk-line);
  --ds-border: var(--sk-line-ui);
  --ds-thread: var(--sk-gold);
  --ds-accent-text: var(--sk-gold-deep);  /* large only on paper */
  --ds-danger: var(--sk-danger);
  --ds-focus: var(--sk-link);
  --ds-btn-bg: var(--sk-teal);            /* primary: teal pill, paper text 10.10:1 */
  --ds-btn-fg: var(--sk-paper);
  --ds-btn-bg-hover: var(--sk-deep);      /* paper on deep 12.49:1 */
  --ds-btn2-fg: var(--sk-teal);           /* secondary: outline pill */
  --ds-btn2-line: var(--sk-teal);
  --ds-btn2-bg-hover: var(--sk-paper-2);
  --ds-chip-bg: var(--sk-paper-2);
  --ds-chip-on-bg: var(--sk-teal);
  --ds-chip-on-fg: var(--sk-paper);
  --ds-field-bg: var(--sk-white);
  --ds-selection: var(--sk-gold-light);
  --sk-mark-sheet: var(--sk-teal);        /* logo colours (sk-logo.svg reads these) */
  --sk-mark-shadow: #748E8E;
  --sk-mark-lip: #FFFFFF;
  --sk-mark-word: var(--sk-ink);
  --sk-deboss: inset 2px 2px 3px rgb(4 31 36 / .34), inset -1px -1px 0 rgb(255 255 255 / .7); /* the mark's press: shadow upper-left inside, light lip lower-right */

}

/* Teal surface: the desk. Same components, remapped roles. */
[data-surface="teal"], [data-surface="deep"], .sk-surface-teal, .sk-surface-deep {
  --ds-bg: var(--sk-teal);
  --ds-surface: var(--sk-deep);
  --ds-well: var(--sk-deep);
  --ds-fg: var(--sk-paper);
  --ds-fg-muted: var(--sk-mist);
  --ds-heading: var(--sk-paper);
  --ds-link: var(--sk-link-on-teal);
  --ds-rule: var(--sk-line-on-teal);
  --ds-border: var(--sk-line-ui-on-teal);
  --ds-accent-text: var(--sk-gold-light);
  --ds-danger: var(--sk-danger-on-teal);
  --ds-focus: var(--sk-link-on-teal);
  --ds-btn-bg: var(--sk-paper);          /* the film's pill: paper with ink text 15.69:1 */
  --ds-btn-fg: var(--sk-ink);
  --ds-btn-bg-hover: var(--sk-white);    /* ink on white 17.96:1 */
  --ds-btn2-fg: var(--sk-paper);
  --ds-btn2-line: var(--sk-line-ui-on-teal);
  --ds-btn2-bg-hover: rgb(245 239 228 / .10);
  --ds-chip-bg: rgb(245 239 228 / .10);
  --ds-chip-on-bg: var(--sk-paper);
  --ds-chip-on-fg: var(--sk-teal);
  --ds-field-bg: var(--sk-deep);
  --ds-selection: var(--sk-gold-light);
  --sk-mark-sheet: var(--sk-paper);
  --sk-mark-shadow: #041F24;
  --sk-mark-lip: #2A6F7A;
  --sk-mark-word: var(--sk-paper);
  --sk-deboss: inset 2px 2px 3px rgb(4 31 36 / .6), inset -1px -1px 0 rgb(42 111 122 / .9);
}
[data-surface="deep"], .sk-surface-deep { --ds-bg: var(--sk-deep); --ds-surface: var(--sk-teal); --ds-well: var(--sk-teal); --ds-field-bg: var(--sk-teal); }
[data-surface="white"] { --ds-bg: var(--sk-white); --ds-well: var(--sk-paper); --ds-field-bg: var(--sk-white); }

@media (prefers-reduced-motion: reduce) {
  :root {
    --sk-dur-2: 0ms; --sk-dur-3: 0ms; --sk-dur-4: 0ms; --sk-dur-press: 0ms; --sk-dur-undo: 0ms;
    --sk-press-scale: 1; --sk-rise: 0px;
  }
}
