/* ==========================================================================
   PINWHEEL STUDIOS — STUDIO & DOCUMENTATION STYLESHEET
   Clean dark monochrome architecture with subtle gold & crimson accents
   ========================================================================== */

:root {
  --bg-0: #070709;
  --bg-1: #0e0e11;
  --bg-2: #15151a;
  --bg-3: #1c1c23;
  --line: #23232a;
  --line-strong: #363640;
  --ink: #f4f4f1;
  --ink-mid: #b3b3bc;
  --ink-dim: #80808b;

  --gold: #d4af37;
  --gold-bright: #e5c65c;
  --gold-soft: rgba(212, 175, 55, 0.1);
  --crimson: #c24141;
  --crimson-soft: rgba(194, 65, 65, 0.12);
  --blue-accent: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.12);

  /* Pinwheel Thread Node Colors */
  --node-purple: #a855f7;
  --node-blue: #3b82f6;
  --node-gold: #d4af37;
  --node-green: #22c55e;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-w: 1200px;
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection {
  background: var(--gold);
  color: #070709;
}

/* Subtle Scroll-Driven Pinwheel Watermark */
.bg-pinwheel {
  position: fixed;
  right: -260px;
  top: 52%;
  width: 660px;
  height: 660px;
  margin-top: -330px;
  opacity: 0.036;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.page-wrap { position: relative; z-index: 1; }

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

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

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(7, 7, 9, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:hover .brand-mark { transform: rotate(90deg); }

.brand-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-mid);
  padding: 8px 13px;
  border-radius: 4px;
  transition: color 0.16s, background 0.16s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: var(--bg-2);
}

.nav-links a.nav-docs {
  color: var(--gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.35);
  margin-left: 8px;
}

.nav-links a.nav-docs:hover,
.nav-links a.nav-docs.active {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.mobile-toggle {
  display: none;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 7px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* ==========================================================================
   COMMON HEADINGS, TAGS & BUTTONS
   ========================================================================== */
.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.section-desc {
  color: var(--ink-mid);
  font-size: 0.96rem;
  max-width: 48ch;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink-mid);
  white-space: nowrap;
}

.tag-gold {
  border-color: rgba(212, 175, 55, 0.45);
  background: var(--gold-soft);
  color: var(--gold-bright);
}

.tag-crimson {
  border-color: rgba(194, 65, 65, 0.5);
  background: var(--crimson-soft);
  color: #f08a8a;
}

.tag-blue {
  border-color: rgba(96, 165, 250, 0.45);
  background: var(--blue-soft);
  color: #93c5fd;
}

.tag-green {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.tag-purple {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.btn:hover {
  background: var(--bg-3);
  border-color: var(--ink-mid);
}

.btn-primary {
  background: var(--ink);
  color: #070709;
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: #070709;
}

.btn-gold {
  background: var(--gold-soft);
  border-color: rgba(212, 175, 55, 0.55);
  color: var(--gold-bright);
}

.btn-gold:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #070709;
}

.btn-muted {
  background: var(--bg-1);
  border-color: var(--line-strong);
  border-style: dashed;
  color: var(--ink-mid);
  cursor: default;
}

.btn-muted:hover {
  background: var(--bg-1);
  border-color: var(--line-strong);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding: 84px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero-top {
  max-width: 780px;
  margin-bottom: 52px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4.8vw, 3.65rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--ink-mid);
  max-width: 62ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Clean Studio Quick-Index Strip */
.overview-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-1);
}

.overview-cell {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  transition: background 0.16s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-cell:last-child { border-right: none; }
.overview-cell:hover { background: var(--bg-2); }

.overview-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

.overview-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

.overview-sub {
  font-size: 0.82rem;
  color: var(--ink-mid);
}

/* ==========================================================================
   SECTION 1 — UNITY ASSET STORE TOOLKIT
   ========================================================================== */
.compat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

/* Interactive Pinwheel Thread Flow Preview */
.thread-sandbox {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-1);
  overflow: hidden;
  margin-bottom: 34px;
}

.sandbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.sandbox-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink);
}

.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.preset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-tab {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 11px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: var(--bg-1);
  color: var(--ink-mid);
  cursor: pointer;
  transition: all 0.15s;
}

.preset-tab:hover { color: var(--ink); border-color: var(--ink-dim); }
.preset-tab.active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.node-stage {
  padding: 24px 20px;
  background-color: #09090c;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow-x: auto;
}

.node-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(195px, 1fr));
  gap: 16px;
  min-width: 800px;
}

.node-card {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #101015;
  cursor: pointer;
  transition: border-color 0.16s, transform 0.14s, background 0.16s;
  display: flex;
  flex-direction: column;
}

