/* TENEVS shared tokens and primitives (landing + admin). Dark only. */

:root {
  color-scheme: dark;

  /* surfaces */
  --ink: #0B0C10;          /* page */
  --slab: #111319;         /* panel */
  --slab-2: #161920;       /* raised / control */
  --slab-3: #1C2028;       /* hover */
  --rule: #23272F;         /* 1px borders */
  --rule-2: #2F343D;       /* stronger borders */

  /* text */
  --chalk: #E9EBEE;
  --fog: #9097A2;
  --dim: #5E6570;

  /* the one accent: the cap */
  --lime: #C6E21B;
  --lime-2: #D5EE48;
  --lime-ink: #0B0C10;
  --lime-a12: rgba(198, 226, 27, .12);
  --lime-a24: rgba(198, 226, 27, .24);
  --lime-a40: rgba(198, 226, 27, .40);

  /* admin-only signal colours */
  --amber: #F2B53A;
  --orange: #FF8B3D;
  --blue: #6AA8FF;
  --red: #FF5D5D;

  --radius: 14px;
  --radius-sm: 8px;

  --f-pixel: 'Silkscreen', ui-monospace, 'SF Mono', Menlo, monospace;
  --f-sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --gutter: 24px;
  --maxw: 1200px;
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
}

*, *::before, *::after { box-sizing: border-box; }

/* the hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--chalk);
  font: 400 16px/1.55 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, canvas, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
p { margin: 0; }
code { font-family: var(--f-mono); }

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

::selection { background: var(--lime); color: var(--lime-ink); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono { font-family: var(--f-mono); }

/* Pixel face: sizes are multiples of 8 px so the font's pixels land on the grid. */
.pixel {
  font-family: var(--f-pixel);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* ---------- brand ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--chalk);
}
.brand__mark {
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--lime) center / cover no-repeat;
  image-rendering: pixelated;
}
.brand__mark.has-img { background-color: transparent; }
.brand__word {
  font: 400 24px/1 var(--f-pixel);
  text-transform: uppercase;
  letter-spacing: 0;
}

/* ---------- panel ---------- */

.panel {
  background: var(--slab);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  background: var(--slab-2);
  color: var(--chalk);
  font: 500 15px/1 var(--f-sans);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--slab-3); border-color: #3B414C; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}
.btn--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--lime-ink);
  font-weight: 600;
}
.btn--lime:hover { background: var(--lime-2); border-color: var(--lime-2); }
.btn--ghost { background: transparent; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn--xs {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.btn.is-done { color: var(--lime); border-color: var(--lime-a40); }

/* ---------- pixel pip (a square "dot") ---------- */

.pip {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--lime);
}
.pip--blink { animation: pip-blink 1.2s steps(1, end) infinite; }
.pip--off { background: var(--dim); animation: none; }
@keyframes pip-blink { 50% { opacity: .18; } }

/* ---------- chips and badges ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--rule-2);
  border-radius: 7px;
  background: var(--slab-2);
  color: var(--chalk);
  font: 500 12px/1 var(--f-mono);
  white-space: nowrap;
}
.chip--lime { color: var(--lime); border-color: var(--lime-a40); background: var(--lime-a12); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  flex: none;
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  color: var(--fog);
  font: 500 10.5px/1 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

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