/*
 * Otthon design tokens — "Búzavirág" (chosen 2026-11-24, replaces "Parázs").
 * One source for every home surface: Otthon/Home Assistant, Haven dashboard,
 * CleanFrame TV home screen, orsos.hu, artifacts.vpn.orsos.dev. Copy this file
 * into a project (do not hot-link it); keep copies byte-identical so `diff`
 * shows drift.
 *
 * Neutral graphite (dark) / off-white (light) base, cornflower blue accent
 * (#6495ed). Light mode puts one deeper blue on every interactive element.
 * Text tones (--muted, --accent-ink, --ok, --warn, --bad) are >= 4.5:1 on
 * --bg, --surface and --surface-2.
 *
 * Theme selection: light by default, dark when the OS prefers dark, and an
 * explicit <html data-theme="light|dark"> always wins.
 */
:root {
  color-scheme: light;

  /* colour — light */
  --bg: #f0efec;
  --surface: #fbfbf9;
  --surface-2: #e5e4e0;
  --line: rgba(30, 28, 25, 0.10);
  --ink: #1c1c1b;
  --muted: #5e5e5c;
  --accent: #6495ed;      /* decoration: brand full stop, tints (mix with --surface) */
  --accent-ink: #3560b5;  /* accent as text/links on --bg/--surface */
  --on-accent: #0d1830;   /* text on an --accent fill */
  --fill: #dde7f7;        /* primary button: soft cornflower tint (button B, 2026-11-24) */
  --fill-hover: #d5e1f6;
  --on-fill: #3560b5;     /* text on --fill / --fill-hover */
  --ui: #3560b5;          /* interactive outlines: active tab, hover/focus ring, slider */
  --toggle-on-bg: #3560b5;      /* switched-on power button */
  --toggle-on-fg: #ffffff;
  --toggle-on-line: transparent;
  --ok: #2f6b45;
  --warn: #855409;
  --bad: #a33a31;
  --track: #d5d4d0;

  /* type */
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-weight: 800;
  --display-tracking: -0.035em;

  /* shape */
  --radius-l: 22px;  /* cards, panels */
  --radius-m: 16px;  /* tabs, tiles, inner groups */
  --radius-s: 12px;  /* buttons, inputs */
  --radius-pill: 999px;

  /* type scale (rem, so the project's root size still applies) */
  --text-xs: 0.8125rem;   /* 13 px — meta, captions */
  --text-s: 0.875rem;     /* 14 px — secondary text, controls */
  --text-m: 1rem;         /* 16 px — body */
  --text-l: 1.25rem;      /* 20 px — section headings */
  --text-xl: 1.75rem;     /* 28 px — page titles */
  --text-display: clamp(2.6rem, 9vw, 4.6rem); /* hero title */
  --leading: 1.55;
  --leading-tight: 1.1;

  /* spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --touch: 44px;   /* minimum tap target */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1b1b1c;
    --surface: #272829;
    --surface-2: #212223;
    --line: rgba(245, 243, 240, 0.08);
    --ink: #f0efed;
    --muted: #acacad;
    --accent: #6495ed;
    --accent-ink: #93b4f4;
    --on-accent: #0d1830;
    --fill: #333e50;
    --fill-hover: #36435a;
    --on-fill: #93b4f4;
    --ui: #6495ed;
    --toggle-on-bg: #313e54;
    --toggle-on-fg: #93b4f4;
    --toggle-on-line: #6495ed;
    --ok: #afd0ba;
    --warn: #e9c88a;
    --bad: #e8a09a;
    --track: #3a3a3b;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1b1c;
  --surface: #272829;
  --surface-2: #212223;
  --line: rgba(245, 243, 240, 0.08);
  --ink: #f0efed;
  --muted: #acacad;
  --accent: #6495ed;
  --accent-ink: #93b4f4;
  --on-accent: #0d1830;
  --fill: #333e50;
  --fill-hover: #36435a;
  --on-fill: #93b4f4;
  --ui: #6495ed;
  --toggle-on-bg: #313e54;
  --toggle-on-fg: #93b4f4;
  --toggle-on-line: #6495ed;
  --ok: #afd0ba;
  --warn: #e9c88a;
  --bad: #e8a09a;
  --track: #3a3a3b;
}
