/* Obsidian Overseer — shared design system + flavored chrome */

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06070a;
  --bg-deep: #040507;
  --bg-wash: radial-gradient(ellipse 100% 70% at 50% -20%, rgba(var(--accent-rgb), 0.12), transparent 55%),
             radial-gradient(ellipse 60% 40% at 85% 60%, rgba(90, 110, 140, 0.06), transparent 50%);
  --surface: #0f1115;
  --surface2: #161a20;
  --surface-cool: #12151c;
  --border: #2a2520;
  --border-soft: rgba(42, 37, 32, 0.7);
  --text: #f0ebe5;
  --text-muted: #9a8f82;
  --text-subtle: #6b6156;
  --accent: #d4943c;
  --accent-bright: #e8a84a;
  --accent-dim: #b87828;
  --accent-glow: rgba(var(--accent-rgb), 0.35);
  --accent-rgb: 232, 168, 74;
  --live: #6bcf7f;
  --slate: #8a9bb0;
  --radius: 12px;
  --radius-lg: 18px;
  --site-max: 880px;
  --font: "Outfit", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Outfit", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: 0.2s ease;
  --nav-bg: rgba(6, 7, 10, 0.88);
  --panel-bg: rgba(15, 17, 21, 0.72);
  --panel-bg-strong: rgba(15, 17, 21, 0.88);
  --drop-bg: #0e1014;
  --theme-meta: #06070a;
  --hover-wash: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f5;
  --bg-deep: #e2e6ee;
  --bg-wash: radial-gradient(ellipse 100% 70% at 50% -20%, rgba(var(--accent-rgb), 0.12), transparent 55%),
             radial-gradient(ellipse 60% 40% at 85% 60%, rgba(90, 110, 140, 0.08), transparent 50%);
  --surface: #ffffff;
  --surface2: #f2f4f8;
  --surface-cool: #f6f7fa;
  --border: #cfd5df;
  --border-soft: rgba(40, 48, 62, 0.14);
  --text: #1a1d24;
  --text-muted: #5a6370;
  --text-subtle: #848c99;
  --accent: #3d6ea8;
  --accent-bright: #2f5f96;
  --accent-dim: #25507e;
  --accent-glow: rgba(61, 110, 168, 0.28);
  --accent-rgb: 61, 110, 168;
  --live: #2f9e55;
  --slate: #5a6a80;
  --nav-bg: rgba(238, 241, 245, 0.94);
  --panel-bg: rgba(255, 255, 255, 0.9);
  --panel-bg-strong: rgba(255, 255, 255, 0.97);
  --drop-bg: #ffffff;
  --theme-meta: #eef1f5;
  --hover-wash: rgba(20, 28, 40, 0.05);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.55) var(--surface2);
}

body {
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-wash);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Themed scrollbars (Firefox + Chromium/Safari; limited on mobile OS chrome) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.55) var(--surface2);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--surface2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(var(--accent-rgb), 0.75),
    rgba(var(--accent-rgb), 0.45)
  );
  border-radius: 999px;
  border: 2px solid var(--surface2);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--accent-bright),
    var(--accent-dim)
  );
  border: 2px solid var(--surface2);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: var(--surface2);
}

/* Atmosphere: wash + hex grid + grain + breathing orb */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 20%, transparent 75%);
}

.bg-ambient::after {
  content: "";
  position: absolute;
  width: min(75vw, 560px);
  height: min(75vw, 560px);
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18) 0%, transparent 68%);
  filter: blur(48px);
  animation: orb-breathe 10s ease-in-out infinite;
}

