:root {
  --bg0: #02050b;
  --bg1: #050913;
  --bg2: #08111f;
  --panel: rgba(10, 15, 26, 0.84);
  --panel-border: rgba(173, 197, 243, 0.18);
  --text: #f5f7fb;
  --muted: rgba(231, 236, 246, 0.9);
  --muted-2: rgba(220, 228, 242, 0.72);
  --line: rgba(229, 236, 246, 0.16);
  --blue: #2d66ff;
  --blue-2: #66b6ff;
  --orange: #ff7d31;
  --orange-2: #ffb169;
  --green: #34c759;
  --red: #ff5b63;
  --shadow-deep: 0 30px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 69%, rgba(86, 158, 255, 0.22), transparent 12%),
    radial-gradient(circle at 17% 73%, rgba(155, 211, 255, 0.12), transparent 6%),
    radial-gradient(circle at 84% 67%, rgba(255, 120, 41, 0.18), transparent 13%),
    radial-gradient(circle at 86% 60%, rgba(255, 181, 129, 0.10), transparent 8%),
    radial-gradient(circle at 50% 35%, rgba(40, 82, 166, 0.18), transparent 28%),
    linear-gradient(180deg, #01040a 0%, #030711 46%, #02050b 100%);
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    radial-gradient(circle at 5% 38%, rgba(255,255,255,0.75) 0 1px, transparent 1.5px),
    radial-gradient(circle at 10% 71%, rgba(255,255,255,0.70) 0 1px, transparent 1.5px),
    radial-gradient(circle at 13% 76%, rgba(255,255,255,0.68) 0 1px, transparent 1.5px),
    radial-gradient(circle at 79% 22%, rgba(255, 152, 82, 0.75) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 86% 31%, rgba(255, 184, 126, 0.78) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 90% 75%, rgba(255,255,255,0.70) 0 1px, transparent 1.5px),
    radial-gradient(circle at 94% 67%, rgba(255,255,255,0.62) 0 1px, transparent 1.4px),
    radial-gradient(circle at 6% 62%, rgba(128, 188, 255, 0.66) 0 1px, transparent 1.5px);
  opacity: 0.65;
}

body::after {
  background: linear-gradient(transparent 96%, rgba(255,255,255,0.012) 100%);
  background-size: 100% 4px;
  opacity: 0.11;
}

.page-glow {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(34px);
  z-index: 0;
}

.page-glow-left {
  left: 3%;
  top: 47%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(88, 176, 255, 0.56), rgba(88, 176, 255, 0));
}

.page-glow-right {
  right: 3%;
  top: 47%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 128, 61, 0.48), rgba(255, 128, 61, 0));
}

.portal-shell {
  position: relative;
  z-index: 1;
  width: min(1262px, calc(100% - 64px));
  margin: 28px auto 36px;
}

.portal-shell::before {
  content: "";
  position: absolute;
  left: 24%;
  top: 124px;
  width: 40%;
  height: 74%;
  background: radial-gradient(circle, rgba(40, 115, 255, 0.13), transparent 70%);
  filter: blur(34px);
  pointer-events: none;
}

.portal-shell::after {
  content: "";
  position: absolute;
  right: 0;
  top: 178px;
  width: 30%;
  height: 52%;
  background: radial-gradient(circle, rgba(255, 118, 42, 0.12), transparent 72%);
  filter: blur(28px);
  pointer-events: none;
}

