/* Midnight Studio Hub — flagship homepage */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #05070f;
  --bg-elevated: rgba(14, 20, 36, 0.72);
  --bg-card: rgba(16, 24, 48, 0.68);
  --text: #eef2ff;
  --muted: #9aa8c7;
  --accent: #7c9cff;
  --accent-2: #a78bfa;
  --accent-3: #22d3ee;
  --ok: #6ee7b7;
  --warn: #fbbf24;
  --danger: #fb7185;
  --bad: #fb7185;
  --fail: #fb7185;
  --line: rgba(124, 156, 255, 0.22);
  --line-strong: rgba(124, 156, 255, 0.4);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: 0 0 0 3px rgba(124, 156, 255, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #a5b8ff; text-decoration: none; }
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.chip:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(124, 156, 255, 0.12);
  padding: 0.15em 0.45em;
  border-radius: 6px;
  border: 1px solid rgba(124, 156, 255, 0.12);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #0a0e1a;
  font-weight: 600;
  border-radius: 10px;
}
.skip-link:focus {
  left: 0.75rem;
  box-shadow: var(--focus);
}

/* --- Atmospheric background --- */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(124, 156, 255, 0.28), transparent 58%),
    radial-gradient(ellipse 65% 45% at 92% 18%, rgba(167, 139, 250, 0.18), transparent 52%),
    radial-gradient(ellipse 55% 40% at 8% 62%, rgba(34, 211, 238, 0.1), transparent 52%),
    radial-gradient(ellipse 40% 30% at 70% 85%, rgba(124, 156, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #05070f 0%, #070b18 40%, #05070f 100%);
}

.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.bg-scene .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
  will-change: transform;
}
.bg-scene .orb-a {
  width: min(52vw, 480px);
  height: min(52vw, 480px);
  top: -8%;
  right: 5%;
  background: radial-gradient(circle, rgba(124, 156, 255, 0.55), transparent 70%);
}
.bg-scene .orb-b {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  bottom: 10%;
  left: -5%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.5), transparent 70%);
  animation-delay: -6s;
  animation-duration: 22s;
}
.bg-scene .orb-c {
  width: min(30vw, 280px);
  height: min(30vw, 280px);
  top: 45%;
  left: 40%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 70%);
  animation-delay: -11s;
  animation-duration: 16s;
}
.bg-scene .orb-d {
  width: min(24vw, 220px);
  height: min(24vw, 220px);
  top: 18%;
  left: 12%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.32), transparent 70%);
  animation-delay: -3s;
  animation-duration: 26s;
  opacity: 0.4;
}

.bg-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  mix-blend-mode: screen;
}
.bg-nebula-a {
  width: min(70vw, 640px);
  height: min(50vw, 420px);
  top: 8%;
  right: -10%;
  background: radial-gradient(ellipse, rgba(124, 156, 255, 0.45), transparent 70%);
  animation: drift 28s ease-in-out infinite alternate;
}
.bg-nebula-b {
  width: min(55vw, 480px);
  height: min(40vw, 360px);
  bottom: 5%;
  left: -8%;
  background: radial-gradient(ellipse, rgba(167, 139, 250, 0.4), transparent 70%);
  animation: drift 34s ease-in-out infinite alternate-reverse;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 156, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 156, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
  opacity: 0.75;
}

.bg-aurora {
  position: absolute;
  inset: -20% -10%;
  background: conic-gradient(
    from 180deg at 50% 40%,
    transparent 0deg,
    rgba(124, 156, 255, 0.1) 60deg,
    rgba(167, 139, 250, 0.12) 140deg,
    rgba(34, 211, 238, 0.08) 220deg,
    transparent 300deg
  );
  animation: spin-slow 48s linear infinite;
  opacity: 0.9;
  will-change: transform;
}
.bg-aurora-2 {
  inset: -30% -20%;
  opacity: 0.45;
  animation-duration: 72s;
  animation-direction: reverse;
  background: conic-gradient(
    from 90deg at 40% 60%,
    transparent 0deg,
    rgba(34, 211, 238, 0.07) 80deg,
    rgba(124, 156, 255, 0.09) 160deg,
    transparent 280deg
  );
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 6%) scale(1.08); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.site-header, main, .site-footer, .donate-dock { position: relative; z-index: 1; }

