/* Two sides of one page.
 *
 * The page is read top to bottom without switching anything:
 *   the user's side       the opening (css/light.css), how it works, what you see — liquid glass on the
 *                         page's own canvas;
 *   the developer's side  one slab (.side-dev) with its own, deeper surface. It does not repeat the
 *                         user's layout: a statement on the left — your users pay for AI from their
 *                         own wallet, you spend nothing on models — and on the right a live list of
 *                         who is paying, ending in "Paid by you $0.000000". Then the film and the SDK.
 *   shared                FAQ, contact, sign-up.
 * The top bar says which side you are reading (html.on-dev, set by js/sides.js) and its button
 * follows: "Sign up free" on the user's side, "Create your app" on the developer's. */
:root {
  --dev-bg: color-mix(in srgb, var(--page) 88%, #222d3a);
  --dev-line: color-mix(in srgb, var(--ink) 9%, transparent);
  --dev-node: color-mix(in srgb, var(--surface) 86%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --dev-bg: #0b0d0f;
    --dev-line: rgb(255 255 255 / 5.5%);
    --dev-node: rgb(27 31 35 / 92%);
  }
}

/* ── Which side: marks ───────────────────────────────────────────────────── */
.side-now > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--link);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.side-now svg,
.side-seam svg {
  flex: none;
  width: 14px;
  height: 14px;
}
/* In the top bar: the mark shows only on the developer side; the page is for users by default
 * and says nothing about that. */
.side-now {
  display: none;
}
@media (min-width: 900px) {
  .side-now {
    display: inline-grid;
    margin-left: 10px;
    overflow: hidden;
    border-radius: 999px;
  }
  .side-now > span {
    grid-area: 1 / 1;
    justify-self: start;
    transition:
      opacity 0.3s,
      translate 0.35s var(--motion-ease);
  }
  html:not(.on-dev) .side-now > [data-side="dev"] {
    opacity: 0;
    translate: 0 100%;
  }
}
.topbar .btn [data-side="dev"] {
  display: none;
}
@media (min-width: 721px) {
  html.on-dev .topbar .btn [data-side="you"] {
    display: none;
  }
  html.on-dev .topbar .btn [data-side="dev"] {
    display: inline;
  }
}
/* The opening points developers to their side. */
.hub-jump {
  display: none; /* wider screens: the top bar has this link */
  color: var(--link);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent);
  text-underline-offset: 3px;
}
.hub-jump:hover {
  text-decoration-color: currentColor;
}
@media (max-width: 720px) {
  .hub-jump {
    display: inline;
    flex: 0 0 100%;
    margin: 0 0 4px;
    padding: 8px 0;
  }
}

/* ── The developer's side: one slab ──────────────────────────────────────── */
.side-dev {
  position: relative;
  z-index: 1;
  isolation: isolate;
  margin-top: clamp(64px, 10vw, 132px);
  padding-bottom: clamp(36px, 6vw, 84px);
  border-block: 1px solid var(--glass-line);
  border-radius: clamp(26px, 4vw, 52px);
  background-color: var(--dev-bg);
  /* a quiet dotted field that fades out, and a wash of blue light behind the list */
  background-image:
    radial-gradient(
      ellipse 46% 420px at 74% 300px,
      color-mix(in srgb, var(--accent) 13%, transparent),
      transparent
    ),
    radial-gradient(circle, var(--dev-line) 1px, transparent 1.5px);
  background-position:
    0 0,
    50% 0;
  background-size:
    100% 100%,
    26px 26px;
}
/* The mark sits on the seam, half on each side. */
.side-seam {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 8px 22px -10px rgb(0 0 0 / 60%);
  color: var(--on-accent);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  translate: -50% -50%;
}
.mono-eyebrow,
.side-dev .eyebrow {
  color: var(--link);
  font-family: var(--mono);
  letter-spacing: 0;
  text-transform: none;
}
.side-dev .film {
  padding-top: clamp(40px, 6vw, 84px);
}

