/* ARRScale API site: the same tokens and clean look as the agent-web landing (Inter, pill buttons, lime glow, window cards). */
:root {
  --bg: #FBFCF7; --ink: #151714; --gray: #6F746F; --faint: #A7ACA6; --line: #E5E8E3; --card: #FFFFFF; --soft: #F3F5EF;
  --lime: #C0F90F; --lime-ring: #8FD11F; --focus: #A4CF2A; --green: #4F6E1A; --danger: #C2362B; --warn: #8A6200;
  --code-bg: #F3F5EF; --code-ink: #151714; --code-key: #4F6E1A; --code-str: #151714; --code-num: #A0522D;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121312; --ink: #ECECEC; --gray: #A3A3A3; --faint: #6E6E6E; --line: #2A2C2A; --card: #1B1C1B; --soft: #222422;
    --green: #B8EE3A; --danger: #FF8A80; --warn: #F2C14E; --code-bg: #171817; --code-ink: #E6E8E3; --code-key: #C0F90F; --code-str: #E6E8E3; --code-num: #FFB86B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121312; --ink: #ECECEC; --gray: #A3A3A3; --faint: #6E6E6E; --line: #2A2C2A; --card: #1B1C1B; --soft: #222422;
  --green: #B8EE3A; --danger: #FF8A80; --warn: #F2C14E; --code-bg: #171817; --code-ink: #E6E8E3; --code-key: #C0F90F; --code-str: #E6E8E3; --code-num: #FFB86B;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
/* clip, not hidden: hidden would make body a scroll container and break the console's sticky sidebar */
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, system-ui, -apple-system, sans-serif; overflow-x: clip; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; letter-spacing: -.04em; line-height: 1.08; font-weight: 700; }
code, pre { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Header */
.top { max-width: 1120px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 18px; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { filter: invert(1); } }
:root[data-theme="dark"] .brand img { filter: invert(1); }
.nav { display: flex; gap: 22px; font-size: 14px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--gray); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.spacer { flex: 1; }
.who { color: var(--gray); font-size: 13px; }
/* One-click sign-in (signin.js): what signing in agrees to, beside the buttons that open Google's popup. Under the
   header it hangs below the buttons (absolute, so nothing moves) and only appears once the popup can open. */
.top { position: relative; }
.signin-note { margin: 12px auto 0; max-width: 460px; color: var(--faint); font-size: 12px; line-height: 1.45; text-align: center; }
.signin-note a { color: inherit; }
.top-note { position: absolute; right: 24px; top: calc(100% - 12px); z-index: 2; max-width: 300px; margin: 0; text-align: right; animation: fade .3s ease; }
a[data-signin][aria-busy="true"] { opacity: .7; cursor: progress; }
@media (max-width: 640px) { .top-note { right: 16px; max-width: 250px; font-size: 11px; } }

/* Pills */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background .15s, transform .15s; }
.btn:hover { background: var(--soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .9; }
.btn.lime { background: var(--lime); color: #151714; border-color: var(--lime); }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Hero */
.hero { position: relative; max-width: 960px; margin: 0 auto; padding: 56px 24px 0; text-align: center; }
.hero::before { content: ''; position: absolute; left: 50%; top: -140px; width: max(1400px, 140vw); height: min(1000px, 110vh); transform: translateX(-50%);
  background: radial-gradient(ellipse 46% 52% at 50% 30%, color-mix(in srgb, var(--lime) 50%, transparent) 0%, color-mix(in srgb, var(--lime) 28%, transparent) 30%,
    color-mix(in srgb, var(--lime) 10%, transparent) 58%, transparent 84%);
  pointer-events: none; z-index: -1; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); letter-spacing: -.045em; line-height: 1.02; }
.mark { display: inline-block; position: relative; }
.mark::after { content: ''; position: absolute; left: 2%; right: 2%; bottom: .06em; height: .16em; border-radius: 99px; background: var(--lime); z-index: -1; }
.hero p { max-width: 620px; margin: 18px auto 0; color: var(--gray); font-size: 18px; }
.hero .row { justify-content: center; margin-top: 28px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Sections and windows */
.section { max-width: 1040px; margin: 0 auto; padding: 72px 24px 0; }
.section > h2 { font-size: clamp(30px, 4vw, 40px); }
.lead { color: var(--gray); margin: 10px 0 0; max-width: 620px; }
.window { border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 30px 80px -30px rgba(21,23,20,.22); overflow: hidden; }
.bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--gray); font-size: 13px; }
.bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.bar span { margin-left: 8px; }
.bar .spacer + span { margin-left: 0; }

