:root {
  --ink: #171716;
  --muted: #686864;
  --paper: #f7f7f5;
  --surface: #ffffff;
  --line: #d9d9d5;
  --line-strong: #bcbcb7;
  --accent: #00a873;
  --accent-dark: #006045;
  --terminal: #06120e;
  --terminal-line: #263c35;
  --terminal-muted: #82938c;
  --terminal-text: #f4f1e9;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --content-padding: clamp(22px, 5vw, 80px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 9px 12px;
  color: var(--surface);
  background: var(--ink);
  transform: translateY(-180%);
}

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

.page-shell {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.site-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
}

.brand-slash {
  color: var(--line-strong);
  font-weight: 400;
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.hero {
  padding: clamp(72px, 10vw, 120px) var(--content-padding) clamp(64px, 9vw, 104px);
  border-bottom: 1px solid var(--line);
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 42px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(0 168 115 / 12%);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 30px;
  font-size: clamp(3rem, 6.4vw, 5.65rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

h1 span {
  color: var(--accent);
}

.hero-lead {
  max-width: 690px;
  margin-bottom: 54px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.65;
}

.install {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
}

.install-label,
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.install-label {
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #fafaf8;
}

.copy-command {
  display: grid;
  min-height: 76px;
  align-items: center;
  padding-left: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.shell-prompt {
  color: var(--accent-dark);
  font-weight: 700;
}

.copy-command code {
  overflow: auto hidden;
  padding: 20px 0;
  font-family: inherit;
  font-size: clamp(0.73rem, 1.5vw, 0.93rem);
  white-space: nowrap;
  scrollbar-width: none;
}

.copy-command code::-webkit-scrollbar {
  display: none;
}

.copy-command button {
  height: 76px;
  padding: 0 20px;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-family: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.copy-command button:hover,
.copy-command button.is-copied {
  color: var(--surface);
  background: var(--ink);
}

.install-note {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fafaf8;
  font-size: 0.68rem;
}

.install-note span {
  padding: 0 5px;
  color: var(--line-strong);
}

.terminal-section,
.commands-section,
.changelog-section {
  border-bottom: 1px solid var(--line);
}

.terminal-section {
  padding: 0 var(--content-padding) clamp(64px, 9vw, 96px);
}

.section-label {
  min-height: 68px;
}

.section-label h2 {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: inherit;
}

.terminal {
  overflow: hidden;
  border: 1px solid #243a33;
  border-radius: 8px;
  color: var(--terminal-text);
  background: var(--terminal);
  box-shadow: 0 22px 55px rgb(8 21 16 / 16%);
}

.terminal-bar {
  display: grid;
  min-height: 58px;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid var(--terminal-line);
  color: var(--terminal-muted);
  font-size: 0.68rem;
  grid-template-columns: 1fr auto 1fr;
}

.terminal-lights {
  display: flex;
  gap: 8px;
}

.terminal-lights i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff665b;
}

.terminal-lights i:nth-child(2) {
  background: #ffbd4a;
}

.terminal-lights i:nth-child(3) {
  background: #3ddc97;
}

.terminal-secure {
  justify-self: end;
}

.terminal-body {
  min-height: 515px;
  padding: clamp(28px, 5vw, 52px);
  font-size: clamp(0.7rem, 1.55vw, 0.97rem);
  line-height: 1.7;
}

.terminal-body p {
  margin-bottom: 0;
}

.prompt,
.success,
.terminal-result > span {
  color: #51e5b3;
}

.prompt {
  display: inline-block;
  width: 24px;
  font-weight: 700;
}

.command {
  color: var(--terminal-text);
}

.terminal-output {
  padding-left: 30px;
  color: var(--terminal-muted);
}

.terminal-gap {
  padding-top: 20px;
}

.terminal-result {
  display: grid;
  margin: 14px 0 4px 30px;
  padding: 18px 22px;
  border: 1px solid #35564d;
  grid-template-columns: auto 1fr;
  gap: 2px 18px;
  background: #0d1b17;
}

.terminal-result strong {
  font-weight: 500;
}

.terminal-result small {
  color: var(--terminal-muted);
  font-size: 0.78em;
  grid-column: 2;
}

.cursor-line {
  padding-top: 12px;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 19px;
  vertical-align: -4px;
  background: var(--accent);
  animation: blink 1.1s steps(1, end) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.commands-section,
.changelog-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.7fr);
}

.section-intro,
.changelog-section > .section-label {
  padding: 0 32px 48px;
  border-right: 1px solid var(--line);
}

.section-intro > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.section-intro code {
  color: var(--ink);
  font-family: inherit;
}

.command-list article {
  display: grid;
  min-height: 112px;
  align-content: center;
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1fr);
  gap: 28px;
}

.command-list article:last-child {
  border-bottom: 0;
}

.command-list code {
  align-self: center;
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 650;
}

.command-list p {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.changelog-section > .section-label {
  align-items: flex-start;
  padding-top: 26px;
}

.releases {
  padding: 38px 32px 52px;
}

.release {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 28px;
}

.release-meta {
  display: grid;
  align-content: start;
  gap: 5px;
}

.release-meta strong {
  font-size: 0.82rem;
}

.release-meta time {
  color: var(--muted);
  font-size: 0.68rem;
}

.release-notes p {
  margin-bottom: 16px;
  font-size: 0.86rem;
  font-weight: 650;
}

.release-notes ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.release-notes li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.76rem;
}

.release-notes li::before {
  position: absolute;
  left: 0;
  content: "+";
  color: var(--accent-dark);
}

footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  color: var(--muted);
  font-size: 0.68rem;
}

.copy-status {
  position: fixed;
  z-index: 30;
  right: 18px;
  bottom: 18px;
  padding: 11px 14px;
  color: var(--surface);
  background: var(--ink);
  font-size: 0.7rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.copy-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 780px) {
  .page-shell {
    width: 100%;
    border-right: 0;
    border-left: 0;
  }

  .site-header {
    padding: 0 20px;
  }

  nav a:not(:last-child) {
    display: none;
  }

  .hero {
    padding-top: 64px;
  }

  h1 {
    font-size: clamp(2.5rem, 12vw, 3.15rem);
  }

  .hero-lead {
    margin-bottom: 38px;
  }

  .copy-command {
    min-height: 66px;
    padding-left: 13px;
    gap: 8px;
  }

  .copy-command button {
    height: 66px;
    padding: 0 13px;
  }

  .terminal-section {
    padding-right: 0;
    padding-left: 0;
  }

  .terminal-section > .section-label {
    padding: 0 22px;
  }

  .terminal {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .terminal-bar {
    padding: 0 16px;
    grid-template-columns: 1fr auto;
  }

  .terminal-secure {
    display: none;
  }

  .terminal-body {
    min-height: 440px;
    overflow: hidden;
    padding: 28px 20px;
    font-size: 0.72rem;
  }

  .terminal-result {
    margin-left: 24px;
    padding: 14px;
    gap: 2px 10px;
  }

  .commands-section,
  .changelog-section {
    display: block;
  }

  .section-intro,
  .changelog-section > .section-label {
    padding: 0 22px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .changelog-section > .section-label {
    min-height: 68px;
    align-items: center;
    padding-top: 0;
  }

  .command-list article {
    min-height: 0;
    padding: 22px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .releases {
    padding: 30px 22px 42px;
  }

  .release {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  footer {
    min-height: 92px;
    align-items: flex-start;
    padding: 24px 22px;
    flex-direction: column;
    gap: 8px;
  }
}

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

  .cursor {
    animation: none;
  }

  .copy-status {
    transition: none;
  }
}
