/* ============================================================
   macMLX website — single stylesheet
   Design: macOS native · frosted glass · gradient accents
   Theme: auto (prefers-color-scheme) + manual toggle
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  /* Palette — light */
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --bg-raised: rgba(255, 255, 255, 0.72);
  --surface: #ffffff;
  --surface-2: #f2f2f5;
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --divider: rgba(0, 0, 0, 0.06);

  /* Accent */
  --accent: #0a84ff;
  --accent-2: #5e5ce6;
  --accent-soft: rgba(10, 132, 255, 0.12);
  --accent-gradient: linear-gradient(135deg, #5e5ce6 0%, #0a84ff 60%, #32ade6 100%);

  /* Semantic */
  --ok: #30d158;
  --warn: #ff9f0a;
  --err: #ff453a;
  --info: #64d2ff;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 16px 40px -12px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 32px 80px -20px rgba(10, 132, 255, 0.18);

  /* Layout */
  --max-w: 1160px;
  --nav-h: 54px;
  --gutter: clamp(16px, 4vw, 40px);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Monaco", "Consolas",
               "Liberation Mono", monospace;

  color-scheme: light;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0f;
    --bg-alt: #111116;
    --bg-raised: rgba(22, 22, 28, 0.72);
    --surface: #16161c;
    --surface-2: #1d1d24;
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --text-3: #8e8e93;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --divider: rgba(255, 255, 255, 0.06);

    --accent: #0a84ff;
    --accent-2: #7d7aff;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --accent-gradient: linear-gradient(135deg, #7d7aff 0%, #0a84ff 55%, #64d2ff 100%);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 32px 80px -20px rgba(94, 92, 230, 0.25);

    color-scheme: dark;
  }
}

/* Manual theme override */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --bg-raised: rgba(255, 255, 255, 0.72);
  --surface: #ffffff;
  --surface-2: #f2f2f5;
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --divider: rgba(0, 0, 0, 0.06);
  --accent-soft: rgba(10, 132, 255, 0.12);
  --accent-2: #5e5ce6;
  --accent-gradient: linear-gradient(135deg, #5e5ce6 0%, #0a84ff 60%, #32ade6 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 16px 40px -12px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 32px 80px -20px rgba(10, 132, 255, 0.18);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0f;
  --bg-alt: #111116;
  --bg-raised: rgba(22, 22, 28, 0.72);
  --surface: #16161c;
  --surface-2: #1d1d24;
  --text: #f5f5f7;
  --text-2: #c7c7cc;
  --text-3: #8e8e93;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --divider: rgba(255, 255, 255, 0.06);
  --accent-soft: rgba(10, 132, 255, 0.18);
  --accent-2: #7d7aff;
  --accent-gradient: linear-gradient(135deg, #7d7aff 0%, #0a84ff 55%, #64d2ff 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5), 0 32px 80px -20px rgba(94, 92, 230, 0.25);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.003em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

p { margin: 0; color: var(--text-2); }

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 0.1em 0.36em;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

em { font-style: italic; color: var(--text); }

/* ---- Layout helpers ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
  position: relative;
}

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

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.section-head h2 {
  font-size: clamp(26px, 3.6vw, 40px);
  margin-bottom: 14px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.55;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg-raised);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.brand:hover { text-decoration: none; }

.brand-icon { width: 26px; height: 26px; display: inline-flex; }
.brand-icon svg { width: 100%; height: 100%; display: block; }
.brand-name { font-size: 15px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-size: 13.5px;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-2);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.lang-toggle .lang-opt {
  transition: color 120ms ease;
}
.lang-toggle .lang-opt.active {
  color: var(--accent);
}
.lang-toggle .lang-sep { color: var(--text-3); opacity: 0.6; }

/* Theme-toggle icon visibility */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  .theme-toggle .icon-sun { display: block; }
  .theme-toggle .icon-moon { display: none; }
}
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset,
              0 4px 14px rgba(10, 132, 255, 0.28);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset,
                                  0 6px 20px rgba(10, 132, 255, 0.38); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 96px) 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 720px;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 30% 20%, rgba(94, 92, 230, 0.22), transparent 70%),
    radial-gradient(50% 50% at 80% 10%, rgba(10, 132, 255, 0.18), transparent 70%),
    radial-gradient(40% 30% at 50% 70%, rgba(50, 173, 230, 0.14), transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

.hero-inner {
  position: relative;
  text-align: center;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-raised);
  backdrop-filter: saturate(180%) blur(10px);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.22);
}