.glass {
  background: linear-gradient(180deg, rgba(22, 33, 55, 0.56), rgba(7, 11, 20, 0.78));
  border: 1px solid var(--panel-border);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    inset 0 0 0 1px rgba(255,255,255,0.018),
    var(--shadow-deep);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar {
  min-height: 78px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(8, 12, 23, 0.92) 0%, rgba(22, 40, 74, 0.92) 34%, rgba(12, 21, 38, 0.9) 69%, rgba(7, 11, 20, 0.92) 100%);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 38px rgba(42, 108, 255, 0.11);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(86, 154, 255, 0.18));
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-block { color: var(--red); text-shadow: 0 0 14px rgba(255, 91, 99, 0.12); }
.brand-cord { color: #5ea7ff; text-shadow: 0 0 14px rgba(94, 167, 255, 0.14); }
.brand-s { color: #4fd76a; text-shadow: 0 0 14px rgba(79, 215, 106, 0.16); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 46px;
}

.nav-links a,
.nav-button {
  color: rgba(244, 247, 255, 0.94);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.chevron {
  display: inline-block;
  margin-left: 3px;
  transform: translateY(-1px);
  opacity: 0.7;
}

.nav-button {
  min-width: 114px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(167, 192, 255, 0.32);
  background: linear-gradient(180deg, rgba(28, 38, 64, 0.96), rgba(14, 20, 35, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 10px 22px rgba(0, 0, 0, 0.34),
    0 0 16px rgba(63, 104, 226, 0.14);
  font-weight: 700 !important;
  font-size: 16px !important;
  cursor: pointer;
  font-family: inherit;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.03fr) minmax(470px, 528px);
  gap: 56px;
  align-items: start;
  padding: 56px 34px 18px;
}

.hero-copy {
  padding-top: 72px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 470px;
  font-size: clamp(44px, 4.15vw, 58px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hero-copy p {
  margin: 24px 0 28px;
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
}

.primary-button {
  width: 200px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  color: #f7f9ff;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(180deg, #1c62f4 0%, #0f338f 100%);
  border: 1px solid rgba(162, 194, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 14px 28px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(41, 109, 255, 0.2);
}

.availability {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(225, 233, 248, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3c7cff;
  box-shadow: 0 0 8px rgba(60, 124, 255, 0.9);
}

.session-inline {
  margin-top: 12px;
  max-width: 520px;
  color: rgba(220, 228, 242, 0.78);
  font-size: 13px;
  line-height: 1.5;
}

.session-inline--secondary {
  color: rgba(194, 208, 233, 0.58);
  font-size: 12px;
}

.feature-card {
  position: relative;
  width: 100%;
  max-width: 528px;
  justify-self: end;
  margin-top: 2px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.035),
    0 24px 44px rgba(0,0,0,0.48),
    -12px 0 34px rgba(51, 145, 255, 0.18),
    14px 0 34px rgba(255, 117, 44, 0.14);
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 2px 0 0 rgba(62, 172, 255, 0.54),
    inset -2px 0 0 rgba(255, 130, 53, 0.54),
    inset 0 1px 0 rgba(255,255,255,0.11),
    inset 0 -1px 0 rgba(0,0,0,0.24);
}

.feature-art {
  position: relative;
  aspect-ratio: 1.56 / 1;
  overflow: hidden;
  padding: 16px 16px 0;
  background:
    linear-gradient(90deg, rgba(32, 61, 108, 0.92) 0%, rgba(15, 22, 40, 0.96) 56%, rgba(69, 29, 22, 0.94) 100%);
}

.feature-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  pointer-events: none;
}

.feature-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
  pointer-events: none;
}

.feature-light-left {
  width: 138px;
  height: 138px;
  left: 12%;
  top: 30%;
  background: radial-gradient(circle, rgba(119, 176, 255, 0.42), rgba(119, 176, 255, 0));
}

.feature-light-right {
  width: 108px;
  height: 108px;
  right: 7%;
  top: 16%;
  background: radial-gradient(circle, rgba(255, 126, 57, 0.36), rgba(255, 126, 57, 0));
}

.feature-media {
  position: absolute;
  inset: 18px 18px 0 18px;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}

.feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.10));
  pointer-events: none;
}

.feature-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.02) brightness(0.84);
}

.feature-body {
  padding: 18px 24px 18px;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.18), rgba(6, 9, 16, 0.82));
}

.feature-body h2 {
  margin: 0 0 15px;
  font-size: 25px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.feature-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  padding-top: 13px;
  border-top: 1px solid rgba(228, 235, 248, 0.16);
  color: rgba(239, 242, 250, 0.94);
  font-size: 13.5px;
}

.feature-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.meta-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px currentColor;
}

.meta-dot.blue { background: #2c7eff; color: #2c7eff; }
.meta-dot.green { background: #1fa34a; color: #1fa34a; }
.meta-dot.neutral { background: #aeb7c8; color: #aeb7c8; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 22px 34px 48px;
}

.mini-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.mini-card {
  min-height: 150px;
  border-radius: 16px;
  padding: 24px 24px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(23, 34, 56, 0.62), rgba(8, 12, 22, 0.9));
}

.mini-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(255,255,255,0.045);
  pointer-events: none;
}

.mini-card-primary {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    0 16px 30px rgba(0,0,0,0.42),
    -11px 14px 28px rgba(56, 145, 255, 0.16);
}

.mini-card-library {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    0 16px 30px rgba(0,0,0,0.42),
    11px 14px 28px rgba(255, 125, 51, 0.16);
}

.mini-card-link.is-disabled {
  opacity: 0.78;
  pointer-events: none;
}

.mini-content {
  position: relative;
  z-index: 1;
  align-self: stretch;
}

.mini-content h3 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.mini-content p {
  margin: 0;
  padding-top: 15px;
  border-top: 1px solid rgba(228, 235, 248, 0.16);
  color: rgba(228, 234, 247, 0.9);
  font-size: 15px;
  line-height: 1.45;
  max-width: 200px;
}

.mini-art {
  align-self: end;
  justify-self: end;
  pointer-events: none;
}

.thumb-art {
  width: 118px;
  height: 84px;
  display: flex;
  align-items: end;
  justify-content: end;
}

.thumb-frame {
  width: 108px;
  height: 76px;
  overflow: hidden;
  border-radius: 4px;
  opacity: 0.95;
  box-shadow: 0 10px 20px rgba(0,0,0,0.26);
}

.thumb-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.94) contrast(1.03) brightness(0.86);
}

.simple-only {
  max-width: 240px;
}