.bg-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  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 orb-breathe {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg-ambient::after { animation: none; }
  .hero-glow,
  .final-cta::before {
    animation: none !important;
  }
  html.theme-transition::view-transition-old(root),
  html.theme-transition::view-transition-new(root) {
    animation: none !important;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal,
  .reveal-io,
  .reveal-io.is-visible {
    opacity: 1 !important;
    transform: none !important;
  }
  .how-item:hover {
    transform: none;
  }
}

/* Same-origin soft page morph (Chromium / Safari progressive) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
  animation-timing-function: ease;
}

/* Theme toggle: circular reveal from the control (View Transitions) */
html.theme-transition::view-transition-old(root) {
  animation: none;
  z-index: 1;
  mix-blend-mode: normal;
}

html.theme-transition::view-transition-new(root) {
  animation: theme-circle-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  z-index: 2;
  mix-blend-mode: normal;
}

@keyframes theme-circle-in {
  from {
    clip-path: circle(0px at var(--theme-x, 50%) var(--theme-y, 50%));
  }
  to {
    clip-path: circle(var(--theme-r, 100vmax) at var(--theme-x, 50%) var(--theme-y, 50%));
  }
}

/* Theme crossfade fallback (Firefox / no View Transitions) */
html.theme-animating,
html.theme-animating body,
html.theme-animating body * {
  transition-property: background-color, background-image, color, border-color, box-shadow, outline-color, fill, stroke !important;
  transition-duration: 0.42s !important;
  transition-timing-function: ease !important;
}

html.theme-animating img,
html.theme-animating svg,
html.theme-animating video,
html.theme-animating canvas,
html.theme-animating iframe {
  transition: none !important;
}

.container,
.page-wrap {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 24px 56px;
  position: relative;
  z-index: 1;
}

/* Typography */
.section {
  padding: 56px 0 0;
}

.section.section-panel {
  margin-top: 48px;
  padding: 40px 28px 36px;
  background: linear-gradient(180deg, var(--surface-cool) 0%, rgba(15, 17, 21, 0.4) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  text-align: center;
}

.section-subtitle {
  max-width: 440px;
  margin: 0 auto 28px;
  text-align: center;
  font-size: 0.98rem;
  color: var(--text-muted);
  font-weight: 450;
  line-height: 1.55;
}

.page-hero {
  padding: 28px 0 12px;
  max-width: 560px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

code,
.cmd {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--accent-bright);
}

/* Reveal motion — load (hero) + scroll (sections / tools) */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-delay-1 { animation-delay: 0.08s; }
.reveal-delay-2 { animation-delay: 0.16s; }
.reveal-delay-3 { animation-delay: 0.24s; }
.reveal-delay-4 { animation-delay: 0.32s; }

.reveal-io {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal-io.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

/* Live pulse — shared status dots */
.tool-status .dot,
.mk-status .dot,
.wf-status .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-subtle, #6b6156);
  flex-shrink: 0;
}

.pulse,
.tool-status:not(.err) .dot,
.mk-status.live .dot,
.wf-status.ok .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live, #6bcf7f);
  box-shadow: 0 0 0 0 rgba(107, 207, 127, 0.45);
  animation: oo-pulse 2s ease-out infinite;
  flex-shrink: 0;
}

.tool-status.err .dot,
.mk-status.err .dot,
.mk-status.error .dot,
.wf-status.err .dot {
  background: #f87171;
  box-shadow: none;
  animation: none;
}

.mk-status.loading .dot {
  background: var(--accent-bright, #e8a84a);
  animation: none;
}

@keyframes oo-pulse {
  0% { box-shadow: 0 0 0 0 rgba(107, 207, 127, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(107, 207, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(107, 207, 127, 0); }
}

/* Loading skeletons */
.tool-skeleton {
  display: grid;
  gap: 12px;
}

.skel {
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    var(--surface2) 0%,
    rgba(var(--accent-rgb), 0.08) 50%,
    var(--surface2) 100%
  );
  background-size: 200% 100%;
  animation: oo-shimmer 1.25s ease-in-out infinite;
}

.skel-title {
  height: 1.1rem;
  width: 42%;
  margin-bottom: 12px;
}

.skel-line {
  height: 0.72rem;
  width: 92%;
  margin-bottom: 8px;
}

.skel-line.short {
  width: 58%;
  margin-bottom: 0;
}

.tool-skel-card {
  min-height: 88px;
}

.tool-content-enter {
  animation: reveal-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes oo-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Buttons */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn-primary,
.invite-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #06070a;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-dim));
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: filter var(--ease), transform var(--ease), box-shadow var(--ease);
  box-shadow: 0 4px 20px rgba(184, 120, 40, 0.25);
}

.btn-primary::after,
.invite-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.28) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.btn-primary:hover,
.invite-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(184, 120, 40, 0.35);
}

.btn-primary:hover::after,
.invite-btn:hover::after {
  transform: translateX(120%);
}

.btn-primary svg,
.invite-btn svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent-bright);
}

