:root {
  --bg: #020503;
  --bg-soft: #07130b;
  --panel: rgba(6, 20, 10, 0.88);
  --panel-strong: rgba(5, 14, 8, 0.96);
  --line: rgba(124, 255, 0, 0.16);
  --line-strong: rgba(124, 255, 0, 0.3);
  --text: #effff0;
  --muted: #9cb8a0;
  --accent: #7cff00;
  --accent-strong: #43ee6b;
  --blue: #48b8ff;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(124, 255, 0, 0.2), transparent 24%),
    radial-gradient(circle at 82% 8%, rgba(72, 184, 255, 0.14), transparent 24%),
    linear-gradient(180deg, #010402 0%, #041109 45%, #010402 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(124, 255, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 255, 0, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 92%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.7px, transparent 0.7px);
  background-size: 12px 12px;
  mix-blend-mode: soft-light;
}

.page-shell {
  position: relative;
  width: min(1240px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.topbar,
.hero,
.panel-card,
.visual-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 20, 10, 0.9), rgba(3, 10, 5, 0.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 999px;
  position: sticky;
  top: 14px;
  z-index: 20;
}

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

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  filter: drop-shadow(0 0 16px rgba(72, 184, 255, 0.45));
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong,
.button,
.feature-index,
.status-label,
.kicker,
.signal-row li,
.visual-badge,
.status-chip {
  font-family: "Space Grotesk", sans-serif;
}

.brand-copy span,
.lede,
.card-copy,
.status-note,
.visual-label,
.visual-panel span {
  color: var(--muted);
}

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

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(6, 16, 9, 0.82);
}

.landing-main {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.welcome-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 24px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(7, 20, 10, 0.9), rgba(3, 10, 5, 0.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.welcome-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(124, 255, 0, 0.05), transparent 42%),
    url("/assets/niscoord-logo.png") right 8% center / min(46vw, 640px) no-repeat;
  opacity: 0.15;
}

.welcome-copy,
.access-card {
  position: relative;
  z-index: 1;
}

.welcome-copy {
  align-self: center;
  max-width: 680px;
}

.welcome-copy h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3.6rem);
  line-height: 1.04;
}

.journey-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: journey;
}

.journey-list li {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(124, 255, 0, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(5, 14, 8, 0.64);
}

.journey-list strong {
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
}

.journey-list span,
.input-help {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.age-confirmation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid rgba(124, 255, 0, 0.14);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(5, 14, 8, 0.52);
  font-size: 0.82rem;
  line-height: 1.45;
}

.age-confirmation input {
  width: auto;
  margin-top: 3px;
}

.age-confirmation a {
  color: var(--accent);
}

.age-dialog {
  width: min(440px, calc(100vw - 28px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: linear-gradient(180deg, #102016, #061008);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.64);
}

.age-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.age-dialog form {
  padding: 24px;
}

.age-dialog h2 {
  margin: -6px 0 2px;
}

.access-card {
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 420px;
  padding: 26px;
  border: 1px solid rgba(124, 255, 0, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(4, 13, 7, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.access-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.auth-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(124, 255, 0, 0.12);
  border-radius: 16px;
  background: rgba(2, 8, 4, 0.7);
}

.auth-mode-button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.auth-mode-button.active {
  color: #061100;
  background: linear-gradient(135deg, var(--accent), #b7ff5a);
  box-shadow: 0 8px 18px rgba(124, 255, 0, 0.16);
}

.auth-mode-panel {
  display: grid;
}

.access-card .account-card {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

.has-session .access-head,
.has-session .auth-switcher,
.has-session .auth-mode-panel {
  display: none;
}

.landing-guidance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guidance-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(7, 20, 10, 0.84), rgba(3, 10, 5, 0.9));
}

.guidance-card h2 {
  margin: 0;
  font-size: 1.16rem;
}

.guidance-card p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding: 34px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/niscoord-logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(72vw, 920px);
  opacity: 0.09;
  pointer-events: none;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.kicker,
.feature-index,
.visual-panel p {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
}

.hero h1,
.panel-card h2 {
  margin: 0;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.25rem, 4vw, 3.45rem);
  line-height: 1.03;
}

.lede {
  max-width: 60ch;
  margin: 18px 0 0;
  line-height: 1.7;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.signal-row li {
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 21, 11, 0.82);
}

.visual-card {
  padding: 20px;
  border-radius: var(--radius-lg);
}

.visual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.visual-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(124, 255, 0, 0.1);
  border: 1px solid var(--line-strong);
}

.visual-stack {
  display: grid;
  gap: 14px;
}

.visual-panel {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(124, 255, 0, 0.12);
  background: rgba(5, 13, 8, 0.72);
}

.visual-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.panel-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.feature-index {
  margin-bottom: -4px;
}

.card-copy {
  margin: 0;
  line-height: 1.65;
}

.stack {
  display: grid;
  gap: 14px;
}

body.desktop-app .page-shell {
  width: min(760px, calc(100% - 24px));
  padding-top: min(12vh, 96px);
}

body.desktop-app .topbar,
body.desktop-app .welcome-copy,
body.desktop-app .landing-guidance {
  display: none;
}

body.desktop-app .landing-main {
  margin-top: 0;
}

body.desktop-app .welcome-layout {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.desktop-app .welcome-layout::before {
  display: none;
}

body.desktop-app .access-card {
  width: min(520px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 24px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.92rem;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  color: var(--text);
  background: rgba(7, 17, 10, 0.92);
  border: 1px solid rgba(124, 255, 0, 0.14);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(124, 255, 0, 0.36);
  box-shadow: 0 0 0 4px rgba(124, 255, 0, 0.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(124, 255, 0, 0.7);
  outline-offset: 3px;
}

.button-primary {
  color: #021100;
  background: linear-gradient(135deg, var(--accent), #b7ff5a);
  box-shadow: 0 12px 26px rgba(124, 255, 0, 0.2);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(7, 17, 10, 0.82);
}

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

.status-label {
  margin: 0 0 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.status-value {
  margin: 0;
  font-size: 1rem;
  word-break: break-word;
}

.status-note {
  margin: 0;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  min-width: 220px;
  max-width: min(92vw, 520px);
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(6, 18, 9, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1024px) {
  .welcome-layout,
  .landing-guidance {
    grid-template-columns: 1fr;
  }

  .welcome-copy h1 {
    max-width: 17ch;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100%, calc(100% - 16px));
    padding-top: 14px;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    border-radius: 22px;
  }

  .topbar-actions,
  .hero-actions,
  .inline-actions,
  .signal-row,
  .journey-list {
    width: 100%;
  }

  .topbar-actions {
    flex-direction: row;
    width: auto;
    min-width: 0;
    gap: 6px;
  }

  .topbar-actions .status-chip {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.has-session .topbar-actions .status-chip {
    display: none;
  }

  .topbar-actions .button {
    width: auto;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .brand {
    gap: 10px;
  }

  .brand-copy span {
    display: none;
  }

  .button {
    width: 100%;
  }

  .welcome-layout {
    padding: 24px 20px;
  }

  .journey-list {
    display: none;
  }

  .landing-guidance {
    grid-template-columns: 1fr;
  }

  .welcome-copy h1 {
    font-size: clamp(1.95rem, 10vw, 2.55rem);
  }

  .access-card {
    min-height: 0;
    padding: 20px;
  }

  .auth-switcher {
    gap: 4px;
    padding: 4px;
  }

  .auth-mode-button {
    padding: 0 6px;
    font-size: 0.88rem;
    white-space: nowrap;
  }

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