:root {
  --bg: #f7f6f3;
  --bg-alt: #efede8;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --border: rgba(26, 26, 26, 0.08);
  --accent: #1e4d5c;
  --accent-soft: rgba(30, 77, 92, 0.08);
  --accent-hover: #163a46;
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 8px 24px rgba(26, 26, 26, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --font: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --header-height: 72px;
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.download-link {
  font-weight: 600;
}

.ref-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15em;
  font-weight: 600;
}

.ref-link svg {
  width: 0.75em;
  height: 0.75em;
  flex-shrink: 0;
  align-self: center;
  position: relative;
  top: 0.05em;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(247, 246, 243, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-name {
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.hero {
  padding: 5.5rem 0 4.5rem;
}

.hero-inner {
  max-width: 42rem;
  margin-left: 0;
  margin-right: auto;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

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

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
  font-weight: 600;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.download-grid,
.install-layout,
.usage-grid {
  display: grid;
  gap: 1.25rem;
}

.download-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.install-layout {
  grid-template-columns: repeat(2, 1fr);
}

.usage-grid {
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card > * + * {
  margin-top: 1.25rem;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.card p,
.card-note {
  color: var(--text-muted);
}

.card-note {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.card-notice {
  background: rgba(245, 208, 74, 0.14);
  border-color: rgba(234, 179, 8, 0.32);
}

.card-notice .card-icon {
  color: #ca8a04;
}

.card-notice h3 {
  color: #a16207;
}

.card-wide {
  grid-column: 1 / -1;
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.download-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.download-card p {
  flex: 1;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-muted {
  background: var(--bg-alt);
  color: var(--text-muted);
}

.feature-list {
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.feature-list li + li {
  margin-top: 0.75rem;
}

.feature-list ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.feature-list.compact li + li {
  margin-top: 0.5rem;
}

.feature-list.numbered {
  padding-left: 1.4rem;
}

.command-defs {
  margin: 1.25rem 0 0;
}

.command-defs div + div {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.command-defs dt {
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.command-defs dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.code-block {
  position: relative;
  background: #14181a;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-block pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
}

.code-block code {
  background: none;
  padding: 0;
  color: #e8edf0;
  font-size: 0.84rem;
  line-height: 1.7;
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 5.3em;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.copy-btn.copied {
  color: #8fd4b4;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

td {
  color: var(--text-muted);
}

td code {
  white-space: nowrap;
}

.grid-table {
  display: grid;
  font-size: 0.92rem;
}

.param-grid {
  grid-template-columns: 14rem 1fr 5.5rem 5.5rem;
}

.archive-grid {
  grid-template-columns: auto auto auto 1fr auto;
}

.grid-table > div {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.grid-table-head {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
}

.grid-table-center {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

code.checksum {
  font-size: 0.72em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.checksum-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.checksum-cell code.checksum {
  min-width: 0;
}

.card .checksum-cell {
  display: flex;
  max-width: 100%;
}

.card .checksum-cell code.checksum {
  flex: 1;
}

.copy-checksum {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  min-width: 5.3em;
  text-align: center;
}

.copy-checksum:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.copy-checksum.copied {
  color: #2e8b57;
}

.changelog-layout {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.changelog-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.25rem);
}

.changelog-sidebar-label {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.changelog-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-left: 1px solid var(--border);
  padding-left: 0.85rem;
}

.changelog-nav a {
  --highlight: 0;
  color: color-mix(in srgb, var(--accent) calc(var(--highlight) * 100%), var(--text-muted));
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: calc(400 + (var(--highlight) * 200));
  line-height: 1.4;
  padding: 0.2rem 0;
  border-left: 2px solid color-mix(in srgb, var(--accent) calc(var(--highlight) * 100%), transparent);
  margin-left: -0.85rem;
  padding-left: calc(0.85rem - 2px);
  opacity: calc(0.55 + (var(--highlight) * 0.45));
}

.changelog-nav a:hover {
  color: var(--accent);
  opacity: 1;
}

.changelog-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-width: 0;
}

.changelog-entry {
  scroll-margin-top: calc(var(--header-height) + 1.25rem);
}

.changelog-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.changelog-entry-head h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.changelog-entry-head time {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.changelog-entry h4 {
  margin: 1.25rem 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.changelog-entry h4:first-of-type {
  margin-top: 0;
}

.changelog-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

.changelog-list li + li {
  margin-top: 0.45rem;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .usage-grid {
    grid-template-columns: 1fr;
  }

  .changelog-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .changelog-sidebar {
    position: static;
  }

  .changelog-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    border-left: none;
    padding-left: 0;
  }

  .changelog-nav a {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-bottom: 2px solid color-mix(in srgb, var(--accent) calc(var(--highlight) * 100%), transparent);
    padding-bottom: 0.15rem;
  }

  .site-nav {
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: auto;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 0;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}
