/* ===========================================================================
   Strata connector design system.
   The one stylesheet behind every /connector page: landing, account, console,
   connection consent, billing review, API reference, privacy and terms.
   Documented in docs/design-system.md.

   Order: tokens, base, components, page blocks, breakpoints, motion.
   Mobile first: every rule is the phone layout. Two breakpoints widen it,
   640px and 900px. Colors match stratatcg.com and the Strata app: one dark
   world, blue for actions, green only for money, amber for test billing and
   real warnings, red for errors and destructive actions.
   =========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Color. Named by role, not by hue. */
  --bg: #060510;
  --surface: #1b1926;
  --surface-2: #110f1c;
  --text: #f7f7f7;
  --muted: #9899a3;
  --dim: #85889a; /* 5.8:1 on --bg; small text stays readable */
  --accent: #516af6;
  --accent-text: #8d9dff;
  --money: #46d17f;
  --warn: #f0b44c;
  --bad: #ff6b81;
  --line: #ffffff14;
  --line-2: #ffffff24;

  /* Type. Six steps plus two display sizes; nothing off-scale. */
  --t-xs: 0.75rem; /* labels, captions, legal */
  --t-sm: 0.875rem; /* secondary text, chips, notes */
  --t-base: 1rem; /* body */
  --t-md: 1.125rem; /* lede, card and panel titles */
  --t-lg: 1.375rem; /* numbers that matter */
  --t-display: clamp(1.6rem, 6vw, 2.4rem); /* section headings */
  --t-hero: clamp(2.3rem, 10vw, 4rem); /* one per page, at most */

  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 16px;
  --measure: 40rem; /* readable line length for prose */

  /* Motion. Out for arrivals, spring for pops and confirmations, in-out for loops. */
  --e-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --e-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* --- Base --------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  background: var(--bg);
  background-image: radial-gradient(140% 55% at 50% -6%, #171a3a 0%, rgba(6, 5, 16, 0) 62%);
  background-repeat: no-repeat;
  color: var(--text);
  font: var(--t-base)/1.55 var(--sans);
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
}
a { color: var(--accent-text); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
code, pre, .num, kbd { font-family: var(--mono); }
code { font-size: 0.86em; color: var(--text); background: var(--surface); padding: 1px 6px; border-radius: 5px; }
kbd { font-size: 0.8em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--text); }
pre { font-size: var(--t-sm); line-height: 1.6; overflow-x: auto; }
img, svg { max-width: 100%; }
fieldset { border: 0; padding: 0; min-width: 0; }
/* Layout rules like display:grid outrank the browser's [hidden] rule. */
[hidden] { display: none !important; }
.skip, .skip-link { position: absolute; left: -999px; }
.skip:focus, .skip-link:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 20; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.eyebrow { font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
main { max-width: 68rem; margin: 0 auto; }

/* --- Header and footer -------------------------------------------------- */
.top, main > header {
  max-width: 68rem; margin: 0 auto; padding-block: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap;
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { color: var(--muted); font-weight: 500; }
/* Four bars, each heavier than the last: the Strata mark. */
.mark { display: inline-flex; flex-direction: column; gap: 2.5px; flex: none; }
.mark i { display: block; width: 18px; background: var(--text); border-radius: 1px; }
.mark i:nth-child(1) { height: 1.5px; } .mark i:nth-child(2) { height: 2.5px; }
.mark i:nth-child(3) { height: 3.5px; } .mark i:nth-child(4) { height: 5px; }
.top > nav, main > header nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.top nav a:not(.pill), main > header nav a:not(.pill) {
  color: var(--muted); text-decoration: none; font-size: var(--t-sm);
  padding: 8px 10px; min-height: 44px; display: inline-flex; align-items: center;
}
.foot, .account-footer, main > footer {
  display: flex; justify-content: center; align-items: center; gap: 4px 14px; flex-wrap: wrap;
  text-align: center; color: var(--dim); font-size: var(--t-xs); padding-block: 24px 32px;
}
.foot a, .account-footer a, main > footer a { color: var(--muted); display: inline-block; padding: 10px 4px; }

.notice {
  max-width: 68rem; margin: 0 auto; padding: 10px 14px; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); font-size: var(--t-sm); color: var(--muted);
  text-align: center; text-wrap: pretty;
}
.notice a { font-weight: 600; display: inline-block; padding-block: 3px; }
.notice.test { color: var(--warn); border-color: #f0b44c55; background: #f0b44c10; }

/* --- Buttons ------------------------------------------------------------
   .pill     primary action, one per view
   .ghost / .secondary   quiet action
   .linkbtn  text action inside a sentence or a row
   Full width on a phone, sized to the label from 640px. */
.pill, .button, .auth-submit, button[type='submit'] {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px;
  padding: 14px 24px; border-radius: 999px; background: var(--accent); color: #fff;
  font: inherit; font-weight: 650; font-size: var(--t-base); text-decoration: none;
  border: 0; cursor: pointer; transition: filter 0.2s ease, transform 0.12s var(--e-out), background-color 0.2s ease;
}
.pill::after, .button:not(#providers .button)::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, #ffffff40 50%, transparent 70%);
  transform: translateX(-130%); transition: transform 0.7s var(--e-out);
}
.pill:active, .button:active, .auth-submit:active, .ghost:active, .secondary:active { transform: scale(0.98); }
.pill.done { background: var(--money); color: #04210f; }
.pill .label { display: inline-block; }
.pill.done .label { animation: pop 0.35s var(--e-spring); }
.pill-sm { width: auto; padding: 9px 16px; font-size: var(--t-sm); min-height: 44px; }
.ghost, .secondary {
  font: inherit; font-size: var(--t-base); font-weight: 600; color: var(--text); cursor: pointer; text-decoration: none;
  background: transparent; border: 1px solid var(--line-2); border-radius: 999px; min-height: 48px;
  padding: 13px 24px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s var(--e-out);
}
.secondary.sm, .ghost.pill-sm { width: auto; padding: 8px 16px; font-size: var(--t-sm); min-height: 44px; }
.linkbtn {
  font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--accent-text);
  background: none; border: 0; padding: 10px 4px; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn.danger { color: var(--bad); }
.danger-btn {
  font: inherit; font-size: var(--t-sm); font-weight: 650; color: #16050a; background: var(--bad);
  border: 0; border-radius: 999px; padding: 8px 16px; min-height: 44px; cursor: pointer;
}
button:disabled, .pill:disabled, .ghost:disabled, .secondary:disabled { opacity: 0.55; cursor: not-allowed; }

/* --- Forms -------------------------------------------------------------- */
label { display: block; font-size: var(--t-sm); font-weight: 600; margin-bottom: 7px; }
input, textarea {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg); color: var(--text); font: inherit; font-size: var(--t-base);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
input::placeholder { color: var(--dim); }
input:focus-visible, textarea:focus-visible { border-color: var(--accent-text); }
.field-help { font-size: var(--t-xs); color: var(--dim); margin-top: 7px; text-wrap: pretty; }
.actions { display: grid; gap: 10px; }
.actions button, .actions .secondary { width: 100%; }

/* Segmented control: radio inputs that read as one switch. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; max-width: 100%; }
.seg label { position: relative; margin: 0; cursor: pointer; font-weight: 500; }
.seg input { position: absolute; inset: 0; opacity: 0; min-height: 0; cursor: pointer; }
.seg span { display: block; font-size: var(--t-sm); padding: 8px 13px; border-radius: 999px; color: var(--muted); transition: background-color 0.2s ease, color 0.2s ease; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.seg input:disabled + span { opacity: 0.55; }

/* --- Surfaces ----------------------------------------------------------- */
.panel {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px;
  display: grid; gap: 12px; align-content: start; min-width: 0;
}
.panel h2, .panel h3 { font-size: var(--t-md); }
.panel p { color: var(--muted); font-size: var(--t-sm); text-wrap: pretty; }
.panel pre { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Chips: state for a result, a mode or a request. */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.chip.on { color: var(--text); border-color: #516af688; background: #516af61f; }
.chip.done { color: var(--money); border-color: #46d17f55; background: #46d17f14; }
.chip.ask, .chip.test { color: var(--warn); border-color: #f0b44c55; background: #f0b44c14; }
.chip.bad { color: var(--bad); border-color: #ff6b8155; background: #ff6b8112; }
.badge { font-size: 0.66rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-text); border: 1px solid #516af688; border-radius: 999px; padding: 2px 8px; }
.money { color: var(--money); font-variant-numeric: tabular-nums; }
.na { color: var(--muted); }

/* Banners: one per state, each with what to do next. */
.banners { display: grid; gap: 10px; }
.banners:empty { display: none; }
.banner { border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line-2); background: var(--surface-2); }
.banner > div { display: grid; gap: 2px; min-width: 0; flex: 1 1 16rem; }
.banner b { font-weight: 650; }
.banner p { color: var(--muted); font-size: var(--t-sm); }
.banner.ok { border-color: #46d17f55; } .banner.ok b { color: var(--money); }
.banner.warn { border-color: #f0b44c55; background: #f0b44c10; } .banner.warn b { color: var(--warn); }
.banner.bad { border-color: #ff6b8155; background: #ff6b8110; } .banner.bad b { color: var(--bad); }

/* --- Prose (privacy, terms, reference) ---------------------------------- */
main > h1 { font-size: var(--t-display); margin-block: 24px 12px; }
article, main > p { max-width: var(--measure); color: var(--muted); text-wrap: pretty; }
article h2 { font-size: var(--t-md); color: var(--text); margin-block: 26px 8px; }
article p, article li { margin-bottom: 10px; }

/* Tables read as stacked label/value rows on a phone. */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
tr { display: grid; gap: 2px; padding: 12px 14px; border-top: 1px solid var(--line); }
tr:first-child { border-top: 0; }
th, td { text-align: left; padding: 0; }
th { font-weight: 600; }
td { color: var(--muted); font-variant-numeric: tabular-nums; text-wrap: pretty; }

/* ===========================================================================
   Landing page
   =========================================================================== */
.landing { overflow-x: clip; }
.strata-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 720px; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
}
.landing main, .landing .foot { position: relative; z-index: 1; }

.top .top-links { display: none; }
.product-header { flex-wrap: nowrap; width: 100%; }
.product-header .brand { margin-right: auto; white-space: nowrap; }
.product-header .top-actions { gap: 10px; }
.product-header nav a[aria-current='page'] { color: var(--text); }
.product-header .menu nav { gap: 2px; }
.product-header .menu-signup { color: var(--accent-text) !important; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.top-actions > .pill { display: none; }
.top-signin { display: none; color: var(--muted); text-decoration: none; font-size: var(--t-sm); padding: 10px; }
.menu { position: relative; }
.menu summary { list-style: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); display: grid; place-items: center; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after { display: block; width: 16px; height: 1.6px; background: var(--text); border-radius: 2px; transition: transform 0.25s var(--e-out), opacity 0.2s; }
.menu summary span { position: relative; }
.menu summary span::before, .menu summary span::after { content: ''; position: absolute; left: 0; }
.menu summary span::before { top: -5px; } .menu summary span::after { top: 5px; }
.menu[open] summary span { background: transparent; }
.menu[open] summary span::before { transform: translateY(5px) rotate(45deg); }
.menu[open] summary span::after { transform: translateY(-5px) rotate(-45deg); }
.menu nav { position: absolute; right: 0; top: calc(100% + 8px); min-width: 13rem; display: grid; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 24px 60px -24px #000; animation: rise 0.25s var(--e-out); }
.menu nav a { color: var(--text) !important; padding: 12px 14px !important; border-radius: var(--radius-sm); }

.hero { display: grid; gap: 34px; padding-block: 20px 8px; }
.hero h1 { font-size: var(--t-hero); line-height: 1.02; letter-spacing: -0.045em; font-weight: 750; }
.sub, .lede { color: var(--muted); font-size: var(--t-md); max-width: 32rem; margin-top: 14px; text-wrap: pretty; }
.hero-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.copy-status { min-height: 1.4em; font-size: var(--t-sm); color: var(--money); margin-top: 10px; }
.setup-actions { display: grid; justify-items: start; margin-top: 20px; }
.setup-actions .pill { width: auto; }
.fine { font-size: var(--t-xs); color: var(--dim); margin-top: 4px; }

/* Hero conversation. Reads like any chat app: you on the right, your agent on
   the left with its avatar, a labelled Strata tool call, an inline result card,
   then a short reply. Numbered markers match the key underneath. */
.convo { margin: 0; display: grid; gap: 16px; min-width: 0; }
.app {
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 90px -50px #516af6aa;
}
.app-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.app-name { font-weight: 650; }
.app-conn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--muted); }
.app-conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--money); }
.agent-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #3a2f7a, #1e2a66); border: 1px solid #8d9dff55; }
.agent-av svg { width: 15px; height: 15px; fill: var(--accent-text); }
.app-bar .agent-av { width: 24px; height: 24px; }
.app-bar .agent-av svg { width: 13px; height: 13px; }
.turns { list-style: none; padding: 18px 14px 6px; margin: 0; display: grid; gap: 18px; }
.role { font-size: var(--t-xs); font-weight: 650; color: var(--dim); }
.turn.user { justify-self: end; display: grid; justify-items: end; gap: 6px; max-width: 88%; }
.attach { display: grid; grid-template-columns: repeat(4, 34px); gap: 3px; padding: 4px; border-radius: 10px; background: #0b0a12; border: 1px solid var(--line-2); }
.attach span { position: relative; display: block; aspect-ratio: 63 / 88; border-radius: 3px; overflow: hidden; background: var(--surface); }
.attach img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach .unclear i { position: absolute; inset: 0; background: linear-gradient(130deg, transparent 25%, #ffffffd0 46%, #ffffff55 56%, transparent 72%); }
.bubble { background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; font-size: var(--t-sm); line-height: 1.45; text-wrap: pretty; }
.turn.agent { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.agent-body { display: grid; gap: 10px; min-width: 0; }
.tool { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; border: 1px solid #516af655; background: #516af612; border-radius: 10px; font-size: var(--t-xs); }
.tool .mark i { width: 12px; } .tool .mark { gap: 1.5px; }
.tool b { font-weight: 650; }
.tool-sum { color: var(--muted); }
.tool-ok { margin-left: auto; color: var(--money); font-weight: 800; }
.icard { border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.icard thead th:first-child { border-top-left-radius: 11px; }
.icard thead th:last-child { border-top-right-radius: 11px; }
.icard table { width: 100%; border-collapse: collapse; font-size: var(--t-xs); }
.icard tr { display: table-row; padding: 0; border: 0; }
.icard th, .icard td { padding: 7px 10px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; color: var(--text); font-weight: 500; }
.icard thead th { border-top: 0; color: var(--dim); font-weight: 600; background: var(--surface-2); }
.icard tbody th { display: flex; align-items: center; gap: 8px; }
.icard tbody th img { width: 22px; height: 31px; object-fit: cover; border-radius: 2px; flex: none; }
.icard tbody th span { display: grid; line-height: 1.25; }
.icard small { color: var(--dim); font-size: 0.68rem; font-family: var(--mono); }
.icard .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.icard td.money { color: var(--money); font-weight: 650; }
.icard td.na { color: var(--dim); }
.icard tr.ask .chip { font-size: 0.68rem; padding: 2px 8px; }
.icard tfoot th, .icard tfoot td { background: var(--surface-2); font-weight: 650; }
.icard-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 0.68rem; color: var(--dim); }
.reply { font-size: var(--t-sm); line-height: 1.5; color: var(--text); text-wrap: pretty; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick span { font-size: var(--t-xs); padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); }
.composer { display: flex; align-items: center; gap: 10px; margin: 8px 14px 14px; padding: 8px 8px 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--t-sm); color: var(--dim); }
.composer i { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; color: #fff; background: var(--surface); }
.has-n { position: relative; }
.step-n { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; flex: none; background: var(--text); color: var(--bg); font: 750 0.66rem/1 var(--sans); }
.has-n > .step-n { position: absolute; top: -8px; left: -8px; box-shadow: 0 0 0 3px var(--surface-2); z-index: 1; }
.convo-key { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: var(--t-sm); color: var(--muted); }
.convo-key li { display: flex; gap: 10px; align-items: baseline; text-wrap: pretty; }
.convo figcaption .fine { margin-top: 10px; }

/* Coverage: two identical groups make the grayscale logo loop seamless. */
.coverage { margin-top: 36px; padding-block: 20px; border-block: 1px solid var(--line); }
.coverage-heading { color: var(--text); font-size: var(--t-sm); font-weight: 600; }
.coverage-window { overflow: hidden; margin-top: 18px; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.coverage-track { display: flex; width: max-content; animation: coverage-drift 40s linear infinite; }
.coverage-window:hover .coverage-track, .coverage-window:focus-within .coverage-track { animation-play-state: paused; }
.coverage-logos { list-style: none; margin: 0; padding: 8px 28px 8px 0; display: flex; gap: 28px; flex: none; }
.coverage-logos li { flex: 0 0 140px; display: grid; place-items: center; }
.coverage-logos img { width: 140px; height: 64px; object-fit: contain; filter: grayscale(1); opacity: 0.75; }
.coverage-logos img[src$='one-piece.png'] { filter: grayscale(1) invert(1); }
@keyframes coverage-drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .coverage-window { mask-image: none; -webkit-mask-image: none; overflow: visible; }
  .coverage-track { width: auto; animation: none; }
  .coverage-logos { width: 100%; min-width: 0; flex: 1 1 0; flex-wrap: wrap; justify-content: center; padding-right: 0; }
  .coverage-logos[aria-hidden='true'] { display: none; }
}

/* Holo cards: tilt toward the pointer with a foil that follows it. */
@property --sx { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.holo {
  position: relative; border-radius: 4.6% / 3.3%;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--e-out);
  box-shadow: 0 26px 50px -26px #000, 0 0 0 1px #ffffff12;
}
.holo.slab { border-radius: 4%; }
.holo.live { transition: transform 0.08s linear; }
.holo img { display: block; width: 100%; height: auto; border-radius: inherit; }
.holo::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  mix-blend-mode: overlay; opacity: 0; transition: opacity 0.35s ease;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 35%), #ffffff99, transparent 42%),
    linear-gradient(115deg, transparent 25%, #8d9dff66 42%, #46d17f55 50%, #f0b44c55 58%, transparent 75%);
  background-size: 100% 100%, 260% 260%;
  background-position: 0 0, var(--sx) 50%;
}
.holo.live::after { opacity: 1; }
.holo.shine::after { opacity: 0.7; animation: sheen 6s var(--e-io) infinite; }

/* Sections */
.section { padding-block: 64px 0; scroll-margin-top: 12px; }
.section-head { max-width: 38rem; margin-bottom: 22px; display: grid; gap: 8px; }
.section h2, .closing h2 { font-size: var(--t-display); line-height: 1.12; letter-spacing: -0.03em; }
.section-head p { color: var(--muted); text-wrap: pretty; }
.note { color: var(--dim); font-size: var(--t-sm); text-wrap: pretty; }

/* Steps that act themselves out */
.steps { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--bg); padding: 18px 16px; display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 14px; row-gap: 6px; align-content: start; }
.step .sv { grid-row: span 2; align-self: start; }
.step h3 { font-size: var(--t-base); display: flex; gap: 10px; align-items: baseline; }
.step .n { font: 600 var(--t-xs) var(--mono); color: var(--accent-text); }
.step p { color: var(--muted); font-size: var(--t-sm); text-wrap: pretty; }
.sv { width: 100%; max-width: 150px; height: auto; overflow: visible; margin-bottom: 4px; }
.sv * { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; }
.sv .box, .sv .lockb, .sv .bub { fill: var(--surface-2); stroke: var(--line-2); }
.sv .doc, .sv .ghost rect { fill: #516af61f; stroke: var(--accent-text); }
.sv .docl { stroke: var(--accent-text); }
.sv .bl { stroke: var(--text); transform-origin: left center; }
.sv .cur { fill: var(--accent-text); stroke: none; }
.sv .key * { stroke: var(--warn); }
.sv .ok { stroke: var(--money); stroke-width: 2.2; }
.sv .crd { fill: #516af640; stroke: var(--accent-text); }
.sv .tag rect { fill: #46d17f22; stroke: var(--money); }
.sv .tag path { stroke: var(--money); stroke-width: 2.4; }
.step .sv * { animation-duration: 4.5s; animation-iteration-count: infinite; animation-timing-function: var(--e-io); }
.s2 .sv * { animation-delay: 1.5s; } .s3 .sv * { animation-delay: 3s; }
.s1 .ghost { animation-name: ghost; } .s1 .bl { animation-name: retype; } .s1 .l2 { animation-name: retype2; } .s1 .cur { animation-name: blink; animation-timing-function: steps(1); }
.s2 .key { animation-name: keyin; } .s2 .shackle { animation-name: shackle; } .s2 .ok { animation-name: okpop; }
.s3 .tag { animation-name: tagpop; } .s3 .crd { animation-name: wiggle; }

.peek { margin-top: 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); }
.peek summary { cursor: pointer; padding: 14px 16px; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; list-style: none; min-height: 48px; }
.peek summary::-webkit-details-marker { display: none; }
.peek summary::after { content: '+'; color: var(--dim); font-weight: 400; transition: transform 0.3s var(--e-out); }
.peek[open] summary::after { transform: rotate(45deg); }
.peek pre { margin: 0; padding: 0 16px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--t-xs); color: #d6d8e6; }
.peek-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.peek-foot .ghost { width: auto; min-height: 44px; padding: 8px 18px; font-size: var(--t-sm); }
.peek-foot .copy-status { margin: 0; }

/* Lookup examples */
.demo { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px -50px #516af666; }
.dtabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.dtabs::-webkit-scrollbar { display: none; }
.dtabs button, .tabs button {
  position: relative; overflow: hidden; font: inherit; font-size: var(--t-sm); color: var(--muted); background: transparent;
  border: 1px solid transparent; border-radius: 999px; padding: 8px 14px; min-height: 40px; white-space: nowrap; cursor: pointer;
}
.dtabs button[aria-selected='true'], .tabs button[aria-selected='true'] { color: var(--text); background: var(--surface); border-color: var(--line-2); }
.dbody { display: grid; }
.dbody > div { padding: 18px 16px; min-width: 0; display: grid; gap: 10px; align-content: start; }
.dq { border-bottom: 1px solid var(--line); }
.lbl { font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 650; }
.qbox { display: flex; align-items: center; min-height: 48px; font: var(--t-base)/1.4 var(--mono); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; overflow-wrap: anywhere; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; background: var(--accent-text); animation: blink 1s steps(1) infinite; flex: none; }
.resolving { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.resolving i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--accent-text), transparent); transform: translateX(-100%); }
.resolving.go i { animation: resolve 0.45s var(--e-io) both; }
.dout { min-height: 17rem; }
.res { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: start; }
.art-box { perspective: 700px; }
.d-text { display: grid; gap: 4px; min-width: 0; }
.rname { font-weight: 700; font-size: var(--t-md); letter-spacing: -0.015em; text-wrap: balance; }
.rmeta { color: var(--muted); font-size: var(--t-sm); }
.mkts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 8px; margin-top: 10px; }
.mkts > div { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 2px; }
.mkts > div.off { border-style: dashed; }
.mkts dt { font-size: var(--t-xs); color: var(--dim); }
.mkts dd { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em; }
.mkts dd.na { font-size: var(--t-sm); font-weight: 500; letter-spacing: 0; }
.dfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--t-xs); color: var(--dim); margin-top: 10px; }
.cands { list-style: none; padding: 0; display: grid; gap: 6px; margin-top: 10px; }
.cands li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 12px; font-size: var(--t-sm); animation: rise 0.35s var(--e-out) both; animation-delay: calc(var(--i, 0) * 90ms); }
.cands li span:last-child { color: var(--dim); }
.fanc { position: relative; height: 128px; }
.fanc .sil { position: absolute; left: 9px; top: 0; width: 74px; aspect-ratio: 63 / 88; border-radius: 5px; display: grid; place-items: end center; padding-bottom: 6px; font: 700 0.62rem var(--mono); color: #ffffffd0; background: linear-gradient(155deg, hsl(var(--h) 55% 46%), hsl(calc(var(--h) + 40) 45% 20%)); box-shadow: 0 10px 22px -12px #000, inset 0 0 0 1px #ffffff22; transform-origin: 50% 110%; }
.fanc .sil:nth-child(1) { transform: rotate(-14deg) translateX(-6px); }
.fanc .sil:nth-child(3) { transform: rotate(14deg) translateX(6px); }

/* Raw and graded */
.rg { border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface-2); padding: 22px 14px 16px; display: grid; gap: 16px; }
.rg-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(52px, 0.8fr) minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; max-width: 34rem; margin: 0 auto; }
.rg-side { display: grid; gap: 10px; justify-items: center; }
.rg-card { width: 100%; max-width: 160px; transition: transform 0.5s var(--e-out), filter 0.4s var(--e-out), opacity 0.4s var(--e-out); }
.rg-price { display: grid; gap: 1px; text-align: center; font-size: var(--t-xs); color: var(--dim); }
.rg-price b { font-size: var(--t-lg); color: var(--money); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; transition: color 0.3s; }
.rg-mid { position: relative; display: grid; place-items: center; height: 40px; }
.rg-link { width: 100%; height: 10px; overflow: visible; }
.rg-line { fill: none; stroke: var(--money); stroke-width: 2.4; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 100; transition: stroke 0.3s; }
.rg-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 0.68rem; font-weight: 700; white-space: nowrap; padding: 4px 9px; border-radius: 999px; background: var(--bg); border: 1px solid #46d17f66; color: var(--money); }
.rg-badge { position: static; transform: none; }
.rg-notes { list-style: none; padding: 0; display: grid; gap: 6px; font-size: var(--t-sm); color: var(--muted); max-width: 34rem; margin: 0 auto; width: 100%; }
.rg-notes b { color: var(--text); font-weight: 600; }
.rg .field-help { text-align: center; margin: 0; }

/* You stay in control */
.pi { width: 22px; height: 22px; fill: none; stroke: var(--accent-text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.points { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.points li { background: var(--bg); padding: 18px; display: grid; gap: 8px; align-content: start; }
.points h3 { font-size: var(--t-base); }
.points p { color: var(--muted); font-size: var(--t-sm); text-wrap: pretty; }
.workflows { list-style: none; padding: 0; display: grid; gap: 28px; }
.workflow { padding-left: 18px; border-left: 1px dashed var(--line-2); }
.workflow-title { display: grid; gap: 20px; }
.workflow-title .pi { width: 30px; height: 30px; }
.workflow h3 { font-size: var(--t-base); line-height: 1.4; }
.workflow p { margin-top: 12px; color: var(--muted); font-size: var(--t-sm); line-height: 1.6; text-wrap: pretty; }

/* Pricing */
#pricing .notice { margin-bottom: 12px; text-align: left; }
.est { border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface-2); padding: 18px 16px; display: grid; gap: 14px; margin-top: 12px; }
.est-title { font-weight: 650; }
.est-row { display: grid; gap: 12px; }
.est-l { display: flex; justify-content: space-between; gap: 10px; margin: 0; color: var(--muted); font-weight: 500; }
.est-l output { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.est input[type='range'] {
  -webkit-appearance: none; appearance: none; min-height: 0; padding: 0; height: 6px; border: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 49%), var(--line-2) var(--fill, 49%)); margin-block: 10px;
}
.est input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px #516af655, 0 4px 10px #0008; cursor: grab; }
.est input[type='range']::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px #516af655, 0 4px 10px #0008; cursor: grab; }
.est-out { color: var(--muted); }
.est-out .big { font-size: 2rem; color: var(--text); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-right: 4px; }
#est-fit b { color: var(--accent-text); }
.plans { position: relative; display: grid; gap: 10px; }
.plan { position: relative; z-index: 1; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; align-content: start; }
.plan.fit { border-color: transparent; }
.plan h3 { font-size: var(--t-base); display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; }
.plan .badge:not([hidden]) { animation: pop 0.35s var(--e-spring); }
.plan h3, .pp { color: var(--text); }
.pp { font-size: 2rem; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pp small { font-size: var(--t-sm); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pc { color: var(--muted); }
.ex { color: var(--dim); font-size: var(--t-xs); }
.plan .pill-sm, .plan .ghost { margin-top: 8px; justify-self: start; width: auto; }
.plan-hl { position: absolute; z-index: 0; top: 0; left: 0; width: 0; height: 0; opacity: 0; border-radius: var(--radius); border: 1.5px solid var(--accent); background: #516af614; box-shadow: 0 20px 50px -30px var(--accent); pointer-events: none; transition: transform 0.45s var(--e-spring), width 0.45s var(--e-spring), height 0.45s var(--e-spring), opacity 0.3s; }
.rules { list-style: none; padding: 0; display: grid; gap: 6px 24px; margin-top: 16px; font-size: var(--t-sm); color: var(--muted); }
.rules b { color: var(--text); font-weight: 600; }

/* Developers */
.dev { display: grid; gap: 18px; border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px; }
.dev-copy { display: grid; gap: 10px; }
.dev-copy h2 { font-size: var(--t-lg); }
.dev-copy p { color: var(--muted); font-size: var(--t-sm); }
.links { display: flex; gap: 4px 16px; font-size: var(--t-sm); flex-wrap: wrap; }
.links a { padding-block: 10px; }
.setup { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); overflow: hidden; min-width: 0; }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.setup pre { margin: 0; padding: 16px 14px; color: #d6d8e6; font-size: var(--t-xs); }
.setup-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.setup-foot .ghost { width: auto; padding: 8px 18px; font-size: var(--t-sm); min-height: 44px; }
.setup-foot .copy-status { margin: 0; }

/* FAQ */
.faq details { border-top: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.35s var(--e-out), content-visibility 0.35s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq summary { cursor: pointer; padding: 16px 0; min-height: 48px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; text-wrap: pretty; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--dim); font-weight: 400; transition: transform 0.3s var(--e-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 16px; max-width: var(--measure); text-wrap: pretty; }

/* Closing */
.closing { text-align: center; padding-block: 72px 16px; display: grid; justify-items: center; gap: 14px; }
.closing .hero-actions { width: 100%; max-width: 26rem; margin-top: 4px; }
.fan { position: relative; height: 170px; width: 260px; max-width: 100%; margin-bottom: 8px; }
.fc { position: absolute; left: 50%; bottom: 0; width: 104px; margin-left: -52px; transform-origin: 50% 120%; transition: transform 0.55s var(--e-spring); }
.fc.c1 { transform: rotate(-13deg) translateX(-26px); }
.fc.c3 { transform: rotate(13deg) translateX(26px); }
.fc.c2 { z-index: 2; transform: translateY(-8px); }

.closing-sub { color: var(--muted); }

/* Hero: reassurance under the action, then the agents it works with. */
.trust { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.works { margin-top: 28px; display: grid; gap: 10px; }
.works-label { font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 650; }
.agents { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.agents li { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-sm); font-weight: 600; color: var(--text); white-space: nowrap; }
/* Brand marks ship in their own colors; show them as one quiet white set. */
.agents img { width: 18px; height: 18px; filter: brightness(0) invert(1); opacity: 0.9; }
.agents .more { color: var(--muted); font-weight: 500; }
.attach.one { grid-template-columns: 64px; }
.tool-time { font-family: var(--mono); color: var(--money); font-weight: 650; }
.tool-time + .tool-ok { margin-left: 0; }
.tool .tool-time { margin-left: auto; }
.icard.single .ihead { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; }
.icard.single .ihead img { width: 34px; height: 47px; object-fit: cover; border-radius: 3px; }
.icard.single .ihead b { display: block; font-size: var(--t-sm); }
.icard.single .ihead small { font-family: var(--sans); font-size: var(--t-xs); }
.icard.single .ihead .chip { font-size: 0.68rem; padding: 2px 8px; }
.icard.single tbody th { display: table-cell; color: var(--muted); }
.icard.single td.money { font-size: var(--t-sm); }
.coverage-heading b { font-variant-numeric: tabular-nums; }

/* Without / with: the problem, then the claim it proves. */
.vs { display: grid; gap: 10px; }
.vs-col { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px 16px; display: grid; gap: 12px; align-content: start; }
.vs-col.good { border-color: #46d17f55; background: #46d17f0a; }
.vs-label { font-weight: 700; }
.vs-col.good .vs-label { color: var(--money); }
.vs-list { list-style: none; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: var(--t-sm); }
.vs-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; text-wrap: pretty; }
.vs-list.bad li::before { content: '✕'; color: var(--bad); font-weight: 800; text-align: center; }
.vs-list.good li { color: var(--text); }
.vs-list.good li::before { content: '✓'; color: var(--money); font-weight: 800; text-align: center; }

/* Catalog scale */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 12px; }
.stats > div { background: var(--bg); padding: 16px; display: flex; flex-direction: column-reverse; gap: 2px; }
.stats dt { color: var(--muted); font-size: var(--t-sm); }
.stats dd { margin: 0; font-size: var(--t-lg); font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.graders { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.graders li { font: 700 var(--t-xs) var(--mono); letter-spacing: 0.04em; padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; }
.rg-note { color: var(--muted); font-size: var(--t-sm); text-align: center; max-width: 34rem; margin: 0 auto; text-wrap: pretty; }

/* Use cases: alternating rows of copy and a picture of the result. */
.uses { display: grid; gap: 14px; }
.use { max-width: none; color: var(--text); border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface-2); padding: 20px 16px; display: grid; gap: 18px; align-items: center; overflow: hidden; }
.use-copy { display: grid; gap: 8px; align-content: center; }
.use-kicker { font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); font-weight: 650; }
.use h3 { font-size: var(--t-lg); letter-spacing: -0.02em; }
.use-copy > p:last-child { color: var(--muted); text-wrap: pretty; }
.use-art { margin: 0; min-width: 0; display: grid; gap: 8px; }
.use-cap { font-size: var(--t-xs); color: var(--dim); }
.notif { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); box-shadow: 0 24px 50px -30px #000; }
.notif p { font-size: var(--t-sm); color: var(--text); text-wrap: pretty; }
.notif b { color: var(--money); font-weight: 650; }
.notif-head { display: flex; justify-content: space-between; gap: 10px; font-size: var(--t-xs) !important; color: var(--muted) !important; margin-bottom: 2px; }
.deals { list-style: none; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); overflow: hidden; }
.deals li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.deals li:first-child { border-top: 0; }
.deals img { width: 24px; height: 33px; object-fit: cover; border-radius: 2px; }
.deals span { display: grid; line-height: 1.25; min-width: 0; }
.deals small { color: var(--dim); font-size: 0.68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deals .ask-p { font-weight: 650; }
.deals .mkt { color: var(--dim); text-decoration: line-through; }
.deals b { color: var(--money); font-weight: 700; }
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); overflow: hidden; font-size: var(--t-xs); }
.sheet-grid > span { padding: 8px 12px; border-top: 1px solid var(--line); font-family: var(--mono); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-grid > .h { border-top: 0; background: var(--surface-2); color: var(--dim); font-family: var(--sans); font-weight: 600; }
.sheet-grid .n { text-align: right; font-weight: 650; }
.sheet-grid .chip { font-style: normal; font-family: var(--sans); font-size: 0.68rem; padding: 1px 8px; }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--t-xs); color: var(--dim); }
.more-uses { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.more-uses li { font-size: var(--t-sm); color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; }
/* The setup steps act out in reading order. */
.steps .step:nth-child(1) .sv * { animation-delay: 0s; }
.steps .step:nth-child(2) .sv * { animation-delay: 1.5s; }
.steps .step:nth-child(3) .sv * { animation-delay: 3s; }

/* ===========================================================================
   Account: sign-in, recovery, overview, connections and keys, billing
   =========================================================================== */
.auth-view main { min-height: 100svh; display: flex; flex-direction: column; }
.loading { width: 100%; max-width: 23rem; margin: 48px auto auto; }
.skel { display: grid; gap: 12px; }
.skel i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #ffffff0d, #ffffff1a, #ffffff0d); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skel i.tall { height: 48px; border-radius: var(--radius-sm); }
/* Sign-in card: one column, grouped by purpose rather than evenly spaced. */
.auth-card {
  width: 100%; max-width: 25rem; margin: 24px auto 0; display: grid; gap: 22px; align-content: start;
  padding: 28px 20px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface-2);
  box-shadow: 0 40px 90px -60px #516af6aa;
}
/* Sign-in pages: no second sign-in button in the header. */
.auth-view .product-header .top-signin, .auth-view .product-header .top-actions > .pill { display: none !important; }
.auth-card h1 { font-size: var(--t-display); text-align: center; margin-bottom: 6px; }
.auth-description { text-align: center; color: var(--muted); font-size: var(--t-sm); margin-top: -16px; }
.auth-context { font-size: var(--t-sm); color: var(--text); border: 1px solid #516af655; background: #516af614; border-radius: var(--radius-sm); padding: 10px 12px; text-wrap: pretty; }
#provider-section { display: grid; gap: 18px; }
#providers { display: grid; gap: 8px; }
#providers .button {
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
  font-size: var(--t-sm); font-weight: 600; border-radius: var(--radius-sm);
  min-height: 48px; padding: 12px 18px; width: 100%;
}
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--t-xs); }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
#email-auth { display: grid; gap: 14px; }
#email-auth > label { margin-bottom: -7px; }
#email-auth .auth-submit { border-radius: var(--radius-sm); min-height: 48px; padding: 12px 18px; font-size: var(--t-sm); width: 100%; margin-top: 2px; }
.password-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.password-label label { margin: 0; }
.password-label a { font-size: var(--t-sm); }
.password-input { position: relative; display: flex; align-items: center; }
.password-input input { padding-right: 68px; }
#toggle-password {
  position: absolute; right: 4px; width: auto; min-height: 40px; padding: 6px 12px;
  font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--muted);
  background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
#reset-form { display: grid; gap: 14px; }
#reset-form button { border-radius: var(--radius-sm); min-height: 48px; font-size: var(--t-sm); }
#reset-form #toggle-reset-password { justify-self: start; width: auto; padding: 10px 18px; }
.auth-switch, .auth-legal { text-align: center; font-size: var(--t-sm); color: var(--muted); }
.auth-switch { margin-top: -8px; }
.auth-legal { font-size: var(--t-xs); color: var(--dim); margin-top: -14px; }
.trial-back {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px;
  width: 100%; max-width: 23rem; margin: 20px auto 0; text-align: center; font-size: var(--t-sm); color: var(--dim);
}
.trial-back a { color: var(--muted); padding-block: 10px; }
#status { font-size: var(--t-sm); color: var(--muted); text-align: center; text-wrap: pretty; }
#status[data-error='true'] { color: var(--warn); }
#status:empty { display: none; }
.account-view #status { text-align: left; margin-block: 8px; }

#dashboard { display: grid; gap: 14px; padding-block: 8px 32px; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding-top: 12px; }
.acct-head h1 { font-size: var(--t-display); margin-top: 4px; }
.acct-head-actions { display: flex; gap: 10px; align-items: center; }
.acct-head-actions a { font-size: var(--t-sm); padding: 10px 4px; }
.acct-head .secondary { width: auto; padding: 8px 16px; font-size: var(--t-sm); min-height: 44px; }
#connections, #billing { scroll-margin-top: 12px; }
.bal { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bal strong { color: var(--text); font-size: 2.2rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bal span { color: var(--muted); font-size: var(--t-sm); }
.meter { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.6s var(--e-out); }
.meter.low i { background: var(--warn); }
.meter.empty i { width: 0 !important; }
.chk { list-style: none; padding: 0; display: grid; gap: 10px; font-size: var(--t-sm); }
.chk li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.chk li.done { color: var(--text); }
.dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; font-size: 0.66rem; font-weight: 800; }
.chk li.done .dot { background: var(--money); border-color: var(--money); color: #04210f; }
.chk li.done .dot::before { content: '✓'; }
.chk li.live { color: var(--text); }
.chk li.live .dot { border-color: var(--accent-text); animation: pulse 1.6s ease-in-out infinite; }
.connected { border-color: #46d17f55; background: #46d17f0d; }
.okbig { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: var(--money); background: #46d17f22; border: 1px solid #46d17f66; animation: pop 0.45s var(--e-spring); }
.warn-text { color: var(--warn); font-family: var(--sans); }
.confirm { grid-column: 1 / -1; display: grid; gap: 10px; border: 1px solid #ff6b8155; background: #ff6b810d; border-radius: var(--radius-sm); padding: 12px; }
.confirm p { color: var(--text) !important; }
.confirm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.create-key { border-top: 1px solid var(--line); padding-top: 14px; }
.secret { display: grid; gap: 10px; border: 1px solid #46d17f55; background: #46d17f10; border-radius: var(--radius); padding: 14px; }
.secret strong { font-size: var(--t-sm); }
.secret input { font-family: var(--mono); font-size: var(--t-sm); }
.secret .where { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.secret .where b { color: var(--text); }

/* Account tabs: plain links, the hash picks the panel. */
.acct-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.acct-tabs::-webkit-scrollbar { display: none; }
.acct-tabs a { position: relative; color: var(--muted); text-decoration: none; font-size: var(--t-sm); font-weight: 600; white-space: nowrap; padding: 12px; min-height: 44px; display: inline-flex; align-items: center; }
.acct-tabs a:first-child { padding-left: 0; }
.acct-tabs a[aria-current='page'] { color: var(--text); }
.acct-tabs a[aria-current='page']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent-text); }
.acct-tabs a:first-child[aria-current='page']::after { left: 0; }
.tab-panel { display: grid; gap: 14px; }
.tab-panel h2:focus { outline: none; }

/* Overview: three summary cards, each with its next step. */
.stat-grid { display: grid; gap: 14px; }
.stat { grid-template-rows: auto auto auto 1fr; }
.stat h2 { font-size: var(--t-sm) !important; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block: -8px; }
.stat-top .iconbtn { width: 36px; height: 36px; }
.stat-value { color: var(--text) !important; font-size: 2.2rem !important; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.stat .field-help { margin-top: -4px; }
.stat > a { justify-self: start; align-self: end; margin-top: 6px; }

/* Agents and keys: one row each, facts read left to right. */
.panel-head p { margin-top: 4px; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.row-info { min-width: 0; display: grid; gap: 3px; }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 650; color: var(--text) !important; font-size: var(--t-base) !important; }
.row-facts { display: flex; flex-wrap: wrap; font-size: var(--t-sm) !important; }
.row-facts > span:not(:last-child)::after { content: '·'; margin-inline: 8px; color: var(--dim); }
.row-facts code { font-size: 0.82em; }
.row-warn { color: var(--warn) !important; }
.rows .empty { display: grid; gap: 12px; justify-items: start; padding: 16px 0 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-sm); }
.create-key { border-top: 1px solid var(--line); padding-top: 14px; }

/* Plan and billing */
.current-plan h2 { font-size: var(--t-lg) !important; margin-top: 2px; }
.current-plan #billing-notice:empty { display: none; }
.plan-grid { display: grid; gap: 12px; }
.plan-card { max-width: none; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; }
.plan-card.current { border-color: var(--accent); background: #516af60f; }
.plan-card h3 { display: flex; align-items: center; gap: 8px; font-size: var(--t-md); }
.pc-price { font-size: 2rem; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pc-price small { font-size: var(--t-sm); color: var(--muted); font-weight: 500; letter-spacing: 0; }
.pc-facts { list-style: none; padding: 0; display: grid; gap: 6px; align-content: start; font-size: var(--t-sm); color: var(--muted); margin-block: 4px 8px; }
.pc-facts li { display: grid; grid-template-columns: 18px minmax(0, 1fr); }
.pc-facts li::before { content: '✓'; color: var(--money); font-weight: 800; }
.plan-card > button { width: 100%; min-height: 48px; padding-block: 12px; }
.pc-state { min-height: 48px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: var(--t-sm); color: var(--dim); border: 1px dashed var(--line-2); border-radius: 999px; padding-inline: 12px; }
.plan-card.current .pc-state { color: var(--accent-text); border-style: solid; border-color: #516af655; }
.pc-state:empty { visibility: hidden; }
.danger-quiet { color: var(--muted) !important; }

/* Signed-in header: the account menu replaces Sign in and Get started. */
.acct-menu { position: relative; }
.acct-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px; min-height: 44px; border-radius: 999px; }
.acct-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #516af6, #3a2f7a); color: #fff; font-weight: 700; font-size: var(--t-sm); }
.acct-name { display: none; font-size: var(--t-sm); font-weight: 600; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu nav { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; min-width: 15rem; display: grid; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 24px 60px -24px #000; animation: rise 0.25s var(--e-out); }
.acct-menu nav a, .acct-menu nav button {
  display: flex; align-items: center; width: 100%; min-height: 40px; padding: 8px 12px !important;
  color: var(--text) !important; background: none; border: 0; border-radius: var(--radius-sm);
  font: inherit; font-size: var(--t-sm); text-align: left; text-decoration: none; cursor: pointer;
}
.acct-menu nav button { color: var(--muted) !important; }
.acct-who { padding: 8px 12px 10px; font-size: var(--t-xs); color: var(--dim); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-site { display: grid; border-block: 1px solid var(--line); margin-block: 4px; padding-block: 4px; }

/* ===========================================================================
   API console
   =========================================================================== */
.sandbox-banner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  margin-inline: calc(max(var(--gutter), env(safe-area-inset-left, 0px)) * -1);
  padding: 9px max(var(--gutter), env(safe-area-inset-left, 0px));
  font-size: var(--t-xs); font-weight: 650; color: var(--warn);
  background: repeating-linear-gradient(-45deg, #f0b44c24 0 10px, #f0b44c12 10px 20px);
  border-bottom: 1px solid #f0b44c44;
}
.console-main { display: grid; gap: 18px; padding-block: 18px 26px; }
.console-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.console-heading h1 { font-size: var(--t-display); margin-bottom: 6px; }
.console-mode-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.console-heading .chip { white-space: normal; }
.console-account { background: var(--surface-2); }
.console-account-actions, .console-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.console-workbench { display: grid; gap: 18px; min-width: 0; }
.console-workbench > *, .console-account > * { min-width: 0; }
.console-section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.console-view select { width: 100%; min-height: 48px; padding: 10px; border-radius: var(--radius-sm); background: var(--bg); color: var(--text); border: 1px solid var(--line-2); font: inherit; }
.console-view textarea { resize: vertical; min-height: 220px; font-family: var(--mono); font-size: var(--t-sm); tab-size: 2; }
.console-view pre { max-height: 520px; }
.console-view summary { cursor: pointer; padding-block: 8px; font-weight: 600; min-height: 40px; }
.console-view details > :not(summary) { margin-top: 12px; }
.console-endpoint { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); overflow-wrap: anywhere; }
.console-endpoint strong { color: var(--accent-text); font-family: var(--mono); }
.console-endpoint code { min-width: 0; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-chips label { position: relative; margin: 0; font-weight: 500; cursor: pointer; }
.ex-chips input { position: absolute; inset: 0; opacity: 0; min-height: 0; cursor: pointer; }
.ex-chips span { display: block; font-size: var(--t-sm); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 12px; color: var(--muted); transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.ex-chips input:checked + span { color: var(--text); border-color: #516af688; background: #516af61f; }
.ex-chips input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.run-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.run-row .pill { width: auto; }
.run-row .field-help { margin: 0; }
.kbd-hint { margin-top: -4px; }
.hint summary { font-size: var(--t-sm); color: var(--muted); font-weight: 500 !important; }
.hint p { font-size: var(--t-sm); }
.resp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.resp-tabs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.resp-tabs button { font: inherit; font-size: var(--t-sm); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.resp-tabs button[aria-selected='true'] { color: var(--text); background: var(--surface); }
.resp-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; border-block: 1px solid var(--line); padding-block: 10px; font-size: var(--t-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.resp-stats .iconbtn { margin-left: auto; }
.iconbtn { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.iconbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.iconbtn.copied { color: var(--money); border-color: #46d17f66; }
.console-response > pre { min-height: 290px; white-space: pre; overflow: auto; }
.preview { min-height: 200px; }
.preview .empty, .console-history .empty { color: var(--dim); font-size: var(--t-sm); }
.pv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pv:has(.pv-art) { grid-template-columns: 84px minmax(0, 1fr); }
.pv-art { width: 100%; border-radius: 6px; box-shadow: 0 14px 30px -18px #000; }
.pv-text { display: grid; gap: 6px; min-width: 0; }
.pv-title { font-size: var(--t-md) !important; font-weight: 700; color: var(--text) !important; letter-spacing: -0.015em; }
.pv-cands { margin: 0; padding-left: 1.1rem; display: grid; gap: 4px; font-size: var(--t-sm); color: var(--muted); }
.pv-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 8px; margin-top: 6px; }
.pv-prices > div { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.pv-prices dt { font-size: var(--t-xs); color: var(--dim); }
.pv-prices dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.pv-prices dd.field-help { font-weight: 400; margin-top: 2px; }
.console-history .linkbtn { padding-inline: 8px; }
.console-history-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: transparent; color: var(--muted); border: 0; border-top: 1px solid var(--line); padding: 12px 8px; min-height: 44px; font: var(--t-xs)/1.5 var(--mono); cursor: pointer; overflow-wrap: anywhere; border-radius: 0; }
.console-history-item.selected { background: var(--surface); color: var(--text); border-radius: var(--radius-sm); }
.hd { width: 8px; height: 8px; border-radius: 50%; background: var(--money); flex: none; }
.hd.bad { background: var(--bad); }
.console-view #status:not(:empty) { border-left: 3px solid var(--warn); padding: 10px 14px; color: var(--warn); text-align: left; }
.console-view button, .console-view .secondary { border-radius: var(--radius-sm); }
.console-view .pill, .console-view .seg span, .console-view .ex-chips span, .console-view .resp-tabs button { border-radius: 999px; }
/* Older console markup, still used by the agent test page. */
.console-metrics { display: flex; flex-wrap: wrap; gap: 16px; border-block: 1px solid var(--line); padding-block: 12px; }
.console-metrics dt { color: var(--muted); font-size: var(--t-xs); }
.console-metrics dd { font-family: var(--mono); margin-top: 4px; }

/* ===========================================================================
   Connection consent and billing review
   =========================================================================== */
.journey-card { max-width: 27rem; gap: 18px; }
/* Flows keep the header quiet: brand and account only. */
.journey .product-header .top-links, .journey .product-header .top-signin, .journey .product-header .top-actions > .pill { display: none !important; }
.journey-card h1 { text-align: left; font-size: var(--t-display); margin: 0; }
.journey #status { text-align: left; }
.journey .notice { text-align: left; }
.req { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px; }
.req p { font-size: var(--t-sm); color: var(--muted); }
.req p b { color: var(--text); }
.av { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 750; color: #fff; background: linear-gradient(135deg, #516af6, #3a2f7a); border: 1px solid #8d9dff55; }
#requested .av { display: none; }
#consent { display: grid; gap: 16px; }
.can { display: grid; gap: 8px; }
.can legend, .cant-title { font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 650; margin-bottom: 8px; }
#scopes { display: grid; gap: 6px; }
.scope { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-weight: 500; cursor: pointer; }
.scope input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--money); flex: none; }
.cant ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.cant li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); font-size: var(--t-sm); color: var(--muted); }
.cant li::before { content: '✕'; color: var(--bad); font-weight: 800; width: 18px; text-align: center; flex: none; }
.journey-actions { display: grid; gap: 8px; margin-top: 6px; }
.bill { display: grid; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin: 0; }
.bill > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.bill > div:first-child { border-top: 0; }
.bill dt { color: var(--muted); }
.bill dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bill .total { background: var(--surface-2); font-size: var(--t-base); }
.bill .total dd { font-weight: 750; }
.state-mark { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; }
.state-mark.ok { color: var(--money); background: #46d17f22; border: 1px solid #46d17f66; animation: pop 0.45s var(--e-spring); }
.state-mark.bad { color: var(--bad); background: #ff6b8120; border: 1px solid #ff6b8166; }
.state-mark.wait { border: 3px solid var(--line-2); border-top-color: var(--accent-text); animation: spin 0.9s linear infinite; }
.journey-foot { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: var(--t-xs); }
.journey-foot a { color: var(--muted); padding-block: 8px; }
/* Older review markup, kept for cached pages during a deploy. */
.journey-panel { max-width: 44rem; margin: 2rem auto; }

/* ===========================================================================
   Breakpoints
   =========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .top, main > header { padding-block: 18px; }
  .top-signin, .top-actions > .pill { display: inline-flex; }
  .product-header .top-links { display: flex; }
  .product-header .menu { display: none; }
  .workflows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .pill, .button, .ghost, .secondary, .auth-submit, button[type='submit'] { width: auto; }
  .actions { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .panel { padding: 20px; }
  tr { grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; padding: 14px 18px; }
  .section { padding-block: 84px 0; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step { grid-template-columns: minmax(0, 1fr); padding: 20px 18px; }
  .step .sv { grid-row: auto; max-width: 140px; }
  .dbody { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); }
  .dbody > div { padding: 22px 20px; }
  .dq { border-bottom: 0; border-right: 1px solid var(--line); }
  .res { grid-template-columns: 116px minmax(0, 1fr); gap: 20px; }
  .rg { padding: 28px 24px 20px; }
  .rg-stage { gap: 16px; }
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .est { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 28px; padding: 20px 22px; }
  .est .est-title, .est .est-out { grid-column: 1 / -1; }
  .convo-key { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .convo-key li { display: grid; gap: 6px; }
  .turns { padding-inline: 18px; }
  .icard th, .icard td { padding-inline: 12px; }
  .setup pre { padding: 18px 20px; font-size: var(--t-sm); }
  .fan { height: 190px; }
  .fc { width: 120px; margin-left: -60px; }
  #providers .button, .auth-card .auth-submit { width: 100%; }
  .journey-actions button { width: 100%; }
  .auth-card { padding: 32px; margin-top: 32px; }
  .stat-grid, .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .acct-name { display: inline; }
  .acct-menu summary { padding-right: 12px; border: 1px solid var(--line-2); }
  .acct-site { display: none; }
  .acct-menu nav button { border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-top: 4px; }
}

@media (min-width: 900px) {
  .top .top-links { display: flex; }
  .menu { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 56px; padding-block: 44px 10px; }
  .hero-copy { padding-bottom: 120px; }
  .points { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .workflows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dev { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; padding: 24px; }
  .section { padding-block: 104px 0; }
  .closing { padding-block: 104px 24px; }
  .console-workbench { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .console-account { grid-template-columns: 1fr auto; align-items: center; }
  .vs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .vs-col { padding: 24px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats > div { padding: 20px 22px; }
  .stats dd { font-size: 2rem; }
  .use { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 40px; padding: 32px; }
  .use:nth-child(even) .use-copy { order: 2; }
}

@media (min-width: 1200px) {
  .workflows { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
}
@media (hover: hover) {
  a:hover { color: var(--text); }
  .pill:hover, .button:hover, .auth-submit:hover, button[type='submit']:hover { filter: brightness(1.08); color: #fff; }
  .pill:hover::after, .button:hover::after { transform: translateX(130%); }
  .ghost:hover, .secondary:hover:not(:disabled) { background: var(--surface); border-color: #ffffff4d; }
  .top nav a:not(.pill):hover, main > header nav a:not(.pill):hover, .acct-tabs a:hover { color: var(--text); }
  .tabs button:hover, .dtabs button:hover, .resp-tabs button:hover { color: var(--text); }
  .holo:hover::after { opacity: 1; }
  .fan:hover .fc.c1 { transform: rotate(-22deg) translateX(-52px) translateY(-6px); }
  .fan:hover .fc.c3 { transform: rotate(22deg) translateX(52px) translateY(-6px); }
  .fan:hover .fc.c2 { transform: translateY(-20px) scale(1.04); }
  .console-history-item:hover { background: var(--surface); color: var(--text); }
  .scope:hover { border-color: #ffffff4d; }
  .acct-menu nav a:hover, .acct-menu nav button:hover { background: var(--surface); color: var(--text) !important; }
  .acct-menu summary:hover { background: var(--surface); }
  .danger-quiet:hover:not(:disabled) { color: var(--bad) !important; border-color: #ff6b8188; background: #ff6b810d; }
}

/* ===========================================================================
   Motion. Loops pause off screen ([data-run] without .run).
   =========================================================================== */
[data-run]:not(.run), [data-run]:not(.run) * { animation-play-state: paused !important; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes sheen { 0%, 100% { --sx: 0%; } 50% { --sx: 100%; } }
@keyframes tabprog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes resolve { to { transform: translateX(260%); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #516af622; } }
@keyframes spin { to { transform: rotate(360deg); } }
/* Hero conversation: the resting state is the final state; .play replays it. */
.convo.play .turn.user { animation: rise 0.4s var(--e-out) both; }
.convo.play .turn.agent .agent-av, .convo.play .agent-body .role, .convo.play .tool { animation: rise 0.35s var(--e-out) 0.6s both; }
.convo.busy .tool-ok { visibility: hidden; }
.convo.busy .tool-sum::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 6px; vertical-align: -1px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent-text); animation: spin 0.8s linear infinite; }
.convo.play .icard { animation: rise 0.4s var(--e-out) 1.8s both; }
.convo.play .icard tbody tr { animation: rise 0.3s var(--e-out) both; animation-delay: calc(1.95s + var(--i) * 0.1s); }
.convo.play .reply { animation: rise 0.35s var(--e-out) 2.9s both; }
.convo.play .quick { animation: rise 0.35s var(--e-out) 3.2s both; }
/* Step icons */
@keyframes ghost { 0%, 8% { transform: translate(0, 0) scale(1); opacity: 0; } 12% { opacity: 0.9; } 38% { transform: translate(0, 40px) scale(0.55); opacity: 0; } 100% { opacity: 0; } }
@keyframes retype { 0%, 34% { transform: scaleX(1); } 38% { transform: scaleX(0); } 52%, 100% { transform: scaleX(1); } }
@keyframes retype2 { 0%, 34% { transform: scaleX(1); } 38%, 50% { transform: scaleX(0); } 66%, 100% { transform: scaleX(1); } }
@keyframes keyin { 0%, 4% { transform: translateX(0); } 14%, 34% { transform: translateX(-22px); } 46%, 100% { transform: translateX(0); } }
@keyframes shackle { 0%, 4% { transform: translateY(0); } 12%, 48% { transform: translateY(-6px); } 56%, 100% { transform: translateY(0); } }
@keyframes okpop { 0%, 4% { transform: scale(1); opacity: 1; } 10%, 56% { transform: scale(0); opacity: 0; } 66% { transform: scale(1.25); opacity: 1; } 74%, 100% { transform: scale(1); } }
@keyframes tagpop { 0%, 6% { transform: scale(1); opacity: 1; } 12%, 40% { transform: scale(0); opacity: 0; } 52% { transform: scale(1.2); opacity: 1; } 60%, 100% { transform: scale(1); } }
@keyframes wiggle { 0%, 20%, 40%, 100% { transform: rotate(0); } 28% { transform: rotate(-6deg); } 34% { transform: rotate(4deg); } }


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .holo::after { opacity: 0 !important; }
  .state-mark.wait { border-top-color: var(--line-2); }
}

/* Keep decorative motion quiet while preserving user-triggered feedback. */
.holo.shine::after, .step .sv * { animation: none; }
.pv-batch { display: grid; gap: 20px; }
.pv-result + .pv-result { border-top: 1px solid var(--line); padding-top: 16px; }

/* Documentation: one source for readable guides and agent instructions. */
.docs-layout { display: grid; gap: 28px; padding-block: 24px 64px; }
.docs-navigation { min-width: 0; border-bottom: 1px solid var(--line-2); padding-bottom: 16px; }
.docs-navigation > summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.docs-navigation nav { display: grid; gap: 20px; }
.docs-navigation h2 { font-size: var(--t-sm); color: var(--text); padding: 8px; }
.docs-navigation a { display: block; padding: 10px 8px; font-size: var(--t-sm); color: var(--muted); text-decoration: none; border-radius: var(--radius-sm); }
.docs-navigation a:hover, .docs-navigation a[aria-current="page"] { color: var(--text); background: var(--surface); }
.docs-article { min-width: 0; max-width: 48rem; overflow-wrap: anywhere; }
.docs-tools, .docs-footer { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--t-sm); }
.docs-tools { margin-bottom: 28px; }
.docs-tools a, .docs-footer a { padding-block: 10px; }
.docs-article h1, .legal-page h1 { font-size: var(--t-display); margin-bottom: 24px; }
.docs-article h2, .legal-page h2 { font-size: var(--t-lg); margin: 36px 0 16px; }
.docs-article h3 { font-size: var(--t-md); margin: 24px 0 12px; }
.docs-article p, .docs-article ul, .docs-article ol, .legal-page p { margin-block: 16px; }
.docs-article li { margin-block: 10px; }
.docs-article p, .docs-article li, .legal-page p { color: var(--muted); }
.docs-article strong { color: var(--text); }
.docs-article pre { padding: 18px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); margin-block: 20px; }
.docs-article pre code { background: transparent; padding: 0; font-size: inherit; }
.docs-table { max-width: 100%; overflow: auto; margin-block: 24px; }
.docs-table table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.docs-table th, .docs-table td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); min-width: 120px; }
.docs-table td { color: var(--muted); }
.docs-endpoint { border-top: 1px solid var(--line-2); padding-block: 12px; }
.docs-endpoint summary { padding: 12px 0; cursor: pointer; overflow-wrap: anywhere; }
.docs-endpoint h2 { margin-top: 18px; }
.docs-footer { border-top: 1px solid var(--line-2); padding-top: 20px; margin-top: 40px; }
.legal-page { max-width: var(--measure); padding-block: 36px 64px; }
@media (min-width: 900px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
  .docs-navigation { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; align-self: start; border-bottom: 0; }
}

.docs-navigation nav { max-height: 17rem; overflow-y: auto; }
.analytics { padding-block: 32px 64px; }
.analytics .heading, .analytics .actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.analytics h1 { font-size: var(--t-display); margin-block: 12px 20px; }
.analytics h2 { font-size: var(--t-lg); }
.analytics .metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-block: 24px; }
.analytics .metric { padding: 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.analytics .metric span { color: var(--muted); font-size: var(--t-sm); }
.analytics .metric strong { display: block; font-size: var(--t-lg); margin-top: 12px; }
.analytics .panel { margin-block: 24px; }
.analytics .scroll { overflow-x: auto; }
.analytics table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.analytics th, .analytics td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.analytics td { max-width: 340px; overflow-wrap: anywhere; }
.analytics pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 650px; overflow: auto; }
@media (min-width: 900px) {
  .docs-navigation nav { max-height: none; }
  .analytics .metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
.docs-table tr, .analytics tr { display: table-row; padding: 0; border: 0; }
.docs-table table { min-width: 32rem; }
.docs-article h1, .docs-article h2, .docs-article h3 { color: var(--text); }

/* Compact screens keep complete labels and real values visible. */
.dtabs button, .tabs button { flex: 0 0 auto; }
.row-title { overflow-wrap: anywhere; }
@media (max-width: 379px) {
  .dtabs { flex-wrap: wrap; }
  .turn.agent { grid-template-columns: minmax(0, 1fr); }
  .turn.agent > .agent-av { display: none; }
  .icard th, .icard td { padding-inline: 6px; }
}
@media (max-width: 639px) {
  .dtabs { gap: 2px; padding: 6px; }
  .dtabs button { flex: 1 1 auto; min-width: 0; padding-inline: 8px; font-size: 0.8125rem; }
  .dtabs button, .tabs button, .resp-tabs button, .iconbtn { min-height: 44px; }
  .ex-chips span { min-height: 44px; display: flex; align-items: center; }
  .res { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .res:has(.fanc) { grid-template-columns: minmax(0, 1fr); }
  .res:has(.fanc) .art-box { display: none; }
  .mkts { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mkts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 12px; }
  .mkts dd { font-size: var(--t-base); white-space: nowrap; }
  .mkts dd.na { white-space: normal; text-align: right; }
  .rg-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .rg-mid { grid-column: 1 / -1; grid-row: 2; height: auto; }
  .plan { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 14px 16px; }
  .plan > * { grid-column: 1; }
  .plan > a { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin-top: 0 !important; }
  .pp { font-size: 1.6rem; }
  .pv-prices dd { overflow-wrap: anywhere; }
  .est .seg { border-radius: var(--radius); }
  input:not([type='radio']):not([type='checkbox']):not([type='range']), select, textarea, .secret input { font-size: var(--t-base); }
  .console-endpoint { flex-wrap: wrap; }
  .console-endpoint code { overflow-wrap: anywhere; }
}
@media (max-width: 639px) {
  .bill > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .bill dd { text-align: left; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > button { justify-self: start; }
  .stat-value { font-size: 1.8rem !important; }
  .req > div { min-width: 0; overflow-wrap: anywhere; }
}