/* ── The developer's opening: who pays ───────────────────────────────────── */
.dev-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(24px, 4.4vw, 72px);
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(52px, 9vh, 120px) 0 clamp(8px, 2vh, 28px);
  scroll-margin-top: 62px;
}
.dev-copy2 {
  display: grid;
  justify-items: start;
  gap: clamp(12px, 2.2vh, 22px);
  min-width: 0;
}
.dev-h {
  display: grid;
  gap: 0.12em;
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, min(0.9rem + 2.5vw, 7vh), 3.3rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.dev-h .h-accent {
  color: var(--link);
}
.dev-lede2 {
  max-width: 26em;
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(1rem, 0.86rem + 0.5vw, 1.25rem);
  line-height: 1.5;
  text-wrap: balance;
}
.dev-cta2 {
  margin-top: clamp(2px, 1vh, 10px);
}
/* Beta disclosure: where users' credit comes from, and that it cannot be refilled yet. */
.dev-note {
  max-width: 36em;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

/* The list: requests arrive, each paid from that user's own wallet. */
.feed {
  display: grid;
  gap: clamp(8px, 1.4vh, 14px);
  min-width: 0;
  padding: clamp(14px, 2.2vh, 22px) clamp(14px, 1.8vw, 22px) clamp(14px, 1.8vw, 22px);
  border-radius: var(--radius-panel, 28px);
}
.feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  margin: 0;
}
.feed-title {
  margin-right: auto;
  color: var(--ink);
  font-size: clamp(15px, 0.84rem + 0.3vw, 17.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.feed-head .sim-flag {
  margin: 0;
}
.feed-toggle {
  min-height: 32px;
  padding: 4px 10px 4px 6px;
  color: var(--muted-strong);
  font-size: 12.5px;
}
.feed-toggle[hidden] {
  display: none;
}
.feed-view {
  display: grid;
  gap: clamp(8px, 1.4vh, 14px);
}
.feed-list {
  --row: clamp(44px, 7.6vh, 56px);
  position: relative;
  display: grid;
  grid-auto-rows: var(--row);
  gap: 6px;
  height: calc(var(--row) * 4 + 18px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}
.feed-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0 14px 0 9px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}
.feed-row.is-new {
  animation: feed-in 0.55s var(--motion-ease) backwards;
}
@keyframes feed-in {
  from {
    opacity: 0;
    background: color-mix(in srgb, var(--accent) 34%, transparent);
    transform: translateY(-70%);
  }
  55% {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
  }
}
.feed-ava {
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(28px, 4.8vh, 34px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--link);
  font-size: 13.5px;
  font-weight: 600;
}
.feed-ava.tone-2,
.feed-ava.tone-5 {
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  color: var(--ink);
}
.feed-ava.tone-3,
.feed-ava.tone-6 {
  background: color-mix(in srgb, var(--warning) 22%, transparent);
  color: var(--warning);
}
.feed-who {
  display: grid;
  gap: 1px;
  min-width: 0;
  margin-right: auto;
}
.feed-who b {
  overflow: hidden;
  font-size: clamp(14px, 0.8rem + 0.2vw, 15.5px);
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-who small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.feed-tick {
  width: 12px;
  height: 12px;
}
.feed-amt {
  font-size: clamp(14px, 0.8rem + 0.3vw, 16.5px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
/* The two totals: what users' wallets have paid, and what you have. */
.feed-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 8px;
}
.feed-total {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: clamp(9px, 1.6vh, 14px) 14px;
  border: 1px solid var(--glass-line);
  border-radius: 18px;
}
.feed-total span {
  color: var(--muted-strong);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}
.feed-total b {
  color: var(--ink);
  font-size: clamp(1.05rem, 0.8rem + 0.8vw, 1.5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}
.feed-total.is-you {
  border-color: transparent;
  background: var(--accent);
}
.feed-total.is-you span {
  color: var(--on-accent);
}
.feed-total small {
  color: var(--on-accent);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}
.feed-total.is-you b {
  color: var(--on-accent);
  font-size: clamp(1.4rem, 0.9rem + 1.6vw, 2.2rem);
  font-weight: 600;
}

@media (max-width: 860px) {
  .dev-hero {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
  .dev-copy2 {
    justify-items: center;
  }
  .feed {
    width: min(100%, 520px);
    text-align: left;
  }
}
@media (pointer: coarse) {
  .feed-toggle {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .side-now > span {
    transition: none;
  }
  .feed-row.is-new {
    animation: none;
  }
}