.compare { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.compare video { width: 100%; aspect-ratio: 9 / 8; object-fit: contain; background: #111; }
.compare-side { padding: 24px; display: grid; gap: 12px; align-content: center; border-left: 1px solid var(--line); }
.price { padding: 14px 16px; border-radius: 16px; background: var(--soft); }
.price.ours { background: color-mix(in srgb, var(--lime) 22%, var(--card)); border: 1px solid color-mix(in srgb, var(--lime) 70%, transparent); }
.price .label { font-size: 13px; color: var(--gray); font-weight: 500; }
.price .amount { font-size: 36px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price .sub { font-size: 13px; color: var(--gray); }
.muted { color: var(--gray); font-size: 13px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 22px; min-width: 0; }
.card h3 { font-size: 18px; letter-spacing: -.02em; }
.card p { color: var(--gray); margin: 8px 0 0; font-size: 15px; }

table.prices { width: 100%; border-collapse: collapse; }
table.prices th, table.prices td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
table.prices th { font-size: 13px; color: var(--gray); font-weight: 500; }
table.prices tr:last-child td { border-bottom: 0; }
table.prices td.ours { font-weight: 700; }

/* Code */
pre.code { margin: 0; padding: 18px 20px; background: var(--code-bg); color: var(--code-ink); overflow-x: auto; font-size: 13px; line-height: 1.65; border-radius: 14px; }
.window pre.code { border-radius: 0; }
.copy-wrap { position: relative; }
.copy-wrap .copy { position: absolute; top: 10px; right: 10px; height: 28px; padding: 0 10px; font-size: 12px; }
.prompt-box { white-space: pre-wrap; word-break: break-word; }

/* API simulator */
.sim { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 420px; }
.sim-side { padding: 14px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.sim-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.sim-tabs button { flex: 1; appearance: none; height: 32px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--gray); font-size: 13px; font-weight: 500; cursor: pointer; }
.sim-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sim-step { appearance: none; text-align: left; border: 0; background: transparent; color: var(--gray); padding: 8px 10px; border-radius: 10px; font-size: 14px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.sim-step span { font: 500 11px 'JetBrains Mono', Menlo, monospace; color: var(--faint); }
.sim-step:hover { background: var(--soft); color: var(--ink); }
.sim-step.done { color: var(--ink); }
.sim-step.on { background: var(--soft); color: var(--ink); font-weight: 600; }
.sim-step.on span { color: var(--green); }
.sim-play { margin-top: auto; }
.sim-main { padding: 18px 20px; min-width: 0; display: grid; gap: 10px; align-content: start; }
.sim-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.sim-req, .sim-res { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--code-bg); color: var(--code-ink); font: 13px/1.6 'JetBrains Mono', Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.sim-res .k { color: var(--code-key); } .sim-res .s { color: var(--code-str); } .sim-res .n { color: var(--code-num); }
.sim-code { display: inline-block; font: 600 12px 'JetBrains Mono', Menlo, monospace; padding: 2px 8px; border-radius: 99px; margin-left: 6px; }
.sim-code.ok { background: color-mix(in srgb, var(--lime) 35%, transparent); color: var(--ink); }
.sim-code.bad { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }

/* Bots (from the agent-web landing): the wheel, the picked bot's name and glow, and its chat demo */
@property --bot { syntax: '<color>'; inherits: true; initial-value: #FF7D5C; }
:root { --bot: #FF7D5C; --bot-ring: #F2603D; transition: --bot .4s ease-out; }
.bots-hero { position: relative; max-width: 960px; margin: 0 auto; padding: 20px 24px 0; text-align: center; }
.bots-hero::before { content: ''; position: absolute; left: 50%; top: -140px; width: max(1400px, 140vw); height: min(1100px, 115vh); transform: translateX(-50%);
  background: radial-gradient(ellipse 46% 52% at 50% 30%, color-mix(in srgb, var(--bot) 58%, transparent) 0%, color-mix(in srgb, var(--bot) 34%, transparent) 28%,
    color-mix(in srgb, var(--bot) 14%, transparent) 56%, transparent 84%);
  pointer-events: none; z-index: -1; }
.bots-hero h1 { margin: 6px 0 0; font-size: clamp(40px, 7vw, 72px); line-height: 1.02; letter-spacing: -.045em; }
.bots-hero h1 .name { display: inline-block; position: relative; transition: opacity .25s ease, transform .25s ease; }
.bots-hero h1 .name::after { content: ''; position: absolute; left: 2%; right: 2%; bottom: .06em; height: .16em; border-radius: 99px; background: var(--bot); z-index: -1; transition: background .4s ease; }
.bots-hero h1 .name.out { opacity: 0; transform: translateY(8px); }
.bots-hero > p { color: var(--gray); font-size: 18px; margin: 14px auto 0; max-width: 560px; }
.wheel { position: relative; width: min(900px, 100%); height: 320px; margin: -10px auto -20px; touch-action: pan-y; }
.track { position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.pick { position: absolute; left: 50%; top: 50%; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0;
  transform: translate(-50%, -50%) translateX(var(--x, 0px)) scale(var(--s, 1)); opacity: var(--o, 1); transition: transform .7s cubic-bezier(.16,1,.3,1), opacity .5s ease; }
.pick.jump { transition: none; }
.pick:not([aria-selected="true"]):hover { opacity: .8; }
.pick bot-buddy { --buddy-bg: transparent; }
.demo { max-width: 920px; margin: 48px auto 0; padding: 0 24px; }
.chat { height: 460px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.msg { max-width: 78%; animation: rise .35s cubic-bezier(.16,1,.3,1) both; }
.msg.me { align-self: flex-end; padding: 10px 14px; border-radius: 18px 18px 6px 18px; background: var(--soft); font-size: 15px; word-break: break-word; }
.msg.bot { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; max-width: 92%; }
.msg.bot .say { padding-top: 5px; font-size: 15px; min-height: 1.5em; }
.msg.bot .say:empty::after { content: '…'; color: var(--faint); }
.msg .bcard { grid-column: 2; margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); animation: rise .4s .05s cubic-bezier(.16,1,.3,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.bpill { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; background: var(--card); }
.bpill.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.vids { display: flex; gap: 8px; }
.vid { position: relative; flex: none; width: 112px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--soft); animation: rise .4s cubic-bezier(.16,1,.3,1) both; }
.vid:nth-child(2) { animation-delay: .1s; } .vid:nth-child(3) { animation-delay: .2s; }
.vid.wide { width: 150px; aspect-ratio: 3 / 4; }
.vid video { display: block; width: 100%; height: 100%; object-fit: contain; background: #111; }
.vid span { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 6px; background: rgba(17,17,17,.62); color: #fff; font-size: 11px; font-weight: 600; }
.src { color: var(--gray); font-size: 13px; text-decoration: none; }
.src:hover { color: var(--ink); text-decoration: underline; }
.thumb { width: 36px; aspect-ratio: 9 / 16; border-radius: 6px; object-fit: cover; display: block; }
.slots { display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--soft); font-size: 14px; animation: rise .4s cubic-bezier(.16,1,.3,1) both; }
.slot:nth-child(2) { animation-delay: .1s; } .slot:nth-child(3) { animation-delay: .2s; }
.slot b { font-variant-numeric: tabular-nums; }
.plat { display: inline-flex; gap: 4px; }
.plat svg { width: 18px; height: 18px; }
.handoff { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.handoff .arrow { color: var(--faint); }
.composer { margin: 0 16px 16px; height: 50px; border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: center; padding: 0 16px; color: var(--faint); font-size: 15px; }
.api-intro { text-align: center; }
.api-intro .lead { margin: 12px auto 0; }
.api-intro .row { justify-content: center; margin-top: 22px; }
.api-intro .mark::after { background: var(--lime); }
@media (max-width: 640px) {
  .bots-hero { padding: 12px 16px 0; }
  .wheel { height: 220px; margin: -6px auto -14px; }
  .demo { margin-top: 36px; padding: 0 16px; }
  .chat { height: 480px; padding: 16px; }
  .msg { max-width: 92%; }
  .msg.bot { max-width: 100%; }
  .vid { width: calc((100% - 16px) / 3); }
  .vid.wide { width: 60%; }
}

/* Console app: shadcn's inset sidebar (sidebar on the page background, content in a rounded card) with the bot app's Bud */
:root { --side: #F7F8F5; --inset: #FFFFFF; --accent-bg: rgba(21, 23, 20, .06); --hover: rgba(21, 23, 20, .05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --side: #171817; --inset: #0E0F0E; --accent-bg: rgba(255, 255, 255, .08); --hover: rgba(255, 255, 255, .06); } }
:root[data-theme="dark"] { --side: #171817; --inset: #0E0F0E; --accent-bg: rgba(255, 255, 255, .08); --hover: rgba(255, 255, 255, .06); }
body:has(.app) { background: var(--side); }
.app { display: grid; grid-template-columns: 288px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.side-head { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 8px; border-radius: 6px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; text-decoration: none; }
.side-head img { width: 22px; height: 22px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side-head img { filter: invert(1); } }
:root[data-theme="dark"] .side-head img { filter: invert(1); }
.icon-btn svg { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line); background: var(--inset); color: var(--ink); text-decoration: none; cursor: pointer; }
.icon-btn:hover { background: var(--accent-bg); }
.side nav { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 2px; padding: 0 8px; }
.side .sec { display: flex; align-items: center; height: 32px; padding: 0 8px; margin-top: 8px; font-size: 12px; font-weight: 500; color: color-mix(in srgb, var(--ink) 60%, transparent); }
.item { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 0; background: none; border-radius: 6px; text-align: left;
  font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer; }
.item:hover { background: var(--accent-bg); }
.item.on { background: var(--accent-bg); font-weight: 500; }
.item svg { width: 16px; height: 16px; flex: none; }
.item .right { margin-left: auto; font-size: 12px; color: var(--gray); font-variant-numeric: tabular-nums; font-weight: 500; }
.side .secondary { flex: none; display: grid; gap: 2px; padding: 0 8px; }
.bud-card { margin: 0 8px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--lime) 14%, var(--inset)); border: 1px solid color-mix(in srgb, var(--lime) 50%, transparent);
  display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.bud-card .btn { grid-column: 1 / -1; width: 100%; height: 32px; border-radius: 6px; }
.bud-card b { display: block; font-size: 13px; font-weight: 600; }
.bud-card span { color: var(--gray); }
.user-row { position: relative; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 8px; margin: 0 8px; border-radius: 6px; cursor: pointer; }
.user-row:hover { background: var(--accent-bg); }
.user-row .avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-bg); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; overflow: hidden; }
.user-row .avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-row .who-txt { flex: 1; min-width: 0; line-height: 1.25; }
.user-row .who-txt b { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .who-txt span { display: block; font-size: 12px; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row svg { width: 16px; height: 16px; color: var(--gray); }
.user-menu { position: absolute; left: 8px; right: 8px; bottom: 54px; z-index: 30; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); box-shadow: 0 10px 30px -10px rgba(0,0,0,.3); }
.user-menu button, .user-menu a { display: flex; width: 100%; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-size: 14px; text-decoration: none; cursor: pointer; }
.user-menu button:hover, .user-menu a:hover { background: var(--accent-bg); }
.inset { margin: 8px 8px 8px 0; min-height: calc(100vh - 16px); display: flex; flex-direction: column; min-width: 0; background: var(--inset); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.site-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--inset) 92%, transparent); backdrop-filter: blur(8px); border-radius: 12px 12px 0 0; }
.site-header h1 { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.site-header .sep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }
.site-header .spacer { flex: 1; }
.site-header .bal { height: 32px; padding: 0 12px; border-radius: 6px; font-size: 13px; }
.main { min-width: 0; padding: 24px; }
.main-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.main-head p { margin: 0; color: var(--gray); font-size: 14px; }
.main-head .spacer { flex: 1; }
.menu-btn { display: none; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
/* Four numbers (Analytics, Costs & margin): one row on a wide screen, two by two below it, never squeezed into one row */
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.stat { border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(to top, color-mix(in srgb, var(--ink) 3%, var(--inset)), var(--inset)); padding: 20px 24px; min-width: 0; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.stat .k { color: var(--gray); font-size: 14px; }
.stat .v { font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 4px; }
.stat .k + .v { order: 0; }
.stat .foot { display: flex; justify-content: space-between; gap: 8px; color: var(--gray); font-size: 13px; margin-top: 16px; }
.stat .foot a { color: var(--ink); }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--inset); padding: 16px; min-width: 0; }
.hero-balance { text-align: center; padding: 18px 0 26px; }
.hero-balance .k { color: var(--gray); font-size: 14px; }
.hero-balance .v { font-size: clamp(48px, 7vw, 72px); font-weight: 600; letter-spacing: -.05em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero-balance .v small { color: var(--faint); font-size: .62em; }
.hero-balance .row { justify-content: center; margin-top: 16px; }
.block { margin-top: 28px; }
.block > h2 { font-size: 14px; color: var(--gray); font-weight: 500; letter-spacing: 0; margin-bottom: 10px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { border: 1px solid var(--line); border-radius: 12px; background: var(--inset); padding: 18px; display: grid; gap: 8px; align-content: start; }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-bg); }
.step.done .n { background: var(--lime); color: #151714; }
.step h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--gray); font-size: 14px; }
.step .btn { justify-self: start; margin-top: 4px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 10px 4px 0; border-bottom: 1px solid var(--line); }
.bars .b { flex: 1; min-width: 4px; border-radius: 4px 4px 1px 1px; background: var(--accent-bg); position: relative; }
.bars .b.has { background: var(--lime); }
.bars .b:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px;
  padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); z-index: 3; }
.bar-days { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 6px; }
.search-box { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--inset); color: var(--faint); min-width: 220px; }
.search-box svg { width: 16px; height: 16px; }
.search-box input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 14px; color: var(--ink); }
.key-name b { display: block; font-weight: 500; }
.key-name span { color: var(--faint); font-size: 12px; }
.connect { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.connect .card { display: grid; gap: 10px; align-content: start; border-radius: 12px; }
.connect .card .btn { justify-self: start; }
.connect .card h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.logo-tile { width: 24px; height: 24px; object-fit: contain; flex: none; }
.plat-logo { width: 16px; height: 16px; object-fit: contain; flex: none; display: inline-block; vertical-align: -3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-mono { filter: invert(1); } }
:root[data-theme="dark"] .logo-mono { filter: invert(1); }
.plats { display: inline-flex; align-items: center; gap: 6px; }
.main .btn { border-radius: 6px; height: 32px; padding: 0 12px; font-size: 14px; }
.main .btn.lg { height: 40px; padding: 0 18px; }
.main .tag { border-radius: 6px; }
.main .card, .main .window { border-radius: 12px; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100vh; background: var(--side); border-right: 1px solid var(--line); transform: translateX(-105%); transition: transform .22s cubic-bezier(.16,1,.3,1); }
  .app.open .side { transform: none; }
  .menu-btn { display: inline-grid; }
  .inset { margin: 0; border-radius: 0; border: 0; min-height: 100vh; }
  .site-header { border-radius: 0; padding: 0 12px; }
  .main { padding: 16px; }
  .stats, .steps, .connect { grid-template-columns: 1fr; }
}

/* Playground: a chat with the bots, like the ARRScale app's chat window. The page fills the inset exactly: the turns
   scroll in a centred column and the composer (hook, photo, prompt, settings, send) stays at the bottom. */
.inset:has(> .main[data-page="playground"]) { height: calc(100dvh - 16px); min-height: 0; }
.main[data-page="playground"] { flex: 1; min-height: 0; padding: 0; display: flex; flex-direction: column; }
.pgc { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pgc-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 22px; padding: 28px 16px 16px; }
.pgc-log > * { width: 100%; max-width: 760px; margin-inline: auto; }
.pgm { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.pgm.me { justify-content: flex-end; }
.pgm bot-buddy { --buddy-bg: transparent; flex: none; }
.pgm .say { flex: 1; min-width: 0; display: grid; gap: 10px; justify-items: start; padding-top: 4px; }
.pgm .say p { margin: 0; }
.pgm .bubble { max-width: min(78%, 520px); display: grid; gap: 8px; padding: 10px 16px; border-radius: 20px; background: var(--soft); overflow-wrap: anywhere; }
.pgm .bubble p { margin: 0; white-space: pre-wrap; }
.pgm .bubble small { color: var(--gray); font-size: 12px; }
.pgm .media { display: flex; gap: 8px; flex-wrap: wrap; }
.pgm .media video { width: 120px; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 12px; background: #111; }
.pgm .media video.wide { width: 160px; aspect-ratio: 3 / 4; }
.pgc-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--gray); font-size: 13px; }
.pgc-note a { color: var(--ink); }
.pgc-example { font-size: 14px; }
.pgc-example summary { cursor: pointer; width: fit-content; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pgc-example video { width: min(100%, 440px); margin-top: 8px; border-radius: 14px; background: #111; }
.pgc-example small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; color: var(--gray); font-size: 12px; }
.pgc-shot { position: relative; width: min(220px, 64%); aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #111; }
.pgc-shot video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pgc-shot.wait { display: grid; place-items: center; align-content: center; gap: 8px; padding: 16px; background: var(--soft); color: var(--gray); font-size: 13px; text-align: center; }
.pgc-shot.wait b { color: var(--ink); font-size: 14px; }
.pgc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--gray); font-size: 13px; }
.pgc-dl { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 500; text-decoration: none; }
.pgc-dl svg { width: 15px; height: 15px; }
.pgc-dl:hover { text-decoration: underline; }
.pgc-fail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--gray); font-size: 14px; }
.pgc-sent { display: flex; gap: 6px; }
.pgc-sent video, .pgc-sent img { width: 64px; height: 88px; object-fit: cover; border-radius: 12px; background: #111; }
.pgc-log > .pgc-more { width: auto; height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--gray); font-size: 13px; cursor: pointer; }
.pgc-more:hover { color: var(--ink); }
/* Chat parts: who is talking, quick starts, typing dots, handoffs, hooks to pick, upload buttons, the confirmation */
.pgm-who { font-size: 14px; font-weight: 600; }
.pgc-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.pgc-suggest button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.pgc-suggest button:hover { border-color: var(--lime-ring); background: color-mix(in srgb, var(--lime) 8%, var(--card)); }
.pgc-dots { display: inline-flex; gap: 4px; padding: 6px 0; }
.pgc-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: pgc-dot 1.2s ease-in-out infinite; }
.pgc-dots i:nth-child(2) { animation-delay: .15s; } .pgc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pgc-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.pgc-handoff { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--gray); font-size: 13px; }
.pgc-handoff bot-buddy { --buddy-bg: transparent; }
.pgc-handoff b { color: var(--ink); }
.pgc-hooks { display: flex; gap: 10px; width: 100%; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pgc-hook { flex: none; width: 132px; margin: 0; display: grid; gap: 6px; }
.pgc-hook img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: #111; display: block; }
.pgc-hook figcaption { display: grid; font-size: 12px; line-height: 1.3; color: var(--gray); min-width: 0; }
.pgc-hook figcaption b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgc-use { height: 30px; border: 0; border-radius: 8px; background: var(--lime); color: #151714; font: 600 13px Inter, sans-serif; cursor: pointer; }
.pgc-use:disabled { background: var(--soft); color: var(--gray); cursor: default; }
.pgc-hook.on .pgc-use { background: var(--ink); color: var(--bg); }
.pgc-upload { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px dashed color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 14px;
  background: var(--soft); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
.pgc-upload:hover { border-color: var(--lime-ring); background: color-mix(in srgb, var(--lime) 8%, var(--soft)); }
.pgc-upload svg { width: 18px; height: 18px; flex: none; }
.pgc-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pgc-upload.done { border-style: solid; color: var(--gray); cursor: default; }
.pgc-card { width: min(100%, 380px); display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.pgc-card .pgc-set { padding: 0 2px; min-height: 40px; }
.pgc-field { display: grid; gap: 4px; font-size: 13px; color: var(--gray); }
.pgc-field input { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); font: inherit; font-size: 14px; outline: 0; }
.pgc-field input:focus { border-color: var(--lime-ring); }
.pgc-go { height: 44px; border: 0; border-radius: 12px; background: var(--lime); color: #151714; font: 650 15px Inter, sans-serif; cursor: pointer; box-shadow: 0 2px 0 var(--lime-ring); }
.pgc-go:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.pgc-go.busy { opacity: 1; background: linear-gradient(100deg, var(--lime) 30%, color-mix(in srgb, var(--lime) 55%, #fff) 50%, var(--lime) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.pgc-fine { color: var(--gray); font-size: 12px; }
.pgc-err { color: var(--danger); font-size: 14px; }
.pgc-link { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; cursor: pointer; }
.pgc-dock { flex: none; padding: 0 16px 10px; }
.pgc-dock > * { max-width: 760px; margin-inline: auto; }
.pgc-composer { position: relative; display: grid; gap: 10px; padding: 12px 12px 10px 16px; border: 1px solid var(--line); border-radius: 28px; background: var(--card);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .25); transition: border-color .15s, box-shadow .2s; }
.pgc-composer:focus-within { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.pgc-composer.over { border-color: var(--lime-ring); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 25%, transparent); }
.pgc-composer textarea { width: 100%; min-height: 26px; max-height: 200px; overflow-y: hidden; padding: 2px 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5; }
.pgc-composer textarea::placeholder { color: var(--faint); }
.pgc-atts { display: flex; flex-wrap: wrap; gap: 8px; }
.att { position: relative; display: flex; align-items: center; width: 56px; height: 64px; border-radius: 14px; overflow: hidden; background: #111; }
.att video, .att img { width: 100%; height: 100%; object-fit: cover; }
.att-meta { position: absolute; left: 3px; right: 3px; bottom: 3px; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 1px 3px; border-radius: 6px;
  background: rgba(17, 17, 17, .72); color: #fff; font-size: 10px; font-weight: 600; pointer-events: none; }
.att-meta img, .att-meta svg { width: 10px; height: 10px; }
.att-x { position: absolute; top: 3px; right: 3px; z-index: 2; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(17, 17, 17, .78); color: #fff; cursor: pointer; }
.att-x svg { width: 12px; height: 12px; }
.pgc-bar { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pgc-bar .grow { flex: 1; }
.pgc-icon, .pgc-chip { height: 36px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--ink); cursor: pointer; transition: background-color .15s, opacity .2s; }
.pgc-icon { width: 36px; padding: 0; display: grid; place-items: center; }
.pgc-icon svg { width: 18px; height: 18px; }
.pgc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.pgc-chip > svg { width: 16px; height: 16px; }
/* The buddy's body fills under half of its box, so the spare edges of the box overlap the padding. */
.pgc-chip bot-buddy { --buddy-bg: transparent; margin: -4px -4px -4px -8px; }
.pgc-opt bot-buddy { margin: -6px -2px -6px -6px; }
:is(.pgc-icon, .pgc-chip):not(:disabled):hover, :is(.pgc-icon, .pgc-chip)[aria-expanded="true"] { background: var(--hover); }
:is(.pgc-icon, .pgc-chip):disabled { opacity: .5; cursor: default; }
.pgc-send { flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: #151714; cursor: pointer;
  box-shadow: 0 2px 0 var(--lime-ring); transition: transform .2s var(--ease), box-shadow .2s, background-color .15s; }
.pgc-send svg { width: 18px; height: 18px; stroke-width: 2.2; }
.pgc-send:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--lime-ring); }
.pgc-send:disabled { background: var(--soft); color: var(--faint); box-shadow: none; cursor: not-allowed; }
.pgc-foot { margin: 8px auto 0; color: var(--gray); font-size: 12px; text-align: center; }
.pgc-foot a { color: var(--ink); }
/* flex, so each button sits on the row's centre line (an inline button lines up by its first child's baseline, and the
   bot chip's first child is the buddy, which has none) */
.pgc-pop-wrap { position: relative; display: flex; align-items: center; }
.pgc-pop { position: absolute; z-index: 20; left: 0; bottom: calc(100% + 10px); width: max-content; min-width: 240px; max-width: min(340px, calc(100vw - 48px)); display: grid; gap: 2px; padding: 6px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .4); }
.pgc-pop.wide { min-width: 300px; max-width: min(440px, calc(100vw - 48px)); gap: 4px; padding: 8px; }
.pgc-opt { position: relative; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink);
  font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.pgc-opt:hover, .pgc-opt[aria-pressed="true"] { background: var(--hover); }
.pgc-opt > svg { width: 18px; height: 18px; flex: none; }
.pgc-opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pgc-opt span { display: grid; line-height: 1.3; }
.pgc-opt small { color: var(--gray); font-size: 12px; }
.pgc-opt bot-buddy { --buddy-bg: transparent; flex: none; }
/* A row too narrow for its control (a phone) puts the control on a line of its own instead of running past the edge. */
.pgc-set { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 44px; padding: 4px 6px; font-size: 14px; }
label.pgc-set { cursor: pointer; }
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 99px; background: none; color: var(--gray); font-size: 13px; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--lime-ring); animation: spin .9s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  .inset:has(> .main[data-page="playground"]) { height: 100dvh; }
  /* The composer owns the bottom of the screen here, so alerts and their bell drop in under the header instead. */
  body:has(.main[data-page="playground"]) .alerts { top: 60px; bottom: auto; }
}
@media (max-width: 560px) {
  /* On a phone the menus open from the composer's left edge, full width, so none runs off the screen. */
  .pgc-log { padding: 18px 12px 12px; gap: 18px; }
  .pgc-dock { padding: 0 10px 8px; }
  .pgc-composer { padding: 10px 10px 8px 12px; border-radius: 24px; }
  .pgc-pop-wrap { position: static; }
  .pgc-pop, .pgc-pop.wide { left: 8px; right: 8px; width: auto; min-width: 0; max-width: none; }
  .pgc-chip.bot > span { display: none; }
  .pgc-chip.bot { padding: 0 6px; }
  .pgc-shot { width: min(210px, 70%); }
  .pgm .bubble { max-width: 86%; }
}
.sim-tabs button { white-space: nowrap; padding: 0 12px; }

/* Modals */
.modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(10, 12, 10, .45); backdrop-filter: blur(2px); animation: fade .15s ease; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .35); animation: rise .2s cubic-bezier(.16,1,.3,1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { font-size: 22px; letter-spacing: -.03em; }
.modal .x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--hover); color: var(--ink); cursor: pointer; font-size: 18px; line-height: 1; }
.modal-panel { border-radius: 18px; background: var(--soft); padding: 16px; margin-bottom: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.big-input { width: 100%; height: 56px; border: 0; outline: 0; background: transparent; font-size: 26px; font-weight: 600; letter-spacing: -.02em; text-align: center; color: var(--ink); }
.big-input::placeholder { color: var(--faint); font-weight: 500; }
/* Delete key: type its name to confirm; the name is a chip that fills the box when clicked */
.dk { display: grid; gap: 10px; }
.dk-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--gray); }
.dk-name { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 8px; border: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 6px;
  background: var(--card); color: var(--ink); font: 600 13px 'JetBrains Mono', ui-monospace, monospace; cursor: copy; transition: border-color .15s, background-color .15s; }
.dk-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-name svg { width: 13px; height: 13px; flex: none; color: var(--gray); }
.dk-name:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--card)); }
.dk-input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 500 15px 'JetBrains Mono', ui-monospace, monospace; outline: 0; }
.dk-input:focus { border-color: var(--danger); }
.dk-input::placeholder { color: var(--faint); }
.dk-id { font-size: 12px; color: var(--faint); }
.money-input { display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.money-input span { font-size: 26px; color: var(--faint); }
.money-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 26px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.presets button { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--gray); font-size: 14px; cursor: pointer; }
.presets button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ink); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--inset); }
.note { font-size: 13px; color: var(--gray); }
.note b { color: var(--ink); font-weight: 600; }
@keyframes fade { from { opacity: 0; } }

