/* Final NeuroVista homepage overrides. Loaded after styles.css. */
body {
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 78% 38% at 50% 0%, rgba(5, 32, 74, 0.34), transparent 72%),
    radial-gradient(ellipse 48% 22% at 50% 20%, rgba(6, 20, 48, 0.24), transparent 78%),
    linear-gradient(180deg, #020407 0%, #050b15 44%, #020405 100%);
}

.home-page {
  --cyan: #d9e5f1;
  --line: rgba(132, 151, 176, 0.22);
  --line-strong: rgba(168, 188, 218, 0.34);
  --accent-warm: #f4b86a;
  --accent-violet: #8d86ff;
}

.home-page .hero-center {
  width: 100%;
  min-height: 1040px;
  margin: 0;
  padding: 76px clamp(18px, 4vw, 56px) 64px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse 84% 42% at 50% 0%, rgba(5, 38, 88, 0.58), transparent 70%),
    radial-gradient(ellipse 56% 25% at 50% 19%, rgba(8, 25, 61, 0.36), transparent 76%),
    linear-gradient(180deg, rgba(3, 12, 27, 0.1), transparent 54%);
  box-shadow: none;
}

.home-page .hero-center::before {
  background:
    radial-gradient(ellipse 66% 31% at 50% 0%, rgba(28, 64, 124, 0.12), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.008), transparent 44%);
}

.home-page .hero-copy h1 {
  text-shadow: 0 0 24px rgba(37, 67, 104, 0.26);
}

.home-page .hero-slogan {
  color: rgba(226, 235, 244, 0.9);
  font-weight: 500;
  text-shadow: none;
}

.home-page .hero-center .actions .btn {
  border-color: rgba(244, 184, 106, 0.48);
  background: rgba(10, 15, 23, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(244, 184, 106, 0.08),
    0 0 24px rgba(244, 184, 106, 0.06);
}

.home-page .hero-center .actions .btn:hover {
  transform: translateY(-2px);
  border-color: rgba(141, 134, 255, 0.6);
  background: rgba(18, 22, 36, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(141, 134, 255, 0.08),
    0 16px 36px rgba(52, 47, 122, 0.22);
}

.home-page .hero-motion-demo {
  width: min(1100px, 100%);
  margin-top: 50px;
}

.home-page .hero-motion-demo .demo-inner {
  min-height: 0;
  padding: 0;
}

.home-page .motion-shell {
  min-height: 430px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 50%, rgba(39, 83, 145, 0.24), transparent 18rem),
    radial-gradient(circle at 78% 18%, rgba(73, 89, 158, 0.16), transparent 14rem),
    linear-gradient(180deg, rgba(8, 23, 43, 0.86), rgba(4, 10, 20, 0.82));
}

.home-page .motion-stage {
  min-height: 356px;
  grid-template-columns: 0.82fr 1.52fr 0.82fr;
}

.home-page .attention-field {
  height: 320px;
}

.home-page .orbit {
  inset: 28px 48px;
}

.home-page .orbit-b {
  inset: 56px 86px;
}

.home-page .orbit-c {
  inset: 84px 132px;
}

.home-page .motion-node {
  width: 54px;
  height: 54px;
}

.home-page .motion-node.q {
  left: 10%;
  top: 62%;
}

.home-page .motion-node.k {
  left: 44%;
  top: 10%;
}

.home-page .motion-node.v {
  right: 10%;
  top: 60%;
}

.home-page .attention-core {
  width: 156px;
  height: 98px;
}

.home-page .matrix-pulse {
  grid-template-columns: repeat(5, 30px);
  gap: 8px;
}

.home-page .matrix-pulse span {
  width: 30px;
  height: 30px;
}

.home-page .concept-shot {
  overflow: hidden;
}

.home-page .shot-main {
  min-width: 0;
}

.home-page .pipeline {
  flex-wrap: wrap;
  max-width: 100%;
  overflow: hidden;
}

.home-page .pipeline span:not(:nth-child(even)) {
  flex: 1 1 112px;
  max-width: 148px;
  min-width: 96px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.home-page .pipeline span:nth-child(even) {
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .home-page .hero-center {
    min-height: auto;
    padding-top: 48px;
    padding-bottom: 52px;
  }

  .home-page .motion-shell {
    min-height: 520px;
  }

  .home-page .motion-stage {
    min-height: 430px;
    grid-template-columns: 1fr;
  }

  .home-page .attention-field {
    height: 240px;
  }

  .home-page .matrix-pulse {
    grid-template-columns: repeat(10, 20px);
  }

  .home-page .matrix-pulse span {
    width: 20px;
    height: 20px;
  }
}

.visual-lab-page {
  width: min(1480px, calc(100% - 40px));
}

.concept-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.concept-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(132, 151, 176, 0.16);
  border-radius: 999px;
  color: rgba(210, 224, 240, 0.74);
  background: linear-gradient(180deg, rgba(10, 18, 30, 0.55), rgba(5, 10, 18, 0.72));
}

.concept-stat.featured {
  border-color: rgba(244, 184, 106, 0.26);
  background: rgba(19, 16, 13, 0.62);
}

.stat-label {
  color: rgba(146, 166, 190, 0.82);
  font-size: 13px;
  line-height: 1;
}

.stat-value {
  color: #f4b86a;
  font-size: 18px;
  line-height: 1;
}

.concept-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.concept-category-strip button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(132, 151, 176, 0.18);
  border-radius: 8px;
  color: rgba(210, 224, 240, 0.78);
  background: rgba(7, 14, 25, 0.58);
  cursor: pointer;
}

