:root {
  --bg: #0c0e12;
  --bg-elevated: #141820;
  --bg-inset: #1a1f28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f2f5;
  --text-muted: #9aa3b2;
  --text-faint: #6b7585;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.12), transparent);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.brand img {
  border-radius: var(--radius-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-download {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg) !important;
  font-weight: 600;
}

.nav-download:hover {
  opacity: 0.92;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-lead {
  margin: 0 auto 2rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-inset);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
}

.version-line {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.screenshot-section {
  padding: 1rem 0 4rem;
}

.screenshot-frame {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 24px 80px -12px var(--accent-glow);
  background: var(--bg-elevated);
}

.screenshot-frame img {
  width: 100%;
}

.section-title {
  margin: 0 0 2rem;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.features {
  padding: 2rem 0 4rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card {
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.feature-icon {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.updates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.updates h2 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.updates p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.updates-panel {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #0a0c10;
}

.updates-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.updates-url {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
}

.updates-url:hover {
  text-decoration: underline;
}

.text-link {
  color: var(--accent);
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
}

.terminal {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #0a0c10;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-muted);
}

.term-prompt {
  color: var(--accent);
  user-select: none;
}

.cta-bottom {
  text-align: center;
  padding: 4rem 1rem;
  border-top: 1px solid var(--border);
}

.cta-bottom h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.cta-bottom p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--text);
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-muted {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.page-404 .not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.page-404 h1 {
  margin: 1rem 0 0;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.page-404 p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.doc-main {
  max-width: 42rem;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.doc-header {
  margin-bottom: 2rem;
}

.doc-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.doc-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.doc-header a {
  color: var(--accent);
}

.doc-header a:hover {
  text-decoration: underline;
}

.doc-loading,
.doc-empty,
.doc-muted {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.doc-muted {
  margin-top: 1.5rem;
}

.doc-status {
  margin-bottom: 1.5rem;
}

.doc-status-text {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.doc-retry {
  margin-top: 0.25rem;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.changelog-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}

.changelog-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.changelog-summary::-webkit-details-marker {
  display: none;
}

.changelog-summary:hover {
  background: var(--bg-inset);
}

.changelog-summary:focus-visible {
  outline-offset: -2px;
}

.changelog-chevron {
  display: inline-block;
  width: 1rem;
  color: var(--text-faint);
  transition: transform 0.15s ease;
}

.changelog-item[open] .changelog-chevron {
  transform: rotate(90deg);
}

.changelog-version {
  font-weight: 600;
  font-size: 1.05rem;
}

.changelog-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-inset);
  color: var(--text-muted);
}

.changelog-date {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.changelog-body {
  padding: 0 1.15rem 1.15rem 2.15rem;
  border-top: 1px solid var(--border);
}

.changelog-body ul {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.925rem;
}

.changelog-body li + li {
  margin-top: 0.35rem;
}

.release-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.release-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1.5rem;
}

.release-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.release-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.release-card-desc {
  margin: 0;
  max-width: 28rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.release-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}

.release-version {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.release-published {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.release-downloads {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.release-download {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-inset);
  transition: background 0.15s ease;
}

.release-download:hover {
  background: #1e2430;
}

.release-download-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.release-download-file {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.release-notes-heading {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.release-notes-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.release-notes-list li + li {
  margin-top: 0.35rem;
}

.release-notes-plain {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: #0a0c10;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-x: auto;
}

.updates-copy .text-link + .text-link {
  display: inline-block;
  margin-left: 1rem;
}

.updates-single {
  grid-template-columns: 1fr;
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.release-meta-inline {
  align-items: flex-start;
  text-align: left;
  margin-bottom: 0.25rem;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .updates {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2rem;
  }

  .changelog-date {
    margin-left: 0;
    width: 100%;
  }

  .release-meta {
    align-items: flex-start;
    text-align: left;
  }

  .updates-copy .text-link + .text-link {
    display: block;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
