/* Design tokens — Darmowe 50 zł. Contrast pairs verified in tools/contrast.py (WCAG AA). */
:root {
  color-scheme: light;

  /* Colour */
  --c-bg: #ffffff;
  --c-surface: #f5f8fc;
  --c-cream: #fff6ea;
  --c-ink: #1b2433;
  --c-muted: #52607a;
  --c-border: #dde4ef;
  --c-border-strong: #c3cddd;

  --c-navy-900: #101c33;
  --c-navy-800: #1b2a47;
  --c-footer-text: #c9d3e6;

  --c-cta: #0e7c3a;
  --c-cta-hover: #0a6530;
  --c-on-cta: #ffffff;

  --c-link: #1f4fbf;
  --c-focus: #1f4fbf;

  --c-mint-100: #d9f3ea;
  --c-mint-500: #168a68;
  --c-amber-500: #f5a524;
  --c-amber-300: #f7c25e;

  --c-plus: #0e7c3a;
  --c-minus: #a44a08;

  --c-offer-bg: #eef4ff;
  --c-offer-line: #2f5fd8;

  --c-type-a-bg: #e3f5ea;
  --c-type-a: #0b6a31;
  --c-type-b-bg: #e8eefb;
  --c-type-b: #1f4fbf;
  --c-type-c-bg: #fff0d6;
  --c-type-c: #8a4b00;

  --c-rank-1: var(--c-amber-500);
  --c-rank-2: #5b6b86;
  --c-rank-3: #8f4510;
  --c-rank-n: var(--c-navy-800);

  /* Typography */
  --font-sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-300: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);   /* 13–14 */
  --fs-400: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);       /* 16–17 body */
  --fs-500: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);     /* lead */
  --fs-600: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);  /* h3 */
  --fs-700: clamp(1.375rem, 1.2rem + 0.8vw, 1.625rem);     /* h2 22–26 */
  --fs-800: clamp(1.75rem, 1.5rem + 1.1vw, 2rem);          /* h1 28–32 */

  --lh-body: 1.6;
  --lh-tight: 1.25;

  /* Spacing (4px base) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;

  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgb(16 28 51 / 0.06), 0 2px 8px rgb(16 28 51 / 0.05);
  --shadow-2: 0 2px 4px rgb(16 28 51 / 0.06), 0 10px 28px rgb(16 28 51 / 0.1);

  /* Layout */
  --container: 1120px;
  --measure: 760px;
  --toc-w: 280px;
  --gutter: clamp(1rem, 4vw, 1.5rem);
  --header-h: 60px;

  /* Breakpoints (reference only — CSS custom props can't drive @media):
     360 base · 768 tablet · 1024 desktop · 1280 wide */
}

/* Metric-matched fallback so the swap to Inter barely moves layout (CLS) */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.4%;
  ascent-override: 90.2%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}