.node-card:hover { transform: translateY(-2px); background: #15151c; }
.node-card.selected { box-shadow: inset 0 0 0 1px currentColor; }

.node-card[data-color="purple"] { border-top: 3px solid var(--node-purple); color: var(--node-purple); }
.node-card[data-color="blue"]   { border-top: 3px solid var(--node-blue);   color: var(--node-blue); }
.node-card[data-color="gold"]   { border-top: 3px solid var(--node-gold);   color: var(--node-gold); }
.node-card[data-color="green"]  { border-top: 3px solid var(--node-green);  color: var(--node-green); }

.node-head {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.node-role {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.node-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  padding: 10px 12px 6px;
}

.node-ports {
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.port-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-mid);
  padding: 4px 7px;
  border-radius: 2px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
}

.port-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.sandbox-inspector {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}

.inspector-info {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.inspector-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.inspector-desc { font-size: 0.9rem; color: var(--ink-mid); }

.inspector-code {
  padding: 16px 20px;
  background: #09090c;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #d7d7e0;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.55;
}

/* 3-Column Package Breakdown */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.pillar {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
}

.pillar-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.pillar-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

.pillar p {
  font-size: 0.92rem;
  color: var(--ink-mid);
  margin-bottom: 16px;
}

.pillar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pillar-list li {
  font-size: 0.84rem;
  color: var(--ink-mid);
  padding-left: 14px;
  position: relative;
}

.pillar-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* Pinwheel Motion Interactive Preset Tester */
.motion-lab {
  margin: 4px 0 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #09090c;
}

.motion-lab-label {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--ink-dim);
  margin-bottom: 9px;
  display: flex;
  justify-content: space-between;
}

.motion-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.motion-chip {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  padding: 8px 6px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  user-select: none;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.14s, background 0.14s;
}

.motion-chip:hover { border-color: var(--gold); color: var(--gold-bright); }
.motion-chip[data-preset="crisp"]:hover   { transform: scale(1.045); }
.motion-chip[data-preset="crisp"]:active  { transform: scale(0.95); }
.motion-chip[data-preset="forge"]:hover   { transform: translateY(-1px); background: #1c1910; }
.motion-chip[data-preset="forge"]:active  { transform: translateY(3px) scale(0.98); }
.motion-chip[data-preset="nudge"]:hover   { transform: translateX(7px); }
.motion-chip[data-preset="nudge"]:active  { transform: translateX(3px); }
.motion-chip[data-preset="spring"]:hover  { transform: scale(1.07); transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
.motion-chip[data-preset="spring"]:active { transform: scale(0.92); }
.motion-chip[data-preset="tilt"]:hover    { transform: translateY(-2px) rotate(1.8deg); }
.motion-chip[data-preset="tilt"]:active   { transform: rotate(0deg) scale(0.97); }

@keyframes dreadFlicker {
  0%, 100% { opacity: 1; }
  25% { opacity: 0.35; }
  50% { opacity: 0.92; }
  75% { opacity: 0.45; }
}

.motion-chip[data-preset="dread"]:hover   { animation: dreadFlicker 0.24s steps(2, end) 1; border-color: var(--crimson); color: #f08a8a; }
.motion-chip[data-preset="dread"]:active  { transform: scale(0.96); opacity: 0.7; }

.motion-note {
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--gold-bright);
  min-height: 1.3em;
}

.suite-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-1);
}

.suite-cta-text { font-size: 0.92rem; color: var(--ink-mid); }
.suite-cta-text strong { color: var(--ink); }
.suite-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   SECTION 2 — GAMES (REAL STEAM CAPSULES)
   ========================================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.game-card {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-capsule {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #060608;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.game-capsule img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-card:hover .game-capsule img {
  transform: scale(1.025);
}

.game-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.game-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.game-desc {
  font-size: 0.94rem;
  color: var(--ink-mid);
  margin-bottom: 18px;
}

/* Expandable Full Steam Description for Thou Shalt Not Pass */
.game-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.game-details summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-details summary::-webkit-details-marker { display: none; }

.game-details summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 1rem;
}

.game-details[open] summary::after {
  content: "−";
}

.game-details-body {
  padding: 4px 0 18px;
  font-size: 0.88rem;
  color: var(--ink-mid);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-details-body h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  margin-top: 4px;
}

.factions-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.faction-box {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
}

.faction-box strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  margin-bottom: 5px;
}

.game-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  font-size: 0.84rem;
}

.game-meta-grid span {
  display: block;
  font-family: var(--font-mono);
  color: var(--ink-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.game-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   SECTION 3 — OPEN-SOURCE UNITY TOOLS
   ========================================================================== */
.oss-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.oss-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.oss-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.oss-name {
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.oss-summary {
  font-size: 0.93rem;
  color: var(--ink-mid);
  margin-bottom: 18px;
}

.oss-specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.oss-specs li {
  font-size: 0.85rem;
  color: var(--ink-mid);
  padding-left: 14px;
  position: relative;
}

.oss-specs li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.oss-specs strong { color: var(--ink); font-weight: 500; }

.oss-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   SECTION 4 — SUPPORT & CONTACT
   ========================================================================== */
.support-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

.support-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  padding: 28px;
}

.support-panel h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.support-panel p {
  color: var(--ink-mid);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #09090c;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  margin-bottom: 16px;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 3px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  background: var(--gold-soft);
  color: var(--gold-bright);
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover { background: var(--gold); color: #070709; }

.support-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--ink-dim);
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.channel-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #09090c;
  font-size: 0.86rem;
  font-weight: 500;
  transition: border-color 0.16s, background 0.16s;
}

.channel-link:hover {
  border-color: var(--gold);
  background: var(--bg-2);
}

.channel-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--ink-dim);
  margin-top: 2px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: 32px 0;
  background: #050507;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--ink-dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover { color: var(--ink); }

/* ==========================================================================
   DOCS HUB (docs.html) — EXPLICIT ASSET INDEXING
   ========================================================================== */
.docs-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 40px 0 88px;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 22px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-1);
  max-height: calc(100vh - var(--nav-h) - 44px);
  overflow-y: auto;
  padding: 18px;
}

