:root {
  --forest: #233926;
  --lime: #c5ee9f;
  --linen: #edf6e6;
  --charcoal: #434942;
  --obsidian: #1d251f;
  --pebble: #5f675d;
  --slate: #525e52;
  --fog: #e4ebe1;
  --paper: #ffffff;
  --lilac: #eeeafd;
  --terminal: #252237;
  --terminal-inner: #1e1b2e;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--paper); color: var(--charcoal);
  font-size: 18px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-weight: 900; letter-spacing: -0.055em; line-height: 1.06; color: var(--obsidian); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* nav 64px */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--fog); }
.nav-inner { max-width: 1200px; height: 64px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 24px; }
.logo { font-weight: 900; font-size: 22px; color: var(--forest); text-decoration: none;
  letter-spacing: -0.02em; }
.segments { display: flex; gap: 4px; }
.segments a { text-decoration: none; color: var(--charcoal); font-size: 15px; font-weight: 500;
  padding: 8px 20px; border-radius: 9999px; }
.segments a:is(:hover, :focus-visible) { background: var(--linen); color: var(--forest); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.login { color: var(--forest); font-size: 16px; font-weight: 500; text-decoration: none; }
.langwrap { position: relative; }
.lang-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pebble);
  background: #fff; font-size: 20px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-family: inherit; }
.lang-btn:hover { border-color: var(--forest); }
.lang-menu { position: absolute; right: 0; top: 48px; background: #fff;
  border-radius: 10px; box-shadow: rgba(0,0,0,.15) 0px 10px 32px 0px;
  padding: 6px; min-width: 160px; z-index: 100; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: transparent; font-size: 15px; font-weight: 500;
  color: var(--charcoal); padding: 10px 12px; border-radius: 8px; cursor: pointer;
  font-family: inherit; }
.lang-menu button:hover { background: var(--linen); }
.lang-menu button span { font-size: 18px; }

/* buttons: one lime per viewport */
.btn-lime { display: inline-block; background: var(--lime); color: var(--forest);
  border-radius: 9999px; padding: 11px 24px; font-size: 16px; font-weight: 500;
  text-decoration: none; border: none; cursor: pointer; }