/* --- Header --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  position: sticky;
  top: 0;
  background: rgba(5, 7, 15, 0.72);
  z-index: 20;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo:focus-visible { border-radius: 8px; }

.site-header .badge-hub {
  flex-shrink: 0;
  border-color: rgba(34, 211, 238, 0.5);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.12);
}

nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; align-items: center; margin-left: auto; }
nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.35rem 0.15rem;
  position: relative;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
nav a:hover { color: var(--text); }
nav a:hover::after { transform: scaleX(1); }
nav a:focus-visible {
  color: var(--text);
  box-shadow: none;
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(124, 156, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}

main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 5.5rem;
}

/* --- Donate dock --- */
.donate-dock {
  position: fixed;
  z-index: 30;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 600;
}
.dock-x { color: var(--accent-3); }
.dock-sep { color: var(--muted); opacity: 0.6; }
.dock-copy {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0e1a;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.dock-copy:hover { transform: translateY(-1px); }

/* --- Hero --- */
.hero {
  position: relative;
  padding: 2.5rem 0 1.75rem;
  animation: fade-up 0.7s var(--ease) both;
}
.hero-shell {
  position: relative;
  border-radius: 28px;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(18, 26, 52, 0.85), rgba(10, 14, 28, 0.55));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.hero-shell::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 70%;
  height: 90%;
  background: radial-gradient(circle, rgba(124, 156, 255, 0.22), transparent 65%);
  pointer-events: none;
}
.hero-shell::after {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -40%;
  width: 55%;
  height: 80%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18), transparent 65%);
  pointer-events: none;
}
.hero-shell > * { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-3);
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5.5vw, 3.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 1.1rem;
  max-width: 16ch;
  background: linear-gradient(135deg, #eef2ff 30%, #a5b8ff 70%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 1.35rem;
}
.lede strong { color: var(--text); font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.honesty {
  margin: 0 0 1.35rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.07);
  color: #fde68a;
  font-size: 0.9rem;
  line-height: 1.55;
}
.honesty strong { color: #fef3c7; }
.honesty code {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(251, 191, 36, 0.25);
  color: #fde68a;
}

.hub-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin: 0;
}
.hub-stats .stat {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(5, 8, 18, 0.5);
}
.hub-stats dt {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.hub-stats dd {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hub-stats .stat-warn { color: var(--warn); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.btn:hover { transform: translateY(-2px); border-color: var(--line-strong); color: var(--text); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 14px 36px rgba(124, 156, 255, 0.4);
  color: #0a0e1a;
}
.btn.ghost { background: rgba(255, 255, 255, 0.03); }
.btn.small { padding: 0.45rem 0.9rem; font-size: 0.85rem; }

/* --- Section heads --- */
.section-head { margin-bottom: 1.15rem; }
.section-head.tight { margin-bottom: 1rem; }
.section-head h2 {
  font-family: var(--display);
  letter-spacing: -0.02em;
  font-size: 1.45rem;
  margin: 0 0 0.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.section-head .muted { margin: 0; }

/* --- Filters --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(124, 156, 255, 0.06);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active {
  color: #0a0e1a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.chip.ghost-chip {
  border-style: dashed;
  color: var(--accent-3);
}

/* --- Apps gallery --- */
.apps-section { margin: 1.5rem 0 2rem; }
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.25s var(--ease);
}
.app-card.is-hidden { display: none; }
.app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.85;
}
.app-card-flagship::before { background: linear-gradient(90deg, #6ee7b7, var(--accent-3), var(--accent-2)); }
.app-card-stub::before { background: linear-gradient(90deg, var(--warn), #f97316); }
.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}
.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.app-card .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.15rem;
  background: linear-gradient(135deg, rgba(124, 156, 255, 0.2), rgba(167, 139, 250, 0.15));
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.app-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
}
.app-card > p {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0 0 1rem;
  flex: 1;
}
.app-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
  opacity: 0.95;
}
.app-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}
.status-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
.status-pill.is-checking { color: var(--accent-3); border-color: rgba(34, 211, 238, 0.4); }
.status-pill.is-ok { color: var(--ok); border-color: rgba(110, 231, 183, 0.45); background: rgba(110, 231, 183, 0.08); }
.status-pill.is-miss { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.status-pill.is-err { color: var(--fail); border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }

.status-legend { margin-top: 1rem; font-size: 0.88rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}
.badge-live {
  color: var(--ok);
  border-color: rgba(110, 231, 183, 0.4);
  background: rgba(110, 231, 183, 0.1);
}
.badge-flagship {
  border-color: rgba(34, 211, 238, 0.55);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.15);
}
.badge-demo {
  color: var(--accent-3);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.1);
}
.badge-stub {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
}
.badge-research {
  color: var(--accent-2);
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.12);
  font-size: 0.65rem;
  vertical-align: middle;
}
.badge-hub {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}