.btn-ghost {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-ghost:hover {
  color: var(--accent-bright);
}

/* ——— Home hero ——— */
.hero {
  position: relative;
  padding: 48px 0 28px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: -12%;
  width: min(920px, 140vw);
  height: 420px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 50% at 50% 35%, rgba(var(--accent-rgb), 0.18), transparent 70%),
    radial-gradient(ellipse 40% 35% at 18% 60%, rgba(90, 110, 140, 0.1), transparent 65%),
    radial-gradient(ellipse 35% 30% at 82% 50%, rgba(var(--accent-rgb), 0.08), transparent 60%);
  animation: hero-glow-shift 14s ease-in-out infinite alternate;
}

@keyframes hero-glow-shift {
  from { opacity: 0.85; transform: translateX(-50%) scale(1); }
  to { opacity: 1; transform: translateX(-50%) scale(1.04); }
}

.hero > *:not(.hero-glow) {
  position: relative;
  z-index: 1;
}

.hero-mark {
  position: relative;
  display: inline-block;
  margin-bottom: 22px;
}

.hero-mark::before {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: -1;
  animation: orb-breathe 8s ease-in-out infinite;
}

.hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.28),
    0 14px 44px rgba(0, 0, 0, 0.45),
    0 0 56px rgba(var(--accent-rgb), 0.22);
}

.hero-rule {
  width: 48px;
  height: 2px;
  margin: 0 auto 16px;
  background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
  border-radius: 2px;
}

.hero h1 {
  font-family: "Outfit", var(--font-display), system-ui, sans-serif;
  font-size: clamp(2.05rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 14ch;
  margin: 0 auto 12px;
  background: linear-gradient(180deg, #fff8ee 0%, #e8a84a 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .hero h1 {
  background: linear-gradient(180deg, #1a1d24 0%, #2f5f96 130%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-tag {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.hero > .hero-lead {
  max-width: 38ch;
  margin: 0 auto 28px;
  font-size: 1.12rem;
  color: var(--text-muted);
  font-weight: 450;
  line-height: 1.55;
}

.hero-welcome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin: 22px auto 0;
  padding: 10px 16px;
  max-width: 560px;
  background: var(--panel-bg, rgba(15, 17, 21, 0.65));
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hero-meta {
  margin: 0;
  min-height: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero-meta.loading {
  opacity: 0.55;
}

.hero-meta .dot-online {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(107, 207, 127, 0.45);
  animation: oo-pulse 2s ease-out infinite;
  vertical-align: middle;
}

.hero-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* World-state teaser (inline in welcome strip) */
.world-teaser {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin: 0;
  padding: 0;
  max-width: none;
  font-size: 0.84rem;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.world-teaser:not([hidden])::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--border);
  margin-right: 2px;
}

.world-teaser strong {
  color: var(--accent-bright);
  font-weight: 700;
}

.world-teaser .teaser-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

/* Quote */
.site-quote {
  margin: 36px auto 8px;
  max-width: 440px;
  text-align: center;
  padding: 0 12px;
}

.site-quote p {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 10px;
}

.site-quote cite {
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-subtle);
  font-weight: 500;
}

/* How it works */
.how-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.how-item {
  padding: 24px 20px;
  text-align: left;
  border-right: 1px solid var(--border);
  transition: background var(--ease), transform 0.2s ease;
}

.how-item:hover {
  background: rgba(var(--accent-rgb), 0.05);
  transform: translateY(-2px);
}

.how-item:last-child {
  border-right: none;
}

.how-item .num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-bright);
  margin-bottom: 10px;
}

