/* ============================================================
   Design tokens
   Owly (default, dark first) / Owly light / Clan 2003 / LAN '99.
   A fresh visit is always dark: light applies only after the
   toggle sets data-theme="light". Clan 2003 and LAN '99 are
   fixed looks and win over the light theme.
   ============================================================ */

/* Owly, dark. Also the base for every look. */
:root {
  --bg: #050403;
  --s1: #0e0b08;
  --s2: #17120c;
  --fg: #f2e6d6;
  --muted: #b09a80;
  --line: #2b2219;
  --ctl: #7a6650;
  --accent: #f39200;
  --accent-text: #ffb000;
  --on-accent: #050403;
  --ok: #5bd68f;
  --warn: #ffcf5a;
  --bad: #ff7b72;
  --info: #7fb6ff;
  --owl-outline: #f3eee6;
  --glow: none;
  --glow-strong: none;
  --led-filter: none;
  --led-glow: 0 0 6px currentColor;
  --scan-opacity: .55;
  --radius: 4px;
  --radius-sm: 3px;
  --font-display: "Reddit Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Reddit Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display-case: uppercase;
  --display-weight: 800;
  --body-size: 1rem;
  --selection-bg: color-mix(in srgb, var(--accent) 40%, transparent);
  --selection-fg: var(--fg);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-1: .15s;
  --dur-2: .2s;
  --dur-3: .4s;
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* Owly, light. Only after the toggle. */
:root[data-theme="light"] {
  --bg: #f6f6f4;
  --s1: #ffffff;
  --s2: #e9e9e6;
  --fg: #1a140c;
  --muted: #5c4f40;
  --line: #d8d4cc;
  --ctl: #857560;
  --accent: #f39200;
  --accent-text: #985500;
  --on-accent: #1a140c;
  --ok: #1a7442;
  --warn: #875600;
  --bad: #bb2f27;
  --info: #2259b3;
  --owl-outline: transparent;
  --glow: none;
  --glow-strong: none;
  --led-filter: none;
  --led-glow: none;
  --tp-text: var(--tp-on-light);
  color-scheme: light;
}

/* Clan 2003. Fixed look in both themes. */
:root[data-era="2"],
:root[data-era="2"][data-theme="light"] {
  --tp-text: var(--tp-on-dark);
  --bg: #1c1e21;
  --s1: #2a2d31;
  --s2: #34383d;
  --fg: #ececec;
  --muted: #b4b8be;
  --line: #4a4f56;
  --ctl: #7d838b;
  --accent: #f39200;
  --accent-text: #ffb000;
  --on-accent: #111111;
  --ok: #7be09f;
  --warn: #ffd36b;
  --bad: #ff8a80;
  --info: #8cc4ff;
  --owl-outline: #f3eee6;
  --glow: none;
  --glow-strong: 0 2px 0 #000;
  --scan-opacity: 0;
  --radius: 0px;
  --radius-sm: 0px;
  --font-display: "Black Ops One", Impact, "Arial Black", sans-serif;
  --font-body: Verdana, Tahoma, "DejaVu Sans", sans-serif;
  --display-weight: 400;
  --body-size: .9375rem;
  --body-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 6px);
  color-scheme: dark;
}

/* LAN '99. Fixed look in both themes. System fonts only. */
:root[data-era="3"],
:root[data-era="3"][data-theme="light"] {
  --tp-text: var(--tp-on-dark);
  --bg: #000014;
  --s1: #0b0b2a;
  --s2: #14143c;
  --fg: #ffffff;
  --muted: #c8c8c8;
  --line: #808080;
  --ctl: #a0a0a0;
  --accent: #f39200;
  --accent-text: #ffff66;
  --on-accent: #000000;
  --ok: #66ff66;
  --warn: #ffff66;
  --bad: #ff6666;
  --info: #7fbfff;
  --owl-outline: #f3eee6;
  --glow: none;
  --glow-strong: none;
  --scan-opacity: 0;
  --radius: 0px;
  --radius-sm: 0px;
  --font-display: "Comic Sans MS", "Chalkboard SE", cursive;
  --font-body: "Times New Roman", Times, "Liberation Serif", serif;
  --font-mono: "Courier New", Courier, monospace;
  --display-case: none;
  --display-weight: 700;
  --body-size: 1.0625rem;
  --body-image:
    radial-gradient(1px 1px at 12px 18px, #ffffff 98%, transparent),
    radial-gradient(1px 1px at 61px 44px, #c8c8ff 98%, transparent),
    radial-gradient(1.5px 1.5px at 94px 9px, #ffffff 98%, transparent),
    radial-gradient(1px 1px at 33px 83px, #ffffaa 98%, transparent),
    radial-gradient(1px 1px at 108px 71px, #ffffff 98%, transparent);
  --body-image-size: 120px 96px;
  --selection-bg: #000080;
  --selection-fg: #ffffff;
  color-scheme: dark;
}

/* Content well. In Clan 2003 and LAN '99 only the chrome and the
   homepage change look. Every other page keeps its content area in
   Owly dark: the same token set as the base block, declared again so
   that descendants inherit it. */
:root:is([data-era="2"], [data-era="3"]) body:not(.page-home) .content-wrapper {
  --bg: #050403;
  --s1: #0e0b08;
  --s2: #17120c;
  --fg: #f2e6d6;
  --muted: #b09a80;
  --line: #2b2219;
  --ctl: #7a6650;
  --accent: #f39200;
  --accent-text: #ffb000;
  --on-accent: #050403;
  --ok: #5bd68f;
  --warn: #ffcf5a;
  --bad: #ff7b72;
  --info: #7fb6ff;
  --owl-outline: #f3eee6;
  --glow: none;
  --glow-strong: none;
  --led-filter: none;
  --led-glow: 0 0 6px currentColor;
  --scan-opacity: .55;
  --radius: 4px;
  --radius-sm: 3px;
  --font-display: "Reddit Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Reddit Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display-case: uppercase;
  --display-weight: 800;
  --body-size: 1rem;
  --selection-bg: color-mix(in srgb, var(--accent) 40%, transparent);
  --selection-fg: var(--fg);
  background: var(--bg);
  color: var(--fg);
  color-scheme: dark;
  font-family: var(--font-body);
  font-size: var(--body-size);
}