.footer-bar {
  margin: 0 0 8px;
  padding: 22px 34px 0;
  border-top: 1px solid rgba(223, 232, 248, 0.18);
  text-align: center;
  color: rgba(224, 230, 242, 0.92);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.footer-name {
  font-size: 18px;
}

.access-gate[hidden] { display: none; }

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.access-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 3, 10, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.access-gate__dialog {
  position: relative;
  width: min(540px, calc(100vw - 28px));
  margin: clamp(24px, 10vh, 92px) auto 0;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 21, 37, 0.96), rgba(7, 11, 20, 0.97));
  box-shadow:
    0 30px 80px rgba(0,0,0,0.48),
    0 0 32px rgba(59, 112, 255, 0.08);
}

.access-gate__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(167, 192, 255, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: rgba(243, 247, 255, 0.86);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.access-gate.is-blocking .access-gate__close {
  display: none;
}

.access-gate__eyebrow {
  color: rgba(142, 178, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.access-gate__title {
  margin: 10px 0 10px;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.access-gate__subtitle {
  margin: 0;
  color: rgba(223, 230, 244, 0.82);
  font-size: 15px;
  line-height: 1.55;
}

.access-gate__alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(122, 164, 255, 0.2);
  background: rgba(42, 107, 255, 0.08);
  color: #e8efff;
  font-size: 14px;
}

.access-gate__alert[data-kind="error"] {
  border-color: rgba(255, 109, 109, 0.26);
  background: rgba(255, 79, 79, 0.08);
  color: #ffdede;
}

.access-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.access-actions--stack {
  grid-template-columns: 1fr 1fr;
}

.access-action {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(167, 192, 255, 0.16);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.access-action--primary {
  background: linear-gradient(180deg, #1c62f4 0%, #0f338f 100%);
  border-color: rgba(162, 194, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 10px 20px rgba(17, 52, 143, 0.22);
}

.access-action--danger {
  background: rgba(255, 91, 99, 0.08);
  border-color: rgba(255, 91, 99, 0.22);
}

body.modal-open {
  overflow: hidden;
}

.primary-button,
.nav-button,
.nav-links a,
.feature-card,
.mini-card,
.mini-card-link,
.access-action,
.access-gate__close {
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

.primary-button:hover,
.nav-button:hover,
.feature-card:hover,
.mini-card-link:hover .mini-card,
.access-action:hover,
.access-gate__close:hover {
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  .portal-shell {
    width: min(1262px, calc(100% - 48px));
  }

  .hero-grid {
    grid-template-columns: 1fr 0.94fr;
    gap: 34px;
    padding-left: 26px;
    padding-right: 26px;
  }

  .tool-grid,
  .footer-bar {
    padding-left: 26px;
    padding-right: 26px;
  }

  .hero-copy {
    padding-top: 52px;
  }

  .feature-meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 920px) {
  .topbar {
    padding: 18px 20px;
    gap: 18px;
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 18px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 34px;
  }

  .hero-copy {
    padding-top: 10px;
  }

  .feature-card {
    justify-self: stretch;
    max-width: none;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .access-actions,
  .access-actions--stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .portal-shell {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .topbar {
    min-height: 74px;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a,
  .nav-button {
    font-size: 14px !important;
  }

  .nav-button {
    min-width: 96px;
    height: 38px;
  }

  .hero-grid,
  .tool-grid,
  .footer-bar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .primary-button {
    width: 100%;
    max-width: 220px;
  }

  .feature-body h2,
  .mini-content h3 {
    font-size: 20px;
  }

  .feature-meta {
    gap: 12px 16px;
    font-size: 13px;
  }

  .mini-card {
    min-height: 140px;
  }

  .thumb-art {
    width: 96px;
    height: 70px;
  }

  .thumb-frame {
    width: 90px;
    height: 64px;
  }

  .access-gate__dialog {
    width: calc(100vw - 20px);
    margin-top: 16px;
    padding: 20px;
    border-radius: 18px;
  }

  .access-gate__title {
    font-size: 28px;
  }
}


/* v20 responsive topbar refresh */
.brand-link {
  text-decoration: none;
  color: inherit;
}

.topbar {
  gap: 16px;
  flex-wrap: wrap;
  min-height: unset;
  padding-top: 14px;
  padding-bottom: 14px;
}

.topbar .brand,
.topbar .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar .brand-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.38);
  border: 1px solid rgba(173, 197, 243, 0.12);
}

.nav-links a,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  white-space: nowrap;
}

.nav-links a {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-button:hover,
.nav-button:focus-visible {
  border-color: rgba(167, 192, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-links {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .nav-links a,
  .nav-button {
    flex: 1 1 calc(50% - 6px);
    min-width: calc(50% - 6px);
  }
}

@media (max-width: 560px) {
  .portal-shell,
  .auth-shell,
  .account-shell,
  .artifacts-shell,
  .confirm-shell,
  .pack-shell,
  .release-shell {
    width: calc(100% - 20px);
  }

  .topbar {
    gap: 12px;
    border-radius: 16px;
  }

  .brand-name {
    font-size: 18px;
  }

  .nav-links {
    gap: 8px;
    padding: 8px;
  }

  .nav-links a,
  .nav-button {
    flex-basis: 100%;
    min-width: 100%;
    width: 100%;
  }
}
