:root {
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --surface: #ffffff;
  --ink: #111318;
  --ink-secondary: #4b5162;
  --ink-muted: #6c7385;
  --border: #e3e6ed;
  --border-strong: #cfd4df;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff4ff;
  --code-bg: #14161c;
  --code-ink: #e8ecf4;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

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

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #14161c;
  color: #f3c095;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--ink-secondary);
  font-size: 14px;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.2;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-lg {
  height: 42px;
  padding: 0 20px;
  font-size: 14.5px;
}

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

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

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-subtle);
}

.btn-ghost {
  color: var(--ink-secondary);
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--bg-subtle);
}

/* Hero */
.hero {
  padding: 64px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  gap: 44px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-weight: 750;
}

.hero-lead {
  margin: 0 0 26px;
  color: var(--ink-secondary);
  font-size: 16px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-badges a {
  display: inline-flex;
}

.hero-meta {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Framed Dark App Window */
.window-frame {
  background: #141518;
  border: 1px solid #2b2e38;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(17, 19, 24, 0.12);
}

.window-bar {
  height: 36px;
  padding: 0 14px;
  background: #1a1c22;
  border-bottom: 1px solid #282b34;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #9aa1b2;
  font-size: 12px;
}

.dot-group {
  display: inline-flex;
  gap: 6px;
}

.dot-group i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #363a46;
}

.window-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #c8cedb;
}

.btn-link {
  background: none;
  border: 1px solid #353946;
  color: #d6dbe6;
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 11.5px;
  cursor: pointer;
}

.btn-link:hover {
  border-color: #6b7285;
  color: #ffffff;
}

/* Sections */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

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

.section-head {
  max-width: 660px;
  margin-bottom: 36px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 15.5px;
}

/* Interactive 5-Scene Showcase */
.showcase-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.showcase-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tab-btn {
  text-align: left;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tab-btn strong {
  font-size: 14px;
  color: var(--ink);
}

.tab-btn span {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.tab-btn:hover {
  border-color: var(--border-strong);
}

.tab-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.tab-btn.is-active strong {
  color: var(--accent-hover);
}

.scene-caption {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.scene-caption h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.scene-caption p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 14.5px;
}

/* Local Memory Explorer */
.memory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 44px;
  align-items: center;
}

.memory-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.memory-copy p {
  margin: 0 0 18px;
  color: var(--ink-secondary);
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink-secondary);
}

.clean-list strong {
  color: var(--ink);
}

.memory-explorer {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid #2a2e38;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.explorer-sidebar {
  background: #101217;
  border-right: 1px solid #262a34;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.explorer-path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #8b92a3;
  padding: 4px 8px 10px;
}

.file-btn {
  text-align: left;
  background: none;
  border: none;
  color: #b4bccb;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.file-btn:hover {
  background: #1c202a;
  color: #ffffff;
}

.file-btn.is-active {
  background: #1f2a40;
  color: #93b7ff;
  font-weight: 600;
}

.explorer-viewer {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.explorer-header {
  padding: 11px 16px;
  border-bottom: 1px solid #262a34;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #d7dde8;
}

.explorer-hint {
  color: #79c99b;
  font-size: 11px;
}

.explorer-viewer pre {
  margin: 0;
  padding: 18px 16px;
  overflow-x: auto;
  min-height: 215px;
}

/* Capabilities */
.mode-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.mode-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.mode-head h3 {
  margin: 0;
  font-size: 20px;
}

.mode-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

.mode-tag-accent {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: #bfd3fe;
}

.mode-summary {
  margin: 0 0 22px;
  color: var(--ink-secondary);
  font-size: 14.5px;
}

.feature-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.feature-dl dt {
  font-weight: 650;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 4px;
}

.feature-dl dd {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 14px;
}

/* Install */
.install-wrap {
  max-width: 820px;
}

.install-switcher {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.switch-btn {
  border: none;
  background: none;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
}

.switch-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.install-panel {
  display: none;
}

.install-panel.is-active {
  display: block;
}

.code-box {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius-md);
  border: 1px solid #2a2e38;
  overflow: hidden;
  margin-bottom: 20px;
}

.code-head {
  padding: 10px 16px;
  background: #1b1e26;
  border-bottom: 1px solid #2a2e38;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #a2a9b9;
}

.copy-btn {
  background: #272c38;
  border: 1px solid #394052;
  color: #e6ebf5;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.copy-btn:hover {
  background: #333a4a;
}

.code-box pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
}

.steps-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink-secondary);
}

/* FAQ */
.faq-wrap {
  max-width: 820px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.faq-list summary {
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-list summary::after {
  content: "+";
  color: var(--ink-muted);
  font-size: 18px;
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 12px 0 0;
  color: var(--ink-secondary);
  font-size: 14.5px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
}

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

.site-footer p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.footer-links a:hover {
  color: var(--ink);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .showcase-shell,
  .memory-grid,
  .mode-columns {
    grid-template-columns: 1fr;
  }

  .showcase-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .site-nav {
    display: none;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .hero {
    padding: 36px 0 44px;
  }

  .section {
    padding: 48px 0;
  }

  .showcase-tabs,
  .memory-explorer {
    grid-template-columns: 1fr;
  }

  .explorer-sidebar {
    border-right: none;
    border-bottom: 1px solid #262a34;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .explorer-path {
    width: 100%;
    padding-bottom: 4px;
  }

  .install-switcher {
    display: flex;
    width: 100%;
  }

  .switch-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
