/* A Felnőtt Köszi — színek, betűk, mértékek.
 *
 * Ez a fájl az oldalé ÉS az exportoké is: a letöltött HTML/SVG/PNG ugyanezt
 * kapja meg (a betűk ilyenkor data: URI-ként kerülnek bele). Ezért itt csak
 * változók és @font-face állhat, felületi szabály nem.
 *
 * Világ: vonalhálózati térkép. Nappal nyomtatott hálózati térkép (fehér lap,
 * tinta, telített vonalszínek), éjjel peronkijelző (kékes-fekete alap, világító
 * vonalak). Szín CSAK a vonalakon és a vonaljelvényeken van; szöveg mindig tinta.
 */

/* Barlow (OFL) — a közterületi táblák és a közlekedés betűi ihlették. Súlyonként
 * két szelet: alap latin + Latin Extended-A (ő, ű). A tools/update-vendor.sh
 * szűkíti le őket magyar szövegre. */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-400-basic.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2032-2033, U+20AC, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-400-ext.woff2") format("woff2");
  unicode-range: U+0100-017F;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-600-basic.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+2032-2033, U+20AC, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-600-ext.woff2") format("woff2");
  unicode-range: U+0100-017F;
}

:root {
  color-scheme: light;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Nyomtatott hálózati térkép */
  --ground: #eef0f3;
  --surface: #ffffff;
  --surface-2: #e6e9ee;
  --map-ground: #ffffff;
  --ink: #15181d;
  --muted: #565d67;
  --rule: #dde0e5;
  --rule-strong: #c5cad2;
  --link: #0a55a8;
  --code-bg: #eff1f4;
  --mark-bg: #ffe26a;
  --mark-ink: #15181d;
  --hit-bg: rgba(255, 196, 0, 0.3);
  --hit-ring: #15181d;
  --scrim: rgba(21, 24, 29, 0.32);
  --shadow: 0 1px 2px rgba(21, 24, 29, 0.06), 0 10px 28px -14px rgba(21, 24, 29, 0.28);

  /* Kódszínezés — a vonalszínek sötétebb, szövegre is olvasható párjai */
  --tok-keyword: #7a2e9e;
  --tok-string: #1c6f2c;
  --tok-number: #a34200;
  --tok-title: #0a55a8;
  --tok-attr: #006d74;
  --tok-comment: #666d77;

  /* Vonalak. Az --on-line-N a jelvényen álló betű színe (≥4.5:1). */
  --line-1: #e0a400;
  --on-line-1: #15181d;
  --line-2: #d4251d;
  --on-line-2: #ffffff;
  --line-3: #0a5bb5;
  --on-line-3: #ffffff;
  --line-4: #1e8537;
  --on-line-4: #ffffff;
  --line-5: #7d3c98;
  --on-line-5: #ffffff;
  --line-6: #e0640f;
  --on-line-6: #15181d;
  --line-7: #007f88;
  --on-line-7: #ffffff;
  --line-8: #b3306f;
  --on-line-8: #ffffff;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Éjszakai peronkijelző. Kétszer áll itt ugyanaz: egyszer a rendszer sötét
 * módjához (hacsak a látogató nem kért kifejezetten világosat), egyszer a kézi
 * váltóhoz. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0a0d12;
    --surface: #131820;
    --surface-2: #1c232d;
    --map-ground: #0a0d12;
    --ink: #e8ebf0;
    --muted: #9aa3af;
    --rule: #242b36;
    --rule-strong: #343d4a;
    --link: #7fb6ff;
    --code-bg: #171d26;
    --mark-bg: rgba(255, 208, 60, 0.3);
    --mark-ink: #fff4cc;
    --hit-bg: rgba(255, 208, 60, 0.22);
    --hit-ring: #e8ebf0;
    --scrim: rgba(0, 0, 0, 0.5);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
    --tok-keyword: #cfa6f5;
    --tok-string: #86d994;
    --tok-number: #ffab70;
    --tok-title: #7fb6ff;
    --tok-attr: #62d6dc;
    --tok-comment: #8c95a1;
    --line-1: #ffd23f;
    --on-line-1: #15181d;
    --line-2: #ff5f55;
    --on-line-2: #15181d;
    --line-3: #5aa2ff;
    --on-line-3: #15181d;
    --line-4: #5fd274;
    --on-line-4: #15181d;
    --line-5: #c08bea;
    --on-line-5: #15181d;
    --line-6: #ff9a4d;
    --on-line-6: #15181d;
    --line-7: #3ccfd6;
    --on-line-7: #15181d;
    --line-8: #ff7db8;
    --on-line-8: #15181d;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0a0d12;
  --surface: #131820;
  --surface-2: #1c232d;
  --map-ground: #0a0d12;
  --ink: #e8ebf0;
  --muted: #9aa3af;
  --rule: #242b36;
  --rule-strong: #343d4a;
  --link: #7fb6ff;
  --code-bg: #171d26;
  --mark-bg: rgba(255, 208, 60, 0.3);
  --mark-ink: #fff4cc;
  --hit-bg: rgba(255, 208, 60, 0.22);
  --hit-ring: #e8ebf0;
  --scrim: rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --tok-keyword: #cfa6f5;
  --tok-string: #86d994;
  --tok-number: #ffab70;
  --tok-title: #7fb6ff;
  --tok-attr: #62d6dc;
  --tok-comment: #8c95a1;
  --line-1: #ffd23f;
  --on-line-1: #15181d;
  --line-2: #ff5f55;
  --on-line-2: #15181d;
  --line-3: #5aa2ff;
  --on-line-3: #15181d;
  --line-4: #5fd274;
  --on-line-4: #15181d;
  --line-5: #c08bea;
  --on-line-5: #15181d;
  --line-6: #ff9a4d;
  --on-line-6: #15181d;
  --line-7: #3ccfd6;
  --on-line-7: #15181d;
  --line-8: #ff7db8;
  --on-line-8: #15181d;
}
