:root {
  --bg: #000;
  --bg-elev: #151923;
  --text: #e6e8ee;
  --muted: #a3a9b7;
  --link: #7cb3ff;
  --accent: #6ee7b7;
  --primary: #3f48cc;
  --warning: #ef4444;
  --border: #2a3040;
  --radius: 10px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --max-w: 1080px;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Allow content to break out of the container width when needed */
.fullbleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
}

.site-footer { margin-top: auto; }

main { flex: 1 0 auto; }
main.container { border: 1px solid var(--primary); border-radius: var(--radius); padding: var(--space-4); }
.app-solid { background: var(--bg); color: var(--text); }

/* Ensure content appears above the background canvas */
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* Avoid showing a programmatic focus outline on <main> (we show a permanent frame instead) */
main:focus { outline: none; }

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Orbitron', 'Share Tech Mono', sans-serif;
}

.nav { display: flex; gap: var(--space-4); align-items: center; }
.nav a { padding: var(--space-2) var(--space-3); border-radius: var(--radius); }
.nav a.active { background: var(--bg-elev); border: 1px solid var(--border); text-decoration: none; }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); width: auto; height: auto; background: var(--bg-elev); padding: var(--space-2) var(--space-3); border-radius: var(--radius); }

.stack > * + * { margin-top: var(--space-4); }

.actions { display: flex; gap: var(--space-3); }

.button {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  /* Dual ring: white inner, dark outer for contrast */
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0,0,0,0.85);
}
.button:hover { text-decoration: none; filter: brightness(0.95); }
.button:disabled, .button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}
.button-subtle:disabled, .button-subtle[disabled] {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border-color: rgba(255,255,255,0.08);
}

.button-secondary { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); }
.button-subtle { box-shadow: none; }
.button-warning { background: var(--warning); color: #ffffff; border: 1px solid var(--warning); }
.button-warning:hover { filter: brightness(1.05); }

.list { list-style: none; }
.list li { margin-top: var(--space-2); }

img { max-width: 100%; height: auto; display: block; border-radius: calc(var(--radius) - 2px); }

/* Visually hidden utility for screen reader-only content */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Utility: warning text color */
.text-warning { color: var(--warning); }