/* --- Compat matrix explorer --- */
.compat-panel {
  background:
    linear-gradient(145deg, rgba(124, 156, 255, 0.08), rgba(167, 139, 250, 0.05)),
    var(--bg-card);
}
.compat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.compat-search-label { flex: 1; min-width: min(100%, 220px); }
#compat-search {
  width: 100%;
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 18, 0.65);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}
#compat-search::placeholder { color: var(--muted); opacity: 0.8; }
.compat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
  margin: 0.5rem 0 1rem;
}
.compat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(5, 8, 18, 0.55);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
}
.compat-item:hover,
.compat-item.is-selected {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(124, 156, 255, 0.25);
  transform: translateY(-2px);
}
.compat-item.is-hidden { display: none; }
.compat-key {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.compat-val {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  background: linear-gradient(135deg, #c7d2fe, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.compat-cat {
  font-size: 0.68rem;
  color: var(--accent-3);
  opacity: 0.9;
  margin-top: 0.15rem;
}
.compat-detail {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: rgba(5, 8, 18, 0.4);
  margin-bottom: 0.85rem;
  min-height: 4.5rem;
}
.compat-detail h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.05rem;
}
.compat-detail p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.compat-note { margin: 0; font-size: 0.9rem; }

/* --- Panels & cards --- */
.panel, .card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.55rem;
  margin: 1.35rem 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.panel:hover, .card:hover {
  border-color: var(--line-strong);
}
.panel h2, .card h3 {
  margin-top: 0;
  font-family: var(--display);
  letter-spacing: -0.02em;
}
.panel h2 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.muted { color: var(--muted); font-size: 0.95rem; }

.bullets { padding-left: 1.15rem; color: var(--muted); margin: 1rem 0; }
.bullets li { margin: 0.45rem 0; }
.bullets li::marker { color: var(--accent-2); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.card .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 0.9rem;
  font-size: 1.15rem;
  background: linear-gradient(135deg, rgba(124, 156, 255, 0.2), rgba(167, 139, 250, 0.15));
  border: 1px solid var(--line);
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.45rem; }
.card p { color: var(--muted); flex: 1; margin: 0 0 1rem; font-size: 0.95rem; }
.card > a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
}
.card > a:hover { color: #c7d2fe; }
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.token-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.token-chip {
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(7, 10, 22, 0.55);
}
.token-chip h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.token-chip p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.steps { color: var(--muted); padding-left: 1.2rem; list-style: decimal; }
.steps li { margin: 0.85rem 0; }

.links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1.5rem;
}
.links li a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0;
  font-weight: 500;
}
.links li a::before {
  content: "→";
  color: var(--accent-2);
  opacity: 0.7;
}

/* --- Donate --- */
.donate {
  background:
    linear-gradient(145deg, rgba(124, 156, 255, 0.1), rgba(167, 139, 250, 0.06)),
    var(--bg-card);
  border-color: var(--line-strong);
}
.donate .addr-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.1rem 0;
}
.donate code#donation-addr {
  display: block;
  word-break: break-all;
  padding: 0.95rem 1.1rem;
  background: rgba(5, 8, 18, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}