.hero .btn-lime { position: relative; overflow: hidden; }
.btn-outline { display: inline-block; background: #fff; color: var(--forest);
  border: 1px solid var(--forest); border-radius: 9999px; padding: 8px 20px;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.text-link { color: var(--forest); font-size: 16px; font-weight: 500; text-decoration: underline; }
.btn-lime:hover { background: #d5f4b8; }
.btn-outline:hover { background: var(--linen); }

.hero { background: #f3f8ef; padding: clamp(50px, 8vw, 116px) 24px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 76px); align-items: center; max-width: 1152px; margin: 0 auto; }
.hero h1 { color: var(--forest); font-size: clamp(43px, 5.65vw, 83px); }
html[lang="zh"] .hero h1 { font-size: clamp(40px, 5.7vw, 76px); letter-spacing: -0.045em; }
.lede { max-width: 39ch; font-size: clamp(17px, 1.8vw, 22px); line-height: 1.45; margin: 22px 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.quickstart { min-width: 0; background: var(--terminal); color: #f5f0ff; border-radius: 20px;
  border: 1px solid #454057; box-shadow: 0 20px 44px rgba(37,34,55,.17); }
.quickstart-header { display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; padding: 13px clamp(14px, 2vw, 22px); }
.terminal-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.terminal-mark { font: 600 15px var(--mono); color: #d1beff; }
.quickstart h2 { color: inherit; font-size: 15px; font-weight: 700; letter-spacing: -0.015em; }
.quickstart .btn-outline { background: transparent; border-color: #70677f; color: inherit; padding: 6px 13px; }
.quickstart .btn-outline:hover { background: #423a56; }
.btn-outline[data-copied] { background: var(--linen); border-color: var(--forest); color: var(--forest); }
.quickstart .btn-outline[data-copied] { background: var(--lime); border-color: var(--lime); color: var(--forest); }
.quickstart pre { overflow-x: auto; background: var(--terminal-inner); padding: 18px clamp(14px, 2vw, 22px);
  border-block: 1px solid #454057; color: #ebe4f8; font-size: 13px; line-height: 1.8; tab-size: 2; }
.quickstart code { font-family: var(--mono); }
.syntax-command { font-weight: 700; color: var(--lime); }
.syntax-flag { color: #d1beff; }
.syntax-value { color: #f5dba6; }

/* feature row */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px;
  max-width: 1200px; margin: 0 auto; padding: 34px 24px 40px; }
.feature svg { display: block; width: 20px; height: 20px; color: var(--forest); }
.feature + .feature { border-inline-start: 1px solid var(--fog); padding-inline-start: 26px; }
.feature h3 { font-size: 18px; font-weight: 700; color: var(--obsidian); margin: 8px 0 4px; }
.feature p { font-size: 16px; color: var(--pebble); }

/* fog band */
.band { background: #f7f9f6; padding: clamp(50px, 7vw, 86px) 24px; text-align: center;
  border-block: 1px solid var(--fog); }
.band h2, .pricing h2, .faq h2 { font-size: clamp(34px, 5vw, 60px); margin-bottom: 12px; }
.band-sub { font-size: 17px; color: var(--slate); margin-bottom: 32px; }
.band-sub code, .inset code { font-family: var(--mono);
  font-size: 14px; background: rgba(22,51,0,.08); padding: 2px 8px; border-radius: 6px; }
.cards { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto; }
.card { flex: 1 1 260px; max-width: 360px; background: var(--paper);
  border: 1px solid #d5dfd0; border-radius: 16px; padding: 24px; text-align: left; }
.card h3 { font-size: 22px; font-weight: 700; color: var(--obsidian); }
.card p { font-size: 16px; color: var(--pebble); margin-top: 8px; }
.card .cost { font-size: 45px; font-weight: 700; color: var(--obsidian); margin-top: 12px; }
.card .cost small { font-size: 16px; font-weight: 400; color: var(--pebble); }
.card ul { list-style: none; margin: 16px 0 22px; font-size: 16px; }
.card ul li { padding: 6px 0; }

.model-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 960px; }
.model-card { max-width: none; display: flex; flex-direction: column; gap: 10px;
  min-width: 0; padding: clamp(18px, 3vw, 30px); }
.model-card-muse { background: var(--linen); border-color: #cfe0c5; }
.model-card-deepseek { background: var(--lilac); border-color: #ded5f5; }
.model-card h3 { font: 700 clamp(16px, 2.3vw, 23px) var(--mono); overflow-wrap: anywhere; }
.model-card p { margin-top: 0; }
.model-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px; padding-top: 14px; margin-top: auto; }
.model-meta code { padding: 5px 9px; border-radius: 6px; background: rgba(255,255,255,.65);
  overflow-wrap: anywhere; font: 13px var(--mono); }
.model-meta .cost { font-size: 15px; margin: 0; white-space: nowrap; }

/* dark card */
.dark-wrap { max-width: 1200px; margin: 0 auto; padding: clamp(50px, 7vw, 86px) 24px; }
.dark-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 24px;
  background: var(--linen); border: 1px solid #cfe0c5; border-radius: 24px; padding: clamp(22px, 4vw, 44px); }
.dark-card h2 { align-self: end; color: var(--forest); font-size: clamp(30px, 4.2vw, 50px); }
.dark-card > p { color: var(--slate); font-size: 16px; margin-top: 12px; }
.inset { grid-column: 2; grid-row: 1 / span 2; min-width: 0; background: var(--paper);
  border: 1px solid var(--fog); border-radius: 14px; padding: 16px; text-align: left; }
.inset-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; }
.inset-row.col { flex-direction: column; align-items: flex-start; gap: 8px;
  border-top: 1px solid var(--fog); margin-top: 8px; padding-top: 16px; }
.inset code { color: var(--forest); overflow-wrap: anywhere; }

/* pricing */
.pricing { padding: 0 24px clamp(50px, 7vw, 86px); text-align: center; max-width: 1200px; margin: 0 auto; }
.fine { margin-top: 28px; font-size: 14px; color: var(--pebble); }

/* faq */
.faq { max-width: 800px; margin: 0 auto; padding: 40px 24px 80px; text-align: center; }
.faq-list { text-align: left; margin-top: 32px; }
.faq-list details { border-top: 1px solid var(--fog); padding: 18px 4px; }
.faq-list details:last-child { border-bottom: 1px solid var(--fog); }
.faq-list summary { font-size: 18px; font-weight: 600; color: var(--obsidian);
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq-list summary::after { content: ">"; color: var(--pebble); transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(-90deg); }
.faq-list details p { margin-top: 10px; font-size: 16px; color: var(--slate); }

/* footer: compact single row */
footer { padding: 20px 24px 80px; font-size: 13px; color: var(--pebble); text-align: center;
  border-top: 1px solid var(--fog); }
footer a { color: var(--forest); }
.fname { font-weight: 700; color: var(--forest); }
.fsep { margin: 0 8px; }
.meta-note { display: block; max-width: 640px; margin: 8px auto 0; font-size: 12px; }
.meta-note[hidden] { display: none; }

/* gateway status in the terminal footer */
.status-badge { display: flex; align-items: center; gap: 8px; padding: 12px clamp(14px, 2vw, 22px);
  color: #e1dbed; font-size: 13px; }
.status-badge .sdot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: #a6b39e; }
.status-badge[data-state="online"] .sdot { background: var(--lime); }
.status-badge[data-state="offline"] .sdot { background: #f4c183; }

@media (max-width: 800px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .quickstart { max-width: 560px; width: 100%; }
  .quickstart pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .features { grid-template-columns: 1fr; }
  .feature + .feature { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--fog); padding-top: 20px; }
  .dark-card { grid-template-columns: minmax(0, 1fr); }
  .inset { grid-column: auto; grid-row: auto; margin-top: 18px; }
  .nav-inner { height: auto; min-height: 64px; flex-wrap: wrap; gap: 0 16px; padding-block: 9px; }
  .segments { order: 1; width: 100%; margin-top: 6px; justify-content: space-between; }
  .segments a { padding: 6px 10px; }
  html { scroll-padding-top: 122px; }
  .inset-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
  .model-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 380px) {
  .hero, .nav-inner { padding-inline: 16px; }
  .terminal-mark { display: none; }
  .hero h1, html[lang="zh"] .hero h1 { font-size: 38px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-inner > :first-child {
    animation: rise-in 460ms cubic-bezier(.2, .7, .2, 1) both;
    --rise-distance: 12px;
  }
  .quickstart {
    animation: rise-in 520ms 90ms cubic-bezier(.2, .7, .2, 1) both;
    --rise-distance: 16px;
  }
  .hero-inner > :focus-within { animation: none; }

  .segments a, .cta-row a {
    animation: rise-in 360ms cubic-bezier(.2, .7, .2, 1) backwards;
    --rise-distance: 9px;
  }
  .segments a:nth-child(2) { animation-delay: 65ms; }
  .segments a:nth-child(3) { animation-delay: 130ms; }
  .cta-row a { animation-delay: 180ms; }
  .cta-row a + a { animation-delay: 260ms; }
  :is(.segments, .cta-row) a:focus-visible { animation: none; }

  :is(.segments a, .nav-right > .login, .lang-btn, .cta-row a, .quickstart-header .btn-outline) {
    transition: translate 220ms cubic-bezier(.2, .8, .2, 1), scale 160ms ease,
      box-shadow 220ms ease, background-color 180ms ease, border-color 180ms ease;
  }
  :is(.segments a, .nav-right > .login, .lang-btn, .cta-row a, .quickstart-header .btn-outline):focus-visible {
    translate: 0 -3px;
  }
  .hero .btn-lime::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(112deg, transparent 35%, #ffffff8c 50%, transparent 65%);
    pointer-events: none;
    transform: translateX(-105%);
  }
  .hero .btn-lime:focus-visible::after { animation: button-glint 560ms ease-out; }

  @media (hover: hover) {
    :is(.segments a, .nav-right > .login, .lang-btn, .cta-row a, .quickstart-header .btn-outline):hover {
      translate: 0 -3px;
    }
    .hero .btn-lime:hover {
      box-shadow: 0 6px 14px rgba(35,57,38,.18);
    }
    .hero .btn-lime:hover::after { animation: button-glint 560ms ease-out; }
  }
  :is(.segments a, .nav-right > .login, .lang-btn, .cta-row a, .quickstart-header .btn-outline):active {
    translate: 0 1px;
    scale: .95;
  }
  .lang-menu button { transition: background-color 140ms ease; }
  .btn-outline[data-copied] { animation: copy-confirm 230ms ease-out; }
  .lang-menu:not([hidden]) { animation: rise-in 150ms ease-out both; --rise-distance: -5px; }

  .faq-list summary::after { transition: transform 180ms ease; }
  .faq-list details[open] p { animation: rise-in 180ms ease-out; --rise-distance: -4px; }
  .status-badge[data-state="pending"] .sdot { animation: status-pulse 1.2s ease-in-out 4; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(var(--rise-distance)); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes copy-confirm {
  50% { transform: scale(1.04); }
}

@keyframes button-glint {
  to { transform: translateX(105%); }
}

@keyframes status-pulse {
  50% { opacity: .55; transform: scale(.75); }
}

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