/* Mention — demo site styles */
:root {
  --bg: #121316;
  --surface: #1a1c20;
  --surface-2: #22252a;
  --line: #2c3036;
  --text: #eef0f2;
  --muted: #8d939c;
  --lime: #c6f432;
  --lime-ink: #1b2200;
  --violet: #8b7cff;
  --danger: #ff6b7a;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, monospace;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.data { font-family: var(--font-data); font-size: 0.92em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.page-head { padding: 72px 0 40px; }
.page-head .lead { margin-bottom: 0; }

/* ---------- demo bar ---------- */
.demo-bar {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.demo-bar strong { color: var(--text); font-weight: 600; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(18, 19, 22, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.logo-mark { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.95rem; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn-primary:hover { background: #d5ff4f; border-color: #d5ff4f; }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- tags ---------- */
.tag-sim {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 2px 8px; vertical-align: middle;
}
.chip-sponsored {
  display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--lime);
  border: 1px solid rgba(198, 244, 50, 0.5); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; white-space: nowrap;
}
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); margin-right: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 1.8s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- highlighter (the signature element) ---------- */
.hl {
  color: var(--lime-ink);
  background-image: linear-gradient(100deg, rgba(198, 244, 50, 0) 0%, var(--lime) 2%, var(--lime) 97%, rgba(198, 244, 50, 0) 100%);
  background-repeat: no-repeat;
  background-size: 100% 88%;
  background-position: 0 60%;
  padding: 0 3px;
  border-radius: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl-sweep { background-size: 0% 88%; color: var(--text); }
.hl-sweep.on { background-size: 100% 88%; color: var(--lime-ink); transition: background-size 0.9s cubic-bezier(.6,.05,.3,1), color 0.3s 0.5s; }
@media (prefers-reduced-motion: reduce) {
  .hl-sweep { background-size: 100% 88%; color: var(--lime-ink); }
}

/* ---------- hero ---------- */
.hero { padding: 80px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lead { margin-bottom: 32px; }

.chat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.chat-top { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; font-size: 0.9rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; color: #111; flex: none; }
.chat-top .muted { margin-left: auto; font-size: 0.8rem; }
.bubble { padding: 12px 16px; border-radius: 16px; max-width: 88%; margin-bottom: 12px; font-size: 0.97rem; line-height: 1.55; }
.bubble.user { background: var(--surface-2); margin-left: auto; border-bottom-right-radius: 4px; }
.bubble.agent { background: transparent; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.agent p:last-child { margin: 0; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: pulse 1s infinite; }
  .typing i:nth-child(2) { animation-delay: 0.15s; }
  .typing i:nth-child(3) { animation-delay: 0.3s; }
}
.chat-foot { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { padding: 24px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { font-family: var(--font-head); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.stats-note { margin-top: 10px; font-size: 0.82rem; color: var(--muted); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px; counter-reset: step; }
.step { padding: 28px 28px 28px 0; position: relative; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step-num { font-family: var(--font-head); font-size: 2.6rem; font-weight: 600; color: var(--line); line-height: 1; margin-bottom: 16px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- feed ---------- */
.feed-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.feed-head h2 { margin: 0; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
table.feed { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.feed th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.82rem; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.feed td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.feed tr:last-child td { border-bottom: 0; }
.feed tbody tr { cursor: pointer; }
.feed tbody tr:hover td { background: var(--surface); }
.feed .num { text-align: right; font-family: var(--font-data); font-size: 0.88rem; }
.agent-cell { display: flex; align-items: center; gap: 10px; }
.agent-cell .avatar { width: 24px; height: 24px; font-size: 0.65rem; }
.ev { font-size: 0.8rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.ev-click { color: var(--violet); border-color: rgba(139, 124, 255, 0.45); }
.ev-conversion { color: var(--lime); border-color: rgba(198, 244, 50, 0.5); }
@media (prefers-reduced-motion: no-preference) {
  .row-new td { animation: rowIn 0.6s ease-out; }
}
@keyframes rowIn { from { background: rgba(198, 244, 50, 0.08); } to { background: transparent; } }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- doors (two audiences) ---------- */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.door { padding: 36px; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.door.lime { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.door.lime .btn { background: var(--lime-ink); color: var(--lime); border-color: var(--lime-ink); }
.door ul { padding-left: 1.1em; margin: 0 0 28px; }
.door li { margin-bottom: 6px; }

/* ---------- trust list ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.trust p { color: var(--muted); margin: 0; }

.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.final-cta .btn-row { justify-content: center; }

/* ---------- forms ---------- */
.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 500; font-size: 0.92rem; margin-bottom: 8px; }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
input[type="text"], input[type="url"], input[type="number"], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--lime); }
textarea { resize: vertical; min-height: 84px; }
input[type="range"] { width: 100%; accent-color: var(--lime); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 0.88rem; }
.chip-toggle[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.error-msg { color: var(--danger); font-size: 0.88rem; min-height: 1.2em; }

/* ---------- builder layout ---------- */
.builder { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.sticky { position: sticky; top: 88px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-family: var(--font-head); font-weight: 600; font-variant-numeric: tabular-nums; }
.budget-value { font-family: var(--font-head); font-size: 2rem; font-weight: 600; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: 32px; }
.plan { padding: 32px; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan.featured { background: var(--surface); }
.plan-price { font-family: var(--font-head); font-size: 1.8rem; font-weight: 600; margin: 8px 0 16px; }
.plan ul { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.plan li { padding: 8px 0; border-top: 1px solid var(--line); }

/* ---------- agents ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.toolbar select { width: auto; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.agent-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; cursor: pointer; width: 100%; }
.agent-card:hover { border-color: var(--muted); }
.agent-card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.agent-card .name { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.agent-card .cat { color: var(--muted); font-size: 0.85rem; }
.status { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.status.on { background: var(--lime); }
.agent-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.agent-card dt { color: var(--muted); font-size: 0.78rem; }
.agent-card dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.score-bar { height: 4px; background: var(--surface-2); border-radius: 4px; margin-top: 14px; overflow: hidden; }
.score-bar span { display: block; height: 100%; background: var(--violet); }

/* ---------- token ---------- */
.burn-hero { text-align: center; padding: 96px 0 72px; }
.burn-count { font-family: var(--font-head); font-weight: 600; font-size: clamp(3rem, 10vw, 7.5rem); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.burn-hero p { margin-top: 16px; }
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: 32px; }
.role { background: var(--bg); padding: 32px; }
.role .who { color: var(--muted); font-size: 0.88rem; margin-bottom: 4px; }
.role p { color: var(--muted); margin: 0; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.tier { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px; }
.tier.active { border-color: var(--lime); }
.tier .min { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 32px; }
.flow-node { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; text-align: center; }
.flow-node strong { display: block; font-family: var(--font-head); }
.flow-node span { color: var(--muted); font-size: 0.88rem; }
.flow-node.burn { border-color: var(--lime); color: var(--lime); }
.flow-arrow { color: var(--muted); font-size: 1.4rem; }
.note { border-left: 3px solid var(--violet); padding: 12px 16px; background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); }

/* ---------- docs ---------- */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
.docs-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.93rem; }
.docs-nav a:hover { color: var(--text); background: var(--surface); }
.docs-body, .builder > *, .hero-grid > * { min-width: 0; }
.docs-body section { padding-bottom: 48px; scroll-margin-top: 96px; }
.docs-body p, .docs-body li { color: #c9cdd3; max-width: 68ch; }
.code { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.code pre { margin: 0; padding: 20px; overflow-x: auto; font: 0.88rem/1.7 var(--font-data); }
.code .copy { position: absolute; top: 10px; right: 10px; }
.tok-k { color: var(--violet); } .tok-s { color: var(--lime); } .tok-c { color: var(--muted); }
details.faq { border-top: 1px solid var(--line); }
details.faq:last-of-type { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { padding-bottom: 18px; margin: 0; color: var(--muted); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); width: min(560px, 100%); max-height: 88vh; overflow-y: auto; padding: 28px; position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.receipt-id { font-family: var(--font-data); color: var(--muted); font-size: 0.85rem; }
.receipt-stamp { display: inline-block; transform: rotate(-4deg); border: 2px dashed var(--muted); color: var(--muted); padding: 4px 12px; font-weight: 700; letter-spacing: 0.08em; border-radius: 6px; font-size: 0.8rem; }
.split { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin: 8px 0 6px; }
.split span:nth-child(1) { background: var(--violet); }
.split span:nth-child(2) { background: var(--muted); }
.split span:nth-child(3) { background: var(--lime); }
.split-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.82rem; color: var(--muted); }
.split-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.quote { border-left: 3px solid var(--line); padding: 4px 0 4px 14px; margin: 12px 0; color: #c9cdd3; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; color: var(--muted); font-size: 0.9rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.disclaimer { margin-top: 24px; font-size: 0.82rem; max-width: 70ch; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .builder, .docs-layout { grid-template-columns: 1fr; }
  .sticky, .docs-nav { position: static; }
  .docs-nav { flex-direction: row; flex-wrap: wrap; }
  .pricing { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .wrap { padding: 0 16px; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .nav.open { display: flex; }
  .site-header .header-cta { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .steps, .trust, .doors, .roles, .tiers { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 24px 0; border-left: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  /* feed table becomes stacked cards */
  table.feed thead { display: none; }
  table.feed, .feed tbody, .feed tr, .feed td { display: block; width: 100%; }
  .feed tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .feed td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; }
  .feed td::before { content: attr(data-label); color: var(--muted); font-size: 0.82rem; }
  .feed .num { text-align: right; }
  .door, .plan, .role, .panel { padding: 24px; }
}