.hero-title {
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.033em;
  line-height: 1.05;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-2);
  max-width: 680px;
  margin: 0 auto 34px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 56px;
}

/* ---- macOS window mockup ---- */
.window-mockup {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  perspective: 1600px;
}

.window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotateX(1.5deg);
  text-align: left;
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--divider);
}
.traffic { display: inline-flex; gap: 6px; }
.tl {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.tl-red { background: #ff5f57; }
.tl-yellow { background: #febc2e; }
.tl-green { background: #28c840; }
.window-title {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 500;
}
.window-actions { display: inline-flex; }
.engine-badge {
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

.window-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 360px;
}

.mock-sidebar {
  background: var(--bg-alt);
  border-right: 1px solid var(--divider);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mock-sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.mock-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 500;
}
.mock-sidebar-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.dot-icon {
  width: 14px; height: 14px; border-radius: 3px;
  background: var(--text-3);
  opacity: 0.6;
  flex-shrink: 0;
}
.mock-sidebar-item.active .dot-icon { background: var(--accent); opacity: 1; }
.dot-icon.chat { background: #ff9f0a; opacity: 1; }
.mock-sidebar-item.active .dot-icon.chat { background: var(--accent); }
.mock-sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-3);
  padding: 8px 10px;
  border-top: 1px solid var(--divider);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.22);
}

.mock-chat {
  display: grid;
  grid-template-columns: 180px 1fr;
}
.mock-conv-list {
  border-right: 1px solid var(--divider);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.conv-item {
  font-size: 12.5px;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-item.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}

.mock-chat-main {
  padding: 22px 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.mock-msg {
  font-size: 13.5px;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 82%;
  white-space: pre-wrap;
}
.mock-msg.user {
  align-self: flex-end;
  background: var(--accent-gradient);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.mock-msg.assistant {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.mock-msg.assistant p { margin: 0 0 8px; color: var(--text); }
.mock-msg.assistant p:last-of-type { margin-bottom: 0; }
.mock-msg.assistant ul { margin: 6px 0 0; padding-left: 18px; }
.mock-msg.assistant li { margin-bottom: 2px; }
.mock-msg.assistant code { font-size: 12px; }

.cursor-blink {
  display: inline-block;
  width: 7px;
  height: 14px;
  vertical-align: -2px;
  margin-left: 3px;
  background: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.mock-chat-stats {
  margin-top: auto;
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: var(--text-3);
  padding-top: 10px;
  border-top: 1px solid var(--divider);
}

/* ---- Compare table ---- */
.compare-table-wrap {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.compare-table th,
.compare-table td {
  text-align: center;
  padding: 14px 14px;
  border-bottom: 1px solid var(--divider);
  color: var(--text-2);
}
.compare-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text);
  font-size: 13.5px;
  letter-spacing: -0.005em;
}
.compare-table td:first-child,
.compare-table th:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .hl {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}
.brand-cell { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.dot-brand {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-gradient);
}

.ok { color: var(--ok); font-weight: 600; }
.warn { color: var(--warn); font-weight: 500; }
.no { color: var(--text-3); }

/* ---- Trifecta cards ---- */
.tri-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tri-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.tri-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.tri-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  margin-bottom: 16px;
  color: #fff;
}
.icon-gui { background: linear-gradient(135deg, #5e5ce6, #0a84ff); }
.icon-cli { background: linear-gradient(135deg, #32ade6, #30d158); }
.icon-api { background: linear-gradient(135deg, #ff9f0a, #ff453a); }

.tri-card h3 {
  font-size: 20px;
  margin-bottom: 4px;
}
.tri-sub {
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.tri-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tri-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.55;
}
.tri-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}
.tri-list li code { font-size: 13px; }

/* ---- Release card ---- */
.release-card {
  max-width: 960px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 28px 22px;
  box-shadow: var(--shadow-md);
}
.release-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.version-pill {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: #fff;
}
.release-date {
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 22px 0 18px;
  border-top: 1px solid var(--divider);
}

.release-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rel-dot {
  width: 9px; height: 9px; border-radius: 50%;
}
.rel-dot.add { background: var(--ok); }
.rel-dot.remove { background: var(--err); }
.rel-dot.note { background: var(--info); }

.release-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.release-item li { position: relative; padding-left: 14px; }
.release-item li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 1.5px;
  background: var(--text-3);
  opacity: 0.6;
}

.release-footer {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--divider);
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
}

/* ---- Timeline ---- */
.timeline {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.timeline-group-head {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.timeline-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid;
}
.timeline-status.shipped {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  border-color: color-mix(in srgb, var(--ok) 32%, transparent);
}
.timeline-status.in-progress {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
}
.timeline-status.next {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
.timeline-status.later {
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent-2) 28%, transparent);
}
.timeline-status.deferred {
  color: var(--text-3);
  background: var(--surface-2);
  border-color: var(--border);
}

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.6);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 159, 10, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0); }
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.timeline-card.in-progress { border-color: color-mix(in srgb, var(--warn) 32%, var(--border)); }
.timeline-card.next { border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }

.timeline-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  padding: 20px 24px;
  border-top: 1px solid var(--divider);
}
.timeline-row:first-child { border-top: none; }

.timeline-row.current {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.tl-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  text-decoration: none;
  height: fit-content;
  align-self: start;
  margin-top: 2px;
  white-space: nowrap;
}
.tl-tag:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.tl-tag.upcoming { background: var(--accent-gradient); color: #fff; border-color: transparent; }
.tl-tag.planned { background: color-mix(in srgb, var(--accent-2) 14%, var(--surface-2)); color: var(--accent-2); }
.tl-tag.blocked { background: var(--surface-2); color: var(--text-3); }
.tl-tag.blocked a { color: inherit; text-decoration: none; }
.tl-tag.blocked a:hover { color: var(--accent); }

.tl-body h4 {
  font-size: 15.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tl-body p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

.new-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-gradient);
  color: #fff;
}

.highlight-new {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 6%, transparent), transparent 80%);
  border-left: 3px solid var(--accent-2);
  padding-left: 21px;
}

.mini-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.6;
}
.mini-list li { margin-bottom: 3px; }

/* ---- Benchmarks preview ---- */
.bench-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
}