/* Footer */
footer { max-width: 1120px; margin: 0 auto; padding: 64px 24px 36px; color: var(--faint); font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Docs */
.docs { max-width: 1120px; margin: 0 auto; padding: 16px 24px 40px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px; }
.docs-nav { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: auto; font-size: 14px; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 10px; text-decoration: none; color: var(--gray); }
.docs-nav a:hover { background: var(--soft); color: var(--ink); }
.docs-nav a.on { background: var(--soft); color: var(--ink); font-weight: 600; }
.md { min-width: 0; max-width: 780px; }
.md h1 { font-size: 44px; letter-spacing: -.045em; margin-bottom: 12px; }
.md h2 { font-size: 28px; margin: 52px 0 12px; scroll-margin-top: 16px; }
.md h3 { font-size: 18px; letter-spacing: -.02em; margin: 26px 0 8px; }
.md p { margin: 10px 0; }
.md p, .md li { color: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.md ul, .md ol { padding-left: 22px; }
.md li { margin: 4px 0; }
.md code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: .88em; }
.md pre code { background: none; padding: 0; font-size: inherit; }
.md .copy-wrap { margin: 14px 0; }
.md table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.md th, .md td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.md tr:last-child td { border-bottom: 0; }
.md th { font-weight: 500; font-size: 13px; color: var(--gray); }
.md a { color: var(--ink); text-decoration-color: var(--lime-ring); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.md blockquote { margin: 14px 0; padding: 10px 16px; border-left: 3px solid var(--lime-ring); background: var(--soft); border-radius: 0 12px 12px 0; }
.md strong { font-weight: 650; }

/* Console */
.console { max-width: 1120px; margin: 0 auto; padding: 16px 24px 40px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 34px; letter-spacing: -.04em; }
.page-head p { margin: 4px 0 0; color: var(--gray); }
.panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 22px; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h2 { font-size: 18px; letter-spacing: -.02em; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.balance { font-size: 44px; font-weight: 700; letter-spacing: -.045em; line-height: 1; margin: 12px 0 16px; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { color: var(--gray); font-size: 12px; font-weight: 500; }
.tbl td.actions { text-align: right; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--soft); color: var(--gray); }
.tag.ok { background: color-mix(in srgb, var(--lime) 35%, transparent); color: var(--ink); }
.tag.bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.tag.run { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.empty { padding: 26px 8px; text-align: center; color: var(--gray); font-size: 14px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--gray); }
.field input { height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; color: var(--ink); background: var(--card); min-width: 190px; }
.field input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.secret-box { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--lime) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--lime) 60%, transparent); }
.secret-box code { display: block; word-break: break-all; font-size: 13px; margin: 8px 0; }
.signin-card { max-width: 420px; margin: 72px auto; text-align: center; }
.signin-card h1 { font-size: 34px; letter-spacing: -.04em; }
.signin-card p { color: var(--gray); }
.signin-card .btn { width: 100%; height: 48px; margin-top: 10px; }
/* Sign in with Google, per Google's branding guidelines (light theme, pill): white fill, #747775 1 px stroke, #1F1F1F
   Roboto Medium 14 px, the standard 18 px "G" 10 px before the text. Same look in light and dark mode. */
