:root {
  --bg: #0a0e14;
  --bg-elevated: #12151c;
  --border: #1e2430;
  --text: #e6ecf5;
  --muted: #8a94a6;
  --accent: #37e0ff;
  --accent-2: #7c5cff;
  --error: #ff4f5e;
  --shell-pad-x: clamp(20px, 4vw, 56px);
  --shell-pad-y: clamp(16px, 2.5vh, 32px);
  --content-max: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
  color-scheme: dark;
  height: 100%;
}

/* Full-viewport shell — edge-to-edge, not a floating centered card. */
body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, #131a26 0%, transparent 55%),
    linear-gradient(rgba(55, 224, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 224, 255, 0.045) 1px, transparent 1px);
  background-size: cover, 40px 40px, 40px 40px;
  background-repeat: no-repeat, repeat, repeat;
  background-attachment: fixed, fixed, fixed;
  color: var(--text);
  font-family: "Segoe UI", "Inter", system-ui, sans-serif;
}

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

.shell-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: var(--shell-pad-y) var(--shell-pad-x);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(10px);
}

.shell-main {
  flex: 1;
  width: 100%;
  padding: clamp(28px, 5vh, 56px) var(--shell-pad-x) clamp(40px, 6vh, 72px);
}

.shell-main-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Auth / invite: still full-bleed page; form sits in readable column. */
.shell-main.shell-main-narrow .shell-main-inner {
  max-width: 420px;
}

.shell-main.shell-main-mid .shell-main-inner {
  max-width: 640px;
}

.shell-main.shell-main-center {
  display: flex;
  align-items: center;
}

.shell-main.shell-main-center .shell-main-inner {
  width: 100%;
}

/* Legacy class aliases (safe if any leftover markup) */
.page-center,
.page-center-top {
  display: contents;
}

