.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--type-small);
  line-height: 1;
  min-height: 40px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}

.btn:focus-visible {
  box-shadow: var(--focus-ring);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-primary {
  background: color-mix(in srgb, var(--page-accent) 90%, #fff 10%);
  color: #fff;
  border-color: color-mix(in srgb, var(--page-accent) 70%, #fff 30%);
  box-shadow: var(--shadow-1);
}

.btn-primary:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.btn-primary:active {
  box-shadow: var(--shadow-1);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
}

.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--page-accent) 55%, var(--border-strong));
  box-shadow: var(--shadow-2);
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface) 30%);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface-2) 85%, transparent 15%);
}

.btn:disabled,
.btn[disabled],
.btn.disabled,
.btn.is-disabled,
.btn[aria-disabled='true'] {
  opacity: 0.6;
  filter: grayscale(0.1);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
  color: var(--text-muted);
}

.btn-icon {
  padding: 8px 12px;
  min-height: 36px;
}

/* Logo contract (site-wide)
  - Header/nav: Vyra wordmark (small, consistent height)
  - Hero/landing: full lockup or badge as supplied in markup
  - Product cards/pages: product logos where available, height-locked, width auto
  - Favicons: Vyra badge
  - Never stretch logos; lock height and allow width to scale
*/
:root {
  --logo-header-height: 40px;
  --logo-header-mobile-height: 36px;
  --logo-footer-badge-height: 32px;
  --logo-footer-wordmark-height: 26px;
  --logo-hero-max-height: 120px;
  --logo-card-height: 36px;
  --logo-card-max-width: 140px;
  --logo-hero-height: 40px;
  --logo-hero-max-width: 180px;
}

.brand-badge,
.brand-wordmark,
.brand-logo {
  display: block;
  height: auto;
  background: transparent;
  object-fit: contain;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.75;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 24px;
  height: 24px;
}

.icon-lg {
  width: 28px;
  height: 28px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-2);
  padding: var(--card-pad);
  box-shadow: var(--card-shadow);
  position: relative;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card--interactive {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--page-accent);
}

.card--interactive:focus-within {
  box-shadow: var(--shadow-2);
  border-color: var(--page-accent);
}

.card--featured {
  border-color: color-mix(in srgb, var(--page-accent) 45%, var(--card-border));
  box-shadow: var(--shadow-2);
}

.card--glass {
  background: color-mix(in srgb, var(--glass) 70%, transparent 30%);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(var(--blur-1));
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 28px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: var(--type-caption);
  font-weight: 600;
  line-height: 1;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 80%, var(--surface-2) 20%);
}

.badge--lavender {
  background: var(--lav-soft);
  color: var(--text);
  border-color: rgba(139, 124, 255, 0.4);
}

.badge--aqua {
  background: var(--aqua-soft);
  color: var(--text);
  border-color: rgba(77, 217, 240, 0.35);
}

.badge--sun {
  background: var(--sun-soft);
  color: var(--text);
  border-color: rgba(246, 211, 95, 0.4);
}

.badge--solid {
  background: var(--lav-soft);
  color: var(--text);
  border-color: rgba(139, 124, 255, 0.35);
}

.logo-pad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--glass) 70%, transparent 30%);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent 40%);
}

[data-theme='dark'] .logo-pad {
  background: color-mix(in srgb, var(--surface) 70%, transparent 30%);
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent 35%);
}

.brand-logo {
  width: auto;
}

.product-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--text);
}

.product-mark--card {
  font-size: 0.95rem;
}

.product-mark--hero {
  font-size: 1rem;
}

.product-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 85%, transparent 15%);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent 30%);
}

.product-hero-icon {
  height: var(--logo-hero-height);
  width: auto;
  max-width: var(--logo-hero-max-width);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 88%, transparent 12%);
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent 22%);
  object-fit: contain;
}

.product-hero-name {
  letter-spacing: 0.01em;
}

.product-icon {
  height: var(--logo-card-height);
  width: auto;
  max-width: var(--logo-card-max-width);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 85%, transparent 15%);
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent 25%);
  object-fit: contain;
}

.product-mark--hero .product-icon {
  height: var(--logo-hero-height);
  width: auto;
  max-width: var(--logo-hero-max-width);
}

.callout {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  border-left: 3px solid var(--page-accent);
  background: color-mix(in srgb, var(--surface-2) 85%, transparent 15%);
  padding: var(--space-4);
  border-radius: var(--radius-2);
  color: var(--text-muted);
}

.callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent 20%);
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent 25%);
}

.grid-2,
.grid-3,
.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-2);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--type-body);
}

.input:focus,
select:focus,
textarea:focus {
  border-color: var(--page-accent);
}

.accordion {
  border-radius: var(--radius-2);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: var(--space-4);
}

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-weight: 600;
  background: none;
  border: none;
  width: 100%;
  color: var(--text);
  cursor: pointer;
}

.accordion-panel,
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium);
}

.accordion-toggle[aria-expanded='true'] + .accordion-panel,
.accordion-toggle[aria-expanded='true'] + .accordion-content {
  max-height: 400px;
  margin-top: var(--space-3);
}

.modal-backdrop,
.demo-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 20, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  backdrop-filter: blur(var(--blur-1));
  z-index: 2000;
}

.modal-backdrop.active,
.demo-modal-backdrop.is-visible,
.demo-modal-backdrop.active {
  display: flex;
}

.modal,
.demo-modal {
  background: var(--surface);
  border-radius: var(--radius-3);
  border: 1px solid var(--border);
  padding: var(--space-6);
  max-width: 520px;
  width: min(100%, 520px);
  box-shadow: var(--shadow-2);
}

.internal-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: var(--type-caption);
  font-weight: 600;
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle-icon span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.crash-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 20, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  z-index: 4000;
  backdrop-filter: blur(var(--blur-2));
}

.crash-card {
  background: color-mix(in srgb, var(--surface) 92%, transparent 8%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-3);
  padding: var(--space-6);
  max-width: 520px;
  text-align: left;
  box-shadow: var(--shadow-3);
}

.crash-card h2 {
  margin: var(--space-2) 0;
}

.crash-message {
  color: var(--text);
  font-weight: 600;
}

.crash-meta {
  color: var(--text-muted);
  font-size: var(--type-caption);
}

.icon-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
  display: grid;
  gap: var(--space-2);
}

.icon-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--type-small);
}
