/* ==========================================================================
   CMDX Website — Next-Gen UI Enhancements & Faithful CMDX / MidiX Experience
   ========================================================================== */

:root {
  --cmdx-glow-purple: rgba(186, 106, 255, 0.35);
  --cmdx-glow-cyan: rgba(116, 232, 255, 0.28);
  --cmdx-glow-pink: rgba(255, 110, 199, 0.25);
  --cmdx-glass-bg: rgba(18, 14, 26, 0.72);
  --cmdx-glass-border: rgba(255, 255, 255, 0.12);
  --cmdx-glass-border-hover: rgba(206, 147, 255, 0.4);
  --cmdx-gradient-text: linear-gradient(135deg, #ffffff 0%, #e2ccff 45%, #9d6fff 100%);
  --cmdx-accent-neon: #c86eff;
  --cmdx-cyan-neon: #5eead4;
}

/* --------------------------------------------------------------------------
   Sleek Frosted Glass Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(9, 6, 14, 0.75) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(7, 4, 12, 0.88) !important;
  border-bottom-color: rgba(200, 110, 255, 0.18);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(166, 88, 255, 0.08);
}

.nav-links > a {
  position: relative;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-links > a:hover {
  color: #f3e8ff !important;
  text-shadow: 0 0 12px rgba(216, 140, 255, 0.6);
}

.nav-links > a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, #c86eff, #74e8ff);
  border-radius: 2px;
  box-shadow: 0 0 8px #c86eff;
}

/* Modern Search Button with Keyboard Badge */
.search-trigger {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  color: #cfc5dd !important;
  font-size: 13px !important;
  transition: all 0.2s ease !important;
}

.search-trigger:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(206, 147, 255, 0.4) !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(186, 106, 255, 0.2);
}

.search-kbd-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  font-family: var(--mono, monospace);
  color: #a79cb7;
  line-height: 1;
}

/* Glowing Download Nav Button */
.nav-links .nav-download {
  background: linear-gradient(135deg, #a855f7 0%, #7928ca 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  font-weight: 500 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.nav-links .nav-download:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
}

/* --------------------------------------------------------------------------
   Hero Enhancements
   -------------------------------------------------------------------------- */
.nebula-hero {
  height: auto !important;
  min-height: 800px;
  padding-bottom: 70px;
  overflow: clip visible !important;
}

@media (min-width: 1024px) {
  .nebula-hero-inner {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-areas:
      "announcement preview"
      "title preview"
      "desc preview"
      "note preview"
      "actions preview"
      "cmd preview"
      "badges preview";
    align-items: center;
    column-gap: 40px;
    padding-top: 130px !important;
  }
  .nebula-hero-inner > .nebula-announcement { grid-area: announcement; justify-self: start; }
  .nebula-hero-inner > h1 { grid-area: title; margin-bottom: 12px !important; }
  .nebula-hero-inner > .nebula-hero-description { grid-area: desc; margin-bottom: 16px !important; }
  .nebula-hero-inner > .nebula-release-note { grid-area: note; margin-bottom: 22px !important; }
  .nebula-hero-inner > .nebula-hero-actions { grid-area: actions; margin-bottom: 18px !important; }
  .nebula-hero-inner > .hero-quick-command { grid-area: cmd; margin: 0 0 18px 0 !important; }
  .nebula-hero-inner > .hero-pill-badges { grid-area: badges; margin-top: 0 !important; }
  .nebula-hero-inner > .nebula-hero-preview {
    grid-area: preview;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 520px;
    margin-left: auto;
    transform: rotate(-0.5deg);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 30px 80px rgba(179, 120, 248, 0.3), 0 0 60px rgba(126, 240, 255, 0.18) !important;
  }
}

@media (max-width: 1023px) {
  .nebula-hero {
    height: auto !important;
    padding-bottom: 60px;
  }
  .nebula-hero-inner {
    display: flex !important;
    flex-direction: column;
    padding-top: 85px !important;
  }
  .nebula-hero-inner > .nebula-hero-description {
    max-width: 600px !important;
    margin-bottom: 20px !important;
  }
  .nebula-hero-preview {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 480px;
    margin: 36px auto 0 !important;
  }
}

.nebula-announcement {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.live-beacon {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: beacon-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  margin-right: 2px;
}

@keyframes beacon-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.25); }
}