.how-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.how-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Features */
.feature-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}

.feat {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background var(--ease), border-color var(--ease);
}

.feat:nth-child(2n) {
  border-right: none;
}

.feat:hover {
  background: rgba(var(--accent-rgb), 0.04);
}

.feat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  color: var(--accent-bright);
  flex-shrink: 0;
}

.feat-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feat-body h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.feat-body p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.features-toggle-wrap {
  text-align: center;
  margin-top: 22px;
}

.features-all[hidden] {
  display: none !important;
}

.features-all {
  margin-top: 36px;
}

.feature-group {
  margin-bottom: 28px;
}

.feature-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}

/* Demo — Discord + dashboard hybrid */
.demo-stack {
  display: grid;
  gap: 16px;
}

.demo-frame {
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.demo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3d352c;
}

.demo-dot.on {
  background: var(--live);
}

.demo-body {
  display: grid;
  grid-template-columns: 128px 1fr;
  min-height: 200px;
}

.demo-side {
  padding: 14px 10px;
  border-right: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.demo-side span {
  display: block;
  padding: 7px 10px;
  margin-bottom: 2px;
  font-size: 0.76rem;
  color: var(--text-subtle);
  border-radius: 6px;
}

.demo-side span.active {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.12);
}

.demo-main {
  padding: 16px 18px;
}

.demo-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.demo-row:last-child {
  border-bottom: none;
}

.demo-row strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.demo-row p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Discord-style embed mock */
.discord-mock {
  background: #1e1f22;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.discord-mock-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.discord-mock-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-mock-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f2f3f5;
}

.discord-mock-name span {
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: #5865f2;
  border-radius: 4px;
  vertical-align: middle;
}

.discord-mock-time {
  font-size: 0.72rem;
  color: #949ba4;
  margin-left: 6px;
  font-weight: 500;
}

.discord-embed {
  border-left: 4px solid var(--accent);
  background: #2b2d31;
  border-radius: 4px;
  padding: 12px 14px 14px;
}

.discord-embed h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 6px;
}

.discord-embed p {
  font-size: 0.85rem;
  color: #dbdee1;
  line-height: 1.45;
  margin-bottom: 8px;
}

.discord-embed .embed-field {
  font-size: 0.8rem;
  color: #b5bac1;
  margin-top: 6px;
}

.discord-embed .embed-field strong {
  display: block;
  color: #f2f3f5;
  font-size: 0.78rem;
  margin-bottom: 2px;
}

/* Final CTA */
.final-cta {
  margin-top: 56px;
  padding: 48px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.12), transparent 55%),
              var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.14), transparent 60%);
  pointer-events: none;
  animation: hero-glow-shift 16s ease-in-out infinite alternate;
}

.final-cta > * {
  position: relative;
  z-index: 1;
}

.final-cta .section-title {
  margin-bottom: 8px;
}

.final-cta .section-subtitle {
  margin-bottom: 22px;
}

.final-cta .cta-row a:not(.btn-primary):not(.invite-btn) {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.final-cta .cta-row a:not(.btn-primary):not(.invite-btn):hover {
  color: var(--accent-bright);
}

/* Status pill */
.site-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--panel-bg, rgba(15, 17, 21, 0.7));
  border: 1px solid var(--border);
  border-radius: 999px;
}

.site-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b6156;
}

.site-status.online .site-status-dot {
  background: var(--live);
}

.site-status.offline .site-status-dot {
  background: #f87171;
}

/* Content pages */
.prose-block {
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 22px 0;
  margin-bottom: 0;
}

.prose-block h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.prose-block h3 {
  font-size: 0.95rem;
  margin: 16px 0 8px;
  color: var(--accent-bright);
}

.prose-block p,
.prose-block li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.prose-block ul,
.prose-block ol {
  margin: 8px 0 0 1.1rem;
}