.bench-stage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bench-stage .stage-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
}
.bench-stage.now .stage-label { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.bench-stage.future .stage-label {
  background: var(--accent-gradient);
  color: #fff;
}

.bench-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  height: calc(100% - 34px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bench-card h4 { font-size: 17px; }
.bench-card > p { font-size: 14px; color: var(--text-2); line-height: 1.55; }

.issue-preview {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
}
.issue-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
}
.issue-label {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 20%, transparent);
  color: var(--ok);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.issue-title { color: var(--text); font-size: 12.5px; }
.issue-body {
  margin: 0;
  padding: 12px 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-2);
  white-space: pre;
  overflow-x: auto;
}

.bench-table-mock {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  font-size: 12.5px;
}
.bench-mock-head,
.bench-mock-row {
  display: grid;
  grid-template-columns: 1fr 0.55fr 1.3fr 0.8fr 0.7fr 0.5fr;
  gap: 6px;
  padding: 8px 14px;
  align-items: center;
}
.bench-mock-head {
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bench-mock-row {
  border-bottom: 1px solid var(--divider);
  color: var(--text-2);
}
.bench-mock-row:last-child { border-bottom: none; }
.bench-mock-row.best { background: color-mix(in srgb, var(--accent) 5%, transparent); color: var(--text); font-weight: 500; }
.tps-val { color: var(--accent); font-weight: 600; }

.bench-caption {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  font-style: italic;
}

/* ---- Architecture ---- */
.arch-wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  max-width: 1040px;
  margin: 0 auto;
  align-items: start;
}

.arch-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.arch-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
  align-items: stretch;
}
.arch-row.arch-apps { gap: 10px; }
.arch-row.arch-split { gap: 10px; }

.arch-box {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
}
.arch-sub {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0;
}
.arch-box.core {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
}
.arch-box.engine {
  background: color-mix(in srgb, var(--accent-2) 8%, var(--bg-alt));
  border-color: color-mix(in srgb, var(--accent-2) 28%, transparent);
}
.arch-box.engine .engine-name { color: var(--accent-2); font-size: 15px; }
.arch-box.engine .engine-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  margin-top: 4px;
}
.arch-box.silicon {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 12%, var(--bg-alt)), color-mix(in srgb, var(--accent) 10%, var(--bg-alt)));
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
}

.arch-arrow {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1;
  opacity: 0.6;
}

.arch-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.arch-side h4 { font-size: 15px; }
.arch-tree {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  white-space: pre;
  overflow-x: auto;
}
.arch-tree .cmt { color: var(--text-3); font-style: italic; }
.arch-note { font-size: 13px; color: var(--text-2); line-height: 1.55; }

