:root {
  --bg: #ffffff;
  --bg-soft: #f6f6fb;
  --panel: #ffffff;
  --border: #e5e5ef;
  --text: #15151d;
  --muted: #5f5f73;
  --accent: #5b5bf0;
  --accent-strong: #4745d6;
  --accent-soft: #eeeefe;
  --ok: #15803d;
  --ok-soft: #e7f7ec;
  --code-bg: #f3f3f8;
  --shadow: 0 1px 2px rgba(20, 20, 40, 0.05), 0 8px 30px rgba(20, 20, 40, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111117;
    --bg-soft: #17171f;
    --panel: #1b1b24;
    --border: #2b2b37;
    --text: #ececf3;
    --muted: #a3a3b6;
    --accent: #8080ff;
    --accent-strong: #9a9aff;
    --accent-soft: #24244a;
    --ok: #4ade80;
    --ok-soft: #173a25;
    --code-bg: #0c0c11;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 30px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 0.88em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 5px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - 1080px) / 2));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); font-size: 17px; }
.brand img { border-radius: 7px; }
.nav nav { display: flex; gap: 18px; margin-left: auto; font-size: 14px; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 11px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--border); color: var(--text); background: var(--panel);
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); }
.btn.small { padding: 6px 12px; font-size: 13.5px; }
.btn.ghost { background: none; }

/* Hero */
main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.hero { text-align: center; padding: 72px 0 56px; }
.hero-icon { border-radius: 22px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(32px, 5vw, 52px); margin: 22px auto 14px; max-width: 760px; }
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 720px; margin: 0 auto 26px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fine { font-size: 13px; color: var(--muted); margin-top: 16px; }
.announce {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  padding: 4px 14px 4px 5px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel); color: var(--text); font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
}
.announce:hover { text-decoration: none; border-color: var(--accent); }
.announces { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 0; }
.announces .announce { margin-top: 0; max-width: 100%; text-align: left; }

/* Sections */
.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 8px; }
.section-lead { color: var(--muted); max-width: 720px; margin: 0 0 26px; }
.section h3 { font-size: 18px; margin: 0 0 6px; }

.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.flow-step { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.flow-step p { color: var(--muted); font-size: 14.5px; margin: 0; }
.flow-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.flow-arrow { align-self: center; color: var(--muted); font-size: 22px; }

.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.step-head h3 { margin: 0; font-size: 20px; }
.step-num { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.note { font-size: 14px; color: var(--muted); }
.howto { padding-left: 20px; margin: 6px 0; }
.howto li { margin: 5px 0; }
.pill { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.new { background: var(--accent); color: #fff; padding: 2px 9px; }
.pill.beta { background: var(--accent-soft); color: var(--accent-strong); padding: 2px 9px; flex-shrink: 0; }

/* Beta download box in the hero */
.beta-cta {
  margin: 30px auto 0; max-width: 660px; padding: 20px 22px 14px;
  border: 2px solid var(--accent); border-radius: 18px; background: var(--accent-soft); box-shadow: var(--shadow);
  scroll-margin-top: 84px; /* clear the sticky header when the hero's Beta pill jumps here */
}
.beta-cta .pill.beta { background: var(--panel); }
.beta-cta-title { margin: 0 0 6px; font-size: 21px; font-weight: 800; }
.beta-cta-title strong { font-weight: 800; }
.beta-cta-sub { margin: 0 0 16px; color: var(--muted); }
.btn.beta {
  font-weight: 800; color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #4745d6, #7c3aed); box-shadow: 0 6px 18px rgba(71, 69, 214, 0.35);
}
.btn.beta:hover { background: linear-gradient(135deg, #3b39c4, #6d28d9); border-color: transparent; }

/* Tabs */
.tabs { margin: 10px 0; }
.tab-list { display: inline-flex; gap: 4px; background: var(--bg-soft); border: 1px solid var(--border); padding: 3px; border-radius: 11px; }
.tab-list button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 8px; cursor: pointer; }
.tab-list button[aria-selected="true"] { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.tab-panel { padding-top: 6px; }
.tab-panel[hidden] { display: none; }

/* Code */
.code { position: relative; margin: 10px 0; }
.code pre { margin: 0; background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 70px 14px 16px; overflow-x: auto; }
.code pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.6; }
.copy { position: absolute; top: 8px; right: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: 12px -apple-system, system-ui, sans-serif; padding: 4px 10px; border-radius: 7px; cursor: pointer; }
.copy:hover { color: var(--text); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }

.model-table { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.mrow { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 15px; }
.mrow:first-child { border-top: 0; }
.mrow.head { background: var(--bg-soft); font-weight: 600; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.mrow span:first-child { font-weight: 600; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.two > * { min-width: 0; } /* let grid columns shrink; code blocks scroll inside themselves */
.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.t th, .t td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.t th { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.t td:first-child { font-weight: 600; white-space: nowrap; }

details { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin: 10px 0; background: var(--panel); }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 2px; }

.footer { max-width: 1080px; margin: 0 auto; padding: 36px 16px 48px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer img { vertical-align: -5px; border-radius: 5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .grid { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .mrow { grid-template-columns: 1fr; gap: 2px; }
  .hero { padding: 48px 0 40px; }
  .step { padding: 18px; }
  .tab-list { display: flex; }
  .tab-list button { flex: 1 1 auto; white-space: nowrap; padding: 6px 8px; }
  .t td:first-child { white-space: normal; width: 36%; }
}
