/* Inngame site: shared styles. No external fonts, no framework. */
:root {
  --bg: #0b0d12;
  --bg-2: #0f1218;
  --surface: #141821;
  --surface-2: #1a1f2a;
  --border: #262c39;
  --border-2: #333b4c;
  --text: #e8ebf1;
  --muted: #a3acbc;
  --faint: #7f8899;
  --accent: #7cf0b0;
  --accent-ink: #062314;
  --accent-2: #a99bff;
  --warn: #ffcf70;
  --danger: #ff8a8a;
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1160px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --accent-text: #7cf0b0;
  --accent-hover: #a8f7cc;
  --header-bg: rgba(11, 13, 18, .86);
  --prose: #d3d8e2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); }
:not(pre) > code {
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: .1em .38em;
  border-radius: 6px;
  word-break: break-word;
}
kbd {
  font-size: .8em;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  padding: .05em .4em;
  border-radius: 5px;
}
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.08rem; }
.brand:hover { color: var(--text); }
.brand svg { width: 28px; height: 28px; }
.brand small { font-weight: 500; color: var(--faint); font-size: .8rem; margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav .btn { margin-left: 6px; }
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: .98rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font-family: inherit; line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #9ff5c6; color: var(--accent-ink); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.nav .btn { padding: 8px 14px; font-size: .92rem; }
.nav .btn-primary { color: var(--accent-ink); }
.nav .btn-primary:hover { background: #9ff5c6; color: var(--accent-ink); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -200px -10% auto; height: 620px; z-index: -1;
  background:
    radial-gradient(600px 300px at 20% 20%, rgba(124, 240, 176, .13), transparent 70%),
    radial-gradient(520px 300px at 80% 10%, rgba(169, 155, 255, .14), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: var(--accent-text);
  background: rgba(124, 240, 176, .08); border: 1px solid rgba(124, 240, 176, .25);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); font-weight: 800; max-width: 15ch; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 60ch; margin-bottom: 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { color: var(--faint); font-size: .9rem; margin-top: 14px; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted);
  border: 1px solid var(--border); background: var(--bg-2); padding: 4px 10px; border-radius: 999px;
}
.chip.soon { border-style: dashed; }

/* ---------- product mock ---------- */
.demo { padding: 20px 0 64px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; align-items: stretch; }
.demo-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 8px 4px; font-weight: 600; }
.demo-col { display: flex; flex-direction: column; min-width: 0; }

