:root {
  --bg: #0b1220;
  --panel: #0f1a2f;
  --card: #101f3d;
  --text: #e9eefc;
  --muted: #aeb9da;
  --border: rgba(233, 238, 252, 0.12);
  --accent: #5cc8ff;
  --accent2: #8b5cff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --cvg-global-nav-height: 0px;

  /* UX tokens (lightweight design system)
     - keep existing vars for backwards compatibility
     - provide consistent spacing, radius, focus rings, etc.
  */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --focus-ring: 0 0 0 3px rgba(92, 200, 255, 0.25);
  --focus-ring-strong: 0 0 0 4px rgba(92, 200, 255, 0.35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(92, 200, 255, 0.22), transparent 60%),
              radial-gradient(900px 500px at 90% 10%, rgba(139, 92, 255, 0.22), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Improve anchor/link affordance and accessibility */
a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent2);
}

/* Focus styles: visible and consistent */
:where(a, button, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Skip link (injected by ui.js) */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 9999;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(92, 200, 255, 0.45);
  background: rgba(15, 26, 47, 0.92);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 120ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  box-shadow: var(--focus-ring-strong);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 22px 14px 54px;
}

.topbar {
  position: sticky;
  top: calc(var(--cvg-global-nav-height, 0px) + var(--cvg-info-strip-height, 0px));
  z-index: 20;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

/* -------------------------------------------------------------------------
   Live-style header layout: logo + nav + call CTA
   ------------------------------------------------------------------------- */

.cvg-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
}

.cvg-header__mobile-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.cvg-nav-toggle {
  width: auto;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(16, 31, 61, 0.55);
  color: var(--text);
  font-weight: 800;
  gap: 10px;
}

/* Mobile-first nav: collapsed by default, expanded with .is-open */
.nav.cvg-header__nav {
  display: none;
  margin-top: 0;
  gap: 10px;
}

.nav.cvg-header__nav.is-open {
  display: flex;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   Categorized (collapsible) primary nav groups
   - Mobile: details acts like accordion sections
   - Desktop: summary acts like a dropdown trigger on hover/focus
   ------------------------------------------------------------------------- */

.cvg-nav-group {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(16, 31, 61, 0.55);
  overflow: hidden;
}

.cvg-nav-group__summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 800;
}

/* Hide the default disclosure triangle in most browsers */
.cvg-nav-group__summary::-webkit-details-marker { display: none; }

.cvg-nav-group__panel {
  display: grid;
  gap: 8px;
  padding: 10px 10px 12px;
  border-top: 1px solid rgba(233, 238, 252, 0.10);
}

.cvg-nav-group[open] {
  border-color: rgba(92, 200, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(92, 200, 255, 0.12);
}

/* Mobile nav layout: stacked groups */
@media (max-width: 859px) {
  .nav.cvg-header__nav.is-open {
    flex-direction: column;
    align-items: stretch;
  }

  .cvg-nav-group {
    border-radius: 14px;
  }

  .cvg-nav-group__summary {
    justify-content: space-between;
    width: 100%;
  }

  .cvg-nav-group__panel .nav-link {
    width: 100%;
  }
}

/* Desktop nav layout: dropdown-on-hover/focus */
@media (min-width: 860px) {
  .cvg-nav-group {
    position: relative;
    overflow: visible;
  }

  .cvg-nav-group__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(15, 26, 47, 0.98);
    box-shadow: var(--shadow);
    z-index: 120;
    display: none;
  }

  .cvg-nav-group[open] .cvg-nav-group__panel {
    display: grid;
  }

  /* Open group when hovering or focusing within */
  .cvg-nav-group:hover,
  .cvg-nav-group:focus-within {
    border-color: rgba(92, 200, 255, 0.45);
  }
  .cvg-nav-group:hover .cvg-nav-group__panel,
  .cvg-nav-group:focus-within .cvg-nav-group__panel {
    display: grid;
  }
}

/* Testing helpers (optional): force a layout mode via ?cvg_view=mobile|desktop */
html.cvg-force-mobile .nav.cvg-header__nav {
  display: none;
}

html.cvg-force-mobile .nav.cvg-header__nav.is-open {
  display: flex;
}

