/* ===========================================================================
   Security Helps — design tokens
   ===========================================================================
   This is the file to edit if you want to change the look of the site.
   Colours, spacing, type sizes and radii all live here; no component file
   contains a hard-coded colour.

   The dark palette is written out twice on purpose:
     * the @media block  — applies when the visitor has no JavaScript, by
                           following their operating system setting
     * the [data-theme] block — applies when the theme toggle (or the OS
                           setting, resolved by the inline script) has picked
                           a theme explicitly
   CSS cannot share declarations across a media query and an attribute
   selector, so the two blocks are duplicated. They must stay identical —
   build.ps1 compares them and fails the build if they drift apart.
   =========================================================================== */

:root {
  color-scheme: light;

  /* --- surfaces ---------------------------------------------------------- */
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --row-hover: #f8fafc;
  --glass: rgba(255, 255, 255, .85);

  /* --- text -------------------------------------------------------------- */
  --ink: #0e1c33;
  --text: #475569;
  --muted: #5a6b80;

  /* --- accent ------------------------------------------------------------ */
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-active: #1a3a9c;
  --accent-tint: #e8effe;
  --accent-tint-ink: #1e40af;
  --on-accent: #ffffff;

  /* --- status ------------------------------------------------------------ */
  --ok: #0f7a4d;
  --ok-soft: #e6f6ee;
  --warn: #b45309;
  --warn-soft: #fef3e2;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --focus: #1d4ed8;

  /* --- dark panel --------------------------------------------------------
     The one deliberately dark band on each page (the closing call to action).
     Theme-constant: same values in light and dark, so it is not repeated in
     the dark blocks below.                                        */
  --panel-bg: #0e1c33;
  --panel-surface: #16294a;
  --panel-line: rgba(168, 184, 212, .22);
  --panel-ink: #eef3fb;
  --panel-muted: #a8b8d4;
  --panel-accent: #7ba4fb;

  /* --- elevation --------------------------------------------------------- */
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-2: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-3: 0 24px 48px -12px rgba(15, 23, 42, .18);

  /* --- radius ------------------------------------------------------------ */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;

  /* --- spacing ----------------------------------------------------------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --section-y: 96px;

  /* --- type scale -------------------------------------------------------- */
  --fs-2xs: .6875rem;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-hero: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.25rem + 1.8vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;
  --ls-tight: -.02em;
  --ls-wide: .08em;
  --ls-wider: .14em;

  /* --- layout ------------------------------------------------------------ */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: 24px;
  --grid-gap: 24px;
  --header-h: 68px;
  --measure: 68ch;

  /* --- stacking ---------------------------------------------------------- */
  --z-base: 1;
  --z-sticky: 20;
  --z-header: 50;
  --z-drawer: 60;
  --z-toast: 80;

  /* --- motion ------------------------------------------------------------ */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --ease: cubic-bezier(.2, .7, .3, 1);

  /* --- typeface ---------------------------------------------------------- */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI Variable Text",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Dark palette — follows the operating system, for visitors without
   JavaScript. KEEP IDENTICAL TO THE [data-theme="dark"] BLOCK BELOW. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* @dark-a-start */
    color-scheme: dark;
    --bg: #0b1220;
    --surface: #111a2b;
    --surface-2: #182338;
    --line: #22304a;
    --line-strong: #33456a;
    --row-hover: #16233c;
    --glass: rgba(11, 18, 32, .8);
    --ink: #e8eefb;
    --text: #a8b6cc;
    --muted: #8b9cb4;
    --accent: #7ba4fb;
    --accent-hover: #9cbcfd;
    --accent-active: #b3cdfe;
    --accent-tint: #16233d;
    --accent-tint-ink: #a9c4fd;
    --on-accent: #0b1220;
    --ok: #3fbf80;
    --ok-soft: #0f2b1f;
    --warn: #e0a44a;
    --warn-soft: #2e2312;
    --danger: #f0857b;
    --danger-soft: #341713;
    --focus: #7ba4fb;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .45);
    --shadow-3: 0 24px 48px -12px rgba(0, 0, 0, .6);
    /* @dark-a-end */
  }
}

/* Dark palette — chosen explicitly by the theme toggle, or by the inline
   head script resolving the operating-system setting at load.
   KEEP IDENTICAL TO THE @media BLOCK ABOVE. */
:root[data-theme="dark"] {
  /* @dark-b-start */
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #111a2b;
  --surface-2: #182338;
  --line: #22304a;
  --line-strong: #33456a;
  --row-hover: #16233c;
  --glass: rgba(11, 18, 32, .8);
  --ink: #e8eefb;
  --text: #a8b6cc;
  --muted: #8b9cb4;
  --accent: #7ba4fb;
  --accent-hover: #9cbcfd;
  --accent-active: #b3cdfe;
  --accent-tint: #16233d;
  --accent-tint-ink: #a9c4fd;
  --on-accent: #0b1220;
  --ok: #3fbf80;
  --ok-soft: #0f2b1f;
  --warn: #e0a44a;
  --warn-soft: #2e2312;
  --danger: #f0857b;
  --danger-soft: #341713;
  --focus: #7ba4fb;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .45);
  --shadow-3: 0 24px 48px -12px rgba(0, 0, 0, .6);
  /* @dark-b-end */
}