.docs-search {
  width: 100%;
  background: #09090c;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 9px 12px;
  margin-bottom: 14px;
  outline: none;
}

.docs-search:focus { border-color: var(--gold); }

.toc-asset-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.toc-asset-block:first-of-type {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}

.toc-asset-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.toc-group-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 10px 0 6px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.79rem;
  color: var(--ink-mid);
  padding: 6px 8px;
  border-radius: 3px;
  border-left: 2px solid transparent;
  transition: all 0.14s;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--ink);
  background: var(--bg-2);
  border-left-color: var(--gold);
}

.toc-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-dim);
  flex-shrink: 0;
}

.docs-content { min-width: 0; }

.docs-hero {
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.docs-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  margin: 10px 0 12px;
}

/* Asset Documentation Directory Cards */
.asset-directory {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0 22px;
}

.asset-dir-card {
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.16s, background 0.16s;
}

.asset-dir-card:hover {
  border-color: var(--gold);
  background: var(--bg-2);
}

.asset-dir-card h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--ink);
}

.asset-dir-card p {
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.45;
}

.asset-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 7px 13px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--bg-1);
  color: var(--ink-mid);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover { color: var(--ink); border-color: var(--ink-dim); }
.filter-btn.active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* Document Banner Divider (clearly separates each Document & Asset) */
.doc-group-banner {
  padding: 20px 22px;
  margin: 34px 0 28px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--gold);
  border-radius: 5px;
  background: var(--bg-2);
}

.doc-group-banner.oss-banner {
  border-left-color: var(--blue-accent);
}

.doc-group-banner.hidden-by-filter { display: none; }

.doc-group-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.doc-group-banner h2 {
  font-family: var(--font-display);
  font-size: 1.38rem;
  margin-bottom: 4px;
}

.doc-group-banner p {
  font-size: 0.88rem;
  color: var(--ink-mid);
}

.docs-chapter {
  margin-bottom: 46px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.docs-chapter.hidden-by-search,
.docs-chapter.hidden-by-filter { display: none; }

.chapter-top-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.docs-chapter h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin-bottom: 12px;
}

.docs-chapter h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 20px 0 10px;
  color: var(--ink);
}

.docs-chapter p {
  color: var(--ink-mid);
  margin-bottom: 14px;
  max-width: 74ch;
  font-size: 0.94rem;
}

.docs-chapter ul,
.docs-chapter ol {
  margin: 0 0 16px 20px;
  color: var(--ink-mid);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.93rem;
}

.docs-chapter li strong { color: var(--ink); }

.callout {
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  background: rgba(212, 175, 55, 0.06);
  padding: 15px 18px;
  margin: 18px 0;
  font-size: 0.9rem;
  color: var(--ink-mid);
}

.callout strong {
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 5px;
}

.doc-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  text-align: left;
}

.doc-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: var(--bg-2);
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-strong);
}

.doc-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-mid);
  vertical-align: top;
}

.doc-table tr:last-child td { border-bottom: none; }
.doc-table td:first-child { color: var(--ink); font-weight: 500; }

.node-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid currentColor;
  text-transform: uppercase;
}

.pill-purple { color: var(--node-purple); }
.pill-blue   { color: var(--node-blue); }
.pill-gold   { color: var(--node-gold); }
.pill-green  { color: var(--node-green); }

.code-block {
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #09090c;
  overflow: hidden;
  margin: 18px 0;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-dim);
}

.code-block pre {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #e2e2ea;
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.83em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--gold-bright);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1020px) {
  .overview-strip,
  .pillars-grid,
  .games-grid,
  .oss-list,
  .support-grid,
  .sandbox-inspector,
  .docs-layout,
  .asset-directory {
    grid-template-columns: 1fr;
  }

  .overview-cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .overview-cell:last-child { border-bottom: none; }

  .inspector-info {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 780px) {
  .container { padding: 0 18px; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }

  .mobile-toggle { display: inline-block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #0a0a0d;
    border-bottom: 1px solid var(--line-strong);
    padding: 12px 18px 18px;
  }

  .nav-links.open { display: flex; }
  .nav-links a.nav-docs { margin-left: 0; margin-top: 6px; }

  .channels-grid,
  .factions-split { grid-template-columns: 1fr; }
  .bg-pinwheel { width: 420px; height: 420px; right: -190px; opacity: 0.03; }
}