html.cvg-force-desktop .cvg-header__mobile-controls {
  display: none;
}

html.cvg-force-desktop .nav.cvg-header__nav {
  display: flex;
}

.cvg-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cvg-header__brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.cvg-header__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

.cvg-header__brand-text {
  display: grid;
  gap: 2px;
}

.nav.cvg-header__nav {
  justify-content: flex-start;
}

.cvg-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.cvg-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(233, 238, 252, 0.18);
  background: rgba(16, 31, 61, 0.55);
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
}

.cvg-header-cta__sub {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.cvg-header-cta:hover {
  border-color: rgba(92, 200, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(92, 200, 255, 0.12);
}

@media (min-width: 860px) {
  .cvg-header {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .cvg-header__mobile-controls {
    display: none;
  }

  .nav.cvg-header__nav {
    display: flex;
  }

  .nav.cvg-header__nav {
    justify-content: center;
    margin-top: 0;
  }

  .cvg-header__right {
    justify-content: flex-end;
  }
}

/* -------------------------------------------------------------------------
   CVG Network banner (global nav)
   ------------------------------------------------------------------------- */

#cvg-global-nav {
  background: rgba(11, 18, 32, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 25;
}

/* -------------------------------------------------------------------------
   CVG Info Strip (trust/credibility line) - matches live sites
   ------------------------------------------------------------------------- */

#cvg-info-strip {
  background: rgba(11, 18, 32, 0.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: calc(var(--cvg-global-nav-height, 0px));
  z-index: 24;
}

.cvg-info-strip__inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 8px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.cvg-info-strip__item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(233, 238, 252, 0.10);
  background: rgba(16, 31, 61, 0.35);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.cvg-info-strip__link:hover {
  border-color: rgba(92, 200, 255, 0.55);
  color: var(--text);
}

.cvg-info-strip__icon {
  opacity: 0.95;
}

.cvg-global-nav__inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cvg-global-nav__brand {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.cvg-global-nav__toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(16, 31, 61, 0.45);
  color: var(--text);
  width: auto;
  margin-left: 8px;
}

.cvg-global-nav__brand {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.cvg-global-nav__brand-text {
  color: var(--text);
  opacity: 0.95;
}

.cvg-global-nav__brand-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow);
}

.cvg-global-nav__links {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Collapse global nav links on small screens (toggle controls visibility) */
@media (max-width: 720px) {
  .cvg-global-nav__inner {
    align-items: flex-start;
  }

  .cvg-global-nav__links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .cvg-global-nav__links.is-open {
    display: flex;
  }

  .cvg-global-nav__link,
  .cvg-global-nav__more-btn {
    justify-content: center;
  }

  .cvg-global-nav__dropdown {
    position: static;
    margin-top: 8px;
    width: 100%;
    max-width: none;
  }
}

.cvg-global-nav__link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  background: rgba(16, 31, 61, 0.45);
}

.cvg-global-nav__link[aria-current="page"] {
  border-color: rgba(92, 200, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(92, 200, 255, 0.12);
}

.cvg-global-nav__more {
  position: relative;
}

.cvg-global-nav__more-btn {
  width: auto;
  margin-top: 0;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(16, 31, 61, 0.45);
  color: var(--text);
}

.cvg-global-nav__dropdown {
  position: absolute;
  right: 0;
  margin-top: 10px;
  min-width: 320px;
  max-width: 420px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 26, 47, 0.98);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 100;
}

.cvg-global-nav__dropdown.is-open {
  display: block;
}

.cvg-global-nav__dropdown-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
}

.cvg-global-nav__dropdown-item:hover {
  background: rgba(16, 31, 61, 0.55);
}

.cvg-global-nav__dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(16, 31, 61, 0.55);
  border: 1px solid var(--border);
}

.cvg-global-nav__dropdown-text {
  display: grid;
  gap: 2px;
}

.cvg-global-nav__dropdown-text span {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  .cvg-global-nav__dropdown {
    left: 0;
    right: 0;
    min-width: auto;
    width: calc(100vw - 28px);
  }
}

/* Ensure the primary nav sits above page content when expanded */
.nav.cvg-header__nav {
  position: relative;
  z-index: 90;
}