.btn.gsi { background: #fff; color: #1f1f1f; border: 1px solid #747775; gap: 10px; padding: 0 12px;
  font-family: Roboto, Arial, sans-serif; font-weight: 500; font-size: 14px; letter-spacing: .25px; }
.btn.gsi img { width: 18px; height: 18px; flex: none; }
.btn.gsi:hover { background: #f2f2f2; }
.btn.gsi:active { background: #e8e8e8; }
.btn.gsi:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }

/* Onboarding (first sign-in): Higgsfield's layout. A looping 9:16 video on the left, one question per screen on the
   right, lime progress dashes, cards with a radio mark, chips for the source, a consent card. */
/* overflow clip (not hidden): the glow may not add scrollbars, and the sticky video keeps working. */
.ob { display: grid; grid-template-columns: minmax(280px, 36%) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; background: var(--bg); overflow: hidden; overflow: clip; }
.ob-media { position: sticky; top: 10px; z-index: 0; height: calc(100dvh - 20px); margin: 10px; }
/* The ambient glow: a tiny canvas of the current frame, stretched past the frame and blurred, so the clip's colours
   spill onto the page around it. The frame's dark tint lets the glow show, dimmer, above and below landscape clips. */
/* The radial mask fades the light to nothing before the canvas edge, so it never ends in a straight line. */
.ob-glow { position: absolute; left: -22%; top: -14%; width: 144%; height: 128%; filter: blur(64px) saturate(1.7) brightness(.82); opacity: .85; pointer-events: none; transform: translateZ(0);
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent 100%); mask-image: radial-gradient(closest-side, #000 45%, transparent 100%); }
/* No visible frame (user 11/08: 「切角也要從模糊進去」): the video's four edges fade out into the glow behind it. */
.ob-frame { position: relative; z-index: 1; height: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  mask-composite: intersect; }
/* Clip changes: out in .14s (just inside OB_OUT, .16s in console.js, when the question has left), back in a little slower.
   When the layout flips between portrait-left and landscape-top, the glow fades with it so it doesn't jump. */
.ob-frame video { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: opacity .26s ease; }
.ob-frame video.wide { object-fit: contain; }
.ob-frame video.swap { opacity: 0; transition-duration: .14s; }
.ob-glow { transition: opacity .4s ease; }
.ob.flip .ob-glow { opacity: 0; transition-duration: .14s; }
/* First paint: the clip fades in, the panel rises in order (the console's page motion). */
.ob-media { animation: fade .5s ease both; }
.ob-top, .ob-body, .ob-hint { animation: rise .45s var(--ease) both; }
.ob-body { animation-delay: .05s; }
.ob-hint { animation-delay: .1s; }
.ob-panel { position: relative; z-index: 1; display: grid; grid-template-rows: auto 1fr auto; padding: 22px 24px 26px; min-width: 0; }
/* A landscape clip goes on top: 16:9, full width up to 860 px, the glow spreading wide to both sides, the questions
   below (four use-case cards in one row). A portrait clip keeps the left column. ("landscape", not "top": .top is the
   site header's class.) */
.ob.landscape { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.ob.landscape .ob-media { position: relative; top: 0; justify-self: center; width: min(calc(100% - 20px), 860px, calc(42dvh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; margin: 16px auto 0; }
.ob.landscape .ob-glow { left: -45%; top: -40%; width: 190%; height: 180%; }
.ob.landscape .ob-frame video { object-fit: cover; }
.ob.landscape .ob-panel { padding-top: 8px; grid-template-rows: auto auto auto; align-content: start; }
.ob.landscape .ob-top { width: min(920px, 100%); justify-self: center; }
.ob.landscape .ob-body { align-self: start; width: min(920px, 100%); padding: 20px 0 18px; gap: 18px; }
.ob.landscape .ob-body h1 { font-size: clamp(26px, 2.8vw, 36px); }
.ob.landscape .ob-cards:not(.two) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ob.landscape .ob-cards.two { width: min(640px, 100%); }
.ob.landscape .ob-card { min-height: 116px; }
.ob-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.ob-back { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; }
.ob-back svg { width: 18px; height: 18px; }
.ob .ob-back { transition: opacity .25s var(--ease), visibility .25s, background-color .15s, border-color .15s, transform .2s var(--ease); }
.ob .ob-back.off { opacity: 0; visibility: hidden; pointer-events: none; }
.ob-dots { display: flex; justify-content: center; gap: 6px; }
.ob-dots i { width: 16px; height: 4px; border-radius: 99px; background: var(--line); transition: width .25s ease, background .25s ease; }
.ob-dots i.done { background: var(--lime); }
.ob-dots i.on { width: 30px; background: var(--lime); }
.ob-body { align-self: center; justify-self: center; width: min(640px, 100%); display: grid; justify-items: center; gap: 28px; padding: 32px 0; }
.ob-body h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; letter-spacing: -.03em; line-height: 1.12; text-align: center; }
.ob-body h1 span { display: block; color: var(--gray); }
.ob-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.ob-card { position: relative; display: grid; align-content: end; gap: 4px; min-height: 132px; padding: 50px 18px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ob-card svg { position: absolute; top: 16px; left: 18px; width: 20px; height: 20px; color: var(--gray); }
.ob-radio { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--faint); }
.ob-card b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ob-card small { color: var(--gray); font-size: 13px; }
.ob-card:hover { border-color: var(--faint); }
.ob-card[aria-checked="true"] { border-color: var(--lime-ring); background: color-mix(in srgb, var(--lime) 8%, var(--card)); }
.ob-card[aria-checked="true"] svg { color: var(--ink); }
.ob-card[aria-checked="true"] .ob-radio { border-color: var(--lime); background: var(--lime); box-shadow: inset 0 0 0 4px var(--card); }
.ob-team { width: min(420px, 100%); display: grid; gap: 10px; }
.ob-team p { margin: 0; font-size: 13px; }
.ob-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 600px; }
.ob-chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--card);
  font-size: 14px; font-weight: 500; cursor: pointer; }
.ob-chip .plat-logo { width: 16px; height: 16px; }
.ob-chip:hover { border-color: var(--faint); }
.ob-chip[aria-pressed="true"] { border-color: var(--lime-ring); background: color-mix(in srgb, var(--lime) 10%, var(--card)); }
.ob-skip { background: none; border: 0; padding: 4px 8px; color: var(--gray); font-size: 14px; text-decoration: underline; cursor: pointer; }
.ob-consent { display: flex; align-items: flex-start; gap: 12px; width: min(480px, 100%); padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); font-size: 14px; line-height: 1.45; cursor: pointer; }
.ob-consent input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--lime-ring); }
.ob-go { min-width: 140px; height: 42px; }
.ob-go:disabled { opacity: .45; cursor: not-allowed; }
.ob-hint { margin: 0; color: var(--gray); font-size: 14px; text-align: center; }
@media (max-width: 860px) {
  .ob { grid-template-columns: 1fr; }
  .ob-media { position: relative; top: 0; height: 26vh; margin: 10px 10px 0; }
  .ob-panel { padding: 16px 16px 22px; }
  .ob-body { padding: 20px 0; gap: 20px; }
  .ob-cards, .ob.landscape .ob-cards:not(.two) { grid-template-columns: 1fr; }
  .ob-card, .ob.landscape .ob-card { min-height: 0; }
  .ob.landscape .ob-media { margin: 10px 10px 0; width: calc(100% - 20px); }
}