.card,
.card-wide {
  width: 100%;
  max-width: none;
  min-width: 0;
  overflow-wrap: anywhere;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.lead {
  line-height: 1.55;
  margin-bottom: 22px;
}

.lead strong {
  color: var(--text);
  font-weight: 600;
}

.section-title {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 10px;
  font-weight: 600;
}

.product-block {
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.feature-list li + li {
  margin-top: 8px;
}

.feature-list strong {
  color: var(--text);
  font-weight: 600;
}

.disclaimer {
  background: rgba(55, 224, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.disclaimer-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.disclaimer-text strong {
  color: var(--text);
  font-weight: 600;
}

.download-section {
  margin-top: 4px;
}

.platform-hint {
  margin-bottom: 14px;
}

.download-panel {
  margin-top: 4px;
}

.dl-meta {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: "Consolas", "Cascadia Mono", monospace;
}

.dl-notes {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.site-header {
  display: contents;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.brand-link {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.header-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 14px;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.header-nav a:hover {
  color: var(--accent);
  border-color: rgba(55, 224, 255, 0.25);
}

.header-nav a.is-active {
  color: var(--accent);
  border-color: rgba(55, 224, 255, 0.4);
  background: rgba(55, 224, 255, 0.08);
  box-shadow: 0 0 18px rgba(55, 224, 255, 0.1);
}

.profile-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.profile-user {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: Consolas, ui-monospace, monospace;
}

.login-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.login-link:hover {
  text-decoration: underline;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgba(55, 224, 255, 0.8);
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: "Consolas", monospace;
}

.brand-name .accent {
  color: var(--accent);
}

.logout-link {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.logout-link:hover {
  color: var(--accent);
}

.product-cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 1.5rem 0 0;
}

.product-cta {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  background: rgba(18, 21, 28, 0.65);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  min-height: 140px;
}

.product-cta:hover {
  border-color: rgba(55, 224, 255, 0.45);
  box-shadow: 0 0 28px rgba(55, 224, 255, 0.1);
  transform: translateY(-2px);
}

.product-cta h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.product-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-brand {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  font-family: "Consolas", monospace;
}

.hero-brand .accent {
  color: var(--accent);
}

.nav-pills {
  display: none;
}

.nav-pills a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

.nav-pills a:hover,
.nav-pills a.is-active {
  color: var(--accent);
  border-color: rgba(55, 224, 255, 0.35);
}

h1 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin: 0 0 8px;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 10px;
}

input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input.invite-code {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.82rem;
  overflow-x: auto;
}

.client-links {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-links-title {
  margin: 0 !important;
}

.btn-secondary {
  display: block;
  text-align: center;
  text-decoration: none;
  background: rgba(55, 224, 255, 0.12);
  border: 1px solid rgba(55, 224, 255, 0.45);
  color: var(--accent);
  font-weight: 600;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.92rem;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  background: rgba(55, 224, 255, 0.2);
  border-color: var(--accent);
}

.link-quiet {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-quiet:hover {
  color: var(--accent);
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 224, 255, 0.15);
}

.btn-primary {
  margin-top: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05070a;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(55, 224, 255, 0.25);
  transition: transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  box-shadow: 0 0 28px rgba(55, 224, 255, 0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

.error-box {
  background: rgba(255, 79, 94, 0.1);
  border: 1px solid rgba(255, 79, 94, 0.4);
  color: var(--error);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05070a;
  font-weight: 700;
  border-radius: 10px;
  padding: 16px;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(55, 224, 255, 0.3);
  transition: box-shadow 0.2s, transform 0.1s;
}

.btn-download:hover {
  box-shadow: 0 0 36px rgba(55, 224, 255, 0.45);
}

.btn-download:active {
  transform: scale(0.98);
}

.btn-download-icon {
  font-size: 1.2rem;
}

.hint {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.hint-title {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.hint ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.demo-section {
  margin-top: 4px;
}

.demo-lead {
  margin-bottom: 14px;
}

.demo-carousel {
  margin: 0;
}

.demo-carousel-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 21, 28, 0.72);
  overflow: hidden;
  box-shadow: 0 0 28px rgba(55, 224, 255, 0.06);
  cursor: pointer;
}

.demo-carousel-slides {
  position: relative;
  width: 100%;
}

.demo-slide {
  margin: 0;
  display: none;
}

.demo-slide.is-active {
  display: block;
}

.demo-slide img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.demo-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 72px;
  padding: 0;
  border: 1px solid rgba(55, 224, 255, 0.28);
  border-radius: 10px;
  background: rgba(10, 14, 20, 0.42);
  color: rgba(230, 236, 245, 0.78);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  opacity: 0.72;
}

.demo-carousel-arrow:hover,
.demo-carousel-arrow:focus-visible {
  opacity: 1;
  color: var(--accent);
  border-color: rgba(55, 224, 255, 0.55);
  background: rgba(10, 14, 20, 0.62);
  outline: none;
}

.demo-carousel-arrow-next {
  right: 10px;
}

.demo-carousel-arrow-prev {
  left: 10px;
  opacity: 0.45;
}

.demo-carousel-arrow-prev:hover,
.demo-carousel-arrow-prev:focus-visible {
  opacity: 0.95;
}

.demo-carousel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.demo-carousel-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-family: Consolas, ui-monospace, monospace;
  letter-spacing: 0.02em;
}

.demo-carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(55, 224, 255, 0.35);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.demo-carousel-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(55, 224, 255, 0.55);
}

.demo-carousel-dot:hover {
  border-color: rgba(55, 224, 255, 0.7);
}

.tracker-placeholder {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px dashed rgba(55, 224, 255, 0.35);
  border-radius: 12px;
  background: rgba(18, 21, 28, 0.5);
}

.tracker-placeholder code {
  font-family: Consolas, ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--accent);
}

@media (max-width: 720px) {
  .product-cta-grid {
    grid-template-columns: 1fr;
  }

  .shell-header {
    flex-wrap: wrap;
  }

  .header-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    padding-top: 4px;
  }

  .profile-bar {
    margin-left: auto;
  }

  .demo-carousel-arrow {
    width: 36px;
    height: 56px;
    font-size: 1.45rem;
  }

  .demo-carousel-arrow-next {
    right: 6px;
  }

  .demo-carousel-arrow-prev {
    left: 6px;
  }
}
