.cosmos-mobile-tagline {
  display: none;
}

.cosmos-map {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  --panel-x: 62;
  --panel-y: 44;
}

.cosmos-map::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--active-x, 50%) var(--active-y, 50%), rgba(0, 0, 0, 0) 0 11%, rgba(0, 0, 0, 0.22) 38%, rgba(0, 0, 0, 0.34) 100%);
  opacity: 0;
  transition: opacity 260ms var(--ease);
}

.grid-hero.cosmos-active .cosmos-map::before {
  opacity: 1;
}

.cosmos-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.cosmos-line {
  stroke: var(--accent, rgba(148, 163, 184, 0.5));
  stroke-width: 0.08;
  vector-effect: non-scaling-stroke;
  opacity: 0.18;
  filter: drop-shadow(0 0 6px var(--accent-soft, rgba(16, 185, 129, 0.2)));
  transition: opacity 220ms var(--ease), stroke-width 220ms var(--ease);
}

.cosmos-line.is-active {
  opacity: 0.78;
  stroke-width: 0.18;
}

.cosmos-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cosmos-node {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 88px;
  min-height: 84px;
  transform: translate(-50%, -50%);
  color: rgba(226, 232, 240, 0.64);
  text-decoration: none;
  pointer-events: auto;
  display: grid;
  place-items: center;
  gap: 8px;
  opacity: 0.52;
  outline: none;
  transition:
    opacity 220ms var(--ease),
    color 220ms var(--ease),
    filter 220ms var(--ease),
    transform 220ms var(--ease);
}

.cosmos-node.is-primary {
  width: 112px;
  min-height: 104px;
  opacity: 0.66;
}

.cosmos-node-core {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 65%, white 35%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent),
    0 0 14px color-mix(in srgb, var(--accent) 20%, transparent);
}

.cosmos-node-ring {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, rgba(226, 232, 240, 0.08));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.04);
}

.cosmos-node.is-primary .cosmos-node-ring {
  width: 60px;
  height: 60px;
}

.cosmos-node-label {
  position: absolute;
  top: calc(50% + 30px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.cosmos-node.is-primary .cosmos-node-label {
  font-size: 1.08rem;
  color: rgba(240, 253, 250, 0.9);
}

.cosmos-node-summary {
  display: none;
}

.cosmos-node::before {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 62%);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}

.cosmos-node:hover,
.cosmos-node:focus-visible,
.cosmos-node.is-active {
  color: rgba(248, 250, 252, 0.96);
  opacity: 1;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 42%, transparent));
  transform: translate(-50%, -50%) scale(1.03);
}

.cosmos-node:hover::before,
.cosmos-node:focus-visible::before,
.cosmos-node.is-active::before {
  opacity: 1;
  transform: scale(1);
}

.cosmos-node:focus-visible .cosmos-node-ring {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, white 28%);
  outline-offset: 8px;
}

.grid-hero.cosmos-active .cosmos-node:not(.is-active) {
  opacity: 0.28;
  filter: saturate(0.62);
}

.cosmos-panel {
  position: absolute;
  left: calc(var(--panel-x) * 1%);
  top: calc(var(--panel-y) * 1%);
  width: min(286px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--panel-accent, #34d399) 34%, rgba(226, 232, 240, 0.12));
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(5, 16, 24, 0.82), rgba(3, 7, 12, 0.68));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  color: rgba(226, 232, 240, 0.9);
  transform: translate(-6%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 180ms var(--ease);
}

.cosmos-panel:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: translate(-6%, -50%) translateY(0);
}

.cosmos-panel h2 {
  font-size: 1.05rem;
  line-height: 1.2;
  margin-bottom: 12px;
  font-weight: 650;
}

.cosmos-panel-copy {
  margin: 0 0 13px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.88rem;
  line-height: 1.5;
}

.cosmos-panel ul {
  list-style: none;
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding: 0;
}

.cosmos-panel a {
  color: rgba(226, 232, 240, 0.82);
  text-decoration: none;
}

