/* ==========================================================================
   InstaDeck - design tokens, themes and base typography.
   Monochrome pixel identity: strictly black / white / grey, hard edges, no blur.
   Shared by every page (loaded before common.css and the page stylesheet).
   ========================================================================== */

@font-face {
  font-family: "VT323";
  src: url("/static/fonts/vt323.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("/static/fonts/silkscreen.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "VT323", "Cascadia Code", Consolas, monospace;
  --font-mono: "VT323", "Cascadia Code", Consolas, monospace;
  --font-pixel: "Silkscreen", "VT323", monospace;

  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --surface: #0a0a0a;
  --surface-solid: #0a0a0a;
  --surface-soft: #131313;
  --surface-hover: #1c1c1c;
  --border: #333333;
  --border-strong: #8a8a8a;
  --text: #f5f5f5;
  --text-soft: #c9c9c9;
  --muted: #adadad;
  --faint: #8f8f8f;
  --status-ok: #2fbf6b;
  --status-warn: #f0a020;
  --status-bad: #e5484d;
  --status-info: #4f8cff;
  --accent: #ffffff;
  --accent-strong: #ffffff;
  --accent-2: #d4d4d4;
  --accent-3: #a3a3a3;
  --success: #ffffff;
  --warning: #d4d4d4;
  --danger: #ffffff;
  --info: #d4d4d4;
  --on-accent: #000000;
  --grid: rgba(255, 255, 255, 0.035);
  --scan: rgba(255, 255, 255, 0.035);
  --shadow-lg: 8px 8px 0 #2b2b2b;
  --shadow-md: 4px 4px 0 #242424;
  --shadow-sm: 3px 3px 0 #2b2b2b;
  --radius-xl: 0px;
  --radius-lg: 0px;
  --radius-md: 0px;
  --radius-sm: 0px;
  --ease: steps(2, end);
  --transition: 90ms steps(2, end);
  --sidebar-width: 280px;
  --bar-h: 68px;
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #f4f4f4;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-soft: #ededed;
  --surface-hover: #e2e2e2;
  --border: #b4b4b4;
  --border-strong: #000000;
  --text: #000000;
  --text-soft: #222222;
  --muted: #555555;
  --faint: #5f5f5f;
  --status-ok: #2fbf6b;
  --status-warn: #f0a020;
  --status-bad: #e5484d;
  --status-info: #4f8cff;
  --accent: #000000;
  --accent-strong: #000000;
  --accent-2: #333333;
  --accent-3: #555555;
  --success: #000000;
  --warning: #333333;
  --danger: #000000;
  --info: #333333;
  --on-accent: #ffffff;
  --grid: rgba(0, 0, 0, 0.055);
  --scan: rgba(0, 0, 0, 0.045);
  --shadow-lg: 8px 8px 0 #000000;
  --shadow-md: 4px 4px 0 #000000;
  --shadow-sm: 3px 3px 0 #000000;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.375rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, var(--scan) 0, var(--scan) 1px, transparent 1px, transparent 3px);
}

button,
input,
select,
textarea {
  font-family: var(--font-sans);
  font-size: 1.344rem;
  color: inherit;
}

input,
select,
textarea {
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

button {
  min-height: 2.75rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-pixel);
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--border);
}

h2 {
  font-size: 1.431rem;
  line-height: 1.25;
  text-transform: uppercase;
}

h3 {
  font-size: 1.169rem;
  line-height: 1.35;
  text-transform: uppercase;
}

p, li, td, th, label, small, dd, dt {
  line-height: 1.5;
}

svg {
  display: block;
  shape-rendering: geometricPrecision;
}

img, svg, video, canvas, table {
  max-width: 100%;
}

pre,
code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

::selection {
  color: var(--on-accent);
  background: var(--accent);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-left: 1px solid var(--border);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 2px solid var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 480px) {
  main {
    min-width: 0;
  }
}