.topbar .container {
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-weight: 800;
}

.brand-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: rgba(16, 31, 61, 0.55);
}

.nav-link.is-active {
  border-color: rgba(92, 200, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(92, 200, 255, 0.12);
}

.nav a:active {
  transform: translateY(1px);
}

.hero {
  margin-top: 18px;
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 31, 61, 0.85), rgba(16, 31, 61, 0.65));
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 8px 0;
  font-size: 1.7rem;
  line-height: 1.15;
}

.hero p {
  max-width: 74ch;
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 860px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(16, 31, 61, 0.70);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card h2 {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
}

.muted {
  color: var(--muted);
}

label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

label > span,
label > strong {
  color: var(--text);
}

input, select {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 26, 47, 0.85);
  color: var(--text);
}

input::placeholder {
  color: rgba(174, 185, 218, 0.85);
}

input:focus-visible, select:focus-visible {
  box-shadow: var(--focus-ring-strong);
  border-color: rgba(92, 200, 255, 0.55);
}

.shop-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

@media (min-width: 860px) {
  .shop-controls {
    grid-template-columns: 1.5fr 0.9fr;
    align-items: end;
  }
}

.cart-bar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 12px;
}

.cart-bar .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cart-items {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(16, 31, 61, 0.55);
}

.qty-controls {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.qty-controls button {
  width: auto;
  margin-top: 0;
  padding: 8px 10px;
  border-radius: 10px;
}

button, .button {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(233, 238, 252, 0.18);
  background: linear-gradient(135deg, rgba(92, 200, 255, 0.95), rgba(139, 92, 255, 0.95));
  color: #07101d;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  margin-top: 14px;
}

/* Allow inline actions (don’t force full width) */
.button.inline,
button.inline,
.button.auto,
button.auto {
  width: auto;
}

/* Hover/active affordance */
button:hover,
.button:hover {
  filter: saturate(1.03);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

button:active, .button:active {
  transform: translateY(1px);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.cta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 560px) {
  .cta-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* When CTAs are links/buttons mixed, align sizing more predictably */
.cta-row > a.button,
.cta-row > button {
  margin-top: 0;
}

.button.secondary,
button.secondary {
  background: rgba(16, 31, 61, 0.55);
  color: var(--text);
  border: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 860px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feature {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 26, 47, 0.35);
}

.feature-icon {
  font-size: 1.25rem;
}

.feature-title {
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-top: 6px;
  margin-bottom: 4px;
}

.steps {
  margin: 0;
  padding-left: 18px;
}

.steps li {
  margin: 10px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 860px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 26, 47, 0.55);
  padding: 14px;
}

.product-title {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.product-price {
  font-weight: 900;
  margin-top: 6px;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 560px) {
  .product-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }
}

/* Unify CTA links inside product/actions to look like buttons */
.product-actions a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(16, 31, 61, 0.55);
  text-decoration: none;
  color: var(--text);
}

/* If the link is marked as a primary button, let it render as such */
.product-actions a.button {
  border: 1px solid rgba(233, 238, 252, 0.18);
  background: linear-gradient(135deg, rgba(92, 200, 255, 0.95), rgba(139, 92, 255, 0.95));
  color: #07101d;
  font-weight: 700;
}

.product-actions a:hover {
  border-color: rgba(92, 200, 255, 0.55);
  box-shadow: var(--focus-ring);
}

@media (min-width: 560px) {
  .button-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 26, 47, 0.55);
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 8px 0 0;
}

pre {
  background: rgba(15, 26, 47, 0.85);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: auto;
}

code {
  background: rgba(15, 26, 47, 0.8);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

ul.tight li { margin-bottom: 8px; }

.site-footer {
  margin-top: 34px;
  border-top: 1px solid var(--border);
  /* Increased contrast for readability */
  background: rgba(11, 18, 32, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 22px 0 12px;
}

@media (min-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.footer-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.site-footer a {
  color: var(--text);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .muted {
  color: rgba(233, 238, 252, 0.78);
}

.footer-links {
  display: grid;
  gap: 6px;
}

.footer-bottom {
  padding: 10px 0 24px;
  border-top: 1px solid var(--border);
}