.status-line {
  min-height: 1.25rem;
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--ok);
}
.status-line.is-fail { color: var(--fail); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 1.5rem 2.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: grid;
  gap: 0.85rem;
  background: rgba(5, 7, 15, 0.6);
  backdrop-filter: blur(8px);
}
.site-footer strong { color: var(--text); }
.footer-donate code {
  display: inline;
  word-break: break-all;
  background: transparent;
  padding: 0;
  border: none;
  font-size: 0.78rem;
  color: var(--text);
}
.disclaimer { margin: 0; font-size: 0.8rem; opacity: 0.85; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hub-stats { grid-template-columns: 1fr 1fr; }
  .apps-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .grid-3, .token-grid, .apps-grid { grid-template-columns: 1fr; }
  .links ul { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .site-header .badge-hub { display: none; }
  nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 0.75rem 1rem 1rem;
    background: rgba(8, 12, 24, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  .site-header.nav-open nav { display: flex; }
  nav a {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(124, 156, 255, 0.08);
  }
  nav a::after { display: none; }
  .hero { padding: 1.75rem 0 1.25rem; }
  .hero h1 { max-width: none; }
  .compat-grid { grid-template-columns: 1fr 1fr; }
  .donate-dock { left: 0.75rem; right: 0.75rem; justify-content: center; }
}
@media (max-width: 480px) {
  .compat-grid { grid-template-columns: 1fr; }
  .hub-stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .bg-scene .orb, .bg-aurora, .bg-nebula { animation: none !important; }
}


.badge-new {
  background: rgba(110, 231, 183, 0.14);
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.4);
}


/* —— Hub command palette (Pass 13 polish) —— */
.hub-cmd-btn {
  margin-left: 0.25rem;
  font-family: var(--mono, ui-monospace, monospace);
  letter-spacing: 0.02em;
}
.cmd-palette {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 5, 12, 0.72); backdrop-filter: blur(8px);
  display: grid; place-items: start center; padding: 12vh 1rem 1rem;
}
.cmd-palette[hidden] { display: none !important; }
.cmd-card {
  width: min(520px, 100%);
  border-radius: 18px; border: 1px solid rgba(124,156,255,0.4);
  background: rgba(12, 18, 34, 0.97); box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  padding: 0.85rem 0.95rem 0.75rem;
  animation: cmdIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cmdIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cmd-card { animation: none; }
}
.cmd-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.cmd-head h3 { margin: 0; font-family: var(--display, inherit); font-size: 1.05rem; }
#cmd-input {
  width: 100%; border-radius: 12px; border: 1px solid rgba(124,156,255,0.28);
  background: rgba(0,0,0,0.28); color: #eef2ff;
  padding: 0.7rem 0.85rem; font: inherit; font-size: 0.95rem; margin-bottom: 0.55rem;
}
#cmd-input:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(124,156,255,0.45);
}
.cmd-list {
  list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto;
}
.cmd-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: 100%; text-align: left; cursor: pointer;
  padding: 0.65rem 0.75rem; margin-bottom: 0.25rem;
  border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: inherit; font: inherit;
}
.cmd-item:hover, .cmd-item.is-active {
  background: rgba(124,156,255,0.1); border-color: rgba(124,156,255,0.35);
}
.cmd-item strong { display: block; font-size: 0.92rem; }
.cmd-item span { color: #9aa8c7; font-size: 0.75rem; font-family: ui-monospace, monospace; }
.cmd-item .cmd-go { color: #22d3ee; font-size: 0.78rem; font-weight: 700; }
.cmd-foot { margin: 0.55rem 0 0; text-align: center; }


/* —— Pass 14: typography sharpen + probe / empty / ⌘K —— */
.section-head h2 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  font-weight: 700;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  line-height: 1.15;
}
.hero .eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.lede {
  letter-spacing: -0.01em;
  line-height: 1.55;
}
.hub-stats .stat dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hub-stats .stat dd {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.55rem;
}

.probe-banner {
  margin: 0.35rem 0 1rem;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(14, 20, 36, 0.65);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.probe-banner[hidden] { display: none !important; }
.probe-banner.is-checking { border-color: rgba(34, 211, 238, 0.4); color: var(--accent-3); }
.probe-banner.is-ok { border-color: rgba(110, 231, 183, 0.4); color: var(--ok); }
.probe-banner.is-miss { border-color: rgba(251, 191, 36, 0.4); color: var(--warn); }
.probe-banner.is-partial { border-color: rgba(167, 139, 250, 0.45); color: var(--accent-2); }

.ghost-chip.is-probing,
#btn-probe-status[aria-busy="true"] {
  opacity: 0.75;
  pointer-events: none;
}
.status-pill.is-checking::before {
  animation: pulse 1s ease-in-out infinite;
}

.studios-empty {
  margin: 0.5rem 0 1.5rem;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: rgba(8, 12, 24, 0.55);
  text-align: center;
  animation: fadeUp 0.35s var(--ease);
}
.studios-empty p { margin: 0 0 0.45rem; }
.studios-empty .btn { margin-top: 0.55rem; }

.cmd-empty {
  padding: 1rem 0.85rem;
  display: grid;
  gap: 0.35rem;
  text-align: left;
}
.cmd-empty strong { color: var(--text); font-size: 0.95rem; }
.cmd-head kbd,
.cmd-palette kbd {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.cmd-item.is-active .cmd-go { color: var(--accent-3); }
.cmd-foot { margin: 0.55rem 0 0; text-align: center; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .studios-empty { animation: none; }
  .status-pill.is-checking::before { animation: none; }
}

/* --- Preprod / Compact / proof-server status panel --- */
.preprod-panel {
  border-color: rgba(124, 156, 255, 0.28);
  background:
    linear-gradient(155deg, rgba(34, 211, 238, 0.06), rgba(124, 156, 255, 0.05)),
    var(--bg-card);
}
.preprod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.preprod-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(5, 8, 18, 0.55);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.preprod-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.preprod-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.02rem;
}
.preprod-card p { margin: 0; font-size: 0.9rem; }
.preprod-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.preprod-meta li { margin: 0.25rem 0; }
.preprod-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.preprod-live-row {
  margin: 1rem 0 0.75rem;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}
#btn-probe-live-labs[aria-busy="true"] {
  opacity: 0.75;
  pointer-events: none;
}
.preprod-honesty {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}
@media (max-width: 900px) {
  .preprod-grid { grid-template-columns: 1fr; }
}