.cosmos-panel li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.cosmos-panel li a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--panel-accent, #34d399);
  box-shadow: 0 0 10px color-mix(in srgb, var(--panel-accent, #34d399) 60%, transparent);
}

.cosmos-panel li a:hover,
.cosmos-panel li a:focus-visible {
  color: #fff;
}

.cosmos-open {
  min-height: 42px;
  width: 100%;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--panel-accent, #34d399) 52%, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel-accent, #34d399) 10%, rgba(2, 6, 23, 0.48));
  color: color-mix(in srgb, var(--panel-accent, #34d399) 72%, white 28%);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.cosmos-open:hover,
.cosmos-open:focus-visible {
  color: #fff;
  background: color-mix(in srgb, var(--panel-accent, #34d399) 18%, rgba(2, 6, 23, 0.42));
}

@media (max-width: 768px) {

  .cosmos-mobile-tagline {
    display: block;
    width: min(272px, calc(100vw - 76px));
    margin: 8px auto 0;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.72rem;
    line-height: 1.3;
    text-align: center;
  }

  .cosmos-map {
    position: relative;
    inset: auto;
    width: min(380px, calc(100vw - 40px));
    margin: 28px auto 0;
    z-index: 12;
  }

  .cosmos-map::before,
  .cosmos-lines {
    display: none;
  }

  .cosmos-nodes {
    position: relative;
    display: grid;
    gap: 8px;
    pointer-events: auto;
  }

  .cosmos-node,
  .cosmos-node.is-primary,
  .cosmos-node:hover,
  .cosmos-node:focus-visible,
  .cosmos-node.is-active {
    position: static;
    width: 100%;
    min-height: 48px;
    transform: none;
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    justify-items: start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 14px;
    background: rgba(3, 10, 18, 0.55);
    opacity: 0.84;
    filter: none;
    color: rgba(226, 232, 240, 0.88);
  }

  .cosmos-node.is-active {
    border-color: color-mix(in srgb, var(--accent) 56%, rgba(255, 255, 255, 0.16));
    background: color-mix(in srgb, var(--accent) 9%, rgba(3, 10, 18, 0.66));
  }

  .cosmos-node::before,
  .cosmos-node-ring {
    display: none;
  }

  .cosmos-node-core {
    width: 8px;
    height: 8px;
    grid-column: 1;
  }

  .cosmos-node-label {
    position: static;
    transform: none;
    grid-column: 2;
    font-size: 0.92rem;
    text-align: left;
  }

  .cosmos-node-summary {
    display: block;
    grid-column: 2;
    color: rgba(226, 232, 240, 0.52);
    font-size: 0.76rem;
    line-height: 1.35;
    margin-top: -4px;
  }

  .cosmos-node::after {
    content: ">";
    grid-column: 3;
    grid-row: 1 / span 2;
    color: color-mix(in srgb, var(--accent) 60%, rgba(255, 255, 255, 0.32));
    font-family: var(--mono);
  }

  .grid-hero.cosmos-active .cosmos-node:not(.is-active) {
    opacity: 0.52;
  }

  .cosmos-panel,
  .cosmos-panel:not([hidden]) {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: max(96px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(48vh, 360px);
    overflow: auto;
    transform: translateY(0);
    z-index: 40;
    border-radius: 18px;
  }
}

.grid-hero.cosmos-compact {
  height: auto;
  min-height: 100svh;
}

.grid-hero.cosmos-compact .grid-ui {
  min-height: 100svh;
  height: auto;
  padding: 76px 18px 92px;
  align-items: center;
}

.grid-hero.cosmos-compact .grid-ui h1 {
  font-size: clamp(2.35rem, 12vw, 2.9rem);
  letter-spacing: -0.055em;
}

.grid-hero.cosmos-compact .cosmos-offer {
  margin-top: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.grid-hero.cosmos-compact .cosmos-subheadline {
  width: min(350px, calc(100vw - 40px));
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.48;
}

.grid-hero.cosmos-compact .cosmos-hero-actions {
  width: min(350px, calc(100vw - 40px));
  margin-top: 16px;
}

.grid-hero.cosmos-compact .cosmos-hero-cta {
  flex: 1 1 150px;
  min-height: 46px;
  padding: 0 14px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.grid-hero.cosmos-compact .cosmos-mobile-tagline {
  display: block;
  margin-top: 12px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.grid-hero.cosmos-compact .cosmos-map {
  position: relative;
  inset: auto;
  width: min(380px, calc(100vw - 40px));
  margin: 28px auto 0;
  z-index: 12;
}

.grid-hero.cosmos-compact .cosmos-map::before,
.grid-hero.cosmos-compact .cosmos-lines {
  display: none;
}

.grid-hero.cosmos-compact .cosmos-nodes {
  position: relative;
  display: grid;
  gap: 8px;
  pointer-events: auto;
}

.grid-hero.cosmos-compact .cosmos-node,
.grid-hero.cosmos-compact .cosmos-node.is-primary,
.grid-hero.cosmos-compact .cosmos-node:hover,
.grid-hero.cosmos-compact .cosmos-node:focus-visible,
.grid-hero.cosmos-compact .cosmos-node.is-active {
  position: static;
  width: 100%;
  min-height: 48px;
  transform: none;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  justify-items: start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 14px;
  background: rgba(3, 10, 18, 0.55);
  opacity: 0.84;
  filter: none;
  color: rgba(226, 232, 240, 0.88);
}

.grid-hero.cosmos-compact .cosmos-node.is-active {
  border-color: color-mix(in srgb, var(--accent) 56%, rgba(255, 255, 255, 0.16));
  background: color-mix(in srgb, var(--accent) 9%, rgba(3, 10, 18, 0.66));
}

.grid-hero.cosmos-compact .cosmos-node::before,
.grid-hero.cosmos-compact .cosmos-node-ring {
  display: none;
}

.grid-hero.cosmos-compact .cosmos-node-core {
  width: 8px;
  height: 8px;
  grid-column: 1;
}

.grid-hero.cosmos-compact .cosmos-node-label {
  position: static;
  transform: none;
  grid-column: 2;
  font-size: 0.92rem;
  text-align: left;
}

.grid-hero.cosmos-compact .cosmos-node-summary {
  display: block;
  grid-column: 2;
  color: rgba(226, 232, 240, 0.52);
  font-size: 0.76rem;
  line-height: 1.35;
  margin-top: -4px;
}

.grid-hero.cosmos-compact .cosmos-node::after {
  content: ">";
  grid-column: 3;
  grid-row: 1 / span 2;
  color: color-mix(in srgb, var(--accent) 60%, rgba(255, 255, 255, 0.32));
  font-family: var(--mono);
}

.grid-hero.cosmos-compact.cosmos-active .cosmos-node:not(.is-active) {
  opacity: 0.52;
}

.grid-hero.cosmos-compact .cosmos-panel,
.grid-hero.cosmos-compact .cosmos-panel:not([hidden]) {
  position: fixed;
  left: 12px;
  right: 12px;
  top: auto;
  bottom: max(96px, env(safe-area-inset-bottom));
  width: auto;
  max-height: min(48vh, 360px);
  overflow: auto;
  transform: translateY(0);
  z-index: 40;
  border-radius: 18px;
}

@media (max-width: 380px) {
  .cosmos-map {
    width: min(320px, calc(100vw - 32px));
  }

  .cosmos-node,
  .cosmos-node.is-primary {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Homepage hero: keep the procedural canvas as the primary live layer. */
body.home-cosmos {
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(34, 78, 122, 0.16), transparent 55%),
    radial-gradient(110% 80% at 16% 82%, rgba(80, 46, 130, 0.12), transparent 58%),
    radial-gradient(140% 120% at 50% 32%, rgba(10, 16, 34, 0.92), rgba(3, 5, 12, 0.98) 60%),
    #02040b;
}

.home-cosmos canvas#gridCanvas {
  opacity: 1;
  mix-blend-mode: normal;
}

.home-cosmos .grid-hero {
  background: transparent;
  isolation: auto;
  overflow: hidden;
}

.home-cosmos .grid-hero::before {
  content: "";
  display: none;
}

.home-cosmos .grid-hero::after {
  content: none;
  display: none;
}

.home-cosmos .grid-ui h1 {
  font-size: clamp(4.2rem, 8vw, 7.8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  color: rgba(239, 246, 255, 0.96);
  text-shadow: 0 18px 78px rgba(0, 0, 0, 0.94);
}

.home-cosmos .grid-ui h1 .dv-glitch-word {
  position: relative;
  display: inline-block;
  color: #f8fbff;
  text-shadow: 0 16px 58px rgba(0, 0, 0, 0.92);
  animation: dvHomeRareGlitch 10.6s linear infinite;
}

.home-cosmos .grid-ui h1 .dv-glitch-word::before,
.home-cosmos .grid-ui h1 .dv-glitch-word::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  text-shadow: none;
}

.home-cosmos .grid-ui h1 .dv-glitch-word::before {
  color: rgba(255, 64, 92, 0.82);
  transform: translateX(-2px);
  animation: dvHomeRareSplitBefore 10.6s linear infinite;
}

.home-cosmos .grid-ui h1 .dv-glitch-word::after {
  color: rgba(120, 231, 255, 0.86);
  transform: translateX(2px);
  animation: dvHomeRareSplitAfter 10.6s linear infinite;
}

@keyframes dvHomeRareGlitch {
  0%, 91.8%, 98%, 100% { transform: none; filter: none; }
  92.4% { transform: translate(-1px, 0); filter: brightness(1.08); }
  93.6% { transform: translate(2px, -1px); }
  95% { transform: translate(-1px, 1px); }
  96.6% { transform: translate(0, 0); filter: brightness(1.04); }
}

@keyframes dvHomeRareSplitBefore {
  0%, 91.8%, 98%, 100% { opacity: 0; clip-path: inset(0); transform: translateX(-2px); }
  92.4% { opacity: 0.72; clip-path: inset(0 0 62% 0); transform: translate(-4px, 0); }
  93.6% { opacity: 0.42; clip-path: inset(48% 0 22% 0); transform: translate(-2px, 1px); }
  95% { opacity: 0.28; clip-path: inset(68% 0 0 0); transform: translate(-5px, 0); }
  96.6% { opacity: 0.16; clip-path: inset(32% 0 48% 0); transform: translate(-2px, 0); }
}

@keyframes dvHomeRareSplitAfter {
  0%, 91.8%, 98%, 100% { opacity: 0; clip-path: inset(0); transform: translateX(2px); }
  92.4% { opacity: 0.62; clip-path: inset(58% 0 0 0); transform: translate(5px, 0); }
  93.6% { opacity: 0.46; clip-path: inset(18% 0 56% 0); transform: translate(3px, -1px); }
  95% { opacity: 0.24; clip-path: inset(0 0 72% 0); transform: translate(4px, 0); }
  96.6% { opacity: 0.14; clip-path: inset(62% 0 18% 0); transform: translate(2px, 0); }
}

.home-cosmos .cosmos-offer,
.home-cosmos .cosmos-subheadline,
.home-cosmos .cosmos-hero-actions {
  position: relative;
  z-index: 16;
}

.home-cosmos .cosmos-offer {
  margin: 18px 0 0;
  color: rgba(191, 219, 254, 0.9);
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(59, 130, 246, 0.36);
}

.home-cosmos .cosmos-subheadline {
  width: min(760px, calc(100vw - 48px));
  margin: 14px auto 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: clamp(0.98rem, 1.35vw, 1.18rem);
  line-height: 1.62;
  text-align: center;
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.95);
}

.home-cosmos .cosmos-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
  pointer-events: auto;
}

.home-cosmos .cosmos-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(191, 219, 254, 0.24);
  border-radius: 999px;
  background: rgba(8, 16, 28, 0.62);
  color: rgba(239, 246, 255, 0.9);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.44), inset 0 0 18px rgba(147, 197, 253, 0.05);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}

.home-cosmos .cosmos-hero-cta.primary {
  border-color: color-mix(in srgb, var(--accent) 58%, rgba(255, 255, 255, 0.16));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 34%, rgba(8, 16, 28, 0.72)), rgba(8, 16, 28, 0.72));
  color: #fff;
}

.home-cosmos .cosmos-hero-cta:hover,
.home-cosmos .cosmos-hero-cta:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 62%, rgba(255, 255, 255, 0.2));
  background: rgba(12, 25, 42, 0.82);
  color: #fff;
}

@media (max-width: 768px) {
  .home-cosmos .grid-hero .grid-ui h1 {
    width: min(100%, calc(100vw - 44px));
    max-width: calc(100vw - 44px);
    font-size: clamp(1.92rem, 8.8vw, 2.28rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-align: center;
  }

  .home-cosmos .grid-hero .cosmos-offer {
    width: min(282px, calc(100vw - 62px));
    margin-top: 10px;
    font-size: 0.54rem;
    letter-spacing: 0.035em;
    overflow-wrap: anywhere;
  }

  .home-cosmos .grid-hero .cosmos-subheadline {
    width: min(272px, calc(100vw - 76px));
    margin-top: 8px;
    font-size: 0.74rem;
    line-height: 1.38;
  }

  .home-cosmos .grid-hero .cosmos-hero-actions {
    width: min(350px, calc(100vw - 40px));
    margin-top: 16px;
  }

  .home-cosmos .grid-hero .cosmos-hero-cta {
    flex: 1 1 150px;
    min-height: 46px;
    padding: 0 14px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-map {
  z-index: 14;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-line {
  stroke: color-mix(in srgb, var(--accent) 48%, #9cc8ff 52%);
  stroke-width: 0.72;
  opacity: 0.32;
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 34%, transparent))
    drop-shadow(0 0 18px rgba(96, 165, 250, 0.18));
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-line.is-active {
  stroke-width: 1.35;
  opacity: 0.94;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node {
  width: 96px;
  min-height: 96px;
  opacity: 0.68;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node.is-primary {
  width: 108px;
  min-height: 108px;
  opacity: 0.74;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-core {
  width: 18px;
  height: 18px;
  background: color-mix(in srgb, var(--accent) 70%, #eff6ff 30%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.42),
    0 0 16px color-mix(in srgb, var(--accent) 72%, transparent),
    0 0 38px color-mix(in srgb, var(--accent) 44%, transparent);
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-ring {
  width: 72px;
  height: 72px;
  border-color: color-mix(in srgb, var(--accent) 32%, rgba(191, 219, 254, 0.18));
  box-shadow:
    inset 0 0 24px rgba(147, 197, 253, 0.08),
    0 0 0 1px rgba(147, 197, 253, 0.08),
    0 0 28px color-mix(in srgb, var(--accent) 22%, transparent);
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-ring::before,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-ring::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: inherit;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-ring::after {
  inset: -25px;
  opacity: 0.45;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node.is-primary .cosmos-node-ring {
  width: 84px;
  height: 84px;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node::before {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 36%, transparent) 0%, color-mix(in srgb, var(--accent) 12%, transparent) 28%, transparent 68%);
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-label {
  top: calc(50% + 45px);
  opacity: 0;
  color: rgba(226, 232, 240, 0.88);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: opacity 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node:hover .cosmos-node-label,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node:focus-visible .cosmos-node-label,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node.is-active .cosmos-node-label {
  opacity: 1;
  color: #fff;
  transform: translateX(-50%) translateY(4px);
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node:hover,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node:focus-visible,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node.is-active {
  opacity: 1;
  filter:
    drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 62%, transparent))
    drop-shadow(0 0 44px color-mix(in srgb, var(--accent) 34%, transparent));
}

.home-cosmos .grid-hero.cosmos-active .cosmos-map::before {
  opacity: 0.78;
}

.home-cosmos .grid-hero.cosmos-active .cosmos-node:not(.is-active) {
  opacity: 0.34;
  filter: saturate(0.64) brightness(0.72);
}

.home-cosmos .cosmos-panel {
  width: min(320px, calc(100vw - 48px));
  padding: 22px;
  border-radius: 24px;
  border-color: color-mix(in srgb, var(--panel-accent, #93c5fd) 40%, rgba(255, 255, 255, 0.18));
  background:
    linear-gradient(180deg, rgba(19, 33, 50, 0.56), rgba(5, 10, 17, 0.72)),
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--panel-accent, #93c5fd) 18%, transparent), transparent 56%);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.home-cosmos .cosmos-panel h2 {
  padding-right: 32px;
  color: color-mix(in srgb, var(--panel-accent, #93c5fd) 42%, white 58%);
  font-size: 1.45rem;
  font-weight: 560;
}

.home-cosmos .cosmos-panel-copy {
  color: rgba(226, 232, 240, 0.70);
  font-size: 0.92rem;
}

.home-cosmos .cosmos-panel li a {
  min-height: 52px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(226, 232, 240, 0.08);
  border-radius: 14px;
  background: rgba(8, 15, 24, 0.34);
  color: rgba(241, 245, 249, 0.82);
}

.home-cosmos .cosmos-panel li a::before {
  width: 9px;
  height: 9px;
}

.home-cosmos .cosmos-open {
  min-height: 54px;
  border-radius: 18px;
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--panel-accent, #93c5fd) 16%, rgba(6, 12, 20, 0.54));
  box-shadow:
    inset 0 0 22px color-mix(in srgb, var(--panel-accent, #93c5fd) 16%, transparent),
    0 0 30px color-mix(in srgb, var(--panel-accent, #93c5fd) 14%, transparent);
}

.cosmos-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.8);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.cosmos-close:hover,
.cosmos-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  outline: none;
}

.home-cosmos .audio-btn {
  border-color: rgba(248, 213, 140, 0.24);
  background: rgba(3, 7, 12, 0.48);
}

.home-cosmos .audio-dot {
  background: #f8d58c;
  box-shadow: 0 0 10px rgba(248, 213, 140, 0.8);
}

@media (prefers-reduced-motion: reduce) {
  .cosmos-map *,
  .cosmos-map::before,
  .home-cosmos .grid-ui h1 .dv-glitch-word,
  .home-cosmos .grid-ui h1 .dv-glitch-word::before,
  .home-cosmos .grid-ui h1 .dv-glitch-word::after {
    transition: none !important;
    animation: none !important;
  }

  .home-cosmos .grid-ui h1 .dv-glitch-word::before,
  .home-cosmos .grid-ui h1 .dv-glitch-word::after {
    opacity: 0 !important;
    transform: none !important;
    clip-path: inset(0) !important;
  }
}

/* V4 galaxy hero pass: the procedural canvas owns the galaxy; no pseudo ring objects. */
.home-cosmos .grid-ui h1 {
  position: relative;
  z-index: 17;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node::before,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-ring {
  display: none;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node.is-primary {
  width: 44px;
  min-height: 44px;
  opacity: 0.56;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-core,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node.is-primary .cosmos-node-core {
  width: 6px;
  height: 6px;
  background: color-mix(in srgb, var(--accent) 62%, #f8fbff 38%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 12px color-mix(in srgb, var(--accent) 48%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 18%, transparent);
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node-label {
  top: calc(50% + 16px);
  font-size: 0.78rem;
  opacity: 0;
}

.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node:hover,
.home-cosmos .grid-hero:not(.cosmos-compact) .cosmos-node:focus-visible {
  transform: translate(-50%, -50%) scale(1.16);
}

.home-cosmos .cosmos-panel,
.home-cosmos .cosmos-panel:not([hidden]) {
  display: none !important;
}

.home-cosmos .grid-hero.cosmos-active .cosmos-map::before {
  opacity: 0;
}

/* V4 local prod candidate: home keeps only canvas starfield + shared top HUD. */
.home-cosmos .cosmos-map,
.home-cosmos .cosmos-lines,
.home-cosmos .cosmos-nodes,
.home-cosmos .cosmos-node,
.home-cosmos .cosmos-panel,
.home-cosmos .cosmos-hero-actions {
  display: none !important;
}

/* V4 frame removal: full-bleed hero, no decorative perimeter border/card. */
.home-cosmos .grid-hero::after {
  content: none;
  display: none;
}
/* V4 home mobile route cards + frame polish: keep cosmos full-bleed, reduce card weight. */
body.home-cosmos {
  margin: 0;
  overflow-x: clip;
  background-color: #02040b;
}

.home-cosmos .grid-hero {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  border-radius: 0;
}

.home-cosmos .grid-hero,
.home-cosmos .grid-ui,
.home-cosmos .cosmos-map {
  clip-path: none;
}

@media (max-width: 768px) {
  .home-cosmos .grid-hero.cosmos-compact .grid-ui {
    min-height: 100svh;
    padding: clamp(62px, 9vh, 78px) 12px max(86px, calc(74px + env(safe-area-inset-bottom, 0px)));
    justify-content: center;
  }

  .home-cosmos .grid-hero.cosmos-compact .grid-ui h1 {
    width: min(100%, calc(100vw - 44px));
    max-width: calc(100vw - 44px);
    font-size: clamp(1.92rem, 8.8vw, 2.28rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-align: center;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-offer {
    width: min(282px, calc(100vw - 62px));
    margin-top: 10px;
    font-size: 0.54rem;
    letter-spacing: 0.035em;
    overflow-wrap: anywhere;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-subheadline {
    width: min(272px, calc(100vw - 76px));
    margin-top: 8px;
    font-size: 0.74rem;
    line-height: 1.38;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-mobile-tagline {
    width: min(272px, calc(100vw - 76px));
    margin-top: 8px;
    color: rgba(226, 232, 240, 0.52);
    font-size: 0.72rem;
    line-height: 1.3;
    text-align: center;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-map {
    width: min(390px, calc(100vw - 18px));
    margin-top: 12px;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-nodes {
    gap: 5px;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-node,
  .home-cosmos .grid-hero.cosmos-compact .cosmos-node.is-primary,
  .home-cosmos .grid-hero.cosmos-compact .cosmos-node:hover,
  .home-cosmos .grid-hero.cosmos-compact .cosmos-node:focus-visible,
  .home-cosmos .grid-hero.cosmos-compact .cosmos-node.is-active {
    min-height: 34px;
    grid-template-columns: 10px minmax(0, 1fr) 8px;
    gap: 7px;
    padding: 6px 9px;
    border-color: rgba(226, 232, 240, 0.055);
    border-radius: 12px;
    background: rgba(3, 10, 18, 0.22);
    box-shadow: none;
    backdrop-filter: blur(8px);
    opacity: 0.70;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-node.is-active {
    border-color: color-mix(in srgb, var(--accent) 26%, rgba(226, 232, 240, 0.09));
    background: color-mix(in srgb, var(--accent) 6%, rgba(3, 10, 18, 0.28));
    opacity: 0.82;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-node-core {
    width: 5px;
    height: 5px;
    opacity: 0.82;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-node-label {
    min-width: 0;
    font-size: 0.76rem;
    font-weight: 760;
    line-height: 1.1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-node-summary {
    display: none;
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-node::after {
    content: "";
    width: 5px;
    height: 5px;
    justify-self: end;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.54;
  }

  .home-cosmos .grid-hero.cosmos-compact.cosmos-active .cosmos-node:not(.is-active) {
    opacity: 0.58;
  }
}

@media (max-width: 380px) {
  .home-cosmos .grid-hero.cosmos-compact .cosmos-map {
    width: calc(100vw - 16px);
  }

  .home-cosmos .grid-hero.cosmos-compact .cosmos-node-label {
    font-size: 0.76rem;
  }
}
