/* ==========================================================================
   FyxIt design system -- dark "diagnostics console" skin
   Matches the brand art in /ss/s.png: near-black panels, neon-green accent,
   severity colours (critical / warning / suggestion), soft glow.

   Loaded BEFORE each page's own <style> block, so pages can still override.
   Fonts are self-hosted (public/fonts) -- no third-party requests.
   ========================================================================== */

/* ---------- Fonts ------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ------------------------------------------------------ */
:root {
  /* canvas + surfaces */
  --fx-bg: #05070d;
  --fx-bg-deep: #03050a;
  --fx-surface: #0d1420;
  --fx-surface-2: #131c2c;
  --fx-surface-3: #1a2438;
  --fx-surface-hover: #16203230;

  /* lines */
  --fx-line: rgba(148, 163, 184, 0.14);
  --fx-line-strong: rgba(148, 163, 184, 0.28);
  --fx-hairline: rgba(255, 255, 255, 0.05);

  /* type */
  --fx-text: #e8eefb;
  --fx-text-2: #a3b2c9;
  --fx-text-3: #74839b;
  --fx-ink: #04120a; /* text that sits on neon fills */

  /* brand + status */
  --fx-green: #22c55e;
  --fx-green-bright: #4ade80;
  --fx-green-deep: #16a34a;
  --fx-green-dim: rgba(34, 197, 94, 0.12);
  --fx-red: #f87171;
  --fx-red-solid: #ef4444;
  --fx-red-dim: rgba(248, 113, 113, 0.12);
  --fx-amber: #fbbf24;
  --fx-amber-solid: #f59e0b;
  --fx-amber-dim: rgba(251, 191, 36, 0.12);
  --fx-blue: #38bdf8;
  --fx-blue-solid: #0ea5e9;
  --fx-blue-dim: rgba(56, 189, 248, 0.12);
  --fx-violet: #a78bfa;
  --fx-violet-dim: rgba(167, 139, 250, 0.14);

  /* effects */
  --fx-glow: 0 0 24px rgba(34, 197, 94, 0.35);
  --fx-glow-soft: 0 0 40px rgba(34, 197, 94, 0.18);
  --fx-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
               0 18px 40px -18px rgba(0, 0, 0, 0.9);
  --fx-shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
                  0 40px 80px -30px rgba(0, 0, 0, 0.95);

  /* shape */
  --fx-r-sm: 8px;
  --fx-r: 14px;
  --fx-r-lg: 20px;
  --fx-r-pill: 999px;

  /* fonts */
  --fx-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --fx-display: 'Archivo', 'Inter', ui-sans-serif, system-ui, -apple-system,
    'Segoe UI', Roboto, sans-serif;
  --fx-mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas,
    'Courier New', monospace;

  color-scheme: dark;
}

/* ---------- Canvas ------------------------------------------------------ */
html { background: var(--fx-bg-deep); }

body {
  font-family: var(--fx-font);
  color: var(--fx-text);
  background-color: var(--fx-bg);
  background-image:
    radial-gradient(1100px 620px at 50% -260px, rgba(34, 197, 94, 0.16), transparent 68%),
    radial-gradient(900px 520px at 100% -80px, rgba(56, 189, 248, 0.10), transparent 62%),
    radial-gradient(800px 600px at 0% 30%, rgba(167, 139, 250, 0.06), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* faint circuit grid, painted above the canvas but behind all content */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 5%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 5%, transparent 72%);
}

::selection { background: rgba(34, 197, 94, 0.32); color: #fff; }

/* ---------- Typography -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fx-display);
  font-variation-settings: 'wdth' 92;
  letter-spacing: -0.015em;
  color: var(--fx-text);
  line-height: 1.15;
  text-wrap: balance;
}
h1 { font-weight: 800; }
h2 { font-weight: 800; }
h3, h4 { font-weight: 700; }

/* Section headline treatment straight off the brand art:
   heavy, uppercase, tight -- with one accent word. */
.fx-headline {
  font-family: var(--fx-display);
  font-variation-settings: 'wdth' 88;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.fx-accent { color: var(--fx-green-bright); }
.fx-accent-red { color: var(--fx-red); }
.fx-accent-blue { color: var(--fx-blue); }
.fx-accent-violet { color: var(--fx-violet); }

.fx-eyebrow {
  font-family: var(--fx-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fx-green);
}

a { color: var(--fx-green); }
a:hover { color: var(--fx-green-bright); }

code, pre, kbd, samp { font-family: var(--fx-mono); }

/* ---------- Logo lockup (green ring + check, "fyxit.now") --------------- */
.fx-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--fx-display);
  font-variation-settings: 'wdth' 95;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--fx-text);
  line-height: 1;
}
.fx-logo:hover { color: #fff; }
.fx-logo svg {
  width: 1.5em;
  height: 1.5em;
  flex: none;
  filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.55));
}
.fx-logo .fx-tld { color: var(--fx-green); font-weight: 700; }

/* ---------- Panels ------------------------------------------------------ */
.fx-panel {
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-r);
  box-shadow: var(--fx-shadow);
}

/* ---------- Buttons ----------------------------------------------------- */
.fx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--fx-font);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--fx-r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}
.fx-btn-primary {
  background: linear-gradient(135deg, var(--fx-green-bright) 0%, var(--fx-green) 55%, var(--fx-green-deep) 100%);
  color: var(--fx-ink);
  box-shadow: 0 10px 30px -10px rgba(34, 197, 94, 0.7), var(--fx-glow-soft);
}
.fx-btn-primary:hover {
  transform: translateY(-2px);
  color: var(--fx-ink);
  box-shadow: 0 16px 40px -12px rgba(34, 197, 94, 0.85), 0 0 60px rgba(34, 197, 94, 0.28);
}
.fx-btn-ghost {
  background: rgba(148, 163, 184, 0.06);
  border-color: var(--fx-line-strong);
  color: var(--fx-text);
}
.fx-btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: var(--fx-green);
  color: #fff;
}

/* ---------- Form controls (generic dark skin) --------------------------- */
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="date"], input[type="number"], input[type="search"], input[type="tel"],
select, textarea {
  background: rgba(3, 6, 12, 0.6);
  color: var(--fx-text);
  border: 1px solid var(--fx-line-strong);
  border-radius: var(--fx-r-sm);
  font-family: var(--fx-font);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
input::placeholder, textarea::placeholder { color: var(--fx-text-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--fx-green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
  background: rgba(3, 6, 12, 0.85);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--fx-green); }
::-webkit-calendar-picker-indicator { filter: invert(0.8); }

:focus-visible {
  outline: 2px solid var(--fx-green);
  outline-offset: 2px;
}

/* ---------- Status pills ------------------------------------------------ */
.fx-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--fx-r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.fx-pill-critical { background: var(--fx-red-dim); color: var(--fx-red); border-color: rgba(248, 113, 113, 0.3); }
.fx-pill-warning { background: var(--fx-amber-dim); color: var(--fx-amber); border-color: rgba(251, 191, 36, 0.3); }
.fx-pill-suggestion { background: var(--fx-blue-dim); color: var(--fx-blue); border-color: rgba(56, 189, 248, 0.3); }
.fx-pill-ok { background: var(--fx-green-dim); color: var(--fx-green-bright); border-color: rgba(34, 197, 94, 0.3); }

/* ---------- Scrollbar --------------------------------------------------- */
* { scrollbar-color: rgba(148, 163, 184, 0.3) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(34, 197, 94, 0.45); background-clip: content-box; }

/* ---------- Motion preferences ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