.concept-category-strip button.active {
  border-color: rgba(244, 184, 106, 0.52);
  color: rgba(244, 248, 252, 0.94);
  background: rgba(32, 24, 18, 0.68);
}

.concept-category-strip small {
  color: rgba(244, 184, 106, 0.76);
}

.concept-shell .concept-list {
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.concept-list-head {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(132, 151, 176, 0.16);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.74);
}

.concept-list-head span,
.concept-list-head small {
  color: rgba(146, 166, 190, 0.78);
  font-size: 12px;
}

.concept-list-head strong {
  color: rgba(237, 244, 250, 0.94);
  font-size: 20px;
}

.concept-visual-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--visual-accent) 34%, rgba(132, 151, 176, 0.18));
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 20%, color-mix(in srgb, var(--visual-accent) 15%, transparent), transparent 14rem),
    rgba(5, 12, 22, 0.74);
  overflow: hidden;
}

.concept-visual-card .mini-row {
  margin-bottom: 12px;
}

.concept-visual-card h3 {
  margin: 0;
}

.concept-visual-card svg {
  display: block;
  width: 100%;
  min-height: 300px;
  border-radius: 8px;
}

.visual-lab-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 24px;
}

.visual-lab-head h2 {
  max-width: 980px;
  margin: 10px 0 14px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.visual-lab-head p {
  max-width: 860px;
  color: rgba(210, 224, 240, 0.76);
  font-size: 18px;
  line-height: 1.8;
}

.visual-lab-status {
  display: grid;
  gap: 6px;
  min-width: 148px;
  padding: 14px 16px;
  border: 1px solid rgba(132, 151, 176, 0.22);
  border-radius: 8px;
  background: rgba(7, 14, 25, 0.64);
}

.visual-lab-status span {
  color: var(--muted);
  font-size: 12px;
}

.visual-lab-status strong {
  color: #f4b86a;
}

.neural-workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: stretch;
  min-height: 760px;
}

.neural-rail,
.neural-inspector {
  align-self: stretch;
  padding: 16px;
  border: 1px solid rgba(132, 151, 176, 0.16);
  border-radius: 8px;
  background: rgba(5, 11, 20, 0.72);
}

.neural-rail {
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: 880px;
  overflow: auto;
}

.neural-rail > strong {
  margin-bottom: 4px;
  color: rgba(237, 244, 250, 0.92);
}

.neural-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(132, 151, 176, 0.18);
  border-radius: 8px;
  color: rgba(221, 232, 244, 0.86);
  text-align: left;
  background: rgba(10, 18, 30, 0.56);
  cursor: pointer;
}

.neural-step span {
  grid-row: span 2;
  color: rgba(244, 184, 106, 0.78);
  font-size: 12px;
}

.neural-step strong {
  overflow-wrap: anywhere;
}

.neural-step small {
  color: rgba(146, 166, 190, 0.74);
}

.neural-step.active {
  border-color: rgba(244, 184, 106, 0.58);
  background:
    radial-gradient(circle at 0% 50%, rgba(244, 184, 106, 0.12), transparent 8rem),
    rgba(12, 23, 40, 0.82);
}

.neural-stage-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(620px, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 34%, rgba(38, 91, 156, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(6, 16, 31, 0.76), rgba(2, 6, 12, 0.82));
}

.neural-hud,
.neural-control-bar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
}

.neural-hud {
  justify-content: flex-end;
}

.neural-hud span,
.control-pill,
.neural-control-bar label {
  border: 1px solid rgba(132, 151, 176, 0.18);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.62);
}

.neural-hud span {
  padding: 8px 10px;
  color: rgba(210, 224, 240, 0.76);
  font-size: 12px;
}

.neural-canvas {
  position: relative;
  min-height: 620px;
  cursor: grab;
}

.neural-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.webgl-fallback {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 620px;
  color: rgba(226, 238, 248, 0.92);
  text-align: center;
}

.webgl-fallback span {
  color: var(--muted);
}

.neural-control-bar {
  align-items: center;
  border-top: 1px solid rgba(132, 151, 176, 0.12);
}

.control-pill {
  min-height: 42px;
  padding: 0 16px;
  color: rgba(237, 244, 250, 0.88);
  cursor: pointer;
}

.control-pill.primary {
  border-color: rgba(244, 184, 106, 0.58);
  color: #f8d7a5;
}

