:root {
  color-scheme: dark;
}

html {
  scroll-padding-top: 6rem;
}

body {
  font-family: 'Inter', sans-serif;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  border-radius: 9999px;
  border: 1px solid rgba(138, 199, 255, 0.55);
  background: rgba(9, 9, 15, 0.96);
  color: #eef7ff;
  padding: 0.8rem 1rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.section-anchor {
  scroll-margin-top: 7rem;
}

:where(a, button, [role='button'], [tabindex]):focus-visible {
  outline: 2px solid rgba(138, 199, 255, 0.95);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(43, 133, 246, 0.18);
}

.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(18px);
}

.feature-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(24, 24, 27, 0.92);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(83, 167, 255, 0.45);
  box-shadow: 0 20px 70px rgba(43, 133, 246, 0.16);
}

.icon-chip {
  display: inline-flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  border: 1px solid rgba(83, 167, 255, 0.3);
  background: rgba(43, 133, 246, 0.12);
  color: #d9ecff;
  font-size: 0.875rem;
  font-weight: 700;
}

.faq-item {
  transition: border-color 180ms ease, background-color 180ms ease;
}

.faq-item.active {
  border-color: rgba(83, 167, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.faq-question {
  border-radius: 1.5rem;
}

.faq-icon {
  transition: transform 180ms ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.downloads-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.downloads-card-header {
  min-width: 0;
}

.downloads-badge {
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

.downloads-meta-row {
  min-width: 0;
}

.downloads-meta-value {
  max-width: 58%;
  overflow-wrap: anywhere;
  text-align: right;
}

.downloads-button {
  margin-top: auto;
  text-align: center;
  white-space: normal;
  line-height: 1.4;
}

.hero-status-stack {
  max-width: 42rem;
}

.hero-metrics > div {
  min-height: 100%;
}

.status-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.95rem 1rem;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.04);
}

.status-message::before {
  content: '';
  flex: 0 0 0.65rem;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.45rem;
  border-radius: 9999px;
}

.status-message-loading {
  color: #d9ecff;
  border-color: rgba(83, 167, 255, 0.3);
  background: rgba(43, 133, 246, 0.12);
}

.status-message-loading::before {
  background: #8ac7ff;
  box-shadow: 0 0 0 0 rgba(138, 199, 255, 0.55);
  animation: status-pulse 1.8s ease-in-out infinite;
}

.status-message-success {
  color: #e4f7ea;
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.12);
}

.status-message-success::before {
  background: #6ee7b7;
}

.status-message-error {
  color: #ffe4e6;
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(244, 63, 94, 0.12);
}

.status-message-error::before {
  background: #fb7185;
}

.dashboard-card,
.state-card {
  backdrop-filter: blur(14px);
}

.state-card {
  background: rgba(255, 255, 255, 0.04);
}

.state-card-empty {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.state-card-success {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.14), rgba(255, 255, 255, 0.04));
}

.state-card-error {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.14), rgba(255, 255, 255, 0.04));
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(138, 199, 255, 0.12);
    opacity: 0.7;
  }

  50% {
    box-shadow: 0 0 0 6px rgba(138, 199, 255, 0.02);
    opacity: 1;
  }
}

.header-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
}

.header-nav {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.header-nav a {
  white-space: nowrap;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.header-actions a {
  white-space: nowrap;
}

.header-download-primary {
  max-width: 100%;
}

@media (max-width: 1279px) {
  .header-shell {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .header-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 0.5rem;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 5rem;
  }

  .header-shell {
    gap: 0.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section-anchor {
    scroll-margin-top: 6rem;
  }

  .downloads-grid {
    gap: 1rem;
  }

  .hero-status-stack {
    margin-top: 1.25rem;
  }

  .status-message {
    padding: 0.85rem 0.9rem;
  }

  .dashboard-stack {
    gap: 0.875rem;
  }

  .downloads-card {
    padding: 1.25rem;
  }

  .downloads-card-header {
    gap: 0.75rem;
  }

  .downloads-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .downloads-meta-value {
    max-width: 100%;
    text-align: left;
  }

  .downloads-button {
    justify-content: center;
    padding: 0.9rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
