:root {
  color-scheme: dark;
  --site-bg: #0e141b;
  --site-bg-elevated: #16202b;
  --site-bg-soft: #1b2733;
  --site-text: #e7eef5;
  --site-text-muted: #9fb0c2;
  --site-border: rgba(173, 194, 214, 0.16);
  --site-shadow: rgba(0, 0, 0, 0.32);
  --site-link: #8ec5ff;
  --site-focus: rgba(96, 165, 250, 0.6);
}

html,
body {
  height: 100%;
}

body {
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(80, 125, 170, 0.18), transparent 30%),
    linear-gradient(180deg, #0e141b 0%, #121a24 100%);
  color: var(--site-text);
}

body.workspace-route {
  overflow: hidden;
}

a {
  cursor: pointer;
  color: var(--site-link);
}

a:hover {
  color: #bddcff;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
}

.hero-banner {
  min-height: 10.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #1d2c3d 0%, #24384c 45%, #2e4a63 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--site-text);
  text-align: center;
  padding: 1.35rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-banner-content {
  max-width: 58rem;
}

.hero-handle {
  color: #b8dcff;
}

.hero-tagline {
  line-height: 1.55;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--site-text-muted);
}

.page-card,
.content-panel {
  border: 0;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(27, 39, 51, 0.96) 0%, rgba(20, 30, 40, 0.98) 100%);
  color: var(--site-text);
  box-shadow: 0 0.8rem 2rem var(--site-shadow);
}

.home-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.home-card:hover,
.home-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.4);
}

.home-card:focus-visible {
  outline: 2px solid var(--site-focus);
  outline-offset: 3px;
}

.home-card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.3;
  margin-bottom: 0.45rem;
}

.home-card-title i {
  width: 1.35rem;
  flex: 0 0 1.35rem;
  text-align: center;
  color: rgba(231, 238, 245, 0.8);
  margin-top: 0.12rem;
}

.home-card-title span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-card .card-body {
  gap: 0.15rem;
}

.home-card .text-muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

.home-card-home {
  background: linear-gradient(135deg, #3a2d1d 0%, #4b3823 100%);
}

.home-card-news {
  background: linear-gradient(135deg, #1e3246 0%, #27425c 100%);
}

.home-card-media {
  background: linear-gradient(135deg, #302246 0%, #3a2c57 100%);
}

.home-card-biography {
  background: linear-gradient(135deg, #1d3528 0%, #264332 100%);
}

.home-card-solution {
  background: linear-gradient(135deg, #402523 0%, #542e2c 100%);
}

.home-card-research {
  background: linear-gradient(135deg, #2a341d 0%, #364527 100%);
}

.home-card-workspace {
  background: linear-gradient(135deg, #1b3438 0%, #254246 100%);
}

.aioxyzt-section {
  border-top: 1px solid var(--site-border);
  border-bottom: 1px solid var(--site-border);
  padding: 1.5rem 0;
}

.aioxyzt-intro {
  max-width: 42rem;
}

.aioxyzt-pill-panel {
  border: 1px solid var(--site-border);
  border-radius: 0.75rem;
  background: rgba(14, 20, 27, 0.48);
}

.aioxyzt-pill-panel {
  flex: 0 1 28rem;
  padding: 1rem;
}

.aioxyzt-usecases span {
  color: var(--site-text-muted);
}

.aioxyzt-usecases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  list-style: none;
  padding-left: 0;
}

.aioxyzt-usecases li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.aioxyzt-usecases i {
  width: 1.15rem;
  flex: 0 0 1.15rem;
  margin-top: 0.2rem;
  text-align: center;
}

.aioxyzt-badge-mint {
  background-color: #20c997;
  color: #06281f;
}

.aioxyzt-badge-orange {
  background-color: #fd7e14;
  color: #2b1400;
}

.aioxyzt-badge-purple {
  background-color: #6f42c1;
  color: #fff;
}

.aioxyzt-badge-pink {
  background-color: #d63384;
  color: #fff;
}

.aioxyzt-badge-deep {
  background-color: #6610f2;
  color: #fff;
}

@media (max-width: 767.98px) {
  .aioxyzt-usecases {
    grid-template-columns: 1fr;
  }
}

.text-muted {
  color: var(--site-text-muted) !important;
}

.card,
.modal-content,
.dropdown-menu {
  background-color: var(--site-bg-elevated);
  color: var(--site-text);
  border-color: var(--site-border);
}

.list-group-item,
.form-control,
.form-select {
  background-color: var(--site-bg-soft);
  color: var(--site-text);
  border-color: var(--site-border);
}

.form-control::placeholder {
  color: rgba(159, 176, 194, 0.8);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--site-bg-soft);
  color: var(--site-text);
  border-color: rgba(142, 197, 255, 0.6);
  box-shadow: 0 0 0 0.25rem rgba(66, 153, 225, 0.18);
}

.btn-outline-primary {
  color: #9ecfff;
  border-color: rgba(158, 207, 255, 0.55);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #08111a;
  background-color: #9ecfff;
  border-color: #9ecfff;
}

.nav-link.active {
  font-weight: 600;
}

.brand-with-avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 2rem;
  border: 1px solid rgba(231, 238, 245, 0.35);
}

.nav-link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link-with-icon i {
  width: 1rem;
  text-align: center;
  opacity: 0.9;
}

.media-card img,
.media-card video,
.media-card audio {
  width: 100%;
}

.media-edit-toggle {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.media-edit-panel {
  padding: 1rem;
  border: 1px solid var(--site-border);
  border-radius: 0.9rem;
  background: rgba(11, 17, 24, 0.55);
}

.media-delete-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #dc3545;
  color: #ffffff;
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.35);
}

.media-delete-btn:hover,
.media-delete-btn:focus {
  background: #bb2d3b;
}

.bio-avatar {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1rem;
  background: #24384c;
}

.canvas-frame {
  border: 1px solid var(--site-border);
  background: #081018;
}

.workspace-snake-view {
  min-height: calc(100vh - 8rem);
  display: flex;
  flex-direction: column;
}

.workspace-snake-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--site-border);
  background: linear-gradient(135deg, rgba(25, 37, 49, 0.96) 0%, rgba(20, 30, 40, 0.96) 100%);
}

.workspace-scoreboard {
  min-width: 5rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.85rem;
  background: #0b1118;
  color: var(--site-text);
  text-align: center;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
}

.workspace-scoreboard-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 249, 250, 0.75);
}