/* the game */
.game {
  flex: 1; position: relative; border-radius: var(--radius); overflow: hidden; min-height: 470px; padding: 44px 14px 14px; display: flex; flex-direction: column;
  border: 1px solid var(--border-2);
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 213, 128, .35), transparent 22%),
    linear-gradient(180deg, #2b2457 0%, #4a3a7a 38%, #6b4f86 55%, #24453e 56%, #1a332e 100%);
}
.game::before { /* hills */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 52%;
  background:
    radial-gradient(60% 70% at 20% 100%, #1f4a3f 60%, transparent 61%),
    radial-gradient(55% 60% at 75% 100%, #183a33 60%, transparent 61%);
}
.hud { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; justify-content: space-between; font: 700 .78rem/1 var(--mono); color: #fff; text-shadow: 0 1px 0 #000; z-index: 1; }
.hud span { background: rgba(0, 0, 0, .35); padding: 5px 8px; border-radius: 6px; }
.game-dim { position: absolute; inset: 0; background: rgba(8, 8, 18, .55); }
.chat {
  position: relative; flex: 1; z-index: 2;
  background: #12141c; border: 1px solid #2c3142; border-radius: 12px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #252a39; }
.chat-head .av { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #f7b267, #f25f5c); flex: none; }
.chat-head b { font-size: .92rem; }
.chat-head small { display: block; color: var(--faint); font-size: .74rem; line-height: 1.2; }
.chat-head .x { margin-left: auto; color: var(--faint); font-size: .8rem; }
.chat-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 12px; font-size: .88rem; line-height: 1.45; }
.msg.me { align-self: flex-end; background: #3b4cca; color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: #232838; color: var(--text); border-bottom-left-radius: 4px; }
.msg .meta { display: block; font-size: .7rem; opacity: .75; margin-top: 4px; }
.shot { display: block; width: 120px; height: 68px; border-radius: 7px; margin-bottom: 6px; background: linear-gradient(135deg, #4a3a7a, #24453e); border: 1px solid rgba(255,255,255,.25); }
.card-item {
  align-self: flex-start; display: flex; align-items: center; gap: 10px; background: #1b2030; border: 1px solid #343b52;
  border-radius: 12px; padding: 10px 12px; font-size: .84rem; max-width: 86%;
}
.gem { width: 30px; height: 30px; flex: none; border-radius: 8px; background: linear-gradient(135deg, #8ef0ff, #6b6bff); transform: rotate(45deg) scale(.78); }
.card-item .claim { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 6px 10px; border-radius: 8px; font-size: .78rem; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #252a39; align-items: center; }
.chat-input .field { flex: 1; background: #1b1f2b; border: 1px solid #2c3142; color: var(--faint); border-radius: 9px; padding: 8px 10px; font-size: .84rem; }
.pad-hints { display: flex; gap: 12px; padding: 0 14px 10px; font-size: .72rem; color: var(--faint); }
.pad-hints i { font-style: normal; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #2a3042; color: #fff; font-size: .62rem; font-weight: 700; margin-right: 4px; }

/* the inbox */
.inbox {
  flex: 1; display: grid; grid-template-columns: 170px 1fr; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-2); background: var(--surface); min-height: 470px;
}
.inbox-list { border-right: 1px solid var(--border); background: var(--bg-2); font-size: .8rem; }
.inbox-list .t { padding: 12px 12px 8px; font-weight: 700; font-size: .78rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.conv { padding: 10px 12px; border-top: 1px solid var(--border); color: var(--muted); }
.conv b { color: var(--text); font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.conv b span { color: var(--faint); font-weight: 400; }
.conv p { margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 4px; vertical-align: 1px; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.thread-head { padding: 11px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-head b { font-size: .92rem; }
.flag { font-size: .72rem; color: var(--muted); border: 1px solid var(--border-2); border-radius: 6px; padding: 1px 6px; }
.ctx { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.ctx span { font: 500 .7rem/1.4 var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; }
.ctx span b { color: var(--text); font-weight: 600; }
.thread-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tmsg { max-width: 92%; font-size: .86rem; }
.tmsg .bubble { padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.tmsg.out { align-self: flex-end; }
.tmsg.out .bubble { background: rgba(124, 240, 176, .1); border-color: rgba(124, 240, 176, .3); }
.tmsg .orig { display: block; color: var(--faint); font-size: .76rem; margin-top: 5px; font-style: italic; }
.tmsg .who { font-size: .72rem; color: var(--faint); margin: 0 0 4px 2px; }
.tmsg.out .who { text-align: right; }
.tr-badge { display: inline-block; font-size: .66rem; font-weight: 700; color: var(--accent-2); border: 1px solid rgba(169,155,255,.4); border-radius: 5px; padding: 0 5px; margin-left: 6px; vertical-align: 1px; }
.note { font-size: .78rem; color: var(--warn); background: rgba(255, 207, 112, .07); border: 1px dashed rgba(255, 207, 112, .35); padding: 7px 10px; border-radius: 9px; }
.composer { border-top: 1px solid var(--border); padding: 10px 12px; }
.composer .field { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 9px; padding: 9px 11px; font-size: .84rem; color: var(--text); }
.composer .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: .74rem; color: var(--faint); }
.composer .send { background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 5px 12px; border-radius: 8px; font-size: .78rem; }

/* ---------- sections ---------- */
section { scroll-margin-top: 70px; }
.section { padding: 76px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.kicker { font-size: .8rem; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; display: block; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split + .split { margin-top: 72px; }
.split.rev > :first-child { order: 2; }
.split h3 { font-size: 1.5rem; font-weight: 750; }
.split p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--text); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.ticks li span { color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
}
.card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: .45em; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.card .icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-2); margin-bottom: 14px; color: var(--accent-text); }
.card .icon svg { width: 20px; height: 20px; }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; font-size: .9rem;
}

/* small visual blocks */
.flow { display: grid; gap: 10px; }
.flow-step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; }
.flow-step .n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--accent-text); border: 1px solid var(--border-2); font-size: .9rem; }
.flow-step b { display: block; font-size: .95rem; }
.flow-step span { color: var(--muted); font-size: .88rem; }
.flow-step.human .n { color: var(--warn); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mode { border: 1px solid var(--border); background: var(--bg-2); border-radius: 12px; padding: 12px; }
.mode b { display: block; font-size: .92rem; }
.mode span { color: var(--muted); font-size: .84rem; }
.lock { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px; border-radius: 12px; border: 1px solid rgba(255, 207, 112, .35); background: rgba(255, 207, 112, .06); }
.lock svg { width: 20px; height: 20px; flex: none; color: var(--warn); margin-top: 2px; }
.lock p { margin: 0; color: var(--text); font-size: .93rem; }
.channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.channel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.channel b { display: block; margin-bottom: 4px; }
.channel span { color: var(--muted); font-size: .88rem; }
.channel.soon { border-style: dashed; }
.badge { display: inline-block; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-2); vertical-align: 2px; margin-left: 4px; text-transform: uppercase; letter-spacing: .04em; }
.badge.ok { color: var(--accent-text); border-color: rgba(124,240,176,.35); }
.badge.soon { color: var(--warn); border-color: rgba(255,207,112,.4); }
.term {
  background: #07090d; border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; font: .84rem/1.6 var(--mono);
}
.term-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c3242; }
.term pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: #cfd6e2; }
.term .p { color: var(--accent); }
.term .d { color: var(--faint); }

/* real SDK screenshots */
.shots { margin: 56px 0 72px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 18px; align-items: center; }
.shots img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--surface); }
.shots figcaption { grid-column: 1 / -1; color: var(--faint); font-size: .9rem; text-align: center; }
@media (max-width: 760px) { .shots { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; } }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.plan.featured { border-color: rgba(124, 240, 176, .5); box-shadow: 0 0 0 1px rgba(124, 240, 176, .25), 0 20px 60px rgba(124, 240, 176, .06); }
.plan h3 { font-size: 1.15rem; margin-bottom: 4px; }
.plan .for { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 9px; font-size: .95rem; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 3px; top: .5em; width: 11px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; }
.price-note { color: var(--muted); font-size: .92rem; margin-top: 18px; text-align: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -1px; }
.faq details > div { padding: 0 18px 16px; color: var(--muted); }
.faq details > div p:last-child { margin: 0; }

/* ---------- final CTA + footer ---------- */
.final { text-align: center; padding: 80px 0; border-top: 1px solid var(--border); background: radial-gradient(600px 240px at 50% 0%, rgba(124, 240, 176, .09), transparent 70%); }
.final h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
.final p { color: var(--muted); }
.final .cta { justify-content: center; margin-top: 24px; }
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 50px; color: var(--faint); font-size: .9rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr)); gap: 24px; }
.site-footer h4 { color: var(--text); font-size: .88rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-top: 32px; padding-bottom: 80px; }
.docs-nav { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: .93rem; }
.docs-nav h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 20px 0 8px 10px; }
.docs-nav h2:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.docs-nav a:hover { color: var(--text); background: var(--surface); }
.docs-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.prose, .article main { max-width: 780px; min-width: 0; }
.prose h1, .article main h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
.prose .sub, .article main .sub { color: var(--muted); font-size: 1.12rem; margin-bottom: 32px; }
.prose h2, .article main h2 { font-size: 1.45rem; margin-top: 2.2em; padding-top: .4em; scroll-margin-top: 80px; }
.prose h3, .article main h3 { font-size: 1.12rem; margin-top: 1.8em; scroll-margin-top: 80px; }
.prose p, .prose li, .article main p, .article main li { color: var(--prose); }
.prose ul, .prose ol, .article main ul, .article main ol { padding-left: 1.3em; }
.prose li, .article main li { margin: .3em 0; }
.prose pre, .article main pre {
  position: relative; background: #07090d; border: 1px solid var(--border-2); border-radius: 12px;
  padding: 16px 18px; overflow-x: auto; font-size: .85rem; line-height: 1.6; color: #d4dbe7; margin: 0 0 1.4em;
  -webkit-overflow-scrolling: touch;
}
.prose pre[data-lang]::before, .article main pre[data-lang]::before {
  content: attr(data-lang); position: absolute; top: 8px; right: 12px; font: 600 .68rem/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--faint);
}
.prose pre.has-copy[data-lang]::before, .article main pre.has-copy[data-lang]::before { right: 64px; }
.copy-btn {
  position: absolute; top: 6px; right: 6px; font: 600 .72rem/1 var(--font); color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 6px; padding: 5px 8px; cursor: pointer;
}
.copy-btn:hover { color: var(--text); }
.c-c { color: #7f8899; }
.c-k { color: #c3a6ff; }
.c-s { color: #9be8b9; }
.c-n { color: #ffc78a; }
.c-f { color: #8fd3ff; }
.callout { border: 1px solid var(--border-2); border-left: 3px solid var(--accent-2); background: var(--surface); border-radius: 10px; padding: 14px 16px; margin: 0 0 1.4em; font-size: .95rem; }
.callout p:last-child { margin: 0; }
.callout.warn { border-left-color: var(--warn); }
.callout.ok { border-left-color: var(--accent); }
.callout strong:first-child { color: var(--text); }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--border); border-radius: 10px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); color: var(--text); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
.method { display: inline-block; font: 700 .7rem/1 var(--mono); padding: 3px 6px; border-radius: 5px; min-width: 52px; text-align: center; }
.m-get { color: #8fd3ff; background: rgba(143, 211, 255, .1); }
.m-post { color: var(--accent-text); background: rgba(124, 240, 176, .1); }
.m-patch, .m-put { color: var(--warn); background: rgba(255, 207, 112, .1); }
.m-delete { color: var(--danger); background: rgba(255, 138, 138, .1); }
.doc-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 1.6em; }
.doc-cards a { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; color: var(--text); }
.doc-cards a:hover { border-color: var(--border-2); background: var(--surface-2); }
.doc-cards b { display: block; margin-bottom: 4px; }
.doc-cards span { color: var(--muted); font-size: .9rem; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.pager a { text-decoration: none; }
.toc { font-size: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 28px; }
.toc b { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.toc ul { margin: 6px 0 0; padding-left: 1.1em; }
.toc li { margin: 2px 0; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .demo-grid { grid-template-columns: 1fr; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 28px; }
  .split.rev > :first-child { order: 0; }
  .grid-3, .pricing { grid-template-columns: 1fr; }
  .pricing { max-width: 520px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; }
  .docs-nav { position: static; max-height: none; overflow: visible; margin-bottom: 24px; }
  .docs-nav { border-bottom: 1px solid var(--border); padding-bottom: 16px; }
  .docs-nav h2 { margin: 12px 0 6px 2px; }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-nav a { border: 1px solid var(--border); padding: 6px 10px; font-size: .88rem; }
  .docs-nav a[aria-current="page"] { box-shadow: none; border-color: rgba(124,240,176,.5); }
}
@media (max-width: 760px) {
  .menu-btn {
    display: inline-flex; margin-left: auto; background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
    border-radius: 9px; padding: 8px 12px; font: 600 .9rem var(--font); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; }
  .nav .btn { margin: 6px 0 0; padding: 12px; }
  .hero { padding: 44px 0 28px; }
  .section { padding: 56px 0; }
  .grid-2, .channels, .doc-cards, .modes { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; }
  .inbox-list { display: none; }
  .game { min-height: 0; padding: 40px 8px 8px; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .cta .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Mode clair : suit le réglage du système, ou le choix fait avec le bouton (data-theme). Le jeu, le chat et le terminal
   de démonstration restent sombres : ce sont des captures d'écran. */
:root[data-theme="light"] {
  --bg: #ffffff; --bg-2: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --border: #e3e6ec; --border-2: #d3d8e0;
  --text: #12151c; --muted: #4f5868; --faint: #6b7383; --accent-text: #0b7a47; --accent-hover: #075c35; --accent-2: #5b48d6;
  --warn: #9a6200; --danger: #c22f2f; --header-bg: rgba(255, 255, 255, .88); --prose: #2a303b; color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff; --bg-2: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --border: #e3e6ec; --border-2: #d3d8e0;
    --text: #12151c; --muted: #4f5868; --faint: #6b7383; --accent-text: #0b7a47; --accent-hover: #075c35; --accent-2: #5b48d6;
    --warn: #9a6200; --danger: #c22f2f; --header-bg: rgba(255, 255, 255, .88); --prose: #2a303b; color-scheme: light;
  }
}
.game, .chat, .term, .prose pre, .article main pre { color-scheme: dark; --bg: #0b0d12; --surface: #141821; --surface-2: #1a1f2a; --border: #262c39; --border-2: #333b4c; --accent-text: #7cf0b0; --text: #e8ebf1; --muted: #a3acbc; --faint: #7f8899; --accent-2: #a99bff; --warn: #ffcf70; }
.theme-btn { order: 1; background: none; border: 1px solid var(--border-2); color: var(--muted); border-radius: 9px; width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.theme-btn:hover { color: var(--text); border-color: var(--muted); }
.theme-btn svg { width: 18px; height: 18px; }

/* Guides, legal and use-case articles: one column, breadcrumbs. */
.docs.article { grid-template-columns: minmax(0, 1fr); }
.crumbs { font-size: .9rem; color: var(--faint); margin: 0 0 14px; }
.crumbs a { color: var(--muted); }
.article .sub { color: var(--muted); font-size: 1.12rem; margin-bottom: 24px; }
.muted, .article main .muted { color: var(--muted); }
.small { font-size: .9rem; }
.guide-list { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.guide-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0; }

/* Use cases: cards on the homepage and the hub, landing pages per audience. */
.usecases { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.usecases a { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; color: var(--text); }
.usecases a:hover { border-color: var(--border-2); background: var(--surface-2); color: var(--text); }
.usecases b { display: block; margin-bottom: 4px; }
.usecases span { color: var(--muted); font-size: .9rem; }
.usecases-all { margin: 18px 0 0; }
.hero .crumbs { margin-bottom: 18px; }
.uc-hero h1 { max-width: 20ch; font-size: clamp(2rem, 4.6vw, 3.3rem); }
.uc-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.uc-links a { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: var(--text); }
.uc-links a:hover { border-color: var(--border-2); background: var(--surface-2); color: var(--text); }
.uc-links span { display: block; color: var(--muted); font-size: .88rem; }
.uc-links small { display: block; color: var(--faint); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 2px; }
.nav .lang { font-weight: 600; font-size: .85rem; }
.split-h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }

/* ---------- use-case hero with a visual + email form ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: center; }
.hero-media { margin: 0; }
.hero-media img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--surface); }
.hero-media figcaption { color: var(--faint); font-size: .84rem; margin-top: 8px; text-align: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

.lead { margin-top: 26px; max-width: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.lead-title { margin: 0 0 10px; font-size: .95rem; color: var(--text); font-weight: 600; }
.lead-title span { display: block; font-weight: 400; color: var(--muted); font-size: .88rem; }
.lead-row { display: flex; gap: 8px; }
.lead-row input { flex: 1; min-width: 0; font: inherit; font-size: .95rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 9px; padding: 9px 12px; }
.lead-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.lead-row .btn { padding: 9px 14px; font-size: .92rem; }
.lead-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: .8rem; color: var(--muted); line-height: 1.45; }
.lead-consent input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-msg { margin: 8px 0 0; font-size: .86rem; min-height: 0; }
.lead-msg:empty { display: none; }
.lead-msg.ok, .lead-done { color: var(--accent-text); }
.lead-msg.err { color: var(--danger); }
.lead-done { margin: 0; font-weight: 600; }
.lead-flash { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; font-size: .92rem; }
.lead-flash:target { display: block; }
#lead-ok { background: rgba(124, 240, 176, .1); border: 1px solid rgba(124, 240, 176, .35); color: var(--accent-text); }
#lead-error { background: rgba(255, 138, 138, .08); border: 1px solid rgba(255, 138, 138, .35); color: var(--danger); }
.final .lead { margin: 26px auto 0; text-align: left; }
@media (max-width: 520px) { .lead-row { flex-direction: column; } }

/* ---------- ad landings (/lp/): no navigation, one action ---------- */
.lp-header .wrap { justify-content: space-between; }
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.proof div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.proof b { display: block; margin-bottom: 4px; }
.proof span { color: var(--muted); font-size: .93rem; }
.price-line { font-size: 1.05rem; color: var(--text); margin: 18px 0 0; }
.price-line b { color: var(--accent-text); }
@media (max-width: 760px) { .proof { grid-template-columns: 1fr; } }