.prose-block li {
  margin-bottom: 6px;
}

.prose-block a,
.page-wrap a:not(.btn-primary):not(.btn-secondary):not(.site-nav-cta):not(.invite-btn) {
  color: var(--accent-bright);
}

.changelog-entry {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  margin-bottom: 28px;
}

.changelog-entry h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.changelog-entry .meta {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 10px;
}

.changelog-entry ul {
  margin: 0 0 0 1.1rem;
}

.changelog-entry li {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.changelog-entry strong {
  color: var(--text);
}

/* Site footer */
.site-footer {
  margin-top: 48px;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer-inner {
  padding: 28px 24px 20px;
  background: linear-gradient(180deg, var(--surface-cool) 0%, rgba(15, 17, 21, 0.55) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.08);
}

.site-footer-top {
  display: grid;
  grid-template-columns: minmax(200px, 1.15fr) minmax(0, 1.6fr);
  gap: 28px 36px;
  align-items: start;
  margin-bottom: 22px;
}

.site-footer-brand-block {
  max-width: 280px;
}

.site-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-footer-logo img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2);
}

.site-footer-logo:hover {
  color: var(--accent-bright);
}

.site-footer-blurb {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.site-footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #06070a !important;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-dim));
  border-radius: 999px;
  text-decoration: none !important;
  margin-bottom: 0 !important;
  transition: filter var(--ease), transform var(--ease);
}

.site-footer-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: #06070a !important;
}

.site-footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
}

.site-footer h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  margin-bottom: 10px;
  font-weight: 700;
}

.site-footer-links a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 7px;
  font-weight: 500;
  font-size: 0.88rem;
}

.site-footer-links a:hover {
  color: var(--accent-bright);
}

.site-footer-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.site-footer-meta img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  margin-right: 4px;
}

.site-footer-meta a {
  display: inline;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  margin: 0;
}

.site-footer-meta a:hover {
  color: var(--accent-bright);
}

.site-footer-sep {
  margin: 0 6px;
  color: var(--text-subtle);
}

.site-footer-legal {
  font-size: 0.74rem;
  color: var(--text-subtle);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 720px) {
  .how-list {
    grid-template-columns: 1fr;
  }

  .how-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .how-item:last-child {
    border-bottom: none;
  }

  .feature-hero-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feat {
    border-right: none;
  }

  .feat {
    grid-template-columns: 36px 1fr;
  }

  .demo-body {
    grid-template-columns: 1fr;
  }

  .demo-side {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .demo-side span {
    white-space: nowrap;
    margin-bottom: 0;
  }

  .site-footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-footer-brand-block {
    max-width: none;
  }

  .site-footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section.section-panel {
    padding: 28px 18px;
    margin-left: -4px;
    margin-right: -4px;
  }
}

@media (max-width: 480px) {
  .site-footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer-inner {
    padding: 22px 16px 16px;
  }

  .world-teaser {
    border-radius: 0;
  }

  .world-teaser:not([hidden])::before {
    display: none;
  }

  .hero-welcome {
    border-radius: 16px;
    flex-direction: column;
    gap: 8px;
  }

  .hero-glow {
    height: 360px;
  }
}

/* Light theme atmosphere tweaks */
html[data-theme="light"] .bg-ambient::before {
  opacity: 0.045;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.4) 1px, transparent 1px);
}

html[data-theme="light"] .hero-glow {
  background:
    radial-gradient(ellipse 55% 50% at 50% 35%, rgba(var(--accent-rgb), 0.16), transparent 70%),
    radial-gradient(ellipse 40% 35% at 18% 60%, rgba(90, 110, 140, 0.08), transparent 65%),
    radial-gradient(ellipse 35% 30% at 82% 50%, rgba(var(--accent-rgb), 0.08), transparent 60%);
}

html[data-theme="light"] .bg-grain {
  opacity: 0.35;
}

html[data-theme="light"] .site-nav-drop-panel {
  box-shadow: 0 12px 32px rgba(30, 40, 55, 0.12);
}