/* Get started with four steps (after onboarding), the sample swap, and the owner's Sign-ups block. */
.steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .steps.four { grid-template-columns: 1fr; } }
.sample-video { width: 100%; aspect-ratio: 9 / 8; object-fit: contain; border-radius: 14px; background: #0d0e0d; }
.su { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.su h3 { margin-bottom: 10px; color: var(--gray); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.su-row { display: grid; grid-template-columns: minmax(120px, 1.7fr) 1.3fr 28px; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.su-row i { height: 8px; border-radius: 99px; background: linear-gradient(var(--lime), var(--lime)) left / var(--w) 100% no-repeat, var(--soft); }
.su-row b { text-align: right; font-variant-numeric: tabular-nums; }
.su > p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 860px) { .su { grid-template-columns: 1fr; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; z-index: 50; }
.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; }

@media (max-width: 900px) {
  .compare { grid-template-columns: 1fr; }
  .compare-side { border-left: 0; border-top: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; gap: 12px; }
  .docs-nav { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 2px; }
  .panels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top { padding: 14px 16px; gap: 14px; }
  .nav { gap: 14px; }
  .nav .hide-sm, .top .hide-sm { display: none; }
  .hero { padding: 32px 16px 0; }
  .section { padding: 56px 16px 0; }
  .docs, .console { padding-left: 16px; padding-right: 16px; }
  .sim { grid-template-columns: 1fr; min-height: 0; }
  .sim-side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .sim-tabs { flex-basis: 100%; }
  .sim-step { padding: 6px 8px; font-size: 13px; }
  .sim-play { margin-top: 0; }
  .field input { min-width: 0; width: 100%; }
  .form-row .field { flex: 1 1 100%; }
  footer { padding: 48px 16px 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Motion: one easing, short durations, everything off with prefers-reduced-motion (rule above) ── */
:root { --ease: cubic-bezier(.16, 1, .3, 1); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes pulse { 50% { opacity: .35; } }
/* Page content rises in, in order */
.main > *, .md { animation: rise .45s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: .04s; } .main > *:nth-child(3) { animation-delay: .08s; }
.main > *:nth-child(4) { animation-delay: .12s; } .main > *:nth-child(5) { animation-delay: .16s; } .main > *:nth-child(6) { animation-delay: .2s; }
/* Cards in a grid follow one another */
:is(.stats, .steps, .connect, .cards, .gallery, .how) > * { animation: rise .5s var(--ease) both; }
:is(.stats, .steps, .connect, .cards, .gallery, .how) > :nth-child(2) { animation-delay: .05s; }
:is(.stats, .steps, .connect, .cards, .gallery, .how) > :nth-child(3) { animation-delay: .1s; }
:is(.stats, .steps, .connect, .cards, .gallery, .how) > :nth-child(4) { animation-delay: .15s; }
:is(.stats, .steps, .connect, .cards, .gallery, .how) > :nth-child(5) { animation-delay: .2s; }
:is(.stats, .steps, .connect, .cards, .gallery, .how) > :nth-child(n+6) { animation-delay: .25s; }
/* Bars grow from the baseline */
.bars .b { transform-origin: bottom; animation: grow .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
/* Controls answer the pointer */
:is(.item, .btn, .icon-btn, .presets button, .seg button, .sim-tabs button, .sim-step, .user-row, .x) {
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .2s, opacity .2s, transform .2s var(--ease); }
:is(.btn.primary, .btn.lime):hover { transform: translateY(-1px); }
.btn:active, .icon-btn:active { transform: translateY(1px) scale(.98); }
.tag.run::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: pulse 1.2s ease-in-out infinite; }
/* Overlays */
.toast { animation: toast-in .28s var(--ease); }
.user-menu { animation: pop .16s var(--ease); transform-origin: bottom left; }
/* Closing uses its own keyframes: re-running the opening ones "in reverse" keeps the same animation name, so browsers
   treat it as the finished opening and jump straight to the end (the backdrop used to vanish without fading). */
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-out { to { opacity: 0; transform: scale(.96); } }
.modal-back.closing { animation: fade-out .16s ease forwards; }
.modal-back.closing .modal { animation: pop-out .16s ease forwards; }
.user-menu.closing { animation: pop-out .12s ease forwards; pointer-events: none; }
.alerts-history:not([hidden]) { animation: pop .18s var(--ease); transform-origin: bottom right; }
.alerts-history.closing { animation: pop-out .14s ease forwards; }
.alerts-bell:not([hidden]) { animation: pop .25s var(--ease); }
.signin-card { animation: rise .5s var(--ease) both; }
.signin-legal { animation: rise .5s .08s var(--ease) both; }
.app { animation: fade .3s ease; }
/* Moving between console pages: the old page stays until the next one is ready, and dims only if that takes over
   150 ms; a thin lime bar under the header shows the wait. "Loading…" itself only shows after 400 ms. */
.main.leaving { opacity: .45; pointer-events: none; transition: opacity .2s ease .15s; }
.main > .loading { animation: fade .3s .4s both; }
.site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }
.app.loading .site-header::after { animation: loadbar 1.6s .15s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes loadbar { from { transform: scaleX(0); opacity: 1; } to { transform: scaleX(.9); opacity: 1; } }
.secret-box { animation: pop .3s var(--ease); }
/* Landing: sections reveal as they scroll in */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero h1, .bots-hero h1 { animation: rise .7s var(--ease) both; }
.hero p, .bots-hero > p { animation: rise .7s .08s var(--ease) both; }
.hero .row { animation: rise .7s .16s var(--ease) both; }
/* Moving between the site's pages (landing, docs, setup, legal, console) crossfades instead of flashing white. Browsers
   without cross-document view transitions load the page as before; reduced motion turns it off. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
/* In-page links (the docs index, #pricing) glide instead of jumping. Not in the console (#root), whose page changes
   scroll to the top at once. */
@media (prefers-reduced-motion: no-preference) { html:not(:has(#root)) { scroll-behavior: smooth; } }
/* The console's first "Loading…" (while sign-in starts) only appears if that takes a moment. */
#root > p.muted:only-child { animation: fade .3s .5s both; }
.price { transition: transform .25s var(--ease); }
.price:hover { transform: translateY(-2px); }
.sim-req, .sim-res { animation: fade .25s ease; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
/* Live refreshes (polling) swap content without replaying the entrance motion */
.quiet > *, .quiet :is(.stats, .steps, .connect, .cards, .gallery, .how) > *, .quiet .bars .b { animation: none !important; }
/* Phone fixes from the screenshot review */
.brand { flex: none; }
.top .nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top .nav::-webkit-scrollbar { display: none; }
@media (max-width: 420px) { .top .nav { display: none; } }
.scrim { display: none; }
@media (max-width: 900px) {
  /* The drawer's backdrop fades in and out with the slide (it used to disappear at once on close). */
  .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(10, 12, 10, .4); opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s; }
  .app.open .scrim { opacity: 1; visibility: visible; }
  .site-header .bal { padding: 0 10px; font-size: 12px; }
}

/* Hook library: Higgsfield's gallery look (black stage, lime uppercase title in Space Grotesk, square tiles that move on hover,
   a publication view with the video in the middle and a panel on the right). Dark in both themes, like Higgsfield. */
.main.flush { padding: 0; }
.hk, .hk-view { --hk-bg: #050505; --hk-line: rgba(255, 255, 255, .1); --hk-text: #F2F2F2; --hk-dim: #9A9A9A; --hk-lime: #D1FE17; }
.hk { min-height: calc(100vh - 66px); padding: 32px 24px 40px; background: var(--hk-bg); color: var(--hk-text); border-radius: 0 0 11px 11px; }
.hk-hero { text-align: center; }
.hk-hero h2 { margin: 0; line-height: 0; }
.hk-logo { display: block; width: min(100%, 500px); height: auto; margin: 6px auto 0; overflow: visible;
  filter: drop-shadow(0 0 22px rgba(209, 254, 23, .3)) drop-shadow(0 3px 0 rgba(0, 0, 0, .6)); }
.hk-hero .hk-search { margin-inline: auto; text-align: left; }
/* No top bar on any console page: each page opens with its own content (balance and Add funds stay in the sidebar).
   On a phone only the menu button stays, floating top-left, because it is the one way to open the sidebar. */
.site-header { display: none; }
.main[data-page="hooks"] .hk { min-height: calc(100vh - 18px); border-radius: 11px; }
@media (max-width: 900px) {
  .site-header { display: flex; position: fixed; top: 0; left: 0; z-index: 40; width: auto; height: 56px; padding: 0 12px; border: 0; background: none; backdrop-filter: none; }
  .site-header > :not(.menu-btn) { display: none; }
  .main { padding-top: 60px; }
  .main[data-page="playground"] .pgc-log { padding-top: 60px; }
  .main[data-page="hooks"] .hk { min-height: 100vh; padding-top: 60px; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .hk-shine { display: none; } }
.hk-search { display: flex; align-items: center; gap: 10px; max-width: 560px; height: 44px; margin-top: 20px; padding: 0 8px 0 14px; border-radius: 999px; background: #161616; border: 1px solid var(--hk-line); }
.hk-search:focus-within { border-color: var(--hk-lime); }
.hk-search > svg { flex: none; width: 18px; height: 18px; color: var(--hk-dim); }
.hk-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--hk-text); font: 15px Inter, sans-serif; }
.hk-search input::placeholder { color: #6F6F6F; }
.hk-clear { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #222; color: #CCC; cursor: pointer; }
.hk-clear svg { width: 14px; height: 14px; }
.hk-tabs { display: flex; gap: 24px; margin: 28px 0 16px; border-bottom: 1px solid var(--hk-line); }
.hk-tabs button { margin-bottom: -1px; padding: 0 0 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--hk-dim); font: 500 14px Inter, sans-serif; cursor: pointer; }
.hk-tabs button[aria-pressed="true"] { color: var(--hk-text); border-color: var(--hk-text); }
.hk-tabs .n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 99px; background: var(--hk-lime); color: #111; font-size: 11px; font-weight: 700; }
.hk-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.hk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hk-scroll { display: flex; flex: 1; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.hk-scroll::-webkit-scrollbar { display: none; }
.hk-group { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #111; border: 1px solid var(--hk-line); }
.hk-pill { flex: none; height: 30px; padding: 0 12px; border: 1px solid var(--hk-line); border-radius: 999px; background: #151515; color: #D6D6D6; font: 500 13px Inter, sans-serif; white-space: nowrap; cursor: pointer; }
.hk-group .hk-pill { height: 28px; border-color: transparent; background: none; }
.hk-pill:hover { color: #FFF; border-color: rgba(255, 255, 255, .25); }
.hk-pill[aria-pressed="true"] { background: var(--hk-lime); border-color: var(--hk-lime); color: #111; }
.hk-select { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 14px; border-radius: 999px; background: #151515; border: 1px solid var(--hk-line); color: var(--hk-dim); font-size: 13px; }
.hk-select select { max-width: 200px; border: 0; outline: 0; background: none; color: var(--hk-text); font: 500 13px Inter, sans-serif; text-transform: capitalize; cursor: pointer; }
.hk-select option { background: #151515; color: #EEE; }
.hk-openings { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.hk-openings::-webkit-scrollbar { display: none; }
.hk-openings > span { flex: none; margin-right: 4px; color: var(--hk-dim); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.hk-op { flex: none; padding: 6px 10px; border: 1px dashed rgba(255, 255, 255, .2); border-radius: 8px; background: #0E0E0E; color: #E8E8E8; font: 13px Inter, sans-serif; white-space: nowrap; cursor: pointer; }
.hk-op em { margin-left: 6px; color: var(--hk-dim); font-size: 12px; font-style: normal; }
.hk-op:hover { border-color: var(--hk-lime); }
.hk-count { margin: 0 0 8px; color: var(--hk-dim); font-size: 12px; }
.hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.hk-card { position: relative; overflow: hidden; aspect-ratio: 9 / 16; background: #111; cursor: pointer; outline: none; }
.hk-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, #111 30%, #1D1D1D 50%, #111 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.hk-card.ready::before, .hk-card.nocover::before { display: none; }
.hk-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hk-cover { opacity: 0; transition: opacity .35s ease, transform .5s cubic-bezier(.16, 1, .3, 1); }
.hk-card.ready .hk-cover { opacity: 1; }
.hk-card:hover .hk-cover { transform: scale(1.03); }
.hk-anim { opacity: 0; transition: opacity .2s ease; }
.hk-card.playing .hk-anim[src] { opacity: 1; }
.hk-card:focus-visible { box-shadow: inset 0 0 0 2px var(--hk-lime); }
.hk-top { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); opacity: 0; transition: opacity .2s ease; }
.hk-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.hk-views { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 99px; background: rgba(0, 0, 0, .55); font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); }
.hk-views svg { width: 13px; height: 13px; }
.hk-bottom { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; gap: 6px; padding: 48px 10px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .86)); }
.hk-line { display: -webkit-box; margin: 0; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.35; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.hk-meta { display: flex; flex-wrap: wrap; gap: 6px; color: #CFCFCF; font-size: 11px; }
.hk-tag { padding: 1px 6px; border-radius: 4px; background: rgba(209, 254, 23, .16); color: var(--hk-lime); font-weight: 600; text-transform: capitalize; }
.hk-actions { display: flex; align-items: center; gap: 6px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .2s ease, opacity .2s ease; }
.hk-card:hover .hk-top, .hk-card:focus-within .hk-top, .hk-card.playing .hk-top { opacity: 1; }
.hk-card:hover .hk-actions, .hk-card:focus-within .hk-actions { max-height: 40px; opacity: 1; }
@media (hover: none) { .hk-top { opacity: 1; } .hk-actions { max-height: 40px; opacity: 1; } }
.hk-copy { flex: 1; height: 32px; border: 0; border-radius: 8px; background: var(--hk-lime); color: #111; font: 700 13px Inter, sans-serif; cursor: pointer; }
.hk-copy.busy, .hk-go.busy { background: linear-gradient(100deg, var(--hk-lime) 30%, #F0FFB8 50%, var(--hk-lime) 70%); background-size: 200% 100%; animation: shimmer 1s linear infinite; cursor: progress; }
.hk-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .14); color: #FFF; cursor: pointer; backdrop-filter: blur(6px); }
.hk-icon svg { width: 16px; height: 16px; }
.hk-icon:hover { background: rgba(255, 255, 255, .24); }
.hk-icon.on { background: var(--hk-lime); color: #111; }
.hk-more { display: block; height: 40px; margin: 18px auto 0; padding: 0 22px; border: 1px solid var(--hk-line); border-radius: 999px; background: #151515; color: #FFF; font: 600 14px Inter, sans-serif; cursor: pointer; }
.hk-more:disabled { opacity: .6; cursor: progress; }
.hk-empty { display: grid; justify-items: center; gap: 6px; padding: 72px 16px; color: var(--hk-dim); text-align: center; }
.hk-empty b { color: var(--hk-text); font-size: 16px; }
.hk-err { color: #FF8A7A; font-size: 13px; }
.hk-note { margin: 24px 0 0; color: #7A7A7A; font-size: 12px; line-height: 1.5; }
.hk-note a, .hk-link { padding: 0; border: 0; background: none; color: #BDBDBD; font: inherit; text-decoration: underline; cursor: pointer; }
.hk-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--hk-lime); color: #111; font: 700 14px Inter, sans-serif; cursor: pointer; }
.hk-go svg { width: 18px; height: 18px; }
.hk-go.small { height: 36px; margin-top: 8px; padding: 0 16px; }
.hk-go:disabled { cursor: progress; }
.hk-connect { position: relative; min-height: 520px; }
.hk-ghost { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; opacity: .55; }
.hk-ghost i { aspect-ratio: 9 / 16; background: linear-gradient(160deg, #181818, #0A0A0A); }
.hk-connect-card { position: absolute; z-index: 2; top: 48px; left: 50%; display: grid; gap: 12px; width: min(460px, calc(100% - 32px)); padding: 26px; transform: translateX(-50%); border: 1px solid var(--hk-line); border-radius: 16px; background: rgba(18, 18, 18, .92); backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.hk-connect-card b { font: 700 26px/1.1 'Space Grotesk', Inter, sans-serif; }
.hk-connect-card p { margin: 0; color: #BDBDBD; font-size: 14px; line-height: 1.5; }
.hk-connect-card .hk-go { justify-self: start; }
.hk-badge { justify-self: start; padding: 2px 8px; border: 1px solid var(--hk-line); border-radius: 99px; color: var(--hk-dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.hk-view { position: fixed; z-index: 80; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 16px; padding: 16px; overflow: hidden; background: #000; color: #F2F2F2; animation: fade .18s ease; }
.hk-view.closing { opacity: 0; transition: opacity .14s ease; }
.hk-view-bg { position: absolute; inset: -60px; background-position: center; background-size: cover; filter: blur(48px) brightness(.42); transform: scale(1.1); }
.hk-view-media { position: relative; display: grid; place-items: center; min-height: 0; pointer-events: none; }
.hk-view-media :is(iframe, video) { width: auto; max-width: 100%; height: min(100%, 860px); max-height: calc(100vh - 32px); aspect-ratio: 9 / 16; border: 0; border-radius: 12px; background: #000; object-fit: contain; box-shadow: 0 24px 64px rgba(0, 0, 0, .55); pointer-events: auto; }
.hk-loading { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 6px 12px; border-radius: 99px; background: rgba(0, 0, 0, .6); color: #DDD; font-size: 12px; backdrop-filter: blur(6px); animation: fade .3s ease; }
.hk-view-x { position: absolute; z-index: 3; top: 12px; left: 12px; display: none; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #FFF; cursor: pointer; backdrop-filter: blur(8px); }
.hk-view-x svg { width: 18px; height: 18px; }
.hk-panel { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; padding: 14px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; background: #141414; }
.hk-panel header { display: flex; align-items: center; gap: 10px; }
.hk-panel header div { display: grid; flex: 1; min-width: 0; }
.hk-panel header b { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.hk-panel header span { color: #8E8E8E; font-size: 12px; }
.hk-panel header .hk-icon { background: #222; }
.hk-panel section { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: #1B1B1B; }
.hk-sec { display: flex; align-items: center; justify-content: space-between; color: #9A9A9A; font-size: 12px; }
.hk-sec > span { display: inline-flex; align-items: center; gap: 6px; }
.hk-sec svg { width: 14px; height: 14px; }
.hk-mini { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: #262626; color: #EEE; font: 600 12px Inter, sans-serif; cursor: pointer; }
.hk-mini svg { width: 13px; height: 13px; }
.hk-quote { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #101010; font-size: 14px; line-height: 1.5; }
.hk-quote small { color: #7E7E7E; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.hk-quote p { margin: 0 0 6px; }
.hk-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.hk-panel dt { color: #8E8E8E; }
.hk-panel dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.hk-panel dd .plats { justify-content: flex-end; }
.hk-panel footer { display: grid; gap: 10px; margin-top: auto; }
.hk-len { display: flex; align-items: center; justify-content: space-between; color: #BDBDBD; font-size: 13px; }
.hk-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: #1F1F1F; }
.hk-seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: #BDBDBD; font: 600 12px Inter, sans-serif; cursor: pointer; }
.hk-seg button[aria-pressed="true"] { background: #F2F2F2; color: #111; }
.hk-panel .hk-go { width: 100%; height: 48px; font-size: 15px; }
.hk-row-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 0; border-radius: 10px; background: #222; color: #EEE; font: 600 13px Inter, sans-serif; text-decoration: none; cursor: pointer; }
.hk-btn svg, .hk-btn img { width: 16px; height: 16px; }
.hk-btn[aria-pressed="true"] { color: var(--hk-lime); }
.hk-fine { margin: 0; color: #7A7A7A; font-size: 11px; line-height: 1.45; }
/* Playground: where the video came from */
@media (max-width: 900px) {
  .hk { min-height: calc(100vh - 48px); padding: 22px 16px 32px; border-radius: 0; }
  .hk-grid, .hk-ghost { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hk-view { display: block; overflow-y: auto; padding: 12px; }
  .hk-view-media { height: 72vh; padding: 44px 0 0; }
  .hk-view-media :is(iframe, video) { height: calc(72vh - 44px); max-height: none; }
  .hk-view-x { display: grid; }
  .hk-panel { margin-top: 12px; overflow: visible; }
  .hk-panel header .hk-icon { display: none; }
  .hk-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .hk-group, .hk-select { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .hk-card::before, .hk-copy.busy, .hk-go.busy { animation: none; } .hk-cover { transition: none; } }
/* TikTok's dark logo on Higgsfield-dark surfaces */
.hk-view .plat-logo, .hk-btn .plat-logo { filter: invert(1) hue-rotate(180deg); }
.hk-wait { display: flex; align-items: center; gap: 8px; }
.hk .spinner { width: 14px; height: 14px; border-color: rgba(255, 255, 255, .18); border-top-color: var(--hk-lime); }
.hk-sentinel { height: 1px; }
.hk-end { justify-content: center; margin: 18px 0 0; text-align: center; }
details.adv > summary { list-style: none; cursor: pointer; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary h2 { display: inline-flex; align-items: center; gap: 8px; }
details.adv > summary h2::before { content: '›'; display: inline-block; width: 12px; color: var(--gray); transition: transform .15s ease; }
details.adv[open] > summary h2::before { transform: rotate(90deg); }
details.adv > summary h2 .muted { font-weight: 400; font-size: 13px; }
/* Auto top-up fields (Add funds and Billing) */
.auto-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
/* One setting per row, label on the left and the amount on the right (like OpenAI's auto recharge form) */
.auto-grid { display: grid; gap: 8px; }
.auto-grid label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; }
.auto-grid label > span:first-child { min-width: 0; }
.auto-grid .money-input { flex: none; width: 132px; height: 40px; padding: 0 12px; border-radius: 10px; gap: 6px; }
.auto-grid .money-input input { min-width: 0; width: 100%; font-size: 16px; }
.auto-sum { margin: 10px 0 0; font-size: 13px; color: var(--gray); line-height: 1.45; }
.auto-sum.bad { color: var(--danger); }
@media (max-width: 420px) { .auto-grid .money-input { width: 112px; } }
/* Alerts: bottom right, shadcn Alert look */
.alerts { position: fixed; z-index: 95; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.alerts-live { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.alert { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: start; gap: 2px 10px; width: 100%; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font-size: 14px; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .28); pointer-events: auto; animation: alert-in .25s var(--ease) both; }
.alert > svg { width: 18px; height: 18px; margin-top: 1px; color: var(--green); }
.alert-title { min-width: 0; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.alert-desc { grid-column: 2 / -1; margin: 0; color: var(--gray); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.alert-x { display: grid; place-items: center; width: 22px; height: 22px; margin: -2px -4px 0 0; border: 0; border-radius: 6px; background: none; color: var(--gray); cursor: pointer; }
.alert-x:hover { background: var(--accent-bg); color: var(--ink); }
.alert-x svg { width: 14px; height: 14px; }
.alert.error { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.alert.error > svg, .alert.error .alert-title { color: var(--danger); }
.alert.leaving { animation: alert-out .2s ease forwards; }
.alert time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.alerts-bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .3); cursor: pointer; pointer-events: auto; }
.alerts-bell svg { width: 17px; height: 17px; }
.alerts-bell .n { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }
.alerts-history { display: grid; gap: 6px; width: 100%; max-height: min(60vh, 520px); overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--side); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .3); pointer-events: auto; }
.alerts-history-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; font-size: 13px; }
.alerts-history .hk-link { color: var(--gray); }
.alert.in-history { box-shadow: none; animation: none; }
@keyframes alert-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes alert-out { to { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { .alert, .alert.leaving { animation: none; } }
/* Profile (Higgsfield's API profile layout) */
.pf { max-width: 1100px; margin: 0 auto; }
.pf-head { display: grid; justify-items: center; gap: 6px; padding: 28px 0 34px; text-align: center; }
.pf-avatar { display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); font: 600 24px Inter, sans-serif; letter-spacing: .02em; box-shadow: inset 0 0 0 6px var(--card); }
.pf-head h2 { margin: 0; font: 700 26px/1.1 'Space Grotesk', Inter, sans-serif; text-transform: uppercase; letter-spacing: .01em; }
.pf-head p { margin: 0 0 10px; color: var(--gray); font-size: 13px; }
.pf-head .btn svg { width: 14px; height: 14px; margin-right: 6px; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.pf-col { display: grid; gap: 22px; }
.pf section h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--gray); font-size: 13px; font-weight: 500; }
.pf-rename { margin-left: auto; font-size: 12px; }
.pf-list { display: grid; padding: 4px 16px; }
.pf-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pf-row:last-child { border-bottom: 0; }
.pf-row.col { display: grid; gap: 10px; }
.pf-txt { display: grid; flex: 1; min-width: 0; gap: 2px; }
.pf-txt b { font-size: 14px; font-weight: 600; }
.pf-txt span { color: var(--gray); font-size: 13px; line-height: 1.45; }
.pf-meta { color: var(--gray); font-size: 12px; white-space: nowrap; }
.pf-badge { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--soft); border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.pf-badge.organization { background: var(--lime); border-color: var(--lime); color: #151714; }
.pf-badge.invite { color: var(--gray); }
.pf-active { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-size: 13px; font-weight: 500; }
.pf-active svg { width: 15px; height: 15px; }
.pf-row .btn svg { width: 14px; height: 14px; margin-right: 4px; }
.pf-invite input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
.pf-note { margin: 4px 0 10px; color: var(--gray); font-size: 12px; line-height: 1.45; }
.pf-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.pf-field input { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 400; }
.btn.danger { border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); background: var(--danger); color: #FFF; }
.btn.danger:disabled { opacity: .55; }
@media (max-width: 900px) { .pf-grid { grid-template-columns: 1fr; } .pf-head { padding-top: 12px; } }
/* Thank-you dialog after a payment */
.modal.paid-modal { width: min(440px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
.paid { position: relative; display: grid; justify-items: center; gap: 6px; padding: 34px 28px 26px; text-align: center;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, color-mix(in srgb, var(--lime) 34%, transparent), transparent 70%); }
.paid-x { position: absolute; top: 12px; right: 12px; }
.paid-bot { position: relative; display: grid; place-items: center; width: 150px; height: 150px; margin-bottom: 4px; }
.paid-bot bot-buddy { position: relative; z-index: 2; animation: paid-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.paid-ring { position: absolute; inset: 18px; border-radius: 50%; border: 3px solid var(--lime); opacity: 0; animation: paid-ring 1.1s .25s ease-out both; }
.paid-sparks { position: absolute; inset: 0; z-index: 1; }
.paid-sparks i { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--lime); opacity: 0;
  transform: rotate(var(--a)) translateY(0); animation: paid-spark .9s calc(.35s + var(--d)) cubic-bezier(.16, 1, .3, 1) both; }
.paid-sparks i:nth-child(3n) { background: #FF7D5C; } .paid-sparks i:nth-child(3n+1) { background: #66C8FF; }
.paid h2 { margin: 0; font: 700 30px/1.1 'Space Grotesk', Inter, sans-serif; animation: rise .5s .2s var(--ease) both; }
.paid-amount { margin: 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; animation: rise .5s .3s var(--ease) both; }
.paid-sub { max-width: 320px; margin: 2px 0 14px; color: var(--gray); font-size: 14px; line-height: 1.5; animation: rise .5s .38s var(--ease) both; }
.paid-cta { display: grid; gap: 8px; width: 100%; animation: rise .5s .46s var(--ease) both; }
.paid-cta .btn { justify-content: center; width: 100%; }
.paid-cta .btn svg { width: 16px; height: 16px; margin-right: 6px; }
@keyframes paid-pop { from { opacity: 0; transform: scale(.4) translateY(14px); } }
@keyframes paid-ring { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes paid-spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.6); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-74px) scale(1); } }
@media (prefers-reduced-motion: reduce) { .paid-bot bot-buddy, .paid-ring, .paid-sparks i, .paid h2, .paid-amount, .paid-sub, .paid-cta { animation: none; } .paid-ring, .paid-sparks { display: none; } }

/* Campaign welcome dialog (console.js openWelcome): a 16:9 video that blurs and fades into the card, then one centred
   column: the welcome line, the credit rolling in, two buttons. */
.modal.wc-modal { width: min(640px, 100%); padding: 0; overflow: hidden; border-radius: 20px; animation: wc-pop .6s .05s cubic-bezier(.34, 1.4, .5, 1) both; }
.wc { --pad: 32px; }
.wc-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--card); }
.wc-media video { display: block; width: 100%; height: 100%; object-fit: cover; animation: wc-settle 1.6s .05s cubic-bezier(.16, 1, .3, 1) both;
  -webkit-mask-image: linear-gradient(#000 66%, transparent 100%); mask-image: linear-gradient(#000 66%, transparent 100%); }
.wc-blur { position: absolute; inset: auto 0 0 0; height: 36%; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(transparent, #000 75%); mask-image: linear-gradient(transparent, #000 75%); }
.wc-fade { position: absolute; inset: auto 0 0 0; height: 26%; background: linear-gradient(transparent, var(--card)); }
.modal .wc-x { position: absolute; z-index: 2; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .4); color: #FFF; font-size: 18px; cursor: pointer; backdrop-filter: blur(6px); }
.wc-body { position: relative; display: grid; justify-items: center; margin-top: -36px; padding: 0 var(--pad) var(--pad); text-align: center; }
.wc-eyebrow { margin: 0; color: var(--gray); font-size: 13px; font-weight: 600; letter-spacing: .01em; animation: rise .55s .35s cubic-bezier(.16, 1, .3, 1) both; }
.wc-amount { position: relative; margin-top: 8px; animation: rise .55s .42s cubic-bezier(.16, 1, .3, 1) both; }
.wc-odo { position: relative; display: inline-flex; overflow: hidden; color: var(--ink); font: 700 56px/1 'Space Grotesk', Inter, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.wc-odo .fix, .wc-odo .col { display: inline-block; height: 1em; }
.wc-odo .col { overflow: hidden; }
.wc-odo .strip { display: flex; flex-direction: column; }
.wc-odo .strip span { height: 1em; text-align: center; }
.wc-odo::after { content: ''; position: absolute; inset: 0; transform: translateX(-120%); pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--lime) 75%, transparent) 50%, transparent 70%); }
.done .wc-odo::after { animation: wc-shine .9s ease-out forwards; }
.wc-sparks { position: absolute; top: 50%; left: 50%; width: 0; height: 0; pointer-events: none; }
.wc-sparks i { position: absolute; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--lime); opacity: 0; }
.wc-sparks i:nth-child(3n) { background: #FF7D5C; } .wc-sparks i:nth-child(3n+1) { background: #66C8FF; }
.done .wc-sparks i { animation: wc-spark .9s var(--dl) cubic-bezier(.16, 1, .3, 1) forwards; }
.wc-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-top: 28px; animation: rise .55s .52s cubic-bezier(.16, 1, .3, 1) both; }
.wc-cta .btn { justify-content: center; width: 100%; }
@media (max-width: 520px) { .wc { --pad: 20px; } .wc-odo { font-size: 46px; } .wc-cta { grid-template-columns: 1fr; } .wc-cta .primary { order: -1; } }
@keyframes wc-pop { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes wc-settle { from { transform: scale(1.12); } }
@keyframes wc-shine { to { transform: translateX(120%); } }
@keyframes wc-spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-70px) scale(.4); } }
@media (prefers-reduced-motion: reduce) { .modal.wc-modal, .wc-media video, .wc-eyebrow, .wc-amount, .wc-cta { animation: none; } .wc-sparks { display: none; } }

/* Campaigns page (owner) */
.cp-link { font-size: 12px; margin-top: 2px; }
.cp-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.cp-form { display: grid; gap: 14px; }
.cp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cp-id { display: flex; align-items: center; gap: 4px; }
.cp-id input { flex: 1; min-width: 0; }
.cp-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
@media (max-width: 520px) { .cp-row { grid-template-columns: 1fr; } }

/* Legal pages (terms, privacy, refund, content rules): the docs article look, one centred column. */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 24px 0; }
.legal h1 { font-size: clamp(34px, 6vw, 44px); }
.legal h2 { font-size: 22px; margin: 40px 0 10px; letter-spacing: -.03em; }
.legal-date { color: var(--gray); font-size: 14px; margin: 0 0 28px; }
.legal-draft { margin: 0 0 28px; padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.legal table { display: table; }
@media (max-width: 640px) { .legal { padding: 20px 16px 0; } .legal table { display: block; } }
footer a[aria-current] { color: var(--ink); }
/* Console: the legal links under the account row, and on the sign-in card. */
.side-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 16px 6px; font-size: 12px; color: var(--faint); }
.side-legal a { text-decoration: none; }
.side-legal a:hover { color: var(--ink); }
.signin-legal { max-width: 420px; margin: 18px auto 0; text-align: center; font-size: 12px; color: var(--faint); }
.signin-legal a { color: inherit; }

/* Plans (the console's Plans page and the landing's pricing): the layout of Higgsfield's plan cards, name, price,
   one wide button, the credits and what they make, then what is included, in this site's own look. */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { --glow: 34%; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); padding: 24px; min-width: 0; }
.plan.popular { border-color: var(--lime-ring); background: linear-gradient(180deg, color-mix(in srgb, var(--lime) var(--glow), var(--card)), var(--card) 56%); box-shadow: 0 24px 60px -36px var(--lime-ring); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plan { --glow: 15%; } }
:root[data-theme="dark"] .plan { --glow: 15%; }
.plan.mine { outline: 2px solid var(--ink); outline-offset: 2px; }
.plan header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.plan header h3 { font-size: 30px; }
.plan header p { flex-basis: 100%; margin: 0; color: var(--gray); font-size: 14px; }
.plan-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--gray); font-size: 14px; }
.plan > .btn { width: 100%; text-decoration: none; }
.plan-credits { padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--gray); }
.plan-credits b { color: var(--ink); font-weight: 600; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--gray); }
.plan-makes li { position: relative; padding-left: 20px; }
.plan-makes li::before { content: ''; position: absolute; left: 5px; top: -7px; width: 8px; height: 17px; border-left: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); border-bottom-left-radius: 5px; }
.plan-makes b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-has { padding-top: 14px; border-top: 1px solid var(--line); }
.plan-has li { position: relative; padding-left: 22px; }
.plan-has li::before { content: '✓'; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
/* Console: the plan's credits in the header, the plan on the Billing page, and the Plans page's questions. */
.site-header .cred { border-color: var(--lime-ring); background: color-mix(in srgb, var(--lime) 26%, transparent); font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) { .site-header button.bal { display: none; } }
.plan-now { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.plan-now > div:first-child { display: grid; gap: 2px; flex: 1; min-width: 200px; }
.plan-now > div:first-child b { font-size: 20px; letter-spacing: -.02em; }
.plan-left { display: grid; text-align: right; }
.plan-left b { font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 2px; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.faq p { margin: 8px 0 0; color: var(--gray); font-size: 14px; max-width: 72ch; }
/* Plans page: the models as a list, one line each with no box around it, after OpenAI's model list (owner 11/09): a
   picture with the version and the name on it, the model's name and one line, then what a second costs under each
   resolution. The picture is artwork from /media/models (a small scene with a subject, as OpenAI's icons are: a summit
   under an aurora, ribbons of light), or a gradient from --h for a model without one. */
.models-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 14px; }
.models-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.models-head span { color: var(--gray); font-size: 15px; }
.model-tile { flex: none; display: grid; place-content: center; justify-items: center; gap: 2px; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; color: #fff;
  background: #0C0E0C center / cover no-repeat; background-image: radial-gradient(120% 90% at 10% 0%, hsl(var(--h, 80) 90% 58%), transparent 62%), radial-gradient(110% 90% at 100% 100%, hsl(calc(var(--h, 80) + 70) 80% 52%), transparent 60%);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.model-tile b { font-size: 22px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.model-tile small { max-width: 52px; overflow: hidden; font-size: 10px; font-weight: 600; line-height: 1.1; letter-spacing: 0; white-space: nowrap; }
.mlist { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mlist thead th { padding: 0 14px 10px; text-align: left; color: var(--gray); font-size: 13px; font-weight: 500; }
.mlist tbody tr > * { padding: 18px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.mlist tr > :first-child { padding-left: 0; }
.mlist tr > :last-child { padding-right: 0; }
.mlist tbody th { width: 42%; font-weight: 400; }
.minfo { display: flex; align-items: center; gap: 16px; }
.minfo h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.minfo p { margin: 2px 0 0; color: var(--gray); font-size: 14px; line-height: 1.4; }
.mlist td { color: var(--gray); font-size: 14px; white-space: nowrap; }
.mlist td b { color: var(--ink); font-size: 15px; font-weight: 600; }
.mlist td small { display: block; margin-top: 3px; font-size: 13px; }
/* Narrow screens: the line folds: the model, then its prices side by side, each under its resolution. */
@media (max-width: 900px) {
  .mlist, .mlist tbody { display: block; }
  .mlist thead { display: none; }
  .mlist tbody tr { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 16px 0; border-top: 1px solid var(--line); }
  .mlist tbody tr > * { padding: 0; border-top: 0; }
  .mlist tbody th { flex-basis: 100%; width: auto; }
  .mlist td.none { display: none; }
  .mlist td::before { content: attr(data-res); display: block; margin-bottom: 3px; font-size: 12px; }
}