/* Midnight visual refresh — 2026-10-04. Shared craft overlay. */
:root {
  --bg: #070612;
  --bg-elevated: rgba(18, 16, 40, 0.78);
  --bg-card: rgba(16, 14, 36, 0.72);
  --text: #f5f3ff;
  --muted: #b7b3d4;
  --accent: #67e8f9;
  --accent-2: #c084fc;
  --accent-3: #5eead4;
  --ok: #6ee7b7;
  --warn: #fbbf24;
  --danger: #fb7185;
  --bad: #fb7185;
  --fail: #fb7185;
  --line: rgba(192, 132, 252, 0.28);
  --line-strong: rgba(103, 232, 249, 0.55);
  --shadow: 0 24px 60px rgba(4, 2, 16, 0.45);
  --font: "Inter", system-ui, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}
body {
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(192, 132, 252, 0.22), transparent 60%),
    radial-gradient(800px 520px at 90% 0%, rgba(103, 232, 249, 0.16), transparent 55%),
    var(--bg);
}
.site-header, header.site-header {
  background: rgba(7, 6, 18, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.hero-shell, .hero, main section:first-of-type {
  position: relative;
}
.hero-mark {
  width: min(280px, 70vw);
  margin: 0.4rem auto 1.2rem;
  filter: drop-shadow(0 18px 40px rgba(103, 232, 249, 0.25));
}
.hero-mark img, .hero-mark svg { width: 100%; height: auto; display: block; }
.btn.primary, a.btn.primary, button.btn.primary {
  background: linear-gradient(135deg, #67e8f9, #c084fc);
  color: #140b22;
  border: 0;
  font-weight: 700;
}
.app-card, .panel, .card, article {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.app-card {
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.08), transparent 42%),
    var(--bg-card);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.app-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.icon, .app-card .icon {
  background: radial-gradient(circle at 30% 30%, rgba(103, 232, 249, 0.35), rgba(192, 132, 252, 0.12));
  border: 1px solid var(--line);
}
.badge, .badge-live, .badge-flagship {
  letter-spacing: 0.04em;
}

/* Product rebuild — 2026-10-04 */
.hero-shell.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  background: #070612;
}
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 0.95; letter-spacing: -0.04em; margin: 0.4rem 0 0.8rem; }
.hero-copy .lede { max-width: 38rem; font-size: 1.05rem; color: #d9d6ef; }
.hero-stage { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid rgba(103,232,249,0.35); box-shadow: 0 24px 70px rgba(0,0,0,0.45); }
.hero-stage img { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.honesty { margin-top: 1rem; }
.app-card { min-height: 230px; background:
  linear-gradient(180deg, rgba(103,232,249,0.16), rgba(7,6,18,0.2) 28%, rgba(16,14,36,0.9)),
  var(--bg-card); }
.app-card h3 { font-size: 1.2rem; letter-spacing: -0.03em; }
.app-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.site-header { background: rgba(7,6,18,0.84); }
@media (max-width: 860px) {
  .hero-shell.hero-split { grid-template-columns: 1fr; }
}
body.studio-shell::before, .topbar + main::before { content: none; }