.workspace-scoreboard strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.1;
}

.workspace-snake-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(circle at top, rgba(97, 141, 184, 0.22), transparent 50%),
    linear-gradient(180deg, #131c26 0%, #0d151d 100%);
}

.workspace-snake-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 0.9rem 2rem rgba(0, 0, 0, 0.28);
}

.research-section {
  padding-top: 0.35rem;
  border-top: 1px solid var(--site-border);
}

.research-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.research-gallery-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.research-gallery-item {
  flex: 0 0 auto;
  width: 10rem;
  border-radius: 0.9rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--site-border);
}

.research-gallery-item img {
  display: block;
  width: 100%;
  height: 7rem;
  object-fit: cover;
}

.research-gallery-caption {
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
}

.research-gallery-preview {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
}

.research-gallery-preview-item {
  flex: 0 0 auto;
  min-width: 10rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--site-border);
}

.research-edit-toggle {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.research-editor {
  padding: 1rem;
  border: 1px solid var(--site-border);
  border-radius: 0.9rem;
  background: rgba(11, 17, 24, 0.55);
}

.research-passcode-panel {
  display: block;
}

.tag-selector {
  border: 1px solid var(--site-border);
  border-radius: 0.9rem;
  background: rgba(11, 17, 24, 0.5);
  padding: 0.85rem;
}

.tag-selector-search-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(11, 17, 24, 0.96);
  padding-bottom: 0.35rem;
}

.tag-selector-panel {
  max-height: 18rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.tag-selector-title,
.tag-selector-group-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--site-text-muted);
}

.tag-selector-options {
  display: grid;
  gap: 0.45rem;
}

.tag-selector-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.tag-selector-option span {
  display: grid;
  gap: 0.18rem;
}

.tag-selector-option small {
  color: var(--site-text-muted);
}

@media (max-width: 767.98px) {
  .workspace-snake-view {
    min-height: calc(100vh - 6rem);
  }

  .workspace-snake-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .workspace-scoreboard {
    align-self: flex-end;
  }

  .workspace-snake-stage {
    padding: 0.75rem;
  }
}

.footer-band {
  background-color: #101821;
}

.footer-band-secondary {
  background-color: rgba(255, 255, 255, 0.03);
}

.footer-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
}

.footer-socials {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.footer-social-btn {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1;
}

.footer-feedback-btn {
  background: #465a6f;
}

.footer-feedback-btn:hover,
.footer-feedback-btn:focus {
  background: #5b7088;
}

.footer-x-mark {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--site-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
  .footer-inline {
    gap: 0.6rem;
  }

  .footer-socials {
    gap: 0.25rem;
  }

  .footer-social-btn {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.78rem;
  }

  .footer-copy {
    font-size: 0.78rem;
  }
}