:root {
  color-scheme: dark;
  font-family: "Geist Sans", "Aptos", "SF Pro Text", sans-serif;
  font-synthesis: none;
  --canvas: oklch(0.145 0 0);
  --surface: oklch(0.195 0 0);
  --surface-raised: oklch(0.23 0 0);
  --surface-strong: oklch(0.275 0 0);
  --text: oklch(0.985 0 0);
  --text-soft: oklch(0.84 0 0);
  --text-muted: oklch(0.67 0 0);
  --line: oklch(1 0 0 / 0.11);
  --line-strong: oklch(1 0 0 / 0.2);
  --blue: oklch(0.73 0.14 252);
  --green: oklch(0.78 0.16 153);
  --amber: oklch(0.85 0.16 83);
  --red: oklch(0.72 0.17 24);
  --radius: 8px;
  --page-width: 1180px;
  background: var(--canvas);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
code { font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px oklch(0.73 0.14 252 / 0.2);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 13px;
  border-radius: 6px;
  color: var(--canvas);
  background: var(--text);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

.masthead {
  width: min(calc(100% - 48px), var(--page-width));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-lockup img { width: 126px; height: auto; }
.brand-lockup span { padding-left: 14px; border-left: 1px solid var(--line-strong); color: var(--text-muted); font-size: 12px; font-weight: 650; }
.brand-endorsement { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 10px; font-weight: 650; text-transform: uppercase; }
.brand-endorsement img { width: 70px; height: auto; aspect-ratio: 519 / 195; object-fit: contain; }

main { width: min(calc(100% - 48px), var(--page-width)); margin: 0 auto; }
.latest-release {
  min-height: 510px;
  padding: 60px 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  align-items: center;
  gap: 64px;
}
.latest-release__copy { min-width: 0; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.signal-dot { width: 7px; height: 7px; margin-right: 7px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px oklch(0.78 0.16 153 / 0.12); }
.latest-release[data-state="loading"] .signal-dot { background: var(--blue); box-shadow: 0 0 0 4px oklch(0.73 0.14 252 / 0.12); }
.latest-release[data-state="empty"] .signal-dot { background: var(--amber); box-shadow: 0 0 0 4px oklch(0.85 0.16 83 / 0.12); }
.latest-release[data-state="unavailable"] .signal-dot { background: var(--red); box-shadow: 0 0 0 4px oklch(0.72 0.17 24 / 0.12); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 16px; font-size: 52px; line-height: 1.02; letter-spacing: 0; }
.latest-release__summary { max-width: 680px; margin-bottom: 30px; color: var(--text-muted); font-size: 16px; line-height: 1.6; }

.version-facts { max-width: 720px; margin: 0 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.version-facts > div { min-width: 0; padding: 15px 18px 15px 0; }
.version-facts > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.version-facts dt { margin-bottom: 7px; color: var(--text-muted); font-size: 10px; font-weight: 650; text-transform: uppercase; }
.version-facts dd { margin: 0; overflow: hidden; color: var(--text-soft); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.install-command { max-width: 720px; margin-bottom: 22px; }
.install-command > span { margin-bottom: 8px; display: block; color: var(--text-muted); font-size: 10px; font-weight: 650; text-transform: uppercase; }
.install-command > div { min-height: 48px; padding-left: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.install-command code { min-width: 0; overflow-x: auto; color: var(--text-soft); font-size: 12px; white-space: nowrap; scrollbar-width: thin; }
.copy-button {
  min-width: 84px;
  min-height: 46px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 7px 7px 0;
  color: var(--text-muted);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  transition: color 140ms ease, background-color 140ms ease;
}
.copy-button:hover { color: var(--text); background: var(--surface-raised); }
.copy-button:disabled { color: var(--text-muted); background: transparent; cursor: not-allowed; opacity: 0.55; }
.copy-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-button.is-copied { color: var(--green); }

.artifact-panel { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.artifact-panel__header { min-height: 46px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); color: var(--text-muted); font-size: 10px; font-weight: 650; text-transform: uppercase; }
.artifact-status { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); }
.artifact-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.artifact-status.is-unavailable i { background: var(--red); }
.artifact-panel__body { min-height: 238px; padding: 30px 24px; display: flex; flex-direction: column; justify-content: flex-end; }
.artifact-mark { width: 50px; height: 50px; margin-bottom: 42px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; transform: skewY(-8deg); }
.artifact-mark span { display: block; background: var(--text); }
.artifact-mark span:nth-child(2) { transform: translateY(7px); background: var(--blue); }
.artifact-mark span:nth-child(3) { transform: translateY(14px); background: var(--green); }
.artifact-panel__body p { margin-bottom: 5px; color: var(--text-muted); font-size: 11px; }
.artifact-panel__body strong { font-size: 17px; }
.artifact-panel__body code { margin-top: 8px; color: var(--amber); font-size: 13px; }
.artifact-specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.artifact-specs div { min-width: 0; padding: 15px 16px; }
.artifact-specs div + div { border-left: 1px solid var(--line); }
.artifact-specs dt { margin-bottom: 6px; color: var(--text-muted); font-size: 9px; font-weight: 650; text-transform: uppercase; }
.artifact-specs dd { margin: 0; color: var(--text-soft); font-size: 11px; line-height: 1.5; }

.release-history { padding: 54px 0 80px; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 24px; }
.section-heading h2 { margin-bottom: 8px; font-size: 30px; letter-spacing: 0; }
.section-heading p:last-child { margin-bottom: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }

.release-list { display: grid; gap: 12px; }
.release-list[hidden] { display: none; }
.release-entry { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color 150ms ease, background-color 150ms ease; }
.release-entry:hover { border-color: var(--line-strong); background: oklch(0.205 0 0); }
.release-entry__header { min-height: 82px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 18px; }
.release-entry__title { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.release-entry__title h3 { margin: 0; font-size: 17px; }
.release-badge { padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.release-badge--latest { color: var(--canvas); border-color: var(--green); background: var(--green); }
.release-entry__title p { width: 100%; margin: 4px 0 0; color: var(--text-muted); font-size: 11px; }
.release-details { border-top: 1px solid var(--line); }
.release-details summary { min-height: 44px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--text-soft); font-size: 11px; font-weight: 650; cursor: pointer; list-style: none; }
.release-details summary::-webkit-details-marker { display: none; }
.release-details summary::after { content: "+"; color: var(--text-muted); font: 16px/1 "Geist Mono", monospace; }
.release-details[open] summary::after { content: "\2212"; }
.release-notes { padding: 2px 18px 24px; color: var(--text-soft); font-size: 13px; line-height: 1.65; }
.release-notes h2, .release-notes h3, .release-notes h4 { margin: 24px 0 9px; color: var(--text); font-size: 14px; letter-spacing: 0; }
.release-notes h2:first-child, .release-notes h3:first-child { margin-top: 8px; }
.release-notes p { margin-bottom: 12px; }
.release-notes ul, .release-notes ol { margin: 0 0 14px; padding-left: 22px; }
.release-notes li + li { margin-top: 6px; }
.release-notes code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--amber); background: var(--canvas); font-size: 12px; }
.release-notes pre { overflow-x: auto; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); }
.release-notes pre code { padding: 0; border: 0; background: transparent; }
.release-notes blockquote { margin: 14px 0; padding-left: 14px; border-left: 2px solid var(--blue); color: var(--text-muted); }

.release-skeleton { min-height: 126px; padding: 22px; display: grid; align-content: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.release-skeleton span { height: 10px; border-radius: 4px; background: var(--surface-raised); animation: pulse 1.4s ease-in-out infinite; }
.release-skeleton span:nth-child(1) { width: 22%; }
.release-skeleton span:nth-child(2) { width: 58%; }
.release-skeleton span:nth-child(3) { width: 38%; }
.release-state { min-height: 210px; padding: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.release-state[hidden] { display: none; }
.release-state strong { margin-bottom: 7px; font-size: 15px; }
.release-state p { max-width: 460px; margin-bottom: 18px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.release-state--error { border-color: oklch(0.72 0.17 24 / 0.45); }
.state-action { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); background: var(--surface-raised); font-size: 11px; font-weight: 650; text-decoration: none; }
.state-action:hover { border-color: var(--text-muted); background: var(--surface-strong); }

.site-footer { width: min(calc(100% - 48px), var(--page-width)); min-height: 72px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 10px; }
.noscript-notice { margin: 20px; padding: 14px; border: 1px solid var(--red); border-radius: var(--radius); color: var(--text); background: var(--surface); text-align: center; }

@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

@media (max-width: 900px) {
  .latest-release { grid-template-columns: 1fr; gap: 36px; }
  .artifact-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr); }
  .artifact-panel__header { grid-column: 1 / -1; }
  .artifact-panel__body { min-height: 210px; }
  .artifact-specs { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line); }
  .artifact-specs div { display: grid; align-content: center; }
  .artifact-specs div + div { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 640px) {
  .masthead, main, .site-footer { width: min(calc(100% - 32px), var(--page-width)); }
  .masthead { min-height: 62px; }
  .brand-lockup img { width: 112px; }
  .brand-lockup span { display: none; }
  .brand-endorsement span { display: none; }
  .brand-endorsement img { width: 64px; }
  .latest-release { min-height: 0; padding: 42px 0 40px; }
  h1 { font-size: 38px; }
  .latest-release__summary { font-size: 15px; }
  .version-facts { grid-template-columns: 1fr; }
  .version-facts > div { padding: 12px 0; }
  .version-facts > div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .install-command > div { padding-left: 12px; }
  .copy-button { min-width: 48px; }
  .copy-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .artifact-panel { display: block; }
  .artifact-panel__body { min-height: 220px; }
  .artifact-specs { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 0; }
  .artifact-specs div + div { border-top: 0; border-left: 1px solid var(--line); }
  .site-footer { padding: 20px 0; grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