.neural-control-bar label {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  color: rgba(210, 224, 240, 0.78);
}

.neural-control-bar label span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 82px;
}

.neural-control-bar label strong {
  color: #f8d7a5;
  font-size: 12px;
  font-weight: 700;
}

.neural-control-bar input {
  width: 150px;
}

.neural-inspector {
  display: grid;
  align-content: start;
  gap: 12px;
}

.inspector-card {
  padding: 14px;
  border: 1px solid rgba(132, 151, 176, 0.14);
  border-radius: 8px;
  background: rgba(9, 16, 27, 0.62);
}

.inspector-card.active {
  border-color: rgba(244, 184, 106, 0.42);
}

.inspector-card span {
  color: rgba(146, 166, 190, 0.82);
  font-size: 12px;
}

.inspector-card h3 {
  margin: 8px 0 10px;
  font-size: 24px;
}

.inspector-card p,
.inspector-card li {
  color: rgba(210, 224, 240, 0.78);
  line-height: 1.7;
}

.formula-card code {
  display: block;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(244, 184, 106, 0.2);
  border-radius: 8px;
  color: #f8d7a5;
  background: rgba(2, 8, 14, 0.62);
  white-space: normal;
  overflow-wrap: anywhere;
}

.inspector-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.view-modes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.view-modes button {
  min-height: 42px;
  border: 1px solid rgba(132, 151, 176, 0.18);
  border-radius: 8px;
  color: rgba(221, 232, 244, 0.86);
  background: rgba(10, 18, 30, 0.56);
  cursor: pointer;
}

.view-modes button.active {
  border-color: rgba(141, 134, 255, 0.58);
  color: #e4e1ff;
  background: rgba(39, 38, 74, 0.54);
}

.rich-page .section-head {
  max-width: 980px;
}

.path-grid,
.community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.path-card,
.community-card,
.resource-list article,
.resource-band {
  border: 1px solid rgba(132, 151, 176, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 129, 247, 0.08), transparent 12rem),
    rgba(7, 14, 25, 0.64);
}

.path-card,
.community-card {
  display: grid;
  gap: 12px;
  min-height: 280px;
  padding: 22px;
}

.path-card > span,
.community-card > span,
.resource-list article span {
  color: #f4b86a;
  font-size: 13px;
}

.path-card p,
.community-card p,
.resource-band,
.resource-list article p {
  color: rgba(210, 224, 240, 0.76);
  line-height: 1.7;
}

.path-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: rgba(226, 236, 246, 0.86);
}

.resource-band {
  margin-top: 18px;
  padding: 22px;
}

.resource-band div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.resource-band a,
.text-action {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(244, 184, 106, 0.38);
  border-radius: 8px;
  color: #f8d7a5;
  background: rgba(16, 18, 24, 0.64);
  cursor: pointer;
}

.resource-list {
  display: grid;
  gap: 12px;
}

.resource-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 4, 8, 0.72);
  backdrop-filter: blur(14px);
}

.modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(132, 151, 176, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(47, 129, 247, 0.16), transparent 18rem),
    #050b14;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
}

.modal-panel h2 {
  font-size: clamp(32px, 5vw, 56px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(132, 151, 176, 0.22);
  border-radius: 8px;
  color: rgba(237, 244, 250, 0.9);
  background: rgba(5, 12, 22, 0.7);
  cursor: pointer;
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(244, 184, 106, 0.38);
  border-radius: 8px;
  color: var(--text);
  background: rgba(2, 8, 14, 0.78);
}

.search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.search-results > div,
.account-panel {
  display: grid;
  gap: 12px;
}

.search-results a {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(132, 151, 176, 0.16);
  border-radius: 8px;
  background: rgba(9, 16, 27, 0.62);
}

.search-results span {
  color: rgba(244, 248, 252, 0.94);
  font-weight: 750;
}

.search-results small {
  color: rgba(146, 166, 190, 0.84);
  line-height: 1.5;
}

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid rgba(244, 184, 106, 0.42);
  border-radius: 8px;
  color: #f8d7a5;
  background: rgba(8, 12, 18, 0.92);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.42);
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--soft);
  font-size: 12px;
}

@media (max-width: 1160px) {
  .neural-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .neural-inspector {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-modes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .visual-lab-page {
    width: min(100% - 24px, 1480px);
  }

  .visual-lab-head {
    display: grid;
  }

  .neural-workspace,
  .neural-inspector {
    grid-template-columns: 1fr;
  }

  .neural-stage-panel {
    grid-template-rows: auto minmax(520px, 1fr) auto;
  }

  .neural-canvas {
    min-height: 520px;
  }

  .neural-control-bar label {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 10px 12px;
  }

  .neural-control-bar input {
    width: 100%;
  }

  .view-modes {
    grid-template-columns: 1fr;
  }

  .path-grid,
  .community-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

  .resource-list article {
    grid-template-columns: 1fr;
  }
}