.hero-quick-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 480px;
  margin: 24px 0 0;
  padding: 8px 10px 8px 16px;
  background: rgba(14, 10, 20, 0.85);
  border: 1px solid rgba(190, 110, 255, 0.25);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(166, 96, 255, 0.12);
  font-family: var(--mono, "Cascadia Code", Consolas, monospace);
  font-size: 13px;
  color: #dfd8ea;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-quick-command code {
  color: #e5b3ff;
  user-select: all;
}

.hero-quick-command .cmd-prompt {
  color: #74e8ff;
  margin-right: 6px;
  user-select: none;
}

.hero-quick-command .quick-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: #f3edfc;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.hero-quick-command .quick-copy-btn:hover {
  background: rgba(190, 110, 255, 0.25);
  border-color: rgba(200, 130, 255, 0.5);
  color: #fff;
  box-shadow: 0 0 10px rgba(186, 106, 255, 0.3);
}

.hero-pill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  list-style: none;
  padding: 0;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(25, 18, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 12px;
  color: #d1c8de;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-pill-badge:hover {
  border-color: rgba(190, 110, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(166, 96, 255, 0.18);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Spotlight Cursor Effect
   -------------------------------------------------------------------------- */
.spotlight-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease !important;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    650px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(186, 106, 255, 0.15),
    transparent 42%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(206, 147, 255, 0.42) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(186, 106, 255, 0.18) !important;
}

/* --------------------------------------------------------------------------
   Floating Back to Top Button
   -------------------------------------------------------------------------- */
.back-to-top-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 16, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f3edfc;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(168, 85, 247, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.2s, box-shadow 0.2s;
}

.back-to-top-fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-fab:hover {
  background: rgba(168, 85, 247, 0.35);
  border-color: rgba(206, 147, 255, 0.5);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 25px rgba(186, 106, 255, 0.45);
  transform: translateY(-3px) scale(1.05);
}

.back-to-top-fab svg {
  width: 20px;
  height: 20px;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .live-beacon {
    animation: none !important;
  }
  .spotlight-card,
  .back-to-top-fab {
    transition: none !important;
  }
  .spotlight-card:hover {
    transform: none !important;
  }
}

/* CMDX editorial refresh: a quieter, product-first interface. */
:root {
  --bg: #070808;
  --surface: #0c0e0e;
  --surface-raised: #141717;
  --text: #f2f3ef;
  --muted: #a7aba7;
  --subtle: #858b87;
  --border: #292e2d;
  --accent: #d3c4f4;
  --accent-strong: #c4b1ed;
  --accent-hover: #e2d8fa;
  --green: #c6ed83;
  --font: "DM Sans", "Segoe UI", sans-serif;
}

body.nebula-site {
  background: #070808;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

body[data-page] {
  background-color: #070808 !important;
  background-image: none !important;
}

body.nebula-site::before {
  display: none;
}

body.nebula-site h1,
body.nebula-site h2,
body.nebula-site h3,
body.nebula-site h4 {
  letter-spacing: 0;
}

#particle-background {
  opacity: .04;
}

.site-header,
.site-header.scrolled {
  background: rgba(7, 8, 8, .94) !important;
  border-bottom: 1px solid #252a29;
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.nav-shell,
.footer-grid,
.footer-bottom {
  width: min(1280px, calc(100% - 64px));
}

.brand img {
  filter: none;
}

.brand-divider {
  background: #292e2d;
}

.nav-links {
  gap: 25px;
  font-size: 14px;
}

.nav-links > a,
.nav-links .search-trigger {
  color: #a7aba7;
}

.nav-links > a:hover,
.nav-links > a[aria-current],
.nav-links .search-trigger:hover {
  color: #f2f3ef !important;
  text-shadow: none;
}

.nav-links > a[aria-current]::after {
  display: none;
}

.nav-links .search-trigger {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.nav-links .nav-download {
  color: #111313 !important;
  background: #f0f1ed !important;
  border: 1px solid #f0f1ed !important;
  border-radius: 4px;
  box-shadow: none !important;
}

.nav-links .nav-download:hover {
  color: #111313 !important;
  background: #fff !important;
  transform: translateY(-1px);
}

.nav-links .nav-download[aria-current="page"] {
  color: #111313 !important;
}

.button {
  min-height: 46px;
  border-radius: 4px;
  box-shadow: none;
  letter-spacing: 0;
}

.button-white,
.button-primary {
  color: #111313;
  background: #f0f1ed;
  box-shadow: none;
}

.button-white:hover,
.button-primary:hover {
  color: #111313;
  background: #fff;
}

.button-glass,
.button-secondary {
  color: #e6e9e5;
  background: #111414;
  border: 1px solid #353b39;
  box-shadow: none;
}

.button-glass:hover,
.button-secondary:hover {
  color: #fff;
  background: #191d1b;
}

.button-purple {
  color: #131313;
  background: #d3c4f4;
  box-shadow: none;
}

.button-purple:hover {
  color: #131313;
  background: #e2d8fa;
}

.text-link,
.nebula-source-note a,
.nebula-products-heading a {
  color: #d3c4f4;
}

.nebula-hero {
  height: auto !important;
  min-height: 660px;
  overflow: clip !important;
  border-bottom: 1px solid #252a29;
  background-color: #080a0a;
  background-image: repeating-linear-gradient(0deg, transparent 0 79px, #ffffff08 80px),
    repeating-linear-gradient(90deg, transparent 0 79px, #ffffff08 80px);
}

.nebula-hero::before,
.nebula-hero::after {
  display: none;
}

.nebula-grid {
  opacity: .22;
  background-image: linear-gradient(#ffffff08 1px, transparent 1px),
    linear-gradient(90deg, #ffffff08 1px, transparent 1px);
}

.nebula-grid span {
  display: none;
}

.nebula-hero-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "announcement preview"
    "title preview"
    "desc preview"
    "note preview"
    "actions preview";
  align-content: center;
  align-items: center;
  column-gap: 40px;
  row-gap: 0;
  width: min(1280px, calc(100% - 80px));
  height: auto;
  min-height: 660px;
  padding: 62px 0;
}

.nebula-hero-inner > .nebula-announcement { grid-area: announcement; justify-self: start; }
.nebula-hero-inner > h1 { grid-area: title; }
.nebula-hero-inner > .nebula-hero-description { grid-area: desc; }
.nebula-hero-inner > .nebula-release-note { grid-area: note; }
.nebula-hero-inner > .nebula-hero-actions { grid-area: actions; }

.nebula-announcement {
  min-height: 34px;
  padding: 3px 10px 3px 4px;
  border: 1px solid #333938;
  border-radius: 3px;
  background: #0e1110 !important;
  box-shadow: none !important;
  color: #c5cac6;
  font-size: 12px;
}

.nebula-announcement strong {
  border: 0;
  border-radius: 2px;
  background: #d3c4f4 !important;
  box-shadow: none;
  color: #17151b;
}

.live-beacon {
  background: #c6ed83;
  box-shadow: none;
}

body[data-page="home"] .home-wordmark {
  display: none;
}

body[data-page="home"] .nebula-hero h1 {
  max-width: 100%;
  margin: 20px 0 16px;
  color: #f2f3ef;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 70px;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0;
  white-space: normal;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.nebula-hero-description {
  max-width: 490px;
  margin: 0 0 16px;
  color: #c1c6c2;
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: 0;
}

.nebula-release-note {
  max-width: 500px;
  margin: 0 0 24px;
  color: #919894;
  font-size: 14px;
  line-height: 1.7;
}

.nebula-release-note a {
  color: #d3c4f4;
  white-space: nowrap;
}

.nebula-release-note a:hover {
  color: #f2f3ef;
}

.nebula-hero-actions {
  gap: 10px;
}

.nebula-hero-preview {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 100% !important;
  max-width: 650px;
  height: auto;
  aspect-ratio: 31 / 20;
  margin: 0 0 0 auto !important;
  transform: none;
  border: 1px solid #3a403e;
  border-radius: 5px;
  background: #101313;
  box-shadow: 0 24px 70px #0008;
}

.nebula-hero-preview::before,
.nebula-hero-preview::after {
  display: none;
}

.nebula-hero-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  animation: none;
}

.nebula-hero-preview figcaption {
  color: #aab0ac;
  background: linear-gradient(transparent, #080a0add);
}

.freeware-panel,
.nebula-product,
.nebula-tool,
.nebula-project-card {
  border: 1px solid #292e2d;
  border-radius: 5px;
  background: #0c0e0e;
  box-shadow: none;
}

.freeware-panel {
  margin-top: 40px;
  margin-bottom: 30px;
}

.nebula-intro {
  padding-top: 150px;
  padding-bottom: 145px;
  border-color: #252a29;
}

.nebula-intro h2,
.nebula-products-heading h2 {
  color: #f2f3ef;
  font-weight: 500;
  line-height: 1.12;
}

.nebula-intro p {
  max-width: 820px;
  color: #b7bdb9;
  font-size: 20px;
  line-height: 1.7;
  letter-spacing: 0;
  font-weight: 400;
}

.nebula-rainbow-text {
  color: #d3c4f4;
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: none;
}

.nebula-feature {
  gap: 72px;
  padding-top: 110px;
  padding-bottom: 110px;
  min-height: 0;
}

.nebula-symbol-card {
  border: 1px solid #363c3a;
  border-radius: 5px;
  background: linear-gradient(145deg, #1d2220, #101312);
  box-shadow: none;
}

.nebula-symbol-card::before {
  display: none;
}

.nebula-symbol-card img {
  filter: none;
}

.nebula-label,
.nebula-product-tagline,
.nebula-tool > p {
  border-color: #292e2d;
}

.nebula-label {
  border-radius: 3px;
  background: #111414;
  box-shadow: none;
}

.nebula-label > span:first-child {
  border-radius: 2px;
  background: #d3c4f4;
  box-shadow: none;
  color: #17151b;
}

.nebula-feature h3,
.nebula-feature h2,
.nebula-small-title,
.nebula-product-bottom h4 {
  font-weight: 500;
}

.nebula-muted {
  color: #858b87;
}

.nebula-products-section {
  border-color: #252a29;
  background: #090b0b;
}

.nebula-products-heading p,
.nebula-contact > p {
  color: #a7aba7;
}

.nebula-product,
.nebula-tool {
  padding: 32px;
}

.nebula-product:hover,
.nebula-tool:hover {
  transform: translateY(-2px);
  border-color: #454c49;
  box-shadow: 0 18px 45px #0005;
}

.nebula-product-title img {
  filter: none;
}

.nebula-product-type,
.nebula-product-tagline,
.nebula-product .package-meta,
.nebula-product .package-size,
.nebula-product .checksum-details summary,
.nebula-tool-title > span {
  color: #989f9b;
}

.nebula-product-tagline {
  border-color: #292e2d;
}

.nebula-check {
  width: 23px;
  height: 23px;
  border-radius: 3px;
  background: #d3c4f4;
  box-shadow: none;
  color: #17151b;
  font-size: 15px;
  line-height: 23px;
}

.nebula-tool-icon {
  border-radius: 3px;
  background: #171b19;
  color: #d3c4f4;
  text-shadow: none;
}

.nebula-tool-title > span {
  letter-spacing: 0;
}

.nebula-product-bottom h4,
.nebula-product-bottom > p {
  font-size: 26px;
  line-height: 1.25;
}

.nebula-product-bottom > p {
  color: #a7aba7;
}

.nebula-product .package-hash,
.package-hash {
  background: #080a0a;
  border-color: #292e2d;
  color: #d1d6d2;
}

.nebula-product .copy-hash,
.copy-hash {
  background: #171b19;
  border-color: #363c3a;
  color: #e6e9e5;
}

.nebula-contact {
  padding: 110px 0 120px;
}

.nebula-contact > span,
.nebula-project-card span {
  color: #989f9b;
}

.nebula-project-card {
  padding: 18px;
}

.nebula-project-card img {
  filter: none;
}

.nebula-project-card strong {
  color: #e6e9e5;
}

.site-footer {
  background: #080a0a;
  border-top: 1px solid #252a29;
}

.footer-grid > div > h2 {
  color: #989f9b;
}

.footer-grid > div:not(.footer-brand) > a,
.footer-bottom,
.footer-brand p {
  color: #a7aba7;
}

.footer-grid > div:not(.footer-brand) > a:hover,
.footer-bottom a:hover {
  color: #f2f3ef;
}

.motion-toggle {
  color: #a7aba7;
}

.search-dialog {
  background: #0c0e0e;
  border-color: #343a38;
  box-shadow: 0 20px 80px #000b;
}

.search-result:hover,
.search-result.search-active {
  background: #191d1b;
  border-color: #454c49;
}

.toast {
  background: #171b19;
  border-color: #454c49;
  color: #f2f3ef;
}

body[data-page="download"] .download-card,
body[data-page="faq"] .faq-list,
body[data-page="docs"] .docs-sidebar,
body[data-page="download"] .first-command {
  border-color: #292e2d;
  border-radius: 5px;
  background: #0c0e0e;
  box-shadow: none;
}

body[data-page="download"] .download-card.recommended {
  border-color: #626071;
  background: #101212;
  box-shadow: none;
}

body[data-page="download"] .download-icon,
body[data-page="download"] .small-badge,
body[data-page="download"] .small-badge.neutral,
body[data-page="faq"] .faq-list details,
body[data-page="docs"] .docs-sidebar {
  border-color: #343a38;
}

body[data-page="download"] .download-icon,
body[data-page="download"] .small-badge,
body[data-page="download"] .small-badge.neutral {
  border-radius: 3px;
  background: #171b19;
  color: #d3c4f4;
}

body[data-page="download"] .download-card .button {
  border-radius: 4px;
  box-shadow: none;
}

body[data-page="faq"] .faq-list {
  padding-inline: 25px;
}

body[data-page="docs"] .docs-nav-group > a[aria-current="page"] {
  border-left-color: #d3c4f4;
  border-radius: 0 3px 3px 0;
  background: #171b19;
  color: #e6e9e5;
}

body[data-page="docs"] .docs-nav-group > a:hover {
  background: #141817;
  color: #f2f3ef;
}

@media (min-width: 1024px) {
  body[data-page="home"] .nebula-hero-inner > .nebula-hero-preview {
    grid-area: preview;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 650px;
    margin-left: auto;
  }
}

@media (min-width: 1024px) and (max-width: 1200px) {
  body[data-page="home"] .nebula-hero h1 {
    font-size: 56px;
  }
}

@media (max-width: 1023px) {
  .nebula-hero {
    min-height: 0;
  }

  .nebula-hero-inner {
    display: flex !important;
    align-items: flex-start;
    width: calc(100% - 64px);
    min-height: 0;
    padding: 76px 0 68px !important;
  }

  body[data-page="home"] .nebula-hero h1 {
    font-size: 64px;
  }

  .nebula-hero-description {
    margin-bottom: 14px !important;
  }

  .nebula-hero-preview {
    max-width: 650px;
    margin: 34px auto 0 !important;
  }
}

@media (max-width: 800px) {
  .nav-links {
    background: #0a0c0c;
    border-bottom-color: #292e2d;
  }

  .nav-links .search-trigger {
    background: transparent !important;
    border: 0 !important;
  }

  .nebula-wide {
    width: calc(100% - 48px);
  }

  .nebula-feature,
  .nebula-feature-reverse {
    gap: 36px;
  }
}

@media (max-width: 600px) {
  .nav-shell,
  .footer-grid,
  .footer-bottom {
    width: calc(100% - 36px);
  }

  .nebula-wide {
    width: calc(100% - 36px);
  }

  .nebula-hero-inner {
    width: calc(100% - 36px);
    padding: 60px 0 48px !important;
  }

  body[data-page="home"] .nebula-hero h1 {
    font-size: 46px;
    line-height: 1.08;
  }

  .nebula-hero-description {
    font-size: 17px;
  }

  .nebula-release-note {
    font-size: 13px;
  }

  .nebula-hero-actions {
    align-items: stretch;
    width: 100%;
  }

  .nebula-hero-actions .button {
    flex: 1;
    padding-inline: 12px;
    font-size: 13px;
  }

  .nebula-hero-preview {
    width: 100% !important;
    margin-top: 28px !important;
  }

  .freeware-panel,
  .nebula-product,
  .nebula-tool {
    padding: 23px;
  }

  .nebula-intro {
    padding-top: 90px;
    padding-bottom: 90px;
  }

  .nebula-intro h2,
  .nebula-products-heading h2 {
    font-size: 36px;
    line-height: 1.14;
  }

  .nebula-intro p {
    font-size: 17px;
    line-height: 1.65;
  }

  .nebula-feature,
  .nebula-feature-reverse {
    padding-block: 66px;
  }

  .nebula-feature-copy.right {
    text-align: left;
  }

  .nebula-product-bottom h4,
  .nebula-product-bottom > p {
    font-size: 24px;
    line-height: 1.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nebula-grid,
  .nebula-rainbow-text,
  .nebula-hero-preview img {
    animation: none !important;
  }
}

body[data-page="docs"] .docs-sidebar-title,
body[data-page="docs"] .docs-article h1,
body[data-page="docs"] .docs-article h2,
body[data-page="docs"] .docs-article h3,
body[data-page="docs"] .docs-article h4 {
  color: #f2f3ef;
  font-family: var(--font);
  letter-spacing: 0;
}

body[data-page="docs"] .version-small,
body[data-page="docs"] .docs-menu-toggle {
  border-color: #363c3a;
  border-radius: 3px;
  background: #171b19;
  color: #d3c4f4;
}

body[data-page="docs"] .docs-nav-group > span,
body[data-page="docs"] .docs-toc .eyebrow {
  color: #989f9b;
  letter-spacing: 0;
}

body[data-page="docs"] .docs-nav-group > a,
body[data-page="docs"] .docs-toc nav > a,
body[data-page="docs"] .docs-article p,
body[data-page="docs"] .docs-article li {
  color: #aeb4b0;
}

body[data-page="docs"] .docs-article strong,
body[data-page="docs"] .docs-article td:first-child {
  color: #e6e9e5;
}

body[data-page="docs"] .docs-nav-group > a,
body[data-page="docs"] .docs-nav-group > a[aria-current="page"] {
  border-left-color: #363c3a;
  border-radius: 0 3px 3px 0;
}

body[data-page="docs"] .docs-nav-group > a[aria-current="page"] {
  border-left-color: #d3c4f4;
}

body[data-page="docs"] .docs-nav-group > a:hover,
body[data-page="docs"] .docs-nav-group > a[aria-current="page"],
body[data-page="docs"] .docs-toc nav > a:hover,
body[data-page="docs"] .docs-toc nav > a.active {
  background: #171b19;
  color: #f2f3ef;
}

body[data-page="docs"] .docs-article a,
body[data-page="docs"] .docs-article .heading-anchor,
body[data-page="docs"] .docs-toc nav > a:hover,
body[data-page="docs"] .docs-toc nav > a.active,
body[data-page="docs"] .docs-help a {
  color: #d3c4f4;
}

body[data-page="docs"] .docs-article li::marker {
  color: #c6ed83;
}

body[data-page="docs"] .docs-article .table-wrap,
body[data-page="docs"] .docs-article table,
body[data-page="docs"] .docs-article th,
body[data-page="docs"] .docs-article td {
  border-color: #292e2d;
}

body[data-page="docs"] .docs-article table,
body[data-page="docs"] .docs-article .code-block,
body[data-page="docs"] .docs-article .callout,
body[data-page="docs"] .docs-article blockquote,
body[data-page="docs"] .docs-pagination > a {
  border-radius: 4px;
  background: #0c0e0e;
  box-shadow: none;
}

body[data-page="docs"] .docs-article th {
  background: #171b19;
  color: #e6e9e5;
}

body[data-page="docs"] .docs-article td,
body[data-page="docs"] .docs-article .code-block pre,
body[data-page="docs"] .docs-article .callout p,
body[data-page="docs"] .docs-article blockquote p {
  color: #b7bdb9;
}

body[data-page="docs"] .docs-article .callout,
body[data-page="docs"] .docs-article blockquote {
  border-left-color: #c6ed83;
}

body[data-page="docs"] .docs-tip,
body[data-page="docs"] .docs-pagination,
body[data-page="docs"] .docs-pagination > a,
body[data-page="docs"] .docs-footer {
  border-color: #292e2d;
}

body[data-page="docs"] .docs-tip > span,
body[data-page="docs"] .docs-pagination > a,
body[data-page="docs"] .docs-help,
body[data-page="docs"] .docs-footer {
  color: #a7aba7;
}

body[data-page="docs"] .docs-pagination > a:hover {
  border-color: #454c49;
  background: #171b19;
}

@media (max-width: 600px) {
  body[data-page="docs"] .docs-sidebar #docs-nav {
    border-color: #363c3a;
    border-radius: 0 0 4px 4px;
    background: #0c0e0e;
  }
}

body[data-page="faq"] .faq-list details[data-reveal] {
  transition-delay: var(--reveal-delay, 0ms);
}

body[data-page="faq"] .faq-list details[data-reveal]:nth-child(2) { --reveal-delay: 50ms; }
body[data-page="faq"] .faq-list details[data-reveal]:nth-child(3) { --reveal-delay: 100ms; }
body[data-page="faq"] .faq-list details[data-reveal]:nth-child(4) { --reveal-delay: 150ms; }
body[data-page="faq"] .faq-list details[data-reveal]:nth-child(5) { --reveal-delay: 200ms; }
body[data-page="faq"] .faq-list details[data-reveal]:nth-child(6) { --reveal-delay: 250ms; }
body[data-page="faq"] .faq-list details[data-reveal]:nth-child(7) { --reveal-delay: 300ms; }

/* Motion polish: precise, low-amplitude feedback that keeps the editorial look. */
:root {
  --motion-ease: cubic-bezier(.2, .75, .25, 1);
  --motion-fast: 180ms;
  --motion-medium: 360ms;
}

.site-header {
  transition: background-color var(--motion-medium) var(--motion-ease),
    border-color var(--motion-medium) var(--motion-ease),
    box-shadow var(--motion-medium) var(--motion-ease);
}

.nav-links > a:not(.nav-download)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--motion-fast) var(--motion-ease);
}

.nav-links > a:not(.nav-download):hover::after,
.nav-links > a:not(.nav-download)[aria-current]::after {
  transform: scaleX(1);
}

.nebula-hero-preview {
  transition: transform 500ms var(--motion-ease), border-color 300ms ease,
    box-shadow 500ms var(--motion-ease);
}

.nebula-hero-preview:hover {
  transform: translateY(-4px) !important;
  border-color: #626a66;
  box-shadow: 0 30px 80px #0009, 0 0 0 1px #d3c4f41a !important;
}

.nebula-product,
.nebula-tool,
.credit-card,
.download-card,
.nebula-project-card {
  transition: transform 360ms var(--motion-ease), border-color 260ms ease,
    box-shadow 360ms var(--motion-ease), background-color 260ms ease;
}

.nebula-product:hover,
.nebula-tool:hover,
.credit-card:hover,
.download-card:hover {
  transform: translateY(-4px);
}

.button,
.nav-download,
.search-trigger,
.quick-copy-btn,
.copy-hash {
  transition: transform var(--motion-fast) var(--motion-ease),
    color var(--motion-fast) ease, background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.button:active,
.nav-download:active,
.quick-copy-btn:active,
.copy-hash:active {
  transform: translateY(1px) scale(.985);
}

.button:focus-visible,
.nav-download:focus-visible,
.nebula-project-card:focus-visible,
.search-trigger:focus-visible {
  outline: 2px solid #d3c4f4;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  .nav-links > a:not(.nav-download)::after,
  .nebula-hero-preview,
  .nebula-product,
  .nebula-tool,
  .credit-card,
  .download-card,
  .nebula-project-card,
  .button,
  .nav-download,
  .search-trigger,
  .quick-copy-btn,
  .copy-hash {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .nebula-hero-preview:hover,
  .nebula-product:hover,
  .nebula-tool:hover,
  .credit-card:hover,
  .download-card:hover {
    transform: none !important;
  }
}
