/* Colours and themes shared by every ElliottCount page: Auto (device), Light, Dark, Space, Retro green, Retro amber, Retro white. */
:root {
  --bg: #0b0f17; --panel: #121826; --line: #232c3d; --text: #e6ebf5; --muted: #8a96ad;
  --accent: #4fd1c5; --wave: #f472b6; --target: #fbbf24; --break: #f87171; --up: #34d399; --down: #f87171;
  --fib: #a78bfa; --abc: #60a5fa;
  --beta: #facc15;   /* anything about the beta (Deej, 24 Nov 2026): yellow on the dark themes, a deep gold on Light so it stays readable */
  --mono: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;   /* numbers use tabular figures (body), so they line up without a monospace font, which spaces commas oddly on Android */
}
/* Themes: Auto (follows the device), Light, Dark, Space, Retro green, Retro amber, Retro white. Chosen in the header, remembered per browser. */
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --bg: #f6f7fb; --panel: #ffffff; --line: #e2e6ef; --text: #141a26; --muted: #5d6880; --accent: #0f9488; --wave: #db2777; --target: #b45309; --break: #dc2626; --up: #059669; --down: #dc2626; --fib: #7c3aed; --abc: #2563eb; --beta: #a16207; --beta-ink: #fff; } }
:root[data-theme="light"] { --bg: #f6f7fb; --panel: #ffffff; --line: #e2e6ef; --text: #141a26; --muted: #5d6880; --accent: #0f9488; --wave: #db2777; --target: #b45309; --break: #dc2626; --up: #059669; --down: #dc2626; --fib: #7c3aed; --abc: #2563eb; --beta: #a16207; --beta-ink: #fff; }
/* Space: inspired by txprice.com. Deep navy, glassy panels, cyan and magenta neon, twinkling stars, faint scanlines.
   Wave meanings keep their own colours (magenta 1-5, sky-blue A-B-C, amber targets, red break) so the chart reads the same. */
:root[data-theme="space"] {
  --bg: #04050c; --panel: rgba(12, 16, 32, .78); --line: #1d2648; --text: #e6ecff; --muted: #7f8bb5;
  --accent: #3cf0ff; --wave: #ff3df2; --target: #ffc84a; --break: #ff4d6a; --up: #3dffa0; --down: #ff4d6a; --fib: #a98bff; --abc: #6cb8ff; --beta: #ffd84a;
}
:root[data-theme="space"] body {
  background:
    radial-gradient(1200px 700px at 70% -10%, #15124a, transparent 60%),
    radial-gradient(900px 600px at -10% 40%, #0b2a44, transparent 60%),
    #04050c;
  background-attachment: fixed;
}
:root[data-theme="space"]::before, :root[data-theme="space"] body::before, :root[data-theme="space"] body::after { content: ""; position: fixed; inset: 0; pointer-events: none; }
:root[data-theme="space"] body::before {   /* dim stars that stay put, behind everything */
  z-index: -1;
  background:
    radial-gradient(1px 1px at 8% 14%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 71%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 33%, #cfe0ff88 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 88%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 81% 22%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 61%, #cfe0ff77 50%, transparent 51%),
    radial-gradient(1px 1px at 15% 47%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 6%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 71% 52%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 94%, #fff6 50%, transparent 51%);
  background-size: 180px 180px, 230px 230px, 270px 270px, 210px 210px, 250px 250px, 180px 180px, 230px 230px, 270px 270px, 210px 210px, 250px 250px;
}
:root[data-theme="space"]::before {   /* bright stars that twinkle, behind everything */
  z-index: -1;
  background:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 72% 12%, #bff8ff 50%, transparent 51%),
    radial-gradient(2px 2px at 38% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 86% 54%, #ffd6fb 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 22% 86%, #fff 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 58% 34%, #bff8ff 50%, transparent 51%);
  background-size: 340px 340px, 410px 410px, 470px 470px, 380px 380px, 520px 520px, 440px 440px;
  animation: ec-twinkle 3.2s ease-in-out infinite alternate;
}
:root[data-theme="space"] body::after {   /* faint scanlines over the page; never blocks clicks */
  z-index: 9999;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0, rgba(255, 255, 255, .018) 1px, transparent 1px, transparent 3px);
}
@keyframes ec-twinkle { 0% { opacity: .35; } 45% { opacity: 1; } 70% { opacity: .6; } 100% { opacity: .95; } }
@keyframes ec-edge { to { left: 100%; } }
:root[data-theme="space"] header { background: rgba(4, 5, 12, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom-color: #1d2648;
  box-shadow: 0 1px 0 rgba(60, 240, 255, .25); }
:root[data-theme="space"] :is(.tf, .drawer, .auth, .poptab) {
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border-color: #1d2648; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
:root[data-theme="space"] .tf { position: relative; overflow: hidden; }
:root[data-theme="space"] .tf::before {   /* a thin cyan light that sweeps along the top edge of each panel */
  content: ""; position: absolute; left: -40%; top: 0; width: 40%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #3cf0ff, transparent); animation: ec-edge 7s linear infinite; }
:root[data-theme="space"] :is(.brand b, .pairhead h1) { text-shadow: 0 0 14px rgba(60, 240, 255, .55); }
:root[data-theme="space"] .brand b { color: #3cf0ff; }
:root[data-theme="space"] svg polyline[stroke="var(--wave)"] { filter: drop-shadow(0 0 4px #ff3df2) drop-shadow(0 0 10px #ff3df266); }
:root[data-theme="space"] svg polyline[stroke="var(--muted)"] { stroke: #5fd8ff; opacity: .8; filter: drop-shadow(0 0 3px rgba(60, 240, 255, .55)); }
:root[data-theme="space"] svg circle[fill="var(--accent)"] { filter: drop-shadow(0 0 6px #3cf0ff); }
:root[data-theme="space"] .auth .go { background: linear-gradient(90deg, #3cf0ff, #8b6bff); color: #04050c; box-shadow: 0 0 18px rgba(60, 240, 255, .35); }
:root[data-theme="space"] .seg button.on { background: #3cf0ff; color: #04050c; }
@media (prefers-reduced-motion: reduce) { :root[data-theme="space"]::before, :root[data-theme="space"] .tf::before { animation: none; } }
/* Old-school monitor themes: Retro green, Retro amber, Retro white. Courier text, scanlines, a soft glow.
   Wave meanings keep their own colours (pink 1-5, cyan A-B-C, red break, targets in their own amber/yellow) so the chart reads the same. */
:root[data-theme="retro"] { --bg: #000; --panel: #020a04; --line: #0f4d22; --text: #39ff6a; --muted: #1fa64a; --accent: #39ff6a; --up: #39ff6a;
  --wave: #ff5fd2; --abc: #3ad7ff; --target: #ffb000; --break: #ff4040; --down: #ff4040; --fib: #b18cff; --glow: 57, 255, 106; --beta: #ffe14d; }
:root[data-theme="amber"] { --bg: #000; --panel: #0d0700; --line: #4d3200; --text: #ffb000; --muted: #b37a00; --accent: #ffb000; --up: #7dff7a;
  --wave: #ff5fd2; --abc: #3ad7ff; --target: #fff07a; --break: #ff4040; --down: #ff4040; --fib: #c9a2ff; --glow: 255, 176, 0; --beta: #fff07a; }
:root[data-theme="dos"] { --bg: #000; --panel: #070707; --line: #3a3a3a; --text: #e8e8e8; --muted: #9a9a9a; --accent: #ffffff; --up: #55ff55;
  --wave: #ff55ff; --abc: #55ffff; --target: #ffff55; --break: #ff5555; --down: #ff5555; --fib: #aa88ff; --glow: 230, 230, 230; --beta: #ffff55; }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) { --mono: "Courier New", Courier, "Nimbus Mono PS", "Liberation Mono", monospace; }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) body { font-family: var(--mono); background: #000;
  text-shadow: 0 0 2px rgba(var(--glow), .55), 0 0 8px rgba(var(--glow), .18); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) body::after {   /* scanlines + edge vignette, like an old CRT; never blocks clicks */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, .22) 3px),
              radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .55) 100%); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) header { background: #000; border-bottom-color: var(--muted); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) :is(.tf, .drawer, .auth, .poptab) { border-color: var(--muted);
  box-shadow: 0 0 0 1px rgba(var(--glow), .12), 0 0 22px rgba(var(--glow), .12), inset 0 0 40px rgba(var(--glow), .05); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) :is(.brand b, .pairhead h1) { text-shadow: 0 0 10px rgba(var(--glow), .8); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) svg polyline[stroke="var(--muted)"] { stroke: var(--text); opacity: .8; filter: drop-shadow(0 0 3px rgba(var(--glow), .7)); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) svg text { text-shadow: none; }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) .auth .go { background: var(--accent); color: #000; text-shadow: none; box-shadow: 0 0 16px rgba(var(--glow), .5); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) .seg button.on { background: rgba(var(--glow), .18); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) :is(.help, .chip, input, select, button) { text-shadow: none; }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) :is(input, select, button) { font-family: var(--mono); }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) .menu { background: #000; border-color: var(--muted); }
body { font-variant-numeric: tabular-nums; }

/* Motto "No Forced Counts" (Deej, 24 Nov 2026): small caps line under the wordmark, footer lead-in and the public hero pill. */
.brand .bname { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.brand .bname > span { font-size: 24px; white-space: nowrap; }   /* brand.js then sets the exact size so the wordmark and motto are the same width */
.brand .motto { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; white-space: nowrap; }
:root:is([data-theme="retro"], [data-theme="amber"], [data-theme="dos"]) .brand .motto { letter-spacing: .26em; }   /* mono wordmark is wide: a wider motto keeps it big */
footer.site .fmotto { color: var(--text); font-weight: 600; }
.hero .mottopill, .mottopill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); background: var(--panel); }
.mottopill svg { width: 16px; height: 16px; }
@media (max-width: 700px) { .brand .motto { font-size: 10px; margin-top: 2px; } .brand .bname > span { font-size: 22px; } }
@media (max-width: 380px) { .brand .motto { font-size: 9px; letter-spacing: .12em; } .brand .bname > span { font-size: 19px; } }   /* keeps the member icons on the same row on small phones */

/* Links (Deej, 2 Dec 2026: never the browser blue on dark): any link without its own colour takes the theme accent. :where() keeps it weaker than every other rule. */
:where(a) { color: var(--accent); }
