:root {
  --bg: #0d0e12;
  --surface: #1c1d23;
  --text: #f1f1f3;
  --muted: #a5a6ad;
  --line: #303139;
  --accent: #f34f2b;
  --green: #8cc754;
  --page: min(1120px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
code {
  font: inherit;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 6px;
  background: white;
  color: #111;
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: translateY(0);
}
header,
main,
footer {
  width: var(--page);
  margin-inline: auto;
}

header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}
.brand-mark,
.mini-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 16px;
}
nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #c6c7cb;
  font-size: 14px;
}
nav > a:not(.nav-button):hover,
.plain-link:hover {
  color: white;
}
.nav-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / 0.11);
  border-radius: 7px;
  font-weight: 650;
  transition: 160ms ease;
}
.nav-button {
  gap: 9px;
  min-height: 36px;
  padding: 0 13px;
  background: #202127;
  color: white;
}
.nav-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.hero {
  min-height: 580px;
  padding: 72px 0 78px;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 62px;
  align-items: center;
}
.kicker {
  margin: 0 0 18px;
  color: #c7c8cd;
  font-size: 13px;
  font-weight: 650;
}
.hero .kicker {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero .kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgb(243 79 43 / 0.14);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 22px;
  font-size: clamp(42px, 4.7vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 720;
}
.intro {
  max-width: 450px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.primary-button {
  min-height: 44px;
  padding: 0 18px;
  border-color: #f86b4e;
  background: var(--accent);
  box-shadow: 0 5px 18px rgb(243 79 43 / 0.12);
  font-size: 14px;
}
.primary-button:hover {
  background: #df4222;
}
.plain-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #b9bac0;
  font-size: 14px;
  font-weight: 600;
}
.support {
  margin: 24px 0 0;
  color: #777981;
  font-size: 12px;
  line-height: 1.5;
}

.terminal-demo {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #393c40;
  border-radius: 9px;
  background: #151719;
  box-shadow: 0 24px 65px rgb(0 0 0 / 0.28);
  font-family: 'Cascadia Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #e5e7eb;
}
.terminal-titlebar {
  min-height: 39px;
  padding: 9px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #222528;
  border-bottom: 1px solid #363a40;
}
.terminal-title {
  font-size: 12px;
}
.terminal-title > span {
  color: #9299a3;
}
.terminal-label {
  color: #9299a3;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.preview-badge {
  color: #c6b19b;
  font-size: 12px;
  white-space: nowrap;
}
.v3-preview {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
}
.v3-preview .kicker {
  color: #ff9b83;
  margin-bottom: 12px;
}
.v3-preview .section-heading h2 {
  font-size: 32px;
}
.preview-intro {
  max-width: 29ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.preview-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.preview-features article {
  min-width: 0;
  padding: 20px;
  background: #14151a;
}
.preview-features h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.preview-features p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.terminal-screen {
  height: 355px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px 18px;
  scrollbar-width: thin;
  scrollbar-color: #424850 #151719;
}
.terminal-welcome {
  display: block;
  max-width: 330px;
  padding: 12px 15px;
  margin: 0 0 22px;
  border: 1px solid #6f7883;
  border-radius: 8px;
}
.terminal-welcome strong {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
}
.terminal-welcome strong > span {
  margin-right: 7px;
  color: #c4d3e2;
}
.terminal-welcome p {
  margin: 2px 0 0;
  color: #c2cbd6;
  font-size: 12px;
}
.terminal-welcome p > span {
  display: inline-block;
  width: 80px;
  color: #8995a3;
}
.terminal-attachment {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 0 0 14px;
}
.terminal-attachment img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid #4b93d5;
  border-radius: 3px;
}
.terminal-attachment figcaption {
  color: #97a8b9;
  font-size: 12px;
}
.terminal-line {
  margin: 0 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.terminal-prompt {
  padding: 8px 10px;
  background: #24282d;
  border-left: 2px solid #8c9daf;
  color: #edf2f7;
}
.terminal-prompt::before {
  content: '› ';
  color: #d1e0ee;
}
.terminal-tool {
  color: #b8c8df;
  margin-bottom: 3px;
}
.terminal-tool::before {
  content: '• ';
  color: #8da9c3;
}
.terminal-result {
  color: #a2aab5;
  padding-left: 16px;
}
.terminal-result::before {
  content: '└ ';
  color: #7c8998;
}
.terminal-thinking {
  color: #c6d5e6;
}
.terminal-thinking::before {
  content: '• ';
}
.terminal-muted {
  color: #9ba6b2;
}
.terminal-success {
  color: #a8c694;
}
.terminal-add {
  color: #accb9a;
  background: #242b20;
  padding: 4px 8px;
  margin-bottom: 0;
}
.terminal-remove {
  color: #d3a198;
  background: #302421;
  padding: 4px 8px;
  margin-bottom: 0;
}
.terminal-typing::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: #d4e1ee;
  animation: caret 850ms step-end infinite;
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
.terminal-demo[data-paused='true'] .terminal-typing::after {
  animation-play-state: paused;
}
.terminal-footer {
  min-height: 40px;
  padding: 8px 14px;
  border-top: 1px solid #343941;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #9da8b5;
  font-size: 11px;
}
.terminal-footer > div {
  display: flex;
  gap: 14px;
}
.terminal-footer button {
  padding: 3px 0;
  background: none;
  color: #becedf;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.terminal-footer button:disabled {
  color: #75818d;
  cursor: default;
}
.terminal-footer button:hover:not(:disabled) {
  color: #f3f7fb;
}
.demo-fallback {
  padding: 14px;
  margin: 0;
}
a:focus-visible,
summary:focus-visible,
button:focus-visible,
.terminal-screen:focus-visible {
  outline: 2px solid #ff967d;
  outline-offset: -2px;
}

.features {
  padding: 86px 0 80px;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 80px;
  border-top: 1px solid var(--line);
}
.section-heading h2,
.install h2 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.feature-list {
  border-top: 1px solid var(--line);
}
.feature-list article {
  min-height: 112px;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.feature-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #3b3d47;
  border-radius: 7px;
  background: #1b1c22;
  color: #ff9b83;
  font-size: 18px;
}
.feature-list h3 {
  margin: 1px 0 6px;
  font-size: 16px;
}
.feature-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.safety-note span {
  margin-right: 8px;
  color: #77d6a0;
  font-weight: 700;
}

.install {
  margin-bottom: 76px;
  padding: 42px;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 72px;
  align-items: center;
  border: 1px solid #343438;
  border-radius: 11px;
  background: #191a1f;
}
.install > div > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.commands {
  overflow: hidden;
  border: 1px solid #373842;
  border-radius: 8px;
  background: #101116;
}
.command {
  min-height: 54px;
  padding: 0 10px 0 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #303139;
}
.command:last-child {
  border-bottom: 0;
}
.command code {
  overflow: hidden;
  color: #d7d8dc;
  font:
    12px 'Cascadia Code',
    Consolas,
    monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.command button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #3d3f49;
  border-radius: 5px;
  background: #27282f;
  color: #dbdce0;
  font-size: 11px;
  cursor: pointer;
}
.command button:hover {
  background: #34353d;
}

footer {
  min-height: 110px;
  padding: 25px 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 28px;
  border-top: 1px solid var(--line);
  color: #72747c;
  font-size: 12px;
}
footer p {
  margin: 8px 0 0;
}
footer .brand {
  color: #c9cad0;
}
.copy-toast {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border: 1px solid #3b3d46;
  border-radius: 6px;
  background: #222329;
  color: white;
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 160ms ease;
}
.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .v3-preview {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .preview-intro {
    max-width: 48ch;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-top: 56px;
  }
  .hero-copy {
    max-width: 600px;
  }
  .features {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .install {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
@media (max-width: 600px) {
  :root {
    --page: calc(100% - 32px);
  }
  header {
    height: 60px;
  }
  .nav-button {
    min-height: 44px;
  }
  nav > a:not(.nav-button) {
    display: none;
  }
  .hero {
    min-height: 0;
    padding: 28px 0 36px;
    gap: 24px;
  }
  .hero-copy {
    min-width: 0;
  }
  .hero .kicker {
    margin-bottom: 14px;
    font-size: 12px;
  }
  h1 {
    margin-bottom: 14px;
    font-size: clamp(30px, 8.5vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.045em;
  }
  .intro {
    margin-bottom: 18px;
    font-size: 16px;
    line-height: 1.45;
  }
  .hero-actions {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
  }
  .primary-button {
    padding-inline: 14px;
  }
  .plain-link {
    min-height: 44px;
    gap: 6px;
  }
  .support {
    margin-top: 12px;
    color: #95979f;
    max-width: 38ch;
  }
  .terminal-demo {
    font-size: 12px;
    line-height: 1.55;
    box-shadow: none;
  }
  .terminal-titlebar {
    min-height: 34px;
    padding: 6px 12px;
  }
  .terminal-screen {
    height: 290px;
    padding: 12px;
  }
  .terminal-welcome {
    max-width: none;
    margin-bottom: 14px;
    padding: 9px 11px;
  }
  .terminal-welcome strong {
    margin-bottom: 6px;
  }
  .terminal-welcome p {
    overflow-wrap: anywhere;
  }
  .terminal-welcome p > span {
    width: auto;
    margin-right: 8px;
  }
  .terminal-footer {
    padding: 0 10px;
    gap: 8px;
    font-size: 12px;
  }
  .terminal-footer > div {
    gap: 4px;
  }
  .terminal-footer button {
    min-height: 44px;
    padding: 0 6px;
  }

  .features {
    padding: 36px 0;
    gap: 24px;
  }
  .section-heading h2,
  .install h2 {
    font-size: 28px;
  }
  .v3-preview {
    padding: 32px 0;
    margin-bottom: 12px;
  }
  .v3-preview .section-heading h2 {
    font-size: 28px;
  }
  .preview-features {
    grid-template-columns: 1fr;
  }
  .preview-features article {
    padding: 16px;
  }
  .preview-intro {
    margin: 12px 0 0;
  }
  .feature-list article {
    min-height: 0;
    padding: 18px 0;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
  }
  .feature-icon {
    width: 32px;
    height: 32px;
  }
  .install {
    padding: 20px 16px;
    margin-bottom: 36px;
    gap: 20px;
    min-width: 0;
  }
  .install > div {
    min-width: 0;
  }
  .install > div > p:last-child {
    line-height: 1.5;
  }
  .command {
    padding: 8px;
    gap: 8px;
  }
  .command code {
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }
  .command button {
    min-height: 44px;
    font-size: 12px;
  }
  footer {
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 0;
    padding: 22px 0;
  }
  footer p:last-child {
    grid-column: 1 / -1;
  }
}
@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;
  }
}

.feature-menu {
  position: relative;
}
.feature-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.feature-menu summary::-webkit-details-marker {
  display: none;
}
.menu-chevron {
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.feature-menu[open] .menu-chevron {
  transform: translateY(2px) rotate(225deg);
}
.feature-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1a1b20;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.3);
}
.feature-dropdown a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 4px;
}
.feature-dropdown a:hover {
  background: #27282f;
  color: white;
}
.menu-label {
  display: block;
  margin-top: 4px;
  padding: 12px 12px 4px;
  border-top: 1px solid var(--line);
  color: #a5a6ad;
  font-size: 12px;
}
[id] {
  scroll-margin-top: 24px;
}
@media (max-width: 600px) {
  nav {
    gap: 12px;
  }
  .feature-dropdown {
    right: -80px;
    width: min(240px, calc(100vw - 32px));
  }
}

[hidden] {
  display: none !important;
}
.terminal-demo[data-mode='choose'] .terminal-screen {
  height: auto;
  min-height: 355px;
}
.terminal-demo[data-mode='choose'] .terminal-welcome {
  border: 0;
  padding: 0;
  margin-bottom: 18px;
}
.terminal-demo[data-mode='choose'] .terminal-welcome strong {
  margin-bottom: 0;
}
.terminal-demo[data-mode='choose'] .terminal-welcome p {
  display: none;
}
.terminal-question {
  margin-bottom: 10px;
  color: #a2aab5;
  font-size: 13px;
}
.terminal-options {
  display: grid;
  gap: 2px;
}
.terminal-options button {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  text-align: left;
  color: #bfc8d2;
  background: none;
  border: 0;
  border-radius: 3px;
  font: inherit;
  cursor: pointer;
}
.terminal-options button.is-selected,
.terminal-options button:hover {
  color: #f0f3f7;
  background: #262a30;
}
.option-number {
  color: #7f8b99;
}
.is-selected .option-number {
  font-size: 0;
}
.is-selected .option-number::after {
  content: '›';
  color: #ff9b83;
  font-size: 16px;
}
.option-preview {
  font-size: 11px;
  color: #a39382;
}
#terminal-tasks span {
  margin-left: 4px;
  color: #7f8b99;
}
#terminal-key-hint {
  color: #86919e;
  font-size: 11px;
}
@media (max-width: 600px) {
  .terminal-options button {
    min-height: 44px;
    padding-inline: 8px;
  }
  .terminal-demo[data-mode='choose'] .terminal-screen {
    min-height: 350px;
  }
  #terminal-tasks span {
    display: none;
  }
}
@media (hover: none) {
  #terminal-key-hint {
    display: none;
  }
}