/* ---- Quickstart tabs ---- */
.qs-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 auto 20px;
}
.qs-tabs {
  display: flex;
  justify-content: center;
  max-width: max-content;
  margin-left: auto;
  margin-right: auto;
}
.qs-tab {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  padding: 7px 18px;
  border-radius: 7px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.qs-tab:hover { color: var(--text); }
.qs-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.qs-panels { max-width: 920px; margin: 0 auto; }
.qs-panel { display: none; }
.qs-panel.active { display: block; }

.qs-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.qs-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.qs-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.qs-steps h4 { font-size: 15.5px; margin-bottom: 4px; }
.qs-steps p { font-size: 14px; color: var(--text-2); line-height: 1.55; }

.code-block {
  background: #0b0b0f;
  color: #e4e4e9;
  border-radius: var(--r-md);
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
  border: 1px solid #1d1d24;
  box-shadow: var(--shadow-md);
  margin: 0;
  white-space: pre;
}
.code-block .c-cmt { color: #8e8e93; font-style: italic; }
.code-block .c-kw { color: #7d7aff; }
.code-block .c-str { color: #30d158; }

/* ---- Special thanks ---- */
.thanks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.thanks-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 22px 18px;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.thanks-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  text-decoration: none;
}
.thanks-card h4 { font-size: 16px; }
.thanks-card p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.thanks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.thanks-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #5e5ce6, #0a84ff);
  letter-spacing: 0.01em;
}
.thanks-logo.mlx { background: linear-gradient(135deg, #000, #333); }
.thanks-logo.hf { background: linear-gradient(135deg, #ffcc00, #ff9f0a); color: #1d1d1f; }
.thanks-logo.hb { background: linear-gradient(135deg, #ff453a, #ff9f0a); }
.thanks-logo.sp { background: linear-gradient(135deg, #32ade6, #0a84ff); }
.thanks-logo.pl { background: linear-gradient(135deg, #30d158, #32ade6); }
.thanks-logo.ap { background: linear-gradient(135deg, #86868b, #1d1d1f); }
.thanks-meta {
  font-size: 11.5px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.thanks-foot {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-3);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
  color: var(--text-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-tag {
  font-size: 13.5px;
  color: var(--text-3);
  max-width: 320px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.footer-col a {
  font-size: 13.5px;
  color: var(--text-2);
}
.footer-col a:hover { color: var(--accent); text-decoration: none; }

.footer-bottom {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.footer-dim { color: var(--text-3); opacity: 0.8; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .tri-grid { grid-template-columns: 1fr; }
  .release-grid { grid-template-columns: 1fr; }
  .bench-wrap { grid-template-columns: 1fr; }
  .arch-wrap { grid-template-columns: 1fr; }
  .thanks-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .window-body { grid-template-columns: 1fr; }
  .mock-sidebar { border-right: none; border-bottom: 1px solid var(--divider); flex-direction: row; overflow-x: auto; padding: 10px; }
  .mock-sidebar-group { flex-direction: row; gap: 4px; }
  .mock-sidebar-footer { display: none; }
  .mock-chat { grid-template-columns: 1fr; }
  .mock-conv-list { display: none; }
}
@media (max-width: 640px) {
  :root { --nav-h: 52px; }
  .nav-links { display: none; }
  .hero-meta { margin-bottom: 36px; }
  .hero-title { font-size: clamp(32px, 8vw, 44px); }
  .timeline-row { grid-template-columns: 1fr; gap: 10px; padding: 18px 18px; }
  .highlight-new { padding-left: 15px; }
  .tl-tag { align-self: flex-start; }
  .qs-steps li { grid-template-columns: 1fr; gap: 10px; }
  .thanks-grid { grid-template-columns: 1fr; }
  .compare-table { font-size: 13px; }
  .compare-table th, .compare-table td { padding: 12px 8px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; }
  .bench-mock-head, .bench-mock-row { grid-template-columns: 0.9fr 0.6fr 1fr 0.7fr 0.7fr; font-size: 11px; padding: 8px 10px; }
  .bench-mock-head .col-n, .bench-mock-row span:last-child { display: none; }
}

/* ---- Print ---- */
@media print {
  .nav, .hero-bg, .site-footer { display: none; }
  body { background: #fff; }
}

/* ---- Reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
