/* Sendhour — marketing site + app.
   Direction: warm paper, deep ink, a serif display face, brand orange as the accent. */
@font-face { font-family: "Instrument Serif"; src: url("/static/fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/static/fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #fbf8f3;
  --paper-2: #f4eee4;
  --paper-3: #ece4d6;
  --ink: #1b1712;
  --ink-2: #3f382f;
  --muted: #6f665b;
  --faint: #a2988b;
  --line: #e6ded1;
  --line-2: #efe9df;
  --line-strong: #d6cbbb;
  --bg: #ffffff;
  --soft: #f7f3ec;
  --brand: #ff6a1f;
  --brand-hover: #ff7d3a;
  --brand-deep: #e2560f;
  --brand-2: #ffb23e;
  --brand-ink: #b5420a;
  --brand-soft: #fff0e4;
  --grad: linear-gradient(135deg, #ff6a1f 0%, #ff8a3d 100%);
  --ok: #17803d;
  --ok-soft: #e6f4ea;
  --info: #2f55a8;
  --info-soft: #eaf0fb;
  --warn: #a0510a;
  --warn-soft: #fdf1dc;
  --bad: #c4321f;
  --bad-soft: #fcece8;
  --teal: #0f6f68;
  --teal-soft: #e2f2ef;
  --violet: #6b4fc8;
  --violet-soft: #f0ecfb;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, .06);
  --shadow: 0 6px 18px -8px rgba(60, 40, 20, .16), 0 2px 4px -2px rgba(60, 40, 20, .06);
  --shadow-lg: 0 40px 80px -32px rgba(60, 40, 20, .32), 0 14px 28px -16px rgba(60, 40, 20, .14);
  --font: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --display: var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  /* theme tokens: everything below changes in dark mode */
  --surface: #ffffff;
  --on-brand: #1b1712;
  --on-ink: #ffffff;
  --ink-hover: #322b23;
  --inverse: #1b1712;
  --inverse-line: #1b1712;
  --inverse-hover: #3f382f;
  --copy-on-code: rgba(246, 239, 228, .1); --copy-on-code-hover: rgba(246, 239, 228, .2); --copy-done: #7fd6a0;
  --brand-line: #ffd2b5;
  --ok-line: #c6ecd5;
  --warn-line: #fde3a7;
  --bad-line: #fcd5d1;
  --nav-bg: rgba(251, 248, 243, .86);
  --today: #fff8f2;
  --selection: #ffd8bf;
  --dot: rgba(27, 23, 18, .07);
  --dots: rgba(27, 23, 18, .13);
  --pf-mono: #000000;
  --switch-on: var(--ink);
  --raised: #ffffff;
  --picked: var(--ink);
  --on-inverse: #f6efe4;
  --on-inverse-dim: #a89d8e;
  color-scheme: light;
}

/* Dark mode: warm espresso surfaces, cream ink and the same orange. It follows the device setting
   unless the theme picker (public/theme.js) sets <html data-theme="light|dark">. The two blocks
   below must stay identical (test/theme.test.mjs checks). */
:root[data-theme="dark"] {
  --paper: #14110d; --paper-2: #1b1712; --paper-3: #241e18; --bg: #14110d; --soft: #17130f; --surface: #1f1a15;
  --ink: #f4ede3; --ink-2: #d9cfc1; --muted: #a99e8f; --faint: #7b7165;
  --line: #2e2720; --line-2: #26201a; --line-strong: #40362c;
  --brand-hover: #ff8240; --brand-deep: #ff8b4f; --brand-ink: #ffaa78; --brand-soft: #2c1b10; --brand-line: #55301a;
  --ok: #6bd69a; --ok-soft: #13261a; --ok-line: #1f4a2e; --info: #94b4ff; --info-soft: #172036;
  --warn: #f2b85f; --warn-soft: #2b200f; --warn-line: #4f3a15; --bad: #ff8a78; --bad-soft: #2e1612; --bad-line: #5c2a22;
  --teal: #62d2c6; --teal-soft: #0f2623; --violet: #bba8ff; --violet-soft: #201b33;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow: 0 10px 24px -10px rgba(0, 0, 0, .65), 0 2px 4px -2px rgba(0, 0, 0, .45);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 14px 28px -16px rgba(0, 0, 0, .55);
  --on-ink: #14110d; --ink-hover: #ffffff; --inverse: #0d0b08; --inverse-line: #2e2720; --inverse-hover: #241e18;
  --copy-on-code: rgba(246, 239, 228, .08); --copy-on-code-hover: rgba(246, 239, 228, .16); --copy-done: #6bd69a;
  --nav-bg: rgba(20, 17, 13, .8); --today: #251910; --selection: rgba(255, 106, 31, .4); --dot: rgba(255, 236, 214, .07); --dots: rgba(246, 239, 228, .12);
  --pf-mono: #f4ede3; --switch-on: var(--brand); --raised: #2c251e; --picked: var(--brand);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14110d; --paper-2: #1b1712; --paper-3: #241e18; --bg: #14110d; --soft: #17130f; --surface: #1f1a15;
    --ink: #f4ede3; --ink-2: #d9cfc1; --muted: #a99e8f; --faint: #7b7165;
    --line: #2e2720; --line-2: #26201a; --line-strong: #40362c;
    --brand-hover: #ff8240; --brand-deep: #ff8b4f; --brand-ink: #ffaa78; --brand-soft: #2c1b10; --brand-line: #55301a;
    --ok: #6bd69a; --ok-soft: #13261a; --ok-line: #1f4a2e; --info: #94b4ff; --info-soft: #172036;
    --warn: #f2b85f; --warn-soft: #2b200f; --warn-line: #4f3a15; --bad: #ff8a78; --bad-soft: #2e1612; --bad-line: #5c2a22;
    --teal: #62d2c6; --teal-soft: #0f2623; --violet: #bba8ff; --violet-soft: #201b33;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
    --shadow: 0 10px 24px -10px rgba(0, 0, 0, .65), 0 2px 4px -2px rgba(0, 0, 0, .45);
    --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 14px 28px -16px rgba(0, 0, 0, .55);
    --on-ink: #14110d; --ink-hover: #ffffff; --inverse: #0d0b08; --inverse-line: #2e2720; --inverse-hover: #241e18;
  --copy-on-code: rgba(246, 239, 228, .08); --copy-on-code-hover: rgba(246, 239, 228, .16); --copy-done: #6bd69a;
    --nav-bg: rgba(20, 17, 13, .8); --today: #251910; --selection: rgba(255, 106, 31, .4); --dot: rgba(255, 236, 214, .07); --dots: rgba(246, 239, 228, .12);
    --pf-mono: #f4ede3; --switch-on: var(--brand); --raised: #2c251e; --picked: var(--brand);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.015em; line-height: 1.15; margin: 0; color: var(--ink); }
p { margin: 0; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--line-2); padding: .15em .4em; border-radius: 5px; }
code.select { user-select: all; word-break: break-all; }
::selection { background: var(--selection); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ic { width: 18px; height: 18px; flex: none; }
.ic-lg { width: 36px; height: 36px; color: var(--brand-deep); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

/* ---------- buttons ---------- */
.btn { --h: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: 600 .95rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; }
.btn .ic { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: inset 0 -2px 0 rgba(27, 23, 18, .14); }
.btn-primary:hover:not([disabled]) { background: var(--brand-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover:not([disabled]) { border-color: var(--line-strong); background: var(--soft); }
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-dark:hover:not([disabled]) { background: var(--ink-hover); }
.btn-light { background: var(--surface); color: var(--ink); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { --h: 34px; padding: 0 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { --h: 52px; padding: 0 24px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { --h: 34px; width: 34px; padding: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline { display: inline; }

/* ---------- status pills ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; font: 600 .72rem/1 var(--font); padding: 5px 8px; border-radius: 999px; font-style: normal; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-scheduled, .st-publishing { background: var(--info-soft); color: var(--info); }
.st-processing { background: var(--teal-soft); color: var(--teal); }
.st-published, .st-posted { background: var(--ok-soft); color: var(--ok); }
.st-inbox { background: var(--teal-soft); color: var(--teal); }
.st-draft, .st-needs_review { background: var(--warn-soft); color: var(--warn); }
.st-failed { background: var(--bad-soft); color: var(--bad); }
.st-cancelled { background: var(--line-2); color: var(--faint); }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 1.6rem/1 var(--serif); letter-spacing: -0.01em; color: var(--ink); font-synthesis: none; }
.logo img { border-radius: 8px; }

/* =========================================================
   Marketing site
   ========================================================= */
body.site { background: var(--paper); }
.site h1, .site h2, .site h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.012em; font-synthesis: none; }
.site h1 em, .site h2 em, .site h3 em { font-style: italic; color: var(--brand-deep); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--inverse); color: #fff; padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

.site .btn-lg { border-radius: 999px; padding: 0 26px; }
.site .btn-sm { border-radius: 999px; padding: 0 14px; }
.site .btn-ghost { background: transparent; border-color: var(--line-strong); box-shadow: none; }
.site .btn-ghost:hover:not([disabled]) { background: var(--surface); border-color: var(--ink-2); }

.site-nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 40px; height: 72px; }
.nav-links { display: flex; gap: 30px; margin-right: auto; }
.nav-links a, .nav-link { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .93rem; }
.nav-links a:hover, .nav-link:hover { color: var(--ink); }
.nav-only-mobile { display: none; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.microcopy { color: var(--muted); font-size: .88rem; }

/* sections */
.section { padding: 120px 0; }
.section-soft { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 0 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 600 .76rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section-head h2 { font-size: clamp(2.4rem, 4.8vw, 3.9rem); line-height: 1.02; letter-spacing: -0.02em; }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.12rem; max-width: 620px; }

.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.ticks .ic { width: 18px; height: 18px; padding: 2px; color: var(--brand-deep); margin-top: 3px; stroke-width: 2.5; }

/* detail grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.feature { padding: 32px 28px 34px 0; border-bottom: 1px solid var(--line-strong); }
.feature:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line-strong); }
.ic-box { width: 24px; height: 24px; color: var(--brand-deep); margin-bottom: 18px; }
.feature h4, .steps h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.feature p, .steps p { margin-top: 8px; color: var(--muted); font-size: .95rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps::before { content: ""; position: absolute; top: 28px; left: 56px; right: 33%; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.steps li { position: relative; padding-right: 12px; }
.step-n { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px; border-radius: 50%; background: var(--paper); border: 1px solid var(--ink); font: 400 1.7rem/1 var(--serif); color: var(--ink); }
.steps li:last-child .step-n { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }


/* pricing */
.pricing-wrap { display: grid; justify-items: center; }
.billing-toggle { display: inline-flex; padding: 4px; margin-bottom: 36px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.billing-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.billing-toggle label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); }
.billing-toggle label em { font-style: normal; font-size: .72rem; padding: 2px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.billing-toggle input:checked + label { background: var(--ink); color: var(--on-ink); }
.billing-toggle input:checked + label em { background: var(--brand); color: var(--on-brand); }
.billing-toggle input:focus-visible + label { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.pricing { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.plan { padding: 32px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.plan-featured { border-color: var(--picked); box-shadow: 0 0 0 1px var(--picked), var(--shadow-lg); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan-top h3, .plan-top h4 { font-size: 2rem; line-height: 1; }
.plan-blurb { margin-top: 8px; color: var(--muted); font-size: .95rem; line-height: 1.5; min-height: 3em; }
.badge-brand, .badge-soft { font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-brand { background: var(--brand); color: var(--on-brand); }
.badge-soft { background: var(--line-2); color: var(--muted); }
.price { margin: 22px 0 4px; display: flex; align-items: baseline; gap: 6px; }
.price b { font: 400 4rem/1 var(--serif); letter-spacing: -0.02em; font-synthesis: none; }
.price span { color: var(--muted); }
.price-note { color: var(--muted); font-size: .86rem; margin-bottom: 22px; }
.price-month { display: none; }
.pricing-wrap:has(#bill-month:checked) .price-year { display: none; }
.pricing-wrap:has(#bill-month:checked) .price.price-month { display: flex; }
.pricing-wrap:has(#bill-month:checked) .price-note.price-month { display: block; }
.pricing-wrap:has(#bill-month:checked) .btn.price-month { display: flex; }
.plan > p { color: var(--muted); }
.plan .ticks { margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line-2); font-size: .93rem; }
.fine { margin-top: 20px; text-align: center; color: var(--muted); font-size: .85rem; }
.fine a { color: var(--muted); }
.pricing-faq { margin: 80px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--line-strong); }
.pricing-faq > div { padding: 26px 0; border-bottom: 1px solid var(--line); }
.pricing-faq dt { font-weight: 600; }
.pricing-faq dd { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }

.pricing-more { margin-top: 28px; text-align: center; }
.pricing-more a { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.pricing-more a:hover { text-decoration: underline; }
.pricing-more .ic { width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* AI-credits popover (creditsTip in src/views/pricing.mjs; public/credit-tip.js adds tap and Escape).
   Desktop: beside the line, flipped to the left when there is no room (data-side). Narrow screens:
   below the line, as wide as the card (the card is the containing block, .ctip stays static). */
.plan { position: relative; }
.ctip { position: relative; display: inline-block; }
.ctip-btn { position: relative; z-index: 2; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: help; text-decoration: underline dotted var(--faint); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.ctip-btn:hover, .ctip-btn[aria-expanded="true"] { text-decoration-color: var(--brand-deep); }
.ctip-pop { position: absolute; z-index: 40; left: calc(100% + 14px); top: 50%; width: 300px; padding: 18px 18px 16px; border-radius: var(--r-lg); background: var(--inverse); color: #efe7da; box-shadow: var(--shadow-lg); outline: 1px solid var(--inverse-line); outline-offset: -1px; font-size: .85rem; line-height: 1.45; text-align: left; cursor: auto; visibility: hidden; opacity: 0; transform: translateY(-50%) translateX(-4px); transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s; }
/* An invisible bridge over the gap, so the pointer can move onto the popover without it closing. */
.ctip-pop::before { content: ""; position: absolute; top: 0; bottom: 0; left: -16px; width: 16px; }
.ctip[data-side="left"] .ctip-pop { left: auto; right: calc(100% + 14px); transform: translateY(-50%) translateX(4px); }
.ctip[data-side="left"] .ctip-pop::before { left: auto; right: -16px; }
.ctip:hover .ctip-pop, .ctip:focus-within .ctip-pop, .ctip-btn[aria-expanded="true"] + .ctip-pop { visibility: visible; opacity: 1; transform: translateY(-50%); transition-delay: 0s; }
.ctip.is-dismissed .ctip-pop { visibility: hidden; opacity: 0; transition: none; }
.ctip-h { margin: 0 0 8px; font: 600 .7rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-2); }
.ctip-list { margin: 0 0 14px; display: grid; gap: 6px; }
.ctip-row { display: flex; justify-content: space-between; gap: 14px; }
.ctip-row dt { color: #fff; font-weight: 500; }
.ctip-row dd { margin: 0; text-align: right; color: #d9cfbf; }
.ctip-row dd small { display: block; font-size: .75rem; color: #a2988b; }
.ctip-note { margin: 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); color: #d9cfbf; }
/* Without JavaScript, the last card in a row of four (or two) opens to the left. */
@media (min-width: 1081px) { .pricing > .plan:nth-child(4n) .ctip:not([data-side]) .ctip-pop { left: auto; right: calc(100% + 14px); } }
@media (min-width: 901px) and (max-width: 1080px) { .pricing > .plan:nth-child(2n) .ctip:not([data-side]) .ctip-pop { left: auto; right: calc(100% + 14px); } }
@media (max-width: 900px) {
  .ctip { position: static; }
  .ctip-pop, .ctip[data-side="left"] .ctip-pop { left: 16px; right: 16px; top: auto; width: auto; max-width: 420px; margin-top: 10px; transform: translateY(-4px); }
  .ctip-pop::before, .ctip[data-side="left"] .ctip-pop::before { left: 0; right: 0; top: -12px; bottom: auto; width: auto; height: 12px; }
  .ctip:hover .ctip-pop, .ctip:focus-within .ctip-pop, .ctip-btn[aria-expanded="true"] + .ctip-pop { transform: none; }
}

/* /pricing */
.pricing-hero { position: relative; padding: 88px 0 0; overflow: hidden; text-align: center; }
.pricing-hero::before { content: ""; position: absolute; left: 50%; top: -260px; width: 760px; height: 760px; margin-left: -380px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 138, 61, .14), transparent); pointer-events: none; }
.pricing-hero .container { position: relative; }
.pricing-hero h1 { max-width: 900px; margin: 0 auto; font-size: clamp(2.8rem, 6.4vw, 5.2rem); line-height: 1; letter-spacing: -0.02em; }
.pricing-hero .lede { margin: 22px auto 0; max-width: 640px; }
.section.pricing-cards { padding-top: 48px; }
.pricing-jump { margin-top: 28px; text-align: center; color: var(--faint); font-size: .92rem; }
.pricing-jump a { color: var(--ink-2); font-weight: 500; }
.pricing-jump a:hover { color: var(--brand-ink); }

.credit-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.credit-card { padding: 28px 32px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.credit-card h3 { font-size: 1.7rem; line-height: 1.1; margin-bottom: 14px; }
.credit-plans { margin-top: 14px; }
.credit-plans h3 { margin-bottom: 4px; }
.credit-plans .table-scroll { margin-top: 14px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.credit-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.credit-table th, .credit-table td { padding: 12px 0; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.credit-table th + *, .credit-table td + td { padding-left: 16px; }
.credit-table thead th { padding-top: 0; color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.credit-table tbody th { font-weight: 600; }
.credit-table tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.credit-table td { font-variant-numeric: tabular-nums; }
.credit-table tbody tr:last-child > * { border-bottom: 0; padding-bottom: 0; }
.credit-table tr.is-quiet { color: var(--muted); }
.credit-plans .credit-table td, .credit-plans .credit-table thead th:not(:first-child) { text-align: right; }
.credit-examples { margin: 0; display: grid; }
.credit-examples > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.credit-examples dt { color: var(--ink-2); }
.credit-examples dd { margin: 0; font: 400 1.6rem/1 var(--serif); white-space: nowrap; }
.credit-fine { margin-top: 14px; color: var(--muted); font-size: .88rem; }

.topup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 900px; }
.topup { padding: 28px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.topup > b { font: 400 3.4rem/1 var(--serif); letter-spacing: -0.02em; font-synthesis: none; }
.topup > span { margin-left: 8px; color: var(--muted); }
.topup-price { margin: 18px 0 4px; font-size: 1.3rem; font-weight: 600; }
#topups .fine { text-align: left; max-width: 900px; }

/* Comparison table: scrolls sideways on narrow screens with the feature column pinned. */
.cmp-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); }
.cmp { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: .93rem; }
.cmp th, .cmp td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); text-align: center; vertical-align: middle; }
.cmp tbody th[scope="row"] { text-align: left; font-weight: 500; color: var(--ink-2); }
.cmp th small, .cmp td small { display: block; font-size: .78rem; font-weight: 400; color: var(--muted); }
.cmp > :is(thead, tbody) > tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); width: 32%; min-width: 200px; box-shadow: 1px 0 0 var(--line-2); }
.cmp thead th { padding: 22px 18px; vertical-align: bottom; background: var(--surface); }
.cmp thead th b { display: block; font: 400 1.7rem/1 var(--serif); font-synthesis: none; }
.cmp thead th span:not(.sr-only) { display: block; margin: 6px 0 12px; color: var(--muted); font-size: .8rem; font-weight: 400; white-space: nowrap; }
.cmp thead th.is-featured { background: var(--brand-soft); }
.cmp .cmp-group th { padding: 22px 18px 10px; text-align: left; font: 600 .74rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); background: var(--paper); border-bottom-color: var(--line); }
.cmp > tbody > tr.cmp-group > th { position: sticky; left: 0; }
.cmp td { font-variant-numeric: tabular-nums; }
.cmp-yes .ic { width: 18px; height: 18px; color: var(--brand-deep); stroke-width: 2.5; vertical-align: middle; }
.cmp-no { color: var(--faint); }
.cmp-net { display: inline-flex; align-items: center; gap: 10px; }
.cmp tbody:last-child tr:last-child > * { border-bottom: 0; }

/* faq */
.faq { display: grid; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 0; font: 400 1.5rem/1.2 var(--serif); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 1.6rem/1 var(--font); color: var(--brand-deep); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 48px 24px 0; color: var(--muted); }
.faq a { color: var(--brand-ink); }

/* closing call to action, with a clock dial */
.cta-band { padding: 120px 0; }
.cta-inner { display: grid; justify-items: center; text-align: center; }
.dial { position: relative; width: 112px; height: 112px; margin-bottom: 32px; border-radius: 50%; border: 1px solid var(--ink); background: repeating-conic-gradient(from -1deg, var(--ink) 0 2deg, transparent 2deg 30deg); }
.dial::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--paper); }
.dial::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--brand); }
.dial i, .dial b { position: absolute; left: 50%; bottom: 50%; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); transform-origin: 50% 100%; }
.dial i { height: 26px; transform: rotate(270deg); }
.dial b { height: 40px; transform: rotate(0deg); background: var(--brand-deep); }
.cta-inner h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: 1; letter-spacing: -0.02em; max-width: 900px; }
.cta-inner > p { margin: 18px 0 32px; color: var(--muted); font-size: 1.12rem; max-width: 560px; }
.cta-inner > p.microcopy { margin: 14px 0 0; font-size: .88rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line-strong); padding: 64px 0 32px; background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 16px; color: var(--muted); max-width: 340px; font-size: .95rem; }
.footer-nets { display: flex; gap: 12px; }
.footer-nets .pf { width: 18px; height: 18px; opacity: .8; }
.footer-grid h4 { font: 600 .76rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.footer-grid div > a:not(.logo) { display: block; text-decoration: none; color: var(--ink-2); margin-bottom: 10px; font-size: .95rem; }
.footer-grid div > a:not(.logo):hover { color: var(--brand-ink); }
.footer-bottom { display: grid; grid-template-columns: auto 1fr; gap: 12px 48px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-bottom span:last-child { text-align: right; }

/* auth + content pages */
.auth { min-height: calc(100vh - 72px - 300px); display: grid; place-items: center; padding: 72px 24px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 40px; box-shadow: var(--shadow-lg); text-align: center; }
.auth-card > img { margin: 0 auto 18px; border-radius: 14px; }
.auth-card h1 { font-size: 2.2rem; line-height: 1.05; }
.auth-card > p { margin: 10px 0 26px; color: var(--muted); }
.auth-points { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 12px; text-align: left; }
.auth-points li { display: flex; gap: 10px; color: var(--ink-2); font-size: .9rem; }
.auth-points .ic { color: var(--brand-deep); margin-top: 2px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 14px; margin-top: 12px; }
.page-hero { padding: 80px 0 36px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.page-hero h1 { font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1.02; }
.prose { padding-bottom: 104px; color: var(--ink-2); font-size: 1.02rem; }
.prose h1 { font-size: 3rem; line-height: 1.05; margin-bottom: 16px; }
.prose h2 { font-size: 1.75rem; line-height: 1.15; margin: 44px 0 12px; }
.prose p, .prose ul, .prose table, .prose pre { margin: 0 0 16px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--brand-deep); }
.prose a { color: var(--brand-ink); }
.prose .lede { margin: 0 0 24px; font-size: 1.12rem; max-width: none; }
.prose pre { background: var(--inverse); color: #efe7da; padding: 18px 20px; border-radius: var(--r); overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; padding: 0; color: inherit; }
/* Copy buttons (copyBlock / copyInline in src/views/ui.mjs, public/site.js) */
.copy-block { position: relative; }
.copy-block pre { padding-right: 96px; }
.copy-btn { display: inline-flex; flex: none; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font: 600 .74rem var(--font); cursor: pointer; }
.copy-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.copy-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.copy-btn .ic { width: 13px; height: 13px; }
.copy-btn.is-done { color: var(--ok); }
.copy-block .copy-btn { position: absolute; top: 10px; right: 10px; border-color: transparent; background: var(--copy-on-code); color: #efe7da; }
.copy-block .copy-btn:hover { background: var(--copy-on-code-hover); color: #fff; }
.copy-block .copy-btn.is-done { color: var(--copy-done); }
.copy-inline { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle; }
.copy-inline code { overflow-wrap: anywhere; }
.copy-scratch { position: fixed; top: 0; left: -9999px; opacity: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
/* Wide tables (privacy, terms, docs) scroll inside themselves on narrow screens. */
@media (max-width: 760px) { .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } }
.prose { overflow-wrap: break-word; }
.prose a { overflow-wrap: anywhere; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 56px; }
.docs-toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 4px; }
.docs-toc b { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 8px; }
.docs-toc a { text-decoration: none; color: var(--ink-2); padding: 6px 10px; border-radius: 8px; font-size: .92rem; }
.docs-toc a:hover { background: var(--paper-2); }

/* =========================================================
   App
   ========================================================= */
body.app { background: var(--soft); }
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--surface) 247px, var(--line) 247px, var(--line) 248px, transparent 248px); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 20px 16px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.side-top { display: grid; gap: 18px; }
.side-top .logo { padding: 4px 6px; }
.side-nav { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font: 500 .93rem var(--font); background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.side-link:hover { background: var(--soft); color: var(--ink); }
.side-link.is-active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.side-link.small { font-size: .85rem; color: var(--muted); padding: 7px 10px; }
.side-link .ic { width: 17px; height: 17px; }
.side-bottom { display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font: 600 .74rem var(--font); font-style: normal; color: var(--muted); background: var(--line-2); }
.side-link.is-active .side-badge { color: var(--brand-ink); background: var(--surface); }
.side-badge.is-warn, .side-link.is-active .side-badge.is-warn { color: #fff; background: var(--warn); }
.avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line-2); }
.avatar-fallback { display: inline-grid; place-items: center; background: var(--grad); color: #fff; font: 700 .72rem var(--font); }
.avatar-xs { width: 20px; height: 20px; font-size: .62rem; }
.avatar-md { width: 40px; height: 40px; font-size: .95rem; }
.app-main { padding: 32px 40px 64px; max-width: 1360px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-line); margin-bottom: 20px; font-weight: 500; }
.banner-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.banner code { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.panel-head { margin-bottom: 16px; }
.panel-head h2 { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.panel-head p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.panel-head p a { color: var(--brand-ink); }
.panel-danger { border-color: var(--bad-line); }
.agent-setup-title { font-size: .95rem; font-weight: 700; margin-top: 22px; }
.agent-setup-title + .muted { font-size: .88rem; margin: 4px 0 12px; }
.agent-setup details { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; overflow: hidden; }
.agent-setup summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: .9rem; }
.agent-setup pre { margin: 0; padding: 14px; background: var(--inverse); color: #efe7da; overflow-x: auto; font-size: .8rem; line-height: 1.6; }
.agent-setup pre code { background: none; padding: 0; word-break: normal; white-space: pre; }
.app-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.app-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; }
.app-list li div { display: grid; gap: 2px; min-width: 0; }
.app-list li span { overflow-wrap: anywhere; }
.consent .auth-form { gap: 10px; }
.count { font: 600 .78rem var(--font); color: var(--muted); background: var(--line-2); padding: 2px 8px; border-radius: 999px; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font: 700 .78rem var(--font); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 2px; box-shadow: var(--shadow-sm); }
.stat span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat b { font: 800 1.7rem/1.2 var(--display); letter-spacing: -0.03em; }
.stat small { color: var(--faint); font-size: .8rem; }
.stat small a { color: var(--brand-ink); font-weight: 600; }
.stat-warn { border-color: var(--warn-line); background: linear-gradient(var(--surface), color-mix(in srgb, var(--warn-soft) 45%, var(--surface))); }
.stat-bad { border-color: var(--bad-line); background: linear-gradient(var(--surface), color-mix(in srgb, var(--bad-soft) 45%, var(--surface))); }
.empty { text-align: center; padding: 48px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); margin-bottom: 18px; }
.empty .ic-lg { margin: 0 auto 12px; }
.empty h3 { font-size: 1.15rem; }
.empty p { color: var(--muted); margin: 6px 0 18px; }
.empty .btn-row { justify-content: center; }

/* calendar */
.cal { padding: 18px; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav h2 { font-size: 1.05rem; margin-left: 8px; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
/* empty week (public/calendar.js): one compact row, a sleeping Otto, no extra chrome */
.cal-empty { display: flex; align-items: center; gap: 12px; margin: -2px 0 12px; padding: 6px 12px 6px 8px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line-2); }
.cal-empty p { flex: 1; margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.cal-empty p span { color: var(--muted); font-size: .9rem; }
.cal-empty .btn { flex: none; }
.cal-empty-otto { width: 44px; margin: -6px -2px -8px 0; }
.cal-col { background: var(--soft); border-radius: 12px; padding: 8px; min-height: 360px; display: flex; flex-direction: column; gap: 8px; }
.cal-col.is-today { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.cal-col.is-past { opacity: .85; }
.cal-day { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 4px; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-day b { font: 800 1.1rem var(--display); color: var(--ink); letter-spacing: -0.02em; }
.is-today .cal-day b { color: var(--brand-ink); }
.cal-add { display: flex; align-items: center; justify-content: center; height: 30px; border-radius: 8px; border: 1px dashed var(--line-strong); color: var(--faint); text-decoration: none; opacity: 0; transition: opacity .15s; }
.cal-add .ic { width: 15px; height: 15px; }
.cal-col:hover .cal-add { opacity: 1; }
.cal-card { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); color: inherit; }
.cal-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.cal-card img, .cal-card .thumb-ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cal-card .meta { padding: 7px 8px 8px; display: grid; gap: 4px; font-size: .74rem; color: var(--muted); }
.cal-card .meta b { color: var(--ink); font-size: .8rem; }
.cal-card .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-card .st { justify-self: start; font-size: .62rem; padding: 3px 6px; }
/* Day / Week / Month (public/calendar.js) */
.cal-views { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.cal-view { padding: 5px 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.cal-view:hover { color: var(--ink); }
.cal-view[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.cal-daylink { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.cal-daylink:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.cal-day .cal-daylink { font: 800 1.1rem var(--display); color: var(--ink); letter-spacing: -0.02em; }
.is-today .cal-day .cal-daylink { color: var(--brand-ink); }
/* day: one wide list */
.cal-grid.is-day { grid-template-columns: minmax(0, 1fr); }
.cal-dayview { display: grid; align-content: start; gap: 8px; min-height: 360px; padding: 10px; border-radius: 12px; background: var(--soft); }
.cal-dayview.is-today { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.cal-row { display: grid; grid-template-columns: 76px 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 14px 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; }
.cal-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.cal-row-time { font-size: .9rem; }
.cal-row img, .cal-row .thumb-ph { width: 56px; height: 70px; border-radius: 8px; object-fit: cover; font-size: .66rem; }
.cal-row .thumb-text { -webkit-line-clamp: 3; min-height: 0; padding: 6px; }
.cal-row-text { display: grid; gap: 2px; min-width: 0; }
.cal-row-account { color: var(--muted); font-size: .78rem; font-weight: 600; }
.cal-row-text p { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.cal-row-text small { color: var(--bad); font-size: .76rem; }
.cal-add-row { width: 100%; height: 40px; opacity: 1; font-size: .86rem; }
/* month: a 7-column grid of days with one-line posts */
.cal-grid.is-month { gap: 6px; }
.cal-wkday { padding: 0 6px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cal-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 112px; padding: 6px; border-radius: 10px; background: var(--soft); }
.cal-cell > .cal-daylink { align-self: flex-start; min-width: 24px; padding: 1px 6px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.cal-cell.is-today { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.cal-cell.is-today > .cal-daylink { background: var(--brand); color: #fff; }
.cal-cell.is-out { opacity: .5; }
.cal-chip { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 2px 6px; border-radius: 6px; background: var(--surface); color: inherit; font-size: .72rem; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.cal-chip:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.cal-chip b { flex: none; font-weight: 600; }
.cal-chip span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.cal-chip-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.cal-chip.is-published .cal-chip-dot, .cal-chip.is-inbox .cal-chip-dot { background: var(--ok); }
.cal-chip.is-failed .cal-chip-dot, .cal-chip.is-needs_review .cal-chip-dot { background: var(--bad); }
.cal-chip.is-draft .cal-chip-dot { background: var(--warn); }
.cal-more { align-self: flex-start; padding: 0 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; }
.cal-more:hover { color: var(--ink); }
.thumb-ph { display: grid; place-items: center; background: var(--line-2); color: var(--faint); }

/* post list */
.post-list { display: grid; }
.post-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 170px auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.post-row:first-child { border-top: 0; }
.post-thumb img, .post-thumb .thumb-ph { width: 56px; height: 70px; object-fit: cover; border-radius: 9px; }
.post-top { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.post-caption { color: var(--ink-2); font-size: .9rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-error { display: flex; gap: 6px; align-items: center; color: var(--bad); font-size: .84rem; margin-top: 6px; }
.post-error .ic { width: 15px; height: 15px; }
.post-when { display: grid; gap: 6px; justify-items: start; font-size: .85rem; color: var(--muted); }
.post-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* settings */
.acct-list { display: grid; gap: 4px; margin-bottom: 16px; }
.acct-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.acct-row:first-child { border-top: 0; }
.acct-row b { display: block; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 8px; }
.hint.strong { color: var(--ink-2); font-weight: 600; }

/* composer */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.sticky { position: sticky; top: 20px; }
.field { display: grid; gap: 6px; margin: 16px 0 0; border: 0; padding: 0; min-width: 0; }
.field > span, legend { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field em { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 6px; font-size: .82rem; }
legend { margin-bottom: 8px; }
input:not([type]), input[type="text"], input[type="url"], input[type="email"], input[type="password"], input[type="datetime-local"], select, textarea { font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); width: 100%; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 106, 31, .12); }
textarea { resize: vertical; min-height: 120px; }
.counter { justify-self: end; font-size: .78rem; color: var(--faint); }
.creator { display: flex; gap: 10px; align-items: center; margin-top: 12px; color: var(--muted); font-size: .9rem; }
.creator img { width: 32px; height: 32px; border-radius: 50%; }
.alert { background: var(--bad-soft); border: 1px solid var(--bad-line); color: var(--bad); border-radius: 10px; padding: 10px 14px; margin-top: 12px; font-size: .9rem; }
.alert ul { margin: 0; padding-left: 1.1em; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; background: var(--surface); transition: border-color .15s, background .15s; }
.seg label:hover { border-color: var(--line-strong); }
.seg input { accent-color: var(--brand); margin: 0; }
.seg .ic { width: 16px; height: 16px; color: var(--muted); }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); box-shadow: 0 0 0 3px rgba(255, 106, 31, .1); }
.seg label:has(input:checked) .ic { color: var(--brand-ink); }
.seg label:has(input:disabled) { cursor: default; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 2px dashed var(--line-strong); border-radius: var(--r); padding: 28px 20px; text-align: center; color: var(--muted); cursor: pointer; margin: 14px 0 10px; background: var(--soft); transition: border-color .15s, background .15s; }
.drop .ic { width: 24px; height: 24px; color: var(--faint); }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.media-list { display: grid; gap: 6px; }
.media-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; }
.media-item.error { border-color: var(--bad-line); background: var(--bad-soft); }
.media-item .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: .93rem; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.check small { color: var(--muted); }
.check-row { display: flex; gap: 20px; flex-wrap: wrap; }
.check-row .check { margin: 0; }
.is-disabled { opacity: .45; cursor: not-allowed; }
.disclose { border: 0; border-top: 1px solid var(--line); margin: 18px 0 0; padding: 18px 0 0; }
.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 4px rgba(255, 106, 31, .2); }
.preview { background: var(--inverse); border-radius: var(--r); min-height: 240px; display: grid; place-items: center; overflow: hidden; color: #e6ddd0; padding: 10px; }
.preview video { width: 100%; max-height: 440px; border-radius: 8px; }
.photo-strip { display: flex; gap: 6px; overflow-x: auto; width: 100%; }
.photo-strip img { height: 260px; border-radius: 8px; }
.preview-title { font-weight: 700; margin: 10px 4px 0; justify-self: start; color: #fff; }
.preview-caption { white-space: pre-wrap; font-size: .85rem; margin: 6px 4px; justify-self: start; max-height: 120px; overflow: auto; }
.declaration { font-size: .85rem; color: var(--muted); margin-top: 14px; }
.declaration a { color: var(--brand-ink); }
.consent { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }


/* ---------- platforms ---------- */
.pf { width: 20px; height: 20px; flex: none; }
.pf-lg { width: 30px; height: 30px; }

/* ---------- admin ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-grid > .panel { margin-bottom: 18px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-bar { fill: var(--brand); }
.chart-col:hover .chart-bar { fill: var(--brand-deep); }
.chart-hit { fill: transparent; }
.chart-col:hover .chart-hit { fill: var(--line-2); }
.chart-grid { stroke: var(--line-2); stroke-width: 1; }
.chart-axis { fill: var(--faint); font: 500 11px var(--font); }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px 96px; align-items: center; gap: 10px; font-size: .9rem; }
.hbar svg { width: 100%; height: 12px; display: block; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.hbar small { color: var(--warn); font-size: .8rem; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.data-table th { color: var(--muted); font-weight: 600; font-size: .8rem; white-space: nowrap; }
.data-table td:first-child { white-space: nowrap; }
.data-table.num td:not(:first-child), .data-table.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.data-table code { font-size: .8rem; }

/* ---------- landing (landing() in src/views/site.mjs, public/home.js) ---------- */
/* hero: one centred statement, one line, one button; the marquee below is its picture */
.hero { position: relative; isolation: isolate; padding: 36px 0 40px; }
/* The agents card's dot texture, shared: the hero (fading down), the analytics tile (fading from its
   left edge into the chart) and the last call (fading down). */
.hero::before, .dt-tile#analytics::before, .last-call::before { content: ""; position: absolute; z-index: -1; background-image: radial-gradient(var(--dots) 1px, transparent 1.3px); background-size: 18px 18px; pointer-events: none; }
.hero::before { top: 0; right: 0; left: 0; height: 420px; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.dt-tile#analytics { position: relative; isolation: isolate; }
.dt-tile#analytics::before { top: 0; bottom: 0; left: 0; width: 62%; -webkit-mask-image: linear-gradient(90deg, #000, transparent); mask-image: linear-gradient(90deg, #000, transparent); }
.last-call { position: relative; isolation: isolate; overflow: hidden; }
.last-call::before { --dots: rgba(246, 239, 228, .14); inset: 0 0 auto; height: 100%; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.hero-center { display: grid; justify-items: center; text-align: center; }
/* Otto sits after the headline's last word; his negative margin keeps the centred lines centred.
   His artwork has ~11% empty space below the tentacles, so he is dropped .2em to sit on the baseline */
.hero h1 .hero-otto { width: 84px; margin: 0 -92px 0 8px; vertical-align: -0.2em; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -0.025em; }
.hero h1 .h1-a, .hero h1 .h1-b { display: block; }
/* the rotating agent: the word on show is in the line (so the line centres on it), the others wait
   on top of it; public/home.js eases the slot's width between words. Otto follows the name. */
.slot-g { white-space: nowrap; }
.slot { position: relative; display: inline-block; vertical-align: bottom; transition: width .5s cubic-bezier(.65, 0, .35, 1); }
.slot-w { position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; gap: .16em; white-space: nowrap; opacity: 0; transform: translateY(.3em); transition: opacity .35s ease, transform .35s ease; }
.slot-w.is-on { position: relative; opacity: 1; transform: none; }
.slot-w .ag-mark { width: .74em; height: .74em; }
.slot-line { position: absolute; left: -3%; bottom: -.12em; width: 106%; height: .16em; overflow: visible; }
.slot-line path { fill: none; stroke: var(--brand); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.slot-w.is-on .slot-line path { animation: squiggle .7s .2s ease-out forwards; }
@keyframes squiggle { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .slot-w { transition: none; } .slot-line path, .slot-w.is-on .slot-line path { stroke-dashoffset: 0; animation: none; } }
.hero-lede { max-width: 34em; margin-top: 20px; font-size: 1.18rem; line-height: 1.5; color: var(--ink-2); text-wrap: balance; }
.hero .hero-cta { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; margin-top: 30px; }
.hero-link { color: var(--ink-2); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.hero-link:hover { color: var(--ink); text-decoration-color: var(--brand-deep); }

/* the newest viral posts, one row moving right to left; the track holds the cards twice and moves by
   one copy, so it loops without a seam */
.trending { padding: 8px 0 72px; }
.marquee { overflow: hidden; padding: 6px 0 10px; }
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-set { display: flex; gap: 16px; padding-right: 16px; }
.marquee .vl-card { flex: none; width: 196px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; padding: 0 24px; }
  .marquee-set[aria-hidden] { display: none; }
}
.trending-more { margin-top: 28px; text-align: center; }

/* section headings */
.stage { padding: 72px 0; }
.stage h2, .lines h2, .agents h2, .smp h2 { font-size: clamp(2.4rem, 4.8vw, 3.9rem); line-height: 1.02; letter-spacing: -0.02em; text-align: center; }
.stage-lede { max-width: 34em; margin: 14px auto 0; color: var(--muted); font-size: 1.12rem; text-align: center; }
/* slide decks (public/home.js fades through them; slide 1 shows without it) */
.deck { position: absolute; inset: 0; }
.deck-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.deck-slide.is-on { opacity: 1; }

/* find, make, schedule, post: a tour in a picture of the app (tour() in src/views/site.mjs) */
.lines { padding: 80px 0; background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* The detail tiles, below the AI samples: same band, no heading, so the first tile needs no top gap. */
.lines-more .dt { margin-top: 0; }
.tree-card { display: grid; justify-items: center; gap: 10px; margin: 0; }
.tree-shot { position: relative; display: block; width: 156px; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 16px; background: #000; box-shadow: 0 14px 30px -18px rgba(27, 23, 18, .55); }
.tree-card.is-made .tree-shot::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px var(--brand); pointer-events: none; }
.tree-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the version label sits above the card, never on the slides */
.tree-tag { margin-bottom: -2px; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .72rem; font-weight: 600; }
.tree-card.is-made .tree-tag { border-color: var(--brand); color: var(--brand-ink); }
.tree-card figcaption { display: grid; justify-items: center; gap: 4px; text-align: center; }
.tree-card figcaption b { color: var(--ink); font-size: .9rem; font-weight: 600; }
.tree-card figcaption span { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.pipe-link { display: block; overflow: visible; }
.pipe-link.is-h { width: 56px; height: 20px; }
/* the flowing dots: round caps on very short dashes */
.flow { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-dasharray: .1 16; animation: tree-flow 1.6s linear infinite; }
@keyframes tree-flow { to { stroke-dashoffset: -16.1; } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } }

/* stage 3: the week calendar (an illustration of the app), Otto peeking over its top edge */
.sched { display: grid; justify-items: center; width: 100%; }
.sched-cal { position: relative; width: 100%; margin-top: 36px; }
.wk { position: relative; z-index: 1; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); text-align: left; }
.wk-bar { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.wk-brand { display: inline-flex; align-items: center; gap: 8px; font: 400 1.15rem var(--serif); }
.wk-brand img { border-radius: 4px; }
.wk-range { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: .74rem; font-weight: 600; }
.wk-range .ic { width: 12px; height: 12px; color: var(--faint); }
.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wk-col { display: flex; flex-direction: column; gap: 6px; min-height: 196px; padding: 8px 5px 10px; border-left: 1px solid var(--line-2); }
.wk-col:nth-child(7n + 1) { border-left: 0; }
.wk-col.is-next { border-top: 1px solid var(--line-2); }
.wk-col.is-today { background: var(--today); box-shadow: inset 0 2px 0 var(--brand); }
.wk-day { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px 2px; color: var(--muted); font-size: .66rem; font-weight: 600; }
.wk-day b { color: var(--ink); font: 400 1.15rem/1 var(--serif); }
.is-today .wk-day b { color: var(--brand-deep); }
.wk-card { display: grid; gap: 3px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow-sm); }
.wk-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }
.wk-card.is-text { background: var(--paper); }
.wk-meta { display: flex; align-items: center; justify-content: space-between; gap: 3px; font-size: .56rem; }
.wk-meta b { font-weight: 600; white-space: nowrap; }
.wk-nets { display: inline-flex; align-items: center; gap: 2px; }
.wk-nets .pf { width: 9px; height: 9px; }
.wk-nets em { color: var(--muted); font-style: normal; font-size: .5rem; font-weight: 600; }
.wk-card p { display: -webkit-box; overflow: hidden; color: var(--ink-2); font-size: .58rem; line-height: 1.25; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wk-card.is-text p { color: var(--ink); font: italic 400 .72rem/1.2 var(--serif); -webkit-line-clamp: 3; }
.wk-card .st { justify-self: start; padding: 2px 5px; font-size: .5rem; }
/* the remade post landing on Thursday at 9:00 AM: lifted over its slot, then set down */
.wk-slot { border: 1.5px dashed var(--brand-line); border-radius: 8px; }
.wk-card.is-drop { position: relative; z-index: 2; margin: -1.5px; outline: 2px solid var(--brand); outline-offset: -1px; animation: wk-drop 4.8s ease-in-out infinite; }
@keyframes wk-drop {
  0%, 34% { transform: translate(2px, -7px) rotate(-4deg); box-shadow: var(--shadow-lg); }
  50%, 100% { transform: none; box-shadow: var(--shadow-sm); }
}
@media (prefers-reduced-motion: reduce) { .wk-card.is-drop { animation: none; } }
/* one trunk from the middle of the calendar, then a fan out to every network (dots the same size as
   the other lines: the fan's viewBox is drawn larger and scaled down) */
.pipe-link.sched-trunk { width: 20px; height: 40px; }
.sched-fan { display: block; width: 100%; height: auto; overflow: visible; }
.sched-fan .flow { stroke-width: 7.5; stroke-dasharray: .1 24; animation-name: fan-flow; }
@keyframes fan-flow { to { stroke-dashoffset: -24.1; } }
.sched-nets { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; margin: 4px 0 0; padding: 0; text-align: center; }
.sched-nets li { display: grid; justify-items: center; gap: 6px; }
.stop { display: grid; place-items: center; width: 44px; height: 44px; border: 3px solid var(--brand); border-radius: 50%; background: var(--surface); }
.stop .pf { width: 19px; height: 19px; }
.sched-nets b { font: 400 1.1rem/1 var(--serif); font-synthesis: none; }


/* Segmented tabs (the tour and the agents): a pill track with the picked tab raised in it, and a thin
   progress line under the picked tab that public/home.js fills while that step is on show, so people
   can see it will move on by itself. */
.pill-tabs { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 2px; max-width: 100%; padding: 4px; overflow-x: auto; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent); scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.seg-btn, .pill-tabs .ag-tabbtn { position: relative; display: inline-flex; flex: none; align-items: center; gap: 8px; height: 38px; padding: 0 18px; overflow: hidden; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 500 .9rem var(--font); white-space: nowrap; cursor: pointer; transition: color .15s, background-color .2s, box-shadow .2s, scale .15s; }
.seg-btn:hover, .pill-tabs .ag-tabbtn:hover { color: var(--ink); }
.seg-btn:active, .pill-tabs .ag-tabbtn:active { scale: .97; }
.seg-btn[aria-selected="true"], .pill-tabs .ag-tabbtn[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(60, 40, 20, .08), 0 3px 8px -3px rgba(60, 40, 20, .14); }
.seg-btn .ic { width: 16px; height: 16px; }
.seg-bar { position: absolute; left: 18px; right: 18px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--brand); opacity: 0; transform: scaleX(0); transform-origin: left center; pointer-events: none; }
[aria-selected="true"] > .seg-bar { opacity: .85; }
/* the agents' line runs as a CSS animation, timed per scene by public/home.js */
.ag-tabbtn.is-running .seg-bar { animation: seg-fill linear forwards; }
@keyframes seg-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .seg-bar { display: none; } }

/* the tour: a picture of the app with a browser bar, the sidebar following the step */
.tour { display: grid; justify-items: center; margin-top: 40px; }
.tour-win { width: 100%; margin-top: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); text-align: left; }
.tour-chrome { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; border-bottom: 1px solid var(--line); background: var(--paper); }
.tour-chrome .ag-dots { position: absolute; left: 16px; }
.tour-url { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 8px; background: var(--paper-2); color: var(--muted); font: 500 .76rem var(--mono); }
.tour-url .ic { width: 12px; height: 12px; }
.tour-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); height: 500px; }
.tour-side { display: flex; flex-direction: column; gap: 2px; padding: 18px 10px; border-right: 1px solid var(--line); background: var(--paper); }
.tour-brand { display: flex; align-items: center; gap: 8px; margin: 0 8px 16px; font: 400 1.35rem/1 var(--serif); }
.tour-brand img { border-radius: 5px; }
.tour-nav { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: .84rem; font-weight: 500; transition: background-color .3s, color .3s; }
.tour-nav .ic { width: 15px; height: 15px; color: var(--muted); }
.tour-nav.is-on { background: var(--paper-3); color: var(--ink); }
.tour-nav.is-on .ic { color: var(--brand-deep); }
.tour-panels { min-width: 0; min-height: 0; overflow: hidden; }
.tour-panel { height: 100%; padding: 22px 26px; animation: tour-in .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes tour-in { from { opacity: 0; filter: blur(4px); transform: translateY(8px); } }
/* Find */
.tour-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.tour-head > b { font: 400 1.65rem/1 var(--serif); }
.tour-filter { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: .82rem; font-weight: 600; }
.tour-filter .ic { width: 14px; height: 14px; color: var(--muted); }
.tour-filter em { padding: 3px 8px; border-radius: 6px; background: var(--paper-2); color: var(--muted); font-size: .74rem; font-style: normal; font-weight: 500; }
.tour-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
/* a second row runs off the bottom of the window, so the library reads as a long scrolling list */
.tour-panel.is-find { overflow: hidden; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.tour-grid .vl-caption { -webkit-line-clamp: 2; }
/* The picked post: the other cards fade back, the ring draws around it, a pulse goes out and a
   "Remaking this one" tag drops in. Plays each time the Find step shows (its panel is unhidden). */
.tour-grid .vl-card:hover { transform: none; box-shadow: var(--shadow-sm); }
.tour-og, .tour-grid .tour-og:hover { z-index: 1; box-shadow: 0 0 0 3px var(--brand), 0 14px 30px -14px rgba(255, 106, 31, .6); }
.tour-pick { position: absolute; z-index: 3; top: 50%; left: 50%; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .55); transform: translate(-50%, -50%); }
.tour-pick .ic { width: 12px; height: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .tour-panel.is-find .vl-card:not(.tour-og) { animation: pick-dim 1s ease 1.1s both; }
  .tour-panel.is-find .tour-og { animation: pick-ring .7s cubic-bezier(.2, .7, .2, 1.3) 1.1s both, pick-pulse 1.4s ease-out 1.8s 3; }
  .tour-panel.is-find .tour-pick { animation: pick-tag .55s cubic-bezier(.2, .7, .2, 1.4) 1.5s both; }
}
@keyframes pick-dim { to { opacity: .4; filter: saturate(.6); } }
@keyframes pick-ring { from { box-shadow: 0 0 0 0 var(--brand); transform: none; } to { box-shadow: 0 0 0 3px var(--brand), 0 18px 34px -12px rgba(255, 106, 31, .7); transform: scale(1.05); } }
@keyframes pick-pulse { from { box-shadow: 0 0 0 3px var(--brand), 0 0 0 3px rgba(255, 106, 31, .7); } to { box-shadow: 0 0 0 3px var(--brand), 0 0 0 16px rgba(255, 106, 31, 0); } }
@keyframes pick-tag { from { opacity: 0; transform: translate(-50%, -30%) scale(.7); } }
/* Make: the original over the studio's version, slide for slide; public/home.js walks a highlight
   across the pairs (.mk[data-cur]); without it every slide shows plainly */
.mk { display: grid; align-content: center; justify-content: center; gap: 14px; height: 100%; }
.mk-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 16px; }
.mk-label { display: grid; justify-items: start; gap: 4px; }
.mk-label .tree-tag { margin-bottom: 4px; }
.mk-label b { font-size: .88rem; font-weight: 600; }
.mk-label span:last-child { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.mk-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 96px)); gap: 8px; text-decoration: none; }
.mk-slide { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: #000; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); transition: opacity .45s ease, transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease; }
.mk-row.is-made .mk-slide { box-shadow: 0 0 0 1.5px var(--brand-line), var(--shadow-sm); }
/* Sendhour's version stands out: a warm panel with a glowing border that slowly travels around it,
   Otto celebrating beside it and a filled "Made by Sendhour" tag. */
.mk-row.is-made { position: relative; isolation: isolate; margin: 0 -12px; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--brand-soft) 70%, transparent); }
.mk-row.is-made::before { content: ""; position: absolute; z-index: -1; inset: 0; padding: 1.5px; border-radius: inherit; background: conic-gradient(from var(--mk-turn, 0deg), var(--brand-line), var(--brand) 12%, var(--brand-line) 30%, var(--brand-line) 62%, var(--brand) 74%, var(--brand-line) 92%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.mk-row.is-made::after { content: ""; position: absolute; z-index: -2; inset: 8%; border-radius: inherit; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 22%, transparent), transparent); filter: blur(18px); opacity: .7; }
.mk-label .tree-tag.is-made { display: inline-flex; align-items: center; gap: 5px; border-color: var(--brand); background: var(--brand); color: #fff; }
.mk-label .tree-tag.is-made .ic { width: 12px; height: 12px; }
.mk-otto { margin: -10px 0 -2px -6px; }
@property --mk-turn { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes mk-turn { to { --mk-turn: 360deg; } }
@media (prefers-reduced-motion: no-preference) {
  .mk-row.is-made::before { animation: mk-turn 6s linear infinite; }
}
.mk[data-cur] .mk-slide { opacity: .92; }
.mk[data-cur="0"] .mk-slide:nth-child(1), .mk[data-cur="1"] .mk-slide:nth-child(2), .mk[data-cur="2"] .mk-slide:nth-child(3),
.mk[data-cur="3"] .mk-slide:nth-child(4), .mk[data-cur="4"] .mk-slide:nth-child(5), .mk[data-cur="5"] .mk-slide:nth-child(6) { opacity: 1; transform: translateY(-4px) scale(1.04); box-shadow: 0 0 0 2px var(--brand), 0 12px 24px -12px rgba(60, 40, 20, .5); }
.mk-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: 166px; }
.mk-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: .78rem; font-weight: 600; }
.mk-opt .ic { width: 14px; height: 14px; color: var(--muted); }
.mk-more { margin-left: 166px; color: var(--muted); font-size: .78rem; }
.tour-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--brand-line); border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.tour-pill .ic { width: 14px; height: 14px; }
/* Schedule */
.tour-panel.is-schedule { padding-top: 6px; }
.tour .wk { box-shadow: var(--shadow); }
/* two weeks fill the window: equal rows, shorter thumbnails */
.tour-panel.is-schedule { display: flex; flex-direction: column; }
.tour .sched-cal { flex: 1; min-height: 0; margin-top: 30px; }
.tour .wk { display: flex; flex-direction: column; height: 100%; }
.tour .wk-grid { flex: 1; min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.tour .wk-col { min-height: 0; overflow: hidden; }
.tour .wk-card img { aspect-ratio: 2 / 1; }
/* Post */
.tour-panel.is-post { display: grid; align-items: center; }
.sched-post { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: min(440px, 100%); padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.sched-post img { width: 40px; height: 56px; object-fit: cover; border-radius: 7px; }
.sched-post b { display: block; font-size: .9rem; }
.sched-post span { color: var(--muted); font-size: .8rem; }
.sched-nets li .st { padding: 3px 7px; font-size: .62rem; }
.tour-panel.is-post .sched-nets li { animation: tag-in .45s cubic-bezier(.2, .7, .2, 1.3) both; }
.tour-panel.is-post .sched-nets li:nth-child(2) { animation-delay: .08s; }
.tour-panel.is-post .sched-nets li:nth-child(3) { animation-delay: .16s; }
.tour-panel.is-post .sched-nets li:nth-child(4) { animation-delay: .24s; }
.tour-panel.is-post .sched-nets li:nth-child(5) { animation-delay: .32s; }
.tour-panel.is-post .sched-nets li:nth-child(6) { animation-delay: .4s; }
.tour-panel.is-post .sched-nets li:nth-child(7) { animation-delay: .48s; }
@media (prefers-reduced-motion: reduce) { .tour-panel, .tour-panel.is-post .sched-nets li { animation: none; } }

/* the details: tiles with a small picture of the real screen each */
/* wide tiles (settings, analytics) put the copy beside the picture; the two small tiles share a row */
.dt { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.dt-tile { display: flex; flex-direction: column; gap: 6px; padding: 26px 26px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
.dt-tile.is-wide { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); align-items: center; gap: 48px; padding: 30px 30px 30px 34px; }
.dt-tile.is-wide .dt-pic { margin-top: 0; padding-bottom: 0; min-height: 0; }
.dt-copy { display: grid; align-content: start; gap: 6px; }
.dt-tile#analytics h3 { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.04; }
@supports (selector(:has(*))) { .dt:not(:has(.is-wide)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dt:not(:has(.is-wide)) .dt-tile { grid-column: auto; } }
.dt-tile h3 { font: 400 1.7rem/1.08 var(--serif); letter-spacing: -.01em; }
.dt-tile p { max-width: 32em; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.dt-pic { display: grid; flex: 1; align-content: center; min-height: 140px; margin-top: 14px; padding-bottom: 26px; }
.dt-pic b { display: block; overflow: hidden; font-size: .84rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dt-pic div > span { color: var(--muted); font-size: .76rem; }
.dt-nets { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dt-nets li { display: grid; grid-template-columns: 16px 74px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .8rem; }
.dt-nets .pf { width: 16px; height: 16px; }
.dt-field { display: flex; justify-content: space-between; gap: 8px; min-width: 0; padding: 5px 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); white-space: nowrap; }
.dt-field em { overflow: hidden; color: var(--ink); font-style: normal; font-weight: 600; text-overflow: ellipsis; }
.dt-toggles { display: flex; gap: 4px; }
.dt-toggles i { padding: 3px 8px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-size: .68rem; font-style: normal; font-weight: 600; }
.dt-draft, .dt-check { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.dt-draft img { width: 40px; height: 52px; object-fit: cover; border-radius: 6px; }
.dt-pic .dt-btn { grid-column: 1 / -1; justify-self: end; padding: 6px 12px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-size: .76rem; font-weight: 600; }
.dt-check .stop { width: 38px; height: 38px; border-color: var(--warn); }
.dt-check .stop .pf { width: 16px; height: 16px; }
.dt-swap { display: grid; justify-items: end; }
.dt-swap > * { grid-area: 1 / 1; }
.dt-swap .st-scheduled { opacity: 0; }
.dt-bar { display: block; height: 4px; margin-top: 7px; overflow: hidden; border-radius: 4px; background: var(--line); }
.dt-bar i { display: block; height: 100%; border-radius: inherit; }
.dt-bar.is-stall i { width: 68%; background: var(--warn); }
/* played once as each tile comes into view; without motion the tiles show their resting state */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .dt-tile.is-in .dt-nets li { animation: tag-in .5s cubic-bezier(.2, .7, .2, 1.2) both; }
  .js-reveal .dt-tile.is-in .dt-nets li:nth-child(2) { animation-delay: .12s; }
  .js-reveal .dt-tile.is-in .dt-nets li:nth-child(3) { animation-delay: .24s; }
  .js-reveal .dt-tile.is-in .dt-nets li:nth-child(4) { animation-delay: .36s; }
  .js-reveal .dt-tile.is-in .dt-toggles i { animation: dt-on .4s ease both; }
  .js-reveal .dt-tile.is-in .dt-toggles i:nth-child(1) { animation-delay: 1s; }
  .js-reveal .dt-tile.is-in .dt-toggles i:nth-child(2) { animation-delay: 1.3s; }
  .js-reveal .dt-tile.is-in .dt-field em { animation: dt-type .6s steps(12) .6s both; }
  .js-reveal .dt-tile.is-in .dt-btn { animation: dt-press .3s ease 1.4s both; }
  .js-reveal .dt-tile.is-in .dt-swap .st-draft { animation: dt-out .3s ease 1.7s both; }
  .js-reveal .dt-tile.is-in .dt-swap .st-scheduled { animation: dt-in .4s cubic-bezier(.2, .7, .2, 1.3) 1.75s both; }
  .js-reveal .dt-tile.is-in .dt-bar.is-stall i { animation: dt-fill 1.4s cubic-bezier(.3, .8, .3, 1) .5s both, dt-warn .3s ease 1.9s both; }
  .js-reveal .dt-tile.is-in .dt-check .st { animation: dt-in .45s cubic-bezier(.2, .7, .2, 1.4) 2.1s both; }
}
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .dt-tile.is-in .an-line, .js-reveal .dt-tile.is-in .an-spark path { stroke-dasharray: 1; animation: an-draw 1.6s cubic-bezier(.4, 0, .2, 1) .3s both; }
  .js-reveal .dt-tile.is-in .an-area, .js-reveal .dt-tile.is-in .an-demo-tip, .js-reveal .dt-tile.is-in .an-demo-pointer, .js-reveal .dt-tile.is-in .an-focus, .js-reveal .dt-tile.is-in .an-guide { animation: dt-in-soft .5s ease 1.7s both; }
}
@keyframes an-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dt-in-soft { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) { .pill-tabs { scroll-behavior: smooth; } }
@keyframes tag-in { from { opacity: 0; transform: translateY(8px) scale(.94); } }
@keyframes dt-on { to { background: var(--brand-soft); color: var(--brand-ink); } }
@keyframes dt-type { from { clip-path: inset(0 100% 0 0); } }
@keyframes dt-press { 50% { transform: scale(.93); } }
@keyframes dt-out { to { opacity: 0; transform: scale(.8); } }
@keyframes dt-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes dt-fill { from { width: 0; } }
@keyframes dt-warn { from { background: var(--brand); } }

/* sections fade up into place as they come into view (public/home.js adds .js-reveal, then .is-in) */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .reveal { opacity: 0; filter: blur(6px); transform: translateY(16px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), filter .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js-reveal .reveal.is-in { opacity: 1; filter: none; transform: none; }
  .js-reveal .dt-tile.reveal:nth-child(2), .js-reveal .stage-lede.reveal { transition-delay: .08s; }
  .js-reveal .dt-tile.reveal:nth-child(3) { transition-delay: .12s; }
  /* the hero comes in on load, one line after another */
  .hero-center > * { animation: enter .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-center > :nth-child(2) { animation-delay: .1s; }
  .hero-center > :nth-child(3) { animation-delay: .2s; }
  .hero-center > :nth-child(4) { animation-delay: .3s; }
  .trending .marquee { animation: enter 1s .35s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes enter { from { opacity: 0; filter: blur(6px); transform: translateY(14px); } }

/* the networks under the hero's buttons */
.hero-nets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 30px; color: var(--muted); font-size: .9rem; font-weight: 500; text-decoration: none; }
.hero-nets span { display: inline-flex; align-items: center; gap: 7px; }
.hero-nets .pf { width: 16px; height: 16px; }
.hero-nets:hover { color: var(--ink-2); }

/* agents: one request, played in each agent's own look (src/views/landing-demos.mjs, public/home.js) */
.agents { padding: 32px 16px; }
/* a dark card, like a stage, with dots fading down from its top edge */
.agents-card { position: relative; isolation: isolate; max-width: 1232px; margin: 0 auto; padding: 84px 24px 64px; overflow: hidden; border-radius: 32px; background: var(--inverse); color: var(--on-inverse); box-shadow: inset 0 0 0 1px rgba(246, 239, 228, .08); }
.agents-card::before { content: ""; position: absolute; z-index: -1; top: 0; right: 0; left: 0; height: 380px; background-image: radial-gradient(rgba(246, 239, 228, .14) 1px, transparent 1.3px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); pointer-events: none; }
.agents-card h2 { color: var(--on-inverse); }
.agents-card .stage-lede { color: var(--on-inverse-dim); }
.agents-card .pill-tabs { background: rgba(246, 239, 228, .07); box-shadow: inset 0 0 0 1px rgba(246, 239, 228, .08); }
.agents-card .pill-tabs .ag-tabbtn { color: var(--on-inverse-dim); }
.agents-card .pill-tabs .ag-tabbtn:hover { color: var(--on-inverse); }
.agents-card .pill-tabs .ag-tabbtn[aria-selected="true"] { background: rgba(246, 239, 228, .14); color: var(--on-inverse); box-shadow: inset 0 0 0 1px rgba(246, 239, 228, .12), 0 2px 8px -2px rgba(0, 0, 0, .5); }
.agents-card .ag-tabbtn .ag-mark { color: var(--on-inverse); }
.agents-card .ag-say-tools code { background: rgba(246, 239, 228, .08); color: var(--on-inverse-dim); }
.agents-card .works, .agents-card .agent-setup span { color: var(--on-inverse-dim); }
.agents-card .works b { color: var(--on-inverse); }
.agents-card .agent-setup a { color: var(--brand-2); }
.agents-card .agent-setup code { background: rgba(246, 239, 228, .08); color: var(--on-inverse); }
.agents-inner { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.ag-mark { display: inline-block; flex: none; width: 1em; height: 1em; }
.ag-mark { color: var(--ink); }
.ag-win.is-term .ag-mark { color: var(--on-inverse); }
.ag-link { display: inline-grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: .8rem; font-weight: 600; }
.ag-link .ic { grid-row: span 2; width: 15px; height: 15px; color: var(--brand-ink); }
.ag-link em { color: var(--muted); font: 500 .72rem var(--mono); }
.ag { width: min(1040px, 100%); margin-top: 32px; }
.ag .pill-tabs { max-width: 100%; }
.ag { display: grid; justify-items: center; }
.ag-tabs { justify-self: center; }
.ag-tabbtn .ag-mark { width: 18px; height: 18px; }
.pill-tabs .ag-tabbtn { padding: 0 16px 0 13px; }
/* one line per agent over its mockup, with the tools it calls */
.ag-says { display: grid; justify-items: center; min-height: 92px; margin: 26px 0 22px; }
.ag-say { display: grid; justify-items: center; gap: 10px; text-align: center; animation: say-in .6s cubic-bezier(.2, .7, .2, 1) both; }
.ag-say[hidden] { display: none; }
.ag-say > span:first-child { font: 400 clamp(1.6rem, 3vw, 2.3rem)/1.1 var(--serif); letter-spacing: -.01em; }
.ag-say-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ag-say-tools code { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 7px; font-size: .74rem; line-height: 1; }
@keyframes say-in { from { opacity: 0; filter: blur(4px); transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .ag-say { animation: none; } }
.ag-stage { width: 100%; height: 520px; }
.ag-win { display: grid; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-align: left; font-size: .86rem; box-shadow: var(--shadow-lg); }
.ag-step.is-waiting { display: none; }
/* the request is typed into the input box, then sent (public/home.js) */
.ag-draft { flex: 1; min-width: 0; color: inherit; overflow-wrap: anywhere; }
.ag-draft:empty { display: none; }
[data-compose].is-filled [data-ph] { display: none; }
[data-compose].is-filled { color: var(--ink); }
.ag-prompt[data-compose].is-filled, .is-grokbot [data-compose].is-filled { color: inherit; }
.ag-prompt[data-compose] .ag-draft { color: var(--on-inverse); }
.is-muse .ag-prompt[data-compose] .ag-draft { color: var(--ink); }
.is-grokbot [data-compose] .ag-draft { color: #ececec; }
.ag-prompt[data-compose].is-filled > i { display: none; }
.ag.is-typing [data-compose] .ag-draft::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: currentColor; animation: caret 1s steps(1) infinite; }
[data-compose].is-sent b { animation: ag-send .3s ease; }
[data-compose].is-sent.ag-prompt { animation: ag-enter .3s ease; }
@keyframes ag-send { 50% { transform: scale(.82); filter: brightness(1.2); } }
@keyframes ag-enter { 50% { border-color: currentColor; } }
/* newest at the bottom: older lines leave over the top, like a real chat */
.ag-scroll { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; min-height: 0; overflow: hidden; }
.ag-step p { line-height: 1.5; }
.ag-step.is-ask, .ag-step.is-you { display: flex; justify-content: flex-end; }
.ag-step.is-ask.is-waiting, .ag-step.is-you.is-waiting { display: none; }
.ag-bubble { max-width: 78%; padding: 9px 14px; border-radius: 16px; background: var(--paper-2); color: var(--ink); }
.ag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font: 500 .76rem var(--font); cursor: default; }
.ag-chip b { color: var(--ink); font: 600 .74rem var(--mono); }
.ag-chip .ic { width: 13px; height: 13px; }
.ag-result { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.ag-best { position: relative; width: min(330px, 100%); margin-top: 8px; padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ag-best-head { display: flex; justify-content: space-between; font-size: .74rem; }
.ag-best-head span { color: var(--faint); }
.ag-best svg { display: block; width: 100%; height: auto; margin-top: 6px; }
.ag-best rect { fill: var(--line-strong); }
.ag-best rect.is-top { fill: var(--brand); }
.ag-best-tag { position: absolute; left: 36%; top: 26px; padding: 3px 8px; border-radius: 7px; background: var(--ink); color: var(--surface); font-size: .66rem; font-weight: 600; }
.ag-composer { display: flex; align-items: center; gap: 10px; margin: 8px 20px 16px; padding: 9px 9px 9px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--faint); box-shadow: var(--shadow-sm); }
.ag-composer span { flex: 1; }
.ag-composer i { display: grid; place-items: center; color: var(--muted); }
.ag-composer b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--brand); color: #fff; }
.ag-composer .ic { width: 15px; height: 15px; }
.ag-composer b .ic { transform: rotate(-90deg); }
/* terminals */
.ag-win.is-term { grid-template-rows: auto minmax(0, 1fr); border-color: var(--inverse-line); background: var(--inverse); color: var(--on-inverse); }
.ag-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid rgba(246, 239, 228, .1); }
.ag-bar b { flex: 1; margin-right: 52px; color: var(--on-inverse-dim); font-size: .76rem; font-weight: 600; text-align: center; }
.ag-dots { display: flex; gap: 6px; }
.ag-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.ag-dots i + i { background: #febc2e; }
.ag-dots i + i + i { background: #28c840; }
.ag-term { display: flex; flex-direction: column; min-height: 0; padding: 14px 20px 12px; font: 500 .78rem/1.5 var(--mono); }
.ag-term .ag-scroll { flex: 1; gap: 8px; }
.ag-term .ag-step.is-ask, .ag-term .ag-step.is-you { display: block; }
.ag-term .ag-step.is-waiting { display: none; }
.ag-welcome { display: grid; grid-template-columns: 1fr 1.2fr; flex: none; padding: 12px 0; border: 1px solid #d97757; border-radius: 8px; }
.ag-welcome > div { display: grid; align-content: start; gap: 1px; padding: 0 16px; }
.ag-welcome > div:first-child { justify-items: center; text-align: center; }
.ag-welcome > div + div { border-left: 1px solid #d97757; }
.ag-welcome .ag-mark { width: 34px; height: 34px; margin: 6px 0; }
.ag-welcome b { color: #d97757; font-weight: 600; }
.ag-welcome span { color: var(--on-inverse-dim); }
.ag-me { color: var(--on-inverse); }
.ag-dot { color: var(--on-inverse); font-style: normal; }
.ag-dot.is-ok { color: #4eba65; }
.ag-term b { font-weight: 700; }
.ag-res { padding-left: 1.3em; color: var(--on-inverse-dim); }
.ag-res i { font-style: normal; }
.ag-prompt { display: flex; align-items: center; gap: 8px; flex: none; margin-top: 10px; padding: 8px 12px; border: 1px solid rgba(246, 239, 228, .28); border-radius: 8px; }
.ag-prompt i { width: .55em; height: 1.1em; background: var(--on-inverse); opacity: .75; }
.ag-prompt em { color: var(--on-inverse-dim); font-style: normal; }
.ag-prompt.is-codex { border-color: rgba(246, 239, 228, .16); border-radius: 4px; }
.ag-hint { flex: none; margin-top: 4px; padding-left: 12px; color: var(--on-inverse-dim); font-size: .7rem; }
.ag-codex-head { display: grid; flex: none; gap: 1px; width: max-content; max-width: 100%; padding: 10px 14px; border: 1px solid rgba(246, 239, 228, .25); border-radius: 6px; }
.ag-codex-head span { color: var(--on-inverse-dim); }
/* OpenClaw in a chat app */
.ag-win.is-claw { grid-template-rows: auto minmax(0, 1fr) auto; background: var(--paper-2); }
.ag-claw-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.ag-claw-head b { display: block; font-size: .9rem; }
.ag-claw-head span { color: var(--ok); font-size: .74rem; }
.ag-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); }
.ag-avatar .ag-mark { width: 20px; height: 20px; }
.is-claw .ag-scroll { gap: 10px; padding: 14px 18px; }
.ag-msg { max-width: min(78%, 560px); padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: .84rem; line-height: 1.45; }
.ag-msg.is-me { margin-left: auto; border-radius: 14px 14px 4px 14px; background: var(--brand-soft); }
.ag-msg pre { margin: 6px 0; padding: 8px 10px; overflow: hidden; border-radius: 8px; background: var(--inverse); color: var(--on-inverse-dim); font: 500 .72rem/1.5 var(--mono); white-space: pre-wrap; }
.ag-msg pre b { color: var(--on-inverse); font-weight: 600; }
.is-claw .ag-step.is-say { display: flex; }
.is-claw .ag-step.is-waiting { display: none; }
.is-claw .ag-composer { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.is-claw .ag-composer b { border-radius: 50%; }

/* Gemini CLI: gradient banner, tool calls in rounded boxes */
.ag-gem-head { display: grid; flex: none; gap: 4px; }
.ag-gem-head b { width: max-content; background: linear-gradient(90deg, #4796e3, #9177c7 55%, #ca6673); -webkit-background-clip: text; background-clip: text; color: transparent; font: 800 2.1rem/1 var(--mono); letter-spacing: .08em; }
.ag-gem-head span { color: var(--on-inverse-dim); }
.ag-gbox { padding: 6px 10px; border: 1px solid rgba(246, 239, 228, .2); border-radius: 8px; }
.ag-gbox .ag-res { padding-left: 1.3em; }
.ag-dot.is-gem { color: #9177c7; }
.ag-prompt.is-gemini { border-color: #6f8fd8; border-radius: 6px; }
.ag-gem-foot { display: flex; justify-content: space-between; padding: 0 2px; }
.ag-args { color: var(--on-inverse-dim); }
/* Grok Bot: a dark chat, tool calls folded into the answer */
.ag-win.is-grokbot { grid-template-rows: auto minmax(0, 1fr) auto; border-color: #2a2a2a; background: #0a0a0a; color: #ececec; }
.ag-grok-top { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #1f1f1f; font-size: .9rem; }
.ag-grok-top .ag-mark { width: 26px; height: 26px; }
.is-grokbot .ag-scroll { gap: 12px; padding: 16px 12%; }
.is-grokbot .ag-bubble { border-radius: 20px; background: #1f1f1f; color: #ececec; }
.is-grokbot .ag-chip { border-color: #2a2a2a; background: #141414; color: #a0a0a0; }
.is-grokbot .ag-chip b { color: #ececec; }
.is-grokbot .ag-chip .ic { color: #4eba65; }
.is-grokbot .ag-result { color: #8a8a8a; }
.is-grokbot .is-say p { color: #ececec; }
.is-grokbot .ag-composer { margin: 8px 12% 16px; border-color: #2a2a2a; border-radius: 999px; background: #141414; color: #8a8a8a; box-shadow: none; }
.is-grokbot .ag-composer b { border-radius: 50%; background: #ececec; color: #0a0a0a; }
/* Muse Code: a light terminal with Meta blue */
.ag-win.is-muse { border-color: var(--line); background: var(--surface); color: var(--ink); }
.is-muse .ag-bar { border-bottom-color: var(--line); background: var(--paper-2); }
.is-muse .ag-bar b, .is-muse .ag-res, .is-muse .ag-args, .is-muse .ag-hint, .is-muse .ag-muse-head span { color: var(--muted); }
.is-muse .ag-me, .is-muse .ag-dot { color: var(--ink); }
.ag-dot.is-muse { color: #0866ff; }
.ag-muse-head { display: flex; flex: none; align-items: center; gap: 10px; padding: 8px 12px; border-left: 3px solid #0866ff; background: color-mix(in srgb, #0866ff 7%, transparent); }
.ag-muse-head .ag-mark { width: 22px; height: 22px; }
.ag-muse-head span { margin-left: auto; }
.ag-prompt.is-muse { border-color: var(--line-strong); }
.is-muse .ag-prompt i { background: #0866ff; }
/* Hermes Agent: a bot in a chat app */
.ag-win.is-hermes { background: color-mix(in srgb, #2aabee 9%, var(--paper-2)); }
.is-hermes .ag-claw-head span { color: var(--muted); }
.is-hermes .ag-avatar { background: none; }
.is-hermes .ag-avatar .ag-mark { width: 34px; height: 34px; }
.is-hermes .ag-msg.is-me { background: color-mix(in srgb, #2aabee 22%, var(--surface)); }
.ag-msg.is-tool .ag-chip { cursor: default; }
.ag-msg .ag-best { margin-top: 0; }

/* analytics tile: the app's own cards and chart on illustrative numbers */
.an-demo { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "cards" "lift" "top"; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow-lg); }
.an-demo-bar { display: flex; grid-area: bar; align-items: center; justify-content: space-between; }
.an-demo-bar b { font: 400 1.45rem/1 var(--serif); }
.an-demo-range { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.an-demo-range i { padding: 3px 10px; border-radius: 999px; color: var(--muted); font-size: .74rem; font-style: normal; font-weight: 600; }
.an-demo-range i.is-on { background: var(--ink); color: var(--surface); }
.an-demo-cards { display: grid; grid-area: cards; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.an-demo .an-card { padding: 10px 12px 8px; }
.an-demo .an-card b { font-size: 1.3rem; }
.an-demo .an-card small { font-size: .68rem; }
.an-demo .an-card-top > span:first-child { font-size: .74rem; }
.an-demo .an-chg { padding: 1px 6px; font-size: .64rem; }
.an-demo .an-spark { height: 26px; margin-top: 4px; }
.an-demo-lift { position: relative; z-index: 2; grid-area: lift; padding: 12px 12px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); transform: translate(22px, -4px); }
.an-demo-lift-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .82rem; }
.an-demo-lift-head span { color: var(--faint); font-size: .72rem; }
.an-demo .an-chart { overflow: visible; }
.an-demo .an-chart svg { min-width: 0; }
.an-demo .an-chart svg.an-demo-pointer { position: absolute; width: 18px; height: 18px; }
.an-demo-tip { right: 41%; top: 6%; }
.an-demo-pointer { position: absolute; left: 60%; top: calc(20% + 2px); width: 18px; height: 18px; fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }
.an-demo-top { display: grid; grid-area: top; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.an-demo-top > b { font-size: .82rem; }
.an-demo-row { display: flex; align-items: center; gap: 10px; font-size: .82rem; }
.an-demo-row img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.an-demo-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-demo-row .pf { width: 16px; height: 16px; }
.an-demo-row em { color: var(--muted); font-size: .78rem; font-style: normal; font-variant-numeric: tabular-nums; }
.agents .works { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 26px; color: var(--muted); font-size: .93rem; }
.works b { font-weight: 600; color: var(--ink); }
.agent-setup { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin-top: 12px; font-size: .88rem; text-align: center; }
.agent-setup code { overflow-wrap: anywhere; }
.agent-setup[hidden] { display: none; }
.agent-setup span { color: var(--muted); }
.agent-setup a { color: var(--brand-ink); font-weight: 600; }

.home h2 { text-wrap: balance; }
.home .section { padding: 88px 0; border-top: 1px solid var(--line); }
.home .section-head { margin: 0 auto 48px; text-align: center; }
.home .section-head p { margin-inline: auto; text-wrap: balance; }
.home-hosted .hc-wrap { margin-top: 0; }
.home-hosted .hc-intro { max-width: 760px; }
.home-faq h2 { margin-bottom: 28px; text-align: center; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.02; }

/* closing band: Otto on an ink panel */
.last-call { padding: 72px 0; border-top: 1px solid var(--inverse-line); background: var(--inverse); color: var(--on-inverse); }
.last-call-inner { display: flex; align-items: center; justify-content: center; gap: 56px; }
.last-call h2 { max-width: 15ch; color: var(--on-inverse); font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: .98; letter-spacing: -0.02em; }
.last-call p { max-width: 34em; margin: 16px 0 28px; font-size: 1.12rem; }
.last-call p.last-call-fine { margin: 14px 0 0; color: var(--on-inverse-dim); font-size: .88rem; }
.last-call .cta-otto { width: 200px; }

/* "Or make it with AI" (src/views/site.mjs aiSamples): real studio results as input → output tiles. The
   face swap tile is wide, the original and the swap side by side; the two video tiles share a row. */
.smp { padding: 96px 0 88px; }
.smp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.smp-tile { display: grid; align-content: start; gap: 18px; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.smp-tile.is-wide { grid-column: 1 / -1; grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr); align-items: center; gap: 40px; padding: 34px; }
.smp-copy { display: grid; justify-items: start; align-content: start; gap: 8px; }
.smp-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.smp-kicker .ic { width: 15px; height: 15px; }
.smp-tile h3 { font: 400 clamp(1.6rem, 2.4vw, 2.1rem)/1.06 var(--serif); letter-spacing: -.01em; }
.smp-tile.is-wide h3 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
.smp-tile p { max-width: 30em; color: var(--muted); font-size: .97rem; line-height: 1.5; }
.smp-cost { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: .78rem; font-weight: 600; }
.smp-cost .ic { width: 13px; height: 13px; color: var(--brand); }
.smp-note { color: var(--muted); font-size: .78rem; }
.smp-in { display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 10px; margin: 6px 0 4px; color: var(--ink-2); font-size: .82rem; font-weight: 600; }
.smp-in img { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.smp-in.is-tall { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .76rem; }
.smp-in.is-tall img { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 14px; }
.smp-pair { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); align-items: center; gap: 10px; }
.smp-flow { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: 14px; }
.smp-arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px var(--brand); }
.smp-arrow .ic { width: 17px; height: 17px; }
.smp-clip { position: relative; margin: 0; }
.smp-clip video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; background: #000; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.smp-clip.is-made video { box-shadow: 0 0 0 2px var(--brand), 0 18px 36px -18px rgba(60, 40, 20, .55); }
.smp-clip figcaption { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(20, 17, 13, .62); color: #fff; font-size: .72rem; font-weight: 600; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.smp-clip.is-made figcaption { background: var(--brand); }
.smp-clip figcaption .ic { width: 12px; height: 12px; }
.smp-prompt { margin: 0; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--paper); color: var(--ink-2); font: italic 400 1.05rem/1.4 var(--serif); }
@media (max-width: 900px) {
  .tour-body { grid-template-columns: minmax(0, 1fr); height: 470px; }
  .tour-side { display: none; }
  .tour-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tour-grid > :nth-child(n+9) { display: none; }
  .mk-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .mk-label { grid-template-columns: auto auto; align-items: center; column-gap: 8px; }
  .mk-label .tree-tag { margin: 0; }
  .mk-label span:last-child { display: none; }
  .mk-row.is-made { margin: 0 -8px; padding: 10px 8px; }
  .mk-label .mk-otto { width: 40px; margin: -6px 0; }
  .mk-opts, .mk-more { margin-left: 0; }
  .pipe-link.sched-trunk { margin-bottom: 8px; }
  .dt { grid-template-columns: minmax(0, 1fr); }
  .dt .dt-tile, .dt .dt-tile.is-wide { grid-column: auto; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .smp-grid { grid-template-columns: minmax(0, 1fr); }
  .smp-tile.is-wide { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 26px; }
  .sched-fan { display: none; }
  .an-demo-lift { transform: none; }
  .sched-nets { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 0; }
  .last-call-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (max-width: 600px) {
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 2.5rem; }
  .hero h1 .h1-a, .hero h1 .h1-b { display: inline; }
  .hero-lede { font-size: 1.05rem; }
  .hero .hero-cta { flex-direction: column; gap: 16px; }
  .marquee .vl-card { width: 160px; }
  .trending { padding-bottom: 56px; }
  .stage, .lines { padding: 56px 0; }
  .hero h1 .hero-otto { width: 46px; margin: 0 -50px 0 4px; }
  .tree-shot { width: 128px; border-radius: 12px; }
  .tour { margin-top: 28px; }
  .seg-btn { padding: 0 14px; font-size: .86rem; }
  .seg-btn .ic { display: none; }
  .tour-win { margin-top: 16px; border-radius: 14px; }
  .tour-chrome .ag-dots { display: none; }
  .tour-body { height: 430px; }
  .tour-panel { padding: 14px; }
  .tour-head > b { font-size: 1.3rem; }
  .tour-filter em:last-child { display: none; }
  .tour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
  .tour-grid > :nth-child(n+5) { display: none; }
  .tour-body { height: 560px; }
  .mk { gap: 12px; }
  .mk-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-slide:nth-child(n+4) { display: none; }
  .mk-opt:last-child, .mk-more { display: none; }
  .sched-post { grid-template-columns: 34px minmax(0, 1fr); }
  .sched-nets li .st { display: none; }
  .sched-post > .st { display: none; }
  .sched-post img { width: 34px; height: 48px; }
  .dt-tile { padding: 22px 18px 0; border-radius: 18px; }
  .smp { padding: 64px 0; }
  .smp-tile, .smp-tile.is-wide { padding: 20px 16px; border-radius: 18px; }
  .smp-pair { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 6px; }
  .smp-arrow { width: 28px; height: 28px; }
  .dt-nets li { grid-template-columns: 16px minmax(0, 1fr); }
  .dt-nets li b { display: none; }
  .dt-toggles { display: none; }
  .agents { padding: 16px 8px; }
  .agents-card { padding: 56px 14px 40px; border-radius: 24px; }
  .ag-says { min-height: 110px; margin: 20px 0 16px; }
  .wk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wk-col:not(.is-near) { display: none; }
  .tour .wk-grid { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .wk-col.is-near ~ .wk-col.is-near ~ .wk-col.is-near ~ .wk-col.is-near ~ .wk-col.is-near { border-top: 1px solid var(--line-2); }
  .wk-col.is-next { border-top: 0; }
  .wk-col.is-near { border-left: 1px solid var(--line-2); }
  .wk-col.is-today, .wk-col.is-wrap { border-left: 0; }
  .wk-col { min-height: 0; }
  .hero-nets { gap: 8px 16px; margin-top: 26px; font-size: .85rem; }
  .ag-stage { height: 480px; }
  .ag-composer { margin: 6px 12px 12px; }
  .ag-term { padding: 12px 12px 10px; font-size: .74rem; }
  .ag-welcome { grid-template-columns: minmax(0, 1fr); }
  .ag-welcome > div + div { display: none; }
  .ag-bar b { margin-right: 0; }
  .an-demo { padding: 12px; }
  .an-demo-cards { grid-template-columns: 1fr 1fr; }
  .an-demo-lift { transform: none; }
  .home .section { padding: 72px 0; }
  .last-call { padding: 64px 0; }
  .last-call .cta-otto { width: 128px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .pricing-faq { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .composer { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line-2); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-only-mobile { display: block; }
  .nav-toggle { display: block; }
  .nav-right .nav-link { display: none; }
  .nav-inner { gap: 12px; }
  .nav-right { margin-left: auto; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(n) { padding: 28px 20px 30px 0; border-left: 0; }
  .feature:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line-strong); }
  .pricing { grid-template-columns: 1fr; max-width: 460px; }
  .credit-grid, .topup-grid { grid-template-columns: 1fr; }
  .topup-grid { max-width: 460px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-bottom span:last-child { text-align: left; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs-toc { position: static; }
  /* App: the sidebar becomes a pinned top bar; the menu is one row that scrolls sideways. */
  /* rows take their content's height: no stretched band under the top bar on short pages */
  .app-shell { grid-template-columns: minmax(0, 1fr); align-content: start; background: none; }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; display: block; padding: 10px 16px 0; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
  .side-top .btn-block { width: auto; --h: 36px; padding: 0 14px; font-size: .88rem; }
  .side-nav { grid-column: 1 / -1; display: flex; gap: 2px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav .side-link { flex: none; width: auto; padding: 7px 10px; font-size: .86rem; white-space: nowrap; }
  .side-bottom { display: none; }
  /* the posting streak sits in the top row, flame and number only (the full words stay for screen readers) */
  .side-top:has(.side-streak) { grid-template-columns: minmax(0, 1fr) auto auto; }
  .side-top:has(.side-streak) .btn-block { grid-row: 1; grid-column: 3; }
  .side-top .side-streak { grid-row: 1; grid-column: 2; margin: 0; padding: 7px 10px; }
  .side-top .side-streak span:not(.sr-only) { display: none; }
  .app-main { padding: 20px 16px 48px; min-width: 0; }
  .page-head { flex-wrap: wrap; gap: 12px; }
  .docs pre { max-width: 100%; overflow-x: auto; }
  .docs article { min-width: 0; }
  .cal-grid { grid-template-columns: repeat(7, minmax(120px, 1fr)); overflow-x: auto; }
  .cal-grid.is-day { grid-template-columns: minmax(0, 1fr); }
  .cal-grid.is-month { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; overflow: visible; }
  .cal-cell { min-height: 64px; padding: 3px; }
  .cal-chip { justify-content: center; padding: 3px; }
  .cal-chip b, .cal-chip span { display: none; }
  .cal-row { grid-template-columns: 56px minmax(0, 1fr); }
  .cal-row-time { grid-row: 1; grid-column: 1; white-space: nowrap; }
  .cal-row .st { grid-row: 1; grid-column: 2; justify-self: end; }
  .post-row { grid-template-columns: 56px minmax(0, 1fr); }
  .post-when, .post-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 600px) {
  .section { padding: 84px 0; }
  .hero-cta .btn { flex: 1 1 auto; }
  .feature-grid, .pricing-faq { grid-template-columns: 1fr; }
  .feature:nth-child(n) { padding: 26px 0; border-left: 0; }
  .faq summary { font-size: 1.3rem; }
  .faq details p { padding-right: 0; }
  .plan { padding: 26px; }
  .credit-card { padding: 22px; }
  .pricing-hero { padding-top: 56px; }
  .cmp th, .cmp td { padding: 11px 12px; }
  .cmp > :is(thead, tbody) > tr > :first-child { min-width: 150px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  /* a heading with Otto beside it (accounts welcome): keep him small, on the heading's right */
  .page-head:has(.head-otto) { flex-direction: row; align-items: center; flex-wrap: nowrap; }
  .head-otto.otto { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- accounts, connections, multi-network composer, billing ---------- */
.banner-bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.banner-trial { background: var(--paper); color: var(--ink-2); border-color: var(--line); }
.banner-trial .ic { color: var(--brand); }
.banner > span { flex: 1; }
.banner .btn { flex: none; }
.pf-sm { width: 16px; height: 16px; }
.pf-md { width: 22px; height: 22px; }
.post-top .pf { margin-right: 2px; }
.acct-row:has(.pf-md) { grid-template-columns: auto auto 1fr auto auto; }
.connect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 12px; }
/* Icon, name and Connect on one row; the description below at the card's full width. Cards in a grid row stretch
   to the same height. */
.connect-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon name action" "what what what"; gap: 10px 12px; align-items: center; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.connect-card > .pf { grid-area: icon; }
.connect-card > div { display: contents; }
.connect-card b { grid-area: name; display: block; }
.connect-card span { grid-area: what; display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.connect-card > .btn { grid-area: action; }
.compose-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.compose-switch a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--muted); }
.compose-switch a.is-active { background: var(--raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.acct-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.acct-pick { cursor: pointer; }
.acct-pick input { position: absolute; opacity: 0; pointer-events: none; }
.acct-pick > span { display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .15s, background .15s; }
.acct-pick > span > .pf, .acct-pick > span > .avatar { grid-row: span 2; }
.acct-pick b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-pick small { grid-column: 3; color: var(--muted); font-size: .78rem; }
.acct-pick input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(255, 106, 31, .1); }
.acct-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.limits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.limit { font-size: .78rem; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.limit.over { background: var(--bad-soft); color: var(--bad); }
.narrow-panel { max-width: 560px; }
.howto { margin: 0 0 8px; padding-left: 1.2em; color: var(--ink-2); display: grid; gap: 6px; }
details.field summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.billing-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.billing-head .billing-toggle { margin-bottom: 0; }
.billing-plans:has(#bill-month:checked) .price-year { display: none; }
.billing-plans:has(#bill-month:checked) .price.price-month, .billing-plans:has(#bill-month:checked) .btn.price-month { display: flex; }
.billing-plans:has(#bill-month:checked) :is(p, form).price-month { display: block; }
.billing-head .billing-toggle label { padding: 6px 14px; font-size: .85rem; }
.pricing-app { margin-top: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: none; }
.pricing-app .plan { padding: 24px; }
.pricing-app .plan .btn, .pricing-app .plan form { margin-top: auto; }
.pricing-app .plan .ticks { margin-bottom: 20px; }
.plan-selected { border-color: var(--brand); }
.settings-form { display: grid; gap: 4px; max-width: 360px; }
.settings-form .btn { justify-self: start; margin-top: 12px; }
.auth-form { display: grid; gap: 2px; text-align: left; }
.auth-form .btn { margin-top: 18px; }
.auth-form .check { font-size: .88rem; margin-top: 14px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--faint); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-plan { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -12px 0 18px; padding: 8px 12px; border-radius: var(--r); background: var(--brand-soft); color: var(--brand-ink); font-size: .88rem; font-weight: 600; }
@media (max-width: 760px) {
  .acct-row:has(.pf-md) { grid-template-columns: auto auto 1fr; }
  /* On phones Connect gets its own full-width row, so the name (and a Beta tag) keeps the whole line. */
  .connect-card { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon name" "what what" "action action"; }
  .connect-card > .btn { justify-content: center; }
}
.cal-card .thumb-text { aspect-ratio: auto; min-height: 64px; padding: 10px; align-items: flex-start; justify-content: flex-start; text-align: left; font-size: .78rem; line-height: 1.35; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.auth-providers { display: grid; gap: 10px; }
.btn-google .ic, .btn-tiktok .ic { width: 18px; height: 18px; }
.auth-form .hint { margin-top: 10px; font-size: .82rem; color: var(--muted); text-align: center; }

/* ---------- analytics ---------- */
.an-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.an-updated { color: var(--faint); }
.an-filters { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.an-account { display: flex; gap: 8px; align-items: center; }
.an-account select { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 600 .88rem var(--font); color: var(--ink); max-width: 320px; }
.an-selected { display: flex; align-items: center; gap: 8px; margin: -6px 0 16px; font-size: .92rem; }
.an-reconnects { display: grid; gap: 10px; margin-bottom: 18px; }
.an-reconnect { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--warn-line); background: var(--warn-soft); border-radius: var(--r); }
.an-reconnect b { display: block; font-size: .95rem; }
.an-reconnect span { color: var(--ink-2); font-size: .86rem; }
.an-problems { margin: 6px 0 0; padding-left: 18px; font-weight: 400; font-size: .86rem; }
.an-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.an-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px 12px; display: grid; gap: 2px; box-shadow: var(--shadow-sm); min-width: 0; }
.an-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.an-card-top > span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.an-card b { font: 800 1.75rem/1.2 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.an-card small { color: var(--faint); font-size: .78rem; }
.an-chg { font-size: .74rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.an-up { background: var(--ok-soft); color: var(--ok); }
.an-down { background: var(--bad-soft); color: var(--bad); }
.an-spark { width: 100%; height: 32px; margin-top: 8px; overflow: visible; }
.an-spark path { fill: none; stroke: var(--brand-deep); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.an-spark-empty { height: 32px; margin-top: 8px; border-bottom: 2px dashed var(--line); }
.an-chart { position: relative; overflow-x: auto; }
/* Wide charts and tables scroll inside their panel instead of widening the page. */
.an-chart, .an-scroll { width: 0; min-width: 100%; }
.an-chart svg { display: block; width: 100%; min-width: 520px; height: auto; }
.an-grid { stroke: var(--line-2); stroke-width: 1; }
.an-ylabel { font: 500 11px var(--font); fill: var(--faint); text-anchor: end; }
.an-xlabel { font: 500 11px var(--font); fill: var(--faint); text-anchor: middle; }
.an-line { fill: none; stroke: var(--brand-deep); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.an-area { fill: var(--brand); opacity: .08; }
.an-dot { fill: var(--brand-deep); }
.an-hit { fill: transparent; cursor: crosshair; }
.an-guide { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.an-focus { fill: var(--brand-deep); stroke: var(--surface); stroke-width: 2; opacity: 0; pointer-events: none; }
.an-chart.is-hover .an-guide, .an-chart.is-hover .an-focus { opacity: 1; }
.an-chart.is-hover .an-focus.is-hidden { opacity: 0; }
.an-guide { pointer-events: none; }
.an-tip { position: absolute; z-index: 2; display: grid; gap: 2px; min-width: 140px; padding: 8px 10px; background: var(--inverse); color: #fff; border-radius: 8px; font-size: .8rem; box-shadow: var(--shadow); pointer-events: none; }
.an-tip b { font-weight: 700; }
.an-tip span { color: #e9e2d6; }
.an-chart-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 160px; color: var(--muted); background: var(--soft); border-radius: var(--r); font-size: .9rem; }
.an-table-toggle { margin-top: 12px; }
.an-table-toggle summary { cursor: pointer; color: var(--muted); font-size: .86rem; }
.an-scroll { overflow-x: auto; }
.an-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.an-table th { text-align: left; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.an-table td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.an-table tr:last-child td { border-bottom: 0; }
.an-net { display: inline-flex; align-items: center; gap: 6px; }
.an-post { display: flex; align-items: center; gap: 10px; min-width: 220px; white-space: normal; }
.an-post > span:last-child { display: grid; gap: 2px; }
.an-thumb img, .an-thumb .thumb-ph { width: 40px; height: 50px; object-fit: cover; border-radius: 7px; }
.an-caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; color: var(--ink-2); }
.an-empty-inline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 18px; background: var(--soft); border-radius: var(--r); }
.an-empty-inline b { display: block; }
.an-empty-inline span { color: var(--muted); font-size: .88rem; }
.an-notes { margin: 6px 0 24px; color: var(--muted); font-size: .84rem; }
.an-notes h2 { font-size: .9rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.an-notes ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.post-stats { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.post-stats .ic { width: 14px; height: 14px; flex: none; }
@media (max-width: 1080px) { .an-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .an-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .an-card b { font-size: 1.4rem; }
  .an-reconnect, .an-empty-inline { grid-template-columns: minmax(0, 1fr); }
  .an-account select { max-width: 100%; }
}
/* X thread parts in the network composer (public/post.js) */
.x-thread { display: grid; gap: 10px; margin-bottom: 10px; }
.x-part { display: grid; gap: 6px; }
.x-part-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.x-part textarea { width: 100%; }
.x-part-head > :first-child { margin-right: auto; }
/* Viral library (src/views/library.mjs, public/library.js) */
.lib-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.lib-search { flex: 1 1 260px; position: relative; display: block; }
.lib-search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.lib-search input { width: 100%; height: 40px; padding: 0 12px 0 36px; font: inherit; font-size: .92rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.lib-filter { display: grid; gap: 3px; }
.lib-filter span { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lib-filter select { height: 40px; padding: 0 30px 0 10px; font-size: .88rem; font-weight: 600; width: auto; }
.lib-count { margin-bottom: 12px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 18px; }
.lib-grid-small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 0; }
.lib-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.lib-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.lib-cover { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--line-2); }
.lib-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-cover .thumb-ph { display: grid; place-items: center; }
.lib-cover .thumb-ph .ic { width: 32px; height: 32px; }
.lib-tags { position: absolute; top: 8px; left: 8px; right: 44px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; pointer-events: none; }
.lib-tags > * { pointer-events: auto; }
.lib-ratio { flex: none; font: 800 .8rem/1 var(--font); padding: 6px 8px; border-radius: 999px; background: rgba(27, 23, 18, .78); color: #fff; }
.lib-niche { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 .72rem/1 var(--font); padding: 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #1b1712; }
.lib-ratio.is-outlier { background: var(--brand); color: var(--on-brand); }
.lib-saved { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--brand-ink); }
.lib-saved .ic { width: 15px; height: 15px; }
.lib-kind { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; font: 600 .72rem/1 var(--font); padding: 5px 8px; border-radius: 999px; background: rgba(27, 23, 18, .7); color: #fff; }
.lib-kind .ic { width: 13px; height: 13px; }
.lib-body { display: grid; gap: 4px; padding: 10px 12px 12px; min-width: 0; }
.lib-views { font-size: .98rem; font-weight: 800; letter-spacing: -0.01em; }
.lib-caption { font-size: .84rem; color: var(--ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lib-meta { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); min-width: 0; }
.lib-handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.lib-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.lib-fine { color: var(--faint); font-size: .8rem; margin: 6px 0 24px; max-width: 760px; }
.lib-back { margin-bottom: 14px; font-size: .9rem; }
.lib-back a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; }
.lib-back a:hover { color: var(--ink); }
.lib-back .ic { width: 16px; height: 16px; }
.lib-detail { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 18px; }
.lib-player { background: #000; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 9 / 16; max-height: 78vh; box-shadow: var(--shadow); }
.lib-player-slides { aspect-ratio: 9 / 17; background: var(--surface); border: 1px solid var(--line); }
.lib-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.lib-info { display: grid; gap: 16px; min-width: 0; }
.lib-author { display: flex; align-items: center; gap: 10px; }
.lib-author b { display: block; font-size: 1.1rem; }
.lib-callout { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }
.lib-callout > b { font: 800 1.9rem/1 var(--display); letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
.lib-callout.is-outlier { background: var(--brand-soft); border-color: var(--brand-line); }
.lib-callout.is-outlier > b { color: var(--brand-ink); }
.lib-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lib-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 1px; }
.lib-stat span { color: var(--muted); font-size: .76rem; font-weight: 600; }
.lib-stat b { font: 800 1.25rem/1.2 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lib-stat small { color: var(--faint); font-size: .74rem; }
.lib-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: .9rem; }
.lib-facts dt { color: var(--muted); font-weight: 600; }
.lib-facts dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lib-facts .ic { width: 15px; height: 15px; color: var(--muted); }
.lib-full-caption { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; padding: 12px 14px; background: var(--soft); border-radius: var(--r); }
/* /admin/viral */
.admin-form { display: grid; gap: 4px; margin-top: 12px; }
.admin-form .btn { justify-self: start; margin-top: 10px; }
.admin-more { margin-top: 16px; }
.admin-more summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.admin-filter a { padding: 5px 10px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); text-decoration: none; font-size: .82rem; font-weight: 600; }
.admin-filter a.is-active { background: var(--brand-soft); color: var(--brand-ink); }
.admin-error { color: var(--bad); font-size: .82rem; white-space: normal; }
@media (max-width: 900px) {
  .lib-detail { grid-template-columns: minmax(0, 1fr); }
  .lib-player { max-width: 380px; width: 100%; margin: 0 auto; }
}
@media (max-width: 600px) {
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lib-filter { flex: 1 1 45%; }
  .lib-filter select { width: 100%; }
  .lib-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* locked library (expired trial or plan) */
.lib-locked p { max-width: 520px; margin-left: auto; margin-right: auto; }
.lib-locked-actions { justify-content: center; }
/* public viral library demo: /features/viral-library */
.vl-hero { margin-bottom: 0; padding-bottom: 56px; }
.vl-hero h1 { max-width: 880px; }
.vl-hero .lede { margin: 20px 0 28px; max-width: 700px; }
.vl-hero .microcopy { margin-top: 14px; }
.vl-demo { padding: 72px 24px 96px; }
.vl-head { margin-bottom: 32px; }
.vl-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; position: relative; }
.vl-search { flex: 1 1 320px; }
.vl-more { position: relative; }
.vl-more summary { list-style: none; height: 40px; }
.vl-more summary::-webkit-details-marker { display: none; }
.vl-more[open] summary { border-color: var(--ink-2); }
.vl-more-body { position: absolute; z-index: 5; top: 46px; left: 0; display: grid; gap: 10px; min-width: 220px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.vl-more-body select { width: 100%; }
.vl-count { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.vl-count b { color: var(--ink); }
.vl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.vl-card { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--r-lg); overflow: hidden; background: var(--line-2); color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.vl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lib-hand { justify-self: start; font: 600 .7rem/1 var(--font); padding: 4px 7px; border-radius: 999px; background: var(--info-soft); color: var(--info); }
/* Admin-only curation controls (library and demo post pages, grid cards). */
.cur-bar { display: grid; gap: 10px; padding: 12px 14px; margin-bottom: 16px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--soft); }
.cur-state { margin: 0; font-size: .88rem; color: var(--ink-2); }
.cur-state b { margin-right: 6px; padding: 3px 7px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-size: .72rem; letter-spacing: .03em; text-transform: uppercase; }
.cur-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cur-form { display: inline-flex; gap: 6px; align-items: center; }
.cur-reason { height: 34px; width: 170px; padding: 0 10px; font: inherit; font-size: .85rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.cur-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.cur-card > a { flex: 1; }
.cur-quick { position: absolute; top: 44px; right: 8px; z-index: 2; }
/* Library cards: below the usual and niche pills, which can wrap to two rows. */
.cur-card:has(.lib-niche) .cur-quick { top: 64px; }
.cur-quick-btn { font: 700 .72rem/1 var(--font); padding: 6px 9px; border: 0; border-radius: 999px; background: rgba(27, 23, 18, .82); color: #fff; cursor: pointer; }
.cur-quick-btn:hover { background: var(--bad); }
.cur-note { margin: 0 0 12px; }
.vl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vl-img.thumb-ph .ic { width: 32px; height: 32px; }
.vl-chip { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 64px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 .72rem/1 var(--font); padding: 6px 9px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--on-brand); }
.vl-corner { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; font: 700 .74rem/1 var(--font); padding: 6px 8px; border-radius: 999px; background: rgba(27, 23, 18, .72); color: #fff; }
.vl-corner .ic { width: 13px; height: 13px; }
.vl-over { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 6px; padding: 48px 12px 12px; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .78) 55%); }
.vl-handle { display: flex; align-items: center; gap: 6px; font-size: .86rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-handle .pf { flex: none; background: #fff; border-radius: 4px; padding: 1px; }
.vl-caption { font-size: .8rem; line-height: 1.35; color: rgba(255, 255, 255, .88); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vl-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 700 .8rem/1 var(--font); }
.vl-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.vl-stats .ic { width: 14px; height: 14px; }
.vl-ratio { padding: 4px 7px; border-radius: 999px; background: var(--brand); color: var(--on-brand); }
.vl-page .feature-grid { grid-template-columns: repeat(2, 1fr); }
.vl-page .feature:nth-child(n) { padding-left: 0; border-left: 0; }
.vl-page .feature:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line-strong); }
.vl-preview { padding-top: 48px; padding-bottom: 96px; }
.vl-preview-cover { position: relative; aspect-ratio: 9 / 16; max-height: 78vh; border-radius: var(--r-lg); overflow: hidden; background: var(--line-2); box-shadow: var(--shadow); }
.vl-promo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-top: 64px; padding: 28px 32px; border-radius: var(--r-xl); background: var(--brand-soft); border: 1px solid var(--brand-line); }
.vl-promo h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
.vl-promo p { margin-top: 6px; color: var(--ink-2); max-width: 680px; }
@media (max-width: 900px) {
  .vl-promo { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .vl-preview-cover { max-width: 380px; width: 100%; margin: 0 auto; }
}
@media (max-width: 600px) {
  .vl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vl-demo { padding: 48px 16px 72px; }
  .vl-bar .lib-filter { flex: 1 1 40%; }
  .vl-bar .lib-filter select { width: 100%; }
  .vl-over { padding: 36px 9px 9px; }
  .vl-caption { -webkit-line-clamp: 2; font-size: .74rem; }
  .vl-page .feature-grid { grid-template-columns: 1fr; }
  .vl-page .feature:nth-child(even) { padding-left: 0; border-left: 0; }
}
#lib-results.is-loading { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* ---------- AI studio (src/views/studio.mjs) and credits ---------- */
.side-credits { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 10px; border-radius: 9px; background: var(--soft); color: var(--ink-2); text-decoration: none; font: 600 .85rem var(--font); }
.side-credits .ic { width: 15px; height: 15px; color: var(--brand); }
.side-credits em { margin-left: auto; font-style: normal; font-weight: 600; font-size: .75rem; color: var(--brand-ink); }
.side-credits.is-low { background: var(--brand-soft); }
.side-streak { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 8px 10px; border-radius: 9px; background: var(--brand-soft); color: var(--ink-2); font: 600 .85rem var(--font); cursor: default; }
.side-streak .ic { width: 15px; height: 15px; color: var(--brand); }
.side-streak b { color: var(--brand-ink); }
.side-streak + .side-credits { margin-top: 0; }
.studio-balance { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: .9rem; }
.studio-balance > span { flex: 1; }
.studio-balance .ic { color: var(--brand); width: 18px; height: 18px; flex: none; }
.studio-balance.is-low { border-color: var(--brand-line); background: var(--brand-soft); }
.studio-new { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-new > .studio-form:only-child { grid-column: 1 / -1; }
.studio-source { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; margin-bottom: 18px; }
.studio-source img, .studio-source .thumb-ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.studio-source-body { display: grid; gap: 6px; padding: 12px 14px; }
.studio-source-caption { font-size: .88rem; color: var(--ink-2); }
.studio-form .field:first-of-type { margin-top: 0; }
.studio-form > .btn, .studio-form > .btn-row { margin-top: 18px; }
.studio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.studio-list a { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: inherit; }
.studio-list a:hover { border-color: var(--line-strong); background: var(--soft); }
.studio-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.studio-list-kind { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.studio-list-kind .ic { width: 15px; height: 15px; }
.page-head:has(.studio-otto) { align-items: center; }
/* Otto in the studio header, with what he has to say in a speech bubble. */
.studio-otto { display: flex; align-items: center; gap: 10px; max-width: 440px; }
.studio-otto .otto { flex: none; }
.studio-bubble { position: relative; margin: 0; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: .86rem; line-height: 1.4; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.studio-bubble::before { content: ''; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); }
.studio-bubble a { color: var(--brand-ink); font-weight: 600; white-space: nowrap; }
.studio-start { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; margin-bottom: 0; }
.studio-start > .panel { margin-bottom: 18px; }
.studio-start > .panel:only-child { grid-column: 1 / -1; }
.studio-card .panel-head h2 .ic, .studio-tool-card .panel-head h2 .ic { width: 18px; height: 18px; color: var(--brand); }
.studio-match { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'head pair' 'form form'; column-gap: 18px; align-items: start; }
.studio-match .panel-head { grid-area: head; }
.studio-match .studio-pair { grid-area: pair; }
.studio-match-form { grid-area: form; }
.studio-paste { display: flex; gap: 8px; }
.studio-paste input { flex: 1; min-width: 0; }
.studio-chips { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.studio-chips li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--line-2); font-size: .8rem; color: var(--ink-2); }
.studio-chips .ic { width: 13px; height: 13px; color: var(--muted); }
.studio-chips a { color: var(--brand-ink); }
.studio-pair { margin: 0; display: flex; align-items: center; gap: 6px; }
.studio-pair > span:not(.studio-pair-arrow) { display: grid; gap: 4px; justify-items: center; }
.studio-pair img { width: 84px; aspect-ratio: 9 / 16; height: auto; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--line); }
.studio-pair small { font-size: .72rem; color: var(--muted); }
.studio-pair-arrow .ic { width: 16px; height: 16px; color: var(--brand); }
.create-tiles { display: grid; gap: 10px; }
.create-tile { display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.create-tile:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.create-tile b { align-self: end; display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; }
.create-tile b .ic { width: 15px; height: 15px; color: var(--brand); }
.create-tile small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.create-art { grid-row: 1 / 3; display: flex; gap: 4px; height: 64px; align-items: center; justify-content: center; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.create-art img { width: 30px; height: 54px; object-fit: cover; border-radius: 4px; }
.create-art-video .ic { color: var(--faint); }
/* Drawings of the scan video templates' headline styles (not real frames). */
.tpl-frame { font-size: 0; position: relative; display: block; width: 30px; height: 54px; border-radius: 4px; overflow: hidden; background: linear-gradient(160deg, #6b5a4a, #2b241e); flex: none; }
.tpl-news .tpl-band { position: absolute; left: 0; right: 0; top: 62%; display: grid; gap: 2px; padding: 2px; background: #0d0b0a; }
.tpl-news .tpl-label { display: block; width: 60%; height: 3px; background: #ffffff; }
.tpl-news .tpl-line { display: block; height: 3px; background: #e3262b; }
.tpl-news .tpl-line.short { width: 70%; background: #ffffff; }
.tpl-warning .tpl-tag { position: absolute; left: 3px; right: 3px; top: 56%; height: 4px; background: #e0201b; font-size: 0; }
.tpl-warning .tpl-box { position: absolute; left: 3px; right: 3px; top: calc(56% + 5px); height: 9px; background: #ffffff; border-radius: 1px; }
.tpl-warning .tpl-caption { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 3px; background: #ffe14d; }
.scan-style .tpl-frame, .scan-style .tpl-frame span { display: block; flex: none; min-width: 0; }
.scan-style-art .tpl-frame { width: 44px; height: 78px; border-radius: 6px; }
.create-sources { display: grid; gap: 8px; }
.create-sources .scan-style:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.create-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.create-pick a { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; color: inherit; }
.create-pick a:hover { border-color: var(--line-strong); }
.create-pick a[aria-current="page"] { border-color: var(--brand); background: var(--brand-soft); }
.create-pick .ic { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 2px; }
.create-pick span { display: grid; gap: 4px; }
.create-pick small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.create-pick .choice-chips { display: flex; gap: 6px; }
.create-pick .chip { display: inline-flex; gap: 4px; }
.create-pick .chip .ic { width: 11px; height: 11px; margin: 2px 0 0; color: var(--muted); }
.create-tile .choice-chips { margin-top: 6px; }
.studio-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 18px; }
.studio-tools-grid > .panel { margin-bottom: 18px; display: flex; flex-direction: column; }
.studio-tools-grid > .panel > .btn, .studio-tools-grid > .panel > .btn-row { margin-top: auto; align-self: flex-start; }
.studio-swap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.studio-tool-card .studio-form .field:first-of-type { margin-top: 0; }
/* Autopilot (src/views/autopilot.mjs): the studio home's daily drafts card, full width above the tools. Format rows
   follow the "Make your version" choice rows (.choice); the switch is a submit button (role="switch") drawn with .switch-ui. */
.studio-tools-grid > .ap-card { grid-column: 1 / -1; }
.studio-tools-grid > .studio-agents-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px 24px; }
.studio-agents-wide > .panel-head { margin-bottom: 0; min-width: 0; }
.studio-agents-wide > .panel-head p { max-width: 70ch; }
.studio-tools-grid > .studio-agents-wide > .btn-row { margin-top: 0; align-self: center; flex: none; }
.ap-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: 'badge title switch'; gap: 14px; align-items: start; margin-bottom: 18px; }
.ap-badge { grid-area: badge; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-ink); }
.ap-badge .ic { width: 20px; height: 20px; }
.ap-card.is-on .ap-badge { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: inset 0 -2px 0 rgba(27, 23, 18, .14); }
.ap-title { grid-area: title; min-width: 0; }
.ap-title h2 { margin: 0 0 4px; font-size: 1.1rem; }
.ap-title p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; max-width: 62ch; }
.ap-switch { grid-area: switch; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 .86rem var(--font); cursor: pointer; transition: border-color .15s, background .15s; }
.ap-switch:hover { border-color: var(--line-strong); }
.ap-switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ap-switch[aria-checked="true"] { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-ink); }
.ap-switch[aria-checked="true"] .switch-ui { background: var(--brand); }
.ap-switch[aria-checked="true"] .switch-ui::after { transform: translateX(16px); }
.ap-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.ap-field legend { padding: 0; margin-bottom: 8px; font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ap-off { display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); gap: 0 24px; align-items: start; }
.ap-off .ap-cost, .ap-off .btn-row { grid-column: 1 / -1; }
.ap-count { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent); }
.ap-count label { position: relative; }
.ap-count input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ap-count span { display: grid; place-items: center; width: 48px; height: 40px; border-radius: 9px; font-weight: 700; color: var(--muted); transition: background-color .15s, color .15s, box-shadow .15s; }
.ap-count label:hover span { color: var(--ink); }
.ap-count input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(60, 40, 20, .08), 0 3px 8px -3px rgba(60, 40, 20, .14); }
.ap-count input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.ap-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.ap-format { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.ap-format:hover { border-color: var(--line-strong); background: var(--soft); }
.ap-format input { position: absolute; opacity: 0; pointer-events: none; }
.ap-format .choice-head, .ap-format b { padding-right: 28px; font-size: .98rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.ap-format:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.ap-format:has(input:checked) .choice-ic { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ap-format:has(input:checked) .choice-what { color: var(--ink-2); }
.ap-format:has(input:checked) .chip { background: var(--surface); }
.ap-format:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.ap-tick { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface); color: transparent; transition: background .15s, border-color .15s; }
.ap-tick .ic { width: 13px; height: 13px; }
.ap-format:has(input:checked) .ap-tick { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ap-cost { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--soft); color: var(--ink-2); font-size: .88rem; line-height: 1.45; }
.ap-cost .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--brand); flex: none; }
.ap-off .btn-row, .ap-more-body .btn-row { margin-top: 16px; }
.ap-on { display: grid; gap: 14px; }
.ap-card.is-locked .ap-head { margin-bottom: 0; align-items: center; }
.ap-locked-cta { grid-area: switch; }
.ap-switch.is-paused { border-color: var(--line); background: var(--soft); color: var(--muted); }
.ap-switch.is-paused .switch-ui { background: var(--line-strong); }
.ap-paused { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.ap-paused > .ic { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); flex: none; }
.ap-paused p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 1.45; }
.ap-paused b { color: var(--ink); }
.ap-paused .ap-paused-sub { margin-top: 2px; color: var(--muted); font-size: .85rem; }
.ap-on > .btn-row { margin-top: -2px; }
.ap-next { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-ink); font-size: .9rem; }
.ap-next .ic { width: 16px; height: 16px; flex: none; }
.ap-next b { margin-right: 4px; }
.ap-today h3 { margin: 0 0 8px; font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ap-drafts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap-drafts a { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.ap-drafts a:hover { border-color: var(--line-strong); background: var(--soft); }
.ap-draft-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); color: var(--ink-2); }
.ap-draft-ic .ic { width: 17px; height: 17px; }
.ap-draft-body { display: grid; gap: 2px; min-width: 0; }
.ap-draft-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ap-draft-body small { color: var(--muted); font-size: .8rem; }
.ap-empty { margin: 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.ap-more { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ap-more > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; cursor: pointer; color: var(--ink-2); font-size: .9rem; }
.ap-more > summary::-webkit-details-marker { display: none; }
.ap-more > summary .ic { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ap-more > summary b { color: var(--ink); margin-right: 6px; }
.ap-more > summary::after { content: "Change"; margin-left: auto; color: var(--brand-ink); font-weight: 600; }
.ap-more[open] > summary::after { content: "Close"; }
.ap-more[open] > summary { border-bottom: 1px solid var(--line); }
.ap-more-body { display: grid; gap: 16px; padding: 14px; }
.ap-more-body .ap-cost, .ap-more-body .btn-row { margin-top: 0; }
.ap-foot { display: flex; gap: 8px; align-items: center; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.ap-foot .ic { width: 15px; height: 15px; flex: none; }
.ap-foot a { color: var(--brand-ink); font-weight: 600; }
/* "From autopilot" on projects: the studio list and the project page. */
.studio-list-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.studio-list-title b { min-width: 0; }
.ap-tag { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-ink); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.ap-tag .ic { width: 11px; height: 11px; }
.banner-auto { background: var(--brand-soft); color: var(--ink-2); border-color: var(--brand-line); font-weight: 400; }
.banner-auto > .ic { color: var(--brand); flex: none; }
.banner-auto b { color: var(--ink); }
@media (max-width: 640px) {
  .studio-tools-grid > .studio-agents-wide { flex-direction: column; align-items: stretch; }
  .studio-tools-grid > .studio-agents-wide > .btn-row { align-self: flex-start; }
  .ap-head { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: 'badge switch' 'title title'; gap: 12px; }
  .ap-head .ap-switch { justify-self: end; }
  .ap-card.is-locked .ap-head { grid-template-areas: 'badge title' 'cta cta'; align-items: start; }
  .ap-card.is-locked .ap-locked-cta { grid-area: cta; justify-self: start; }
  .ap-badge { width: 40px; height: 40px; }
  .ap-off { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ap-off .ap-cost, .ap-off .btn-row { margin-top: 0; }
  .ap-off .btn-row .btn { width: 100%; justify-content: center; }
  .ap-formats { grid-template-columns: minmax(0, 1fr); }
  .ap-drafts a { grid-template-columns: 38px minmax(0, 1fr); }
  .ap-drafts .st { grid-column: 2; justify-self: start; }
  .ap-draft-body b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .studio-list-title { flex-wrap: wrap; gap: 4px 8px; }
  .banner-auto { flex-wrap: wrap; align-items: flex-start; }
  .banner-auto > span { flex: 1 1 calc(100% - 40px); }
  .banner-auto .btn { margin-left: 30px; }
}
.panel-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.studio-trending { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.studio-trending a { position: relative; display: block; border-radius: 12px; overflow: hidden; color: #fff; text-decoration: none; aspect-ratio: 3 / 4; background: var(--line-2); }
.studio-trending img, .studio-trending .thumb-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-trending-meta { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 26px 10px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); font-size: .85rem; }
.studio-trending-meta small { color: #ffd2b5; }
.studio-trending-cta { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: var(--brand); font-size: .74rem; font-weight: 700; opacity: 0; transition: opacity .15s; }
.studio-trending-cta .ic { width: 12px; height: 12px; }
.studio-trending a:hover .studio-trending-cta, .studio-trending a:focus-visible .studio-trending-cta { opacity: 1; }
@media (hover: none) { .studio-trending-cta { opacity: 1; } }
.studio-none { margin: 0; }
@media (max-width: 1180px) {
  .studio-start { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .page-head:has(.studio-otto) { flex-direction: column; align-items: stretch; }
  .studio-otto { max-width: none; }
  .studio-match { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'pair' 'form'; }
  .studio-pair { margin-bottom: 14px; }
  .studio-pair { justify-content: center; }
  .studio-paste { flex-direction: column; }
  .studio-paste .btn { justify-content: center; }
  .panel-head-row { flex-direction: column; }
  .studio-tools-grid { grid-template-columns: minmax(0, 1fr); }
}
.studio-upload { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .85rem; color: var(--brand-ink); cursor: pointer; }
.studio-upload .ic { width: 14px; height: 14px; }
.studio-project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 20px; align-items: start; }
.studio-slides-edit { margin: 16px 0 0; padding: 0 0 0 20px; display: grid; gap: 14px; }
.studio-slides-edit li::marker { color: var(--faint); font-weight: 600; }
.studio-slides-edit .field { margin-top: 6px; }
.studio-slides-edit textarea { min-height: 60px; }
.slide-words input { font-weight: 600; }
.studio-slides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.studio-slide { display: grid; gap: 6px; align-content: start; }
.studio-slide .st { justify-self: start; }
.studio-slide-img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r); display: block; background: var(--line-2); }
.studio-slide .btn { width: 100%; justify-content: center; }
.studio-err { color: var(--bad); font-size: .82rem; }
/* Pinterest photos: source choice, flagged slides, the swap grid (page and inline panel). */
.studio-source-pick { margin: 0 0 14px; display: grid; gap: 8px; }
.studio-source-pick .field { margin: 0; }
#text-style-form { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); align-items: end; }
.studio-flag { color: var(--warn); display: inline-flex; gap: 4px; align-items: flex-start; }
.studio-flag .ic { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.photo-search { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.photo-search .field { flex: 1 1 220px; margin: 0; }
.photo-grid { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-grid li { display: grid; gap: 4px; }
.photo-grid form { margin: 0; }
.photo-pick { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: var(--r); background: var(--line-2); cursor: pointer; overflow: hidden; }
.photo-pick:hover, .photo-pick:focus-visible { border-color: var(--brand); }
.photo-pick img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.photo-links { font-size: .75rem; color: var(--muted); }
.stock-grid .photo-links { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stock-grid .photo-links .btn { --h: 26px; padding: 0 8px; font-size: .75rem; }
.swap-panel { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); }
.swap-panel .photo-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.studio-video { width: 100%; max-height: 70vh; border-radius: var(--r); background: #000; margin-bottom: 14px; }
.credits-total { font-size: 1.05rem; margin: 0 0 6px; }
.credits-total b { font-size: 1.5rem; }
.credits-rows { margin: 0 0 10px; padding-left: 18px; color: var(--ink-2); font-size: .92rem; }
.credit-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 8px; }
.credit-pack { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.credit-pack span { color: var(--muted); font-size: .9rem; }
.credit-pack .btn { margin-top: 6px; justify-content: center; }
input[type="number"] { font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); width: 100%; color: var(--ink); }
@media (max-width: 900px) {
  .studio-new, .studio-project { grid-template-columns: minmax(0, 1fr); }
  .studio-list a { grid-template-columns: minmax(0, 1fr) auto; }
  .studio-list-kind, .studio-list .muted { display: none; }
}

/* ---------- onboarding (/app/welcome), paywall and setup (/app/setup) ---------- */
body.focus { background: var(--paper); min-height: 100vh; }
.focus-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 18px 28px; }
.focus-top form { justify-self: end; }
.focus-actions { display: flex; align-items: center; gap: 4px; justify-self: end; }
.focus-top .btn-ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--muted); }
.focus-progress { height: 4px; max-width: 420px; width: 100%; justify-self: center; border-radius: 99px; background: var(--line); overflow: hidden; }
.focus-progress-bar { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .3s ease; }
.fp-16 { width: 16%; } .fp-33 { width: 33%; } .fp-50 { width: 50%; } .fp-66 { width: 66%; } .fp-83 { width: 83%; } .fp-100 { width: 100%; }
.focus-main { padding: 24px 24px 80px; }
.wl { max-width: 640px; margin: 0 auto; }
.wl-nav { display: flex; justify-content: space-between; align-items: center; min-height: 28px; margin-bottom: 26px; font-size: .88rem; }
.wl-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; }
.wl-back:hover { color: var(--ink); }
.wl-back .ic { width: 16px; height: 16px; }
.wl-count { color: var(--faint); font-weight: 500; }
.wl-title { font: 400 clamp(2.1rem, 5vw, 3.1rem)/1.05 var(--serif); letter-spacing: -0.02em; font-synthesis: none; }
.wl-sub { margin-top: 12px; color: var(--muted); font-size: 1.05rem; max-width: 560px; }
.wl-form { margin-top: 28px; }
.wl-field input, .wl-field select { padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
.wl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.wl-skip { appearance: none; background: none; border: 0; padding: 6px 0; font: 500 .95rem var(--font); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wl-skip:hover { color: var(--ink); }
.wl-switch { display: flex; align-items: center; gap: 12px; margin-top: 18px; cursor: pointer; font-weight: 500; }
.wl-switch small { display: block; color: var(--muted); font-weight: 400; font-size: .84rem; }
.wl-switch input { position: absolute; opacity: 0; pointer-events: none; }
.wl-switch-ui { flex: none; position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); transition: background .15s; }
.wl-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.wl-switch input:checked + .wl-switch-ui { background: var(--switch-on); }
.wl-switch input:checked + .wl-switch-ui::after { transform: translateX(18px); }
.wl-switch input:focus-visible + .wl-switch-ui { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.wl-cards { display: grid; gap: 12px; }
.wl-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wl-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wl-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; min-height: 76px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; font-weight: 600; line-height: 1.3; transition: border-color .15s, box-shadow .15s, transform .15s; }
.wl-cards-3 .wl-card { flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 116px; }
.wl-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.wl-card input { position: absolute; opacity: 0; pointer-events: none; }
.wl-card-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.wl-card-ic .ic { width: 20px; height: 20px; }
.wl-card-tick { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--picked); color: var(--on-ink); opacity: 0; transition: opacity .15s; }
.wl-card-tick .ic { width: 13px; height: 13px; }
.wl-card:has(input:checked) { border-color: var(--picked); box-shadow: 0 0 0 1px var(--picked), var(--shadow); }
.wl-card:has(input:checked) .wl-card-tick { opacity: 1; }
.wl-card:has(input:focus-visible) { outline: 2px solid var(--brand-deep); outline-offset: 2px; }

/* paywall */
.pw { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pw-form { margin-top: 26px; }
.pw-toggle { margin-bottom: 18px; }
.wl-plans { display: grid; gap: 10px; margin-bottom: 18px; }
.wl-plan { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.wl-plan input { position: absolute; opacity: 0; pointer-events: none; }
.wl-plan:has(input:checked) { border-color: var(--picked); box-shadow: 0 0 0 1px var(--picked), var(--shadow); }
.wl-plan:has(input:focus-visible) { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.wl-plan-head { display: flex; align-items: center; gap: 10px; }
.wl-plan-head b { font: 400 1.6rem/1 var(--serif); font-synthesis: none; }
.wl-plan-price { grid-row: span 2; text-align: right; color: var(--muted); font-size: .9rem; }
.wl-plan-price b { font: 400 1.9rem/1 var(--serif); color: var(--ink); font-synthesis: none; }
.wl-plan-price small { display: block; font-size: .78rem; color: var(--faint); }
.wl-plan-facts { color: var(--muted); font-size: .88rem; }
.wl-plan-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; cursor: pointer; }
.wl-month { display: none; }
.pw-form:has(#pw-month:checked) .wl-month { display: block; }
.pw-form:has(#pw-month:checked) .wl-year { display: none; }
.pw-form .fine { text-align: left; }
.pw-included { margin-top: 18px; font-size: .92rem; }
.pw-included summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.pw-included .ticks { margin-top: 12px; }
.pw-ready { position: sticky; top: 24px; padding: 28px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pw-ready .eyebrow { margin-bottom: 14px; }
.ready-site { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--soft); }
.ready-site-image { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: var(--line-2); }
.ready-site-body { display: flex; gap: 12px; padding: 14px; }
.ready-site-body > div { display: grid; gap: 2px; min-width: 0; }
.ready-site-body a { overflow-wrap: anywhere; }
.ready-site-body p { margin-top: 4px; color: var(--ink-2); }
.ready-site-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.ready-site-ph { display: grid; place-items: center; color: var(--faint); }
.ready-site-empty { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.ready-site-empty > div { display: grid; gap: 2px; }
.ready-color { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.swatch { width: 18px; height: 18px; flex: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.ready-block { margin-top: 24px; }
.ready-block h2 { font-size: 1.05rem; font-weight: 700; }
.ready-block > p { margin-top: 4px; }
.ready-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ready-post { position: relative; display: block; border-radius: var(--r); overflow: hidden; aspect-ratio: 9 / 14; background: var(--line-2); color: #fff; text-decoration: none; }
.ready-post img, .ready-post .thumb-ph { width: 100%; height: 100%; object-fit: cover; }
.ready-post-meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; padding: 18px 8px 7px; font-size: .78rem; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.ready-post-meta em { margin-left: auto; font-style: normal; font-weight: 700; color: #ffd2b8; }
.ready-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.ready-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; color: var(--ink-2); }
.ready-steps .ic { flex: none; margin-top: 2px; color: var(--brand-deep); }

/* setup */
.setup { text-align: center; padding-top: 6vh; }
.setup .wl-sub { margin-left: auto; margin-right: auto; }
.setup .wl-actions { justify-content: center; }
.setup-steps { list-style: none; margin: 30px auto 0; padding: 0; max-width: 440px; display: grid; gap: 10px; text-align: left; }
.setup-steps li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.setup-steps .ic { color: var(--brand-deep); }
.setup-ready { max-width: 760px; }
.setup-h2 { margin-top: 34px; font-size: 1.3rem; }
.brand-card { margin-top: 24px; padding: 24px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.brand-card-flat { margin-top: 0; padding: 0; border: 0; box-shadow: none; }
.brand-desc { font: 400 1.35rem/1.35 var(--serif); font-synthesis: none; }
.brand-card dl { margin: 16px 0 0; display: grid; gap: 12px; }
.brand-card dt { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.brand-card dd { margin: 4px 0 0; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips > span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); font-size: .85rem; }
.chips .ready-color { margin-top: 0; }
.ideas { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.idea a { display: grid; gap: 8px; height: 100%; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.idea a:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.idea b { font-size: 1.02rem; line-height: 1.35; }
.idea-kind { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.idea-kind .ic { width: 14px; height: 14px; }
.idea-open { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--brand-ink); }
.idea-open .ic { width: 14px; height: 14px; }
/* starter review (/app/setup, /app/studio/starters) */
.starters-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.starter { display: grid; gap: 8px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.starter-hook { font-size: 1.08rem; line-height: 1.35; }
.starter-slides { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.starter-slides li span { display: block; }
.starter-video, .starter-caption { margin: 0; color: var(--ink-2); }
.starter-caption span:first-child { display: block; }
.starter-choices { display: grid; gap: 14px; margin-top: 30px; }
.starter-choice { padding: 20px 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.starter-choice h2 { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 1.15rem; }
.starter-choice summary { cursor: pointer; list-style: none; }
.starter-choice summary::-webkit-details-marker { display: none; }
.starter-picks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.starter-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: pointer; }
.starter-total { margin: 14px 0 10px; }
.starter-make .fine { text-align: left; }
.starter-edit { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.starter-edit-slide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.starter-skip form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 640px) { .starter-edit-slide { grid-template-columns: minmax(0, 1fr); } }
.brand-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.brand-form .field { flex: 1 1 280px; margin: 0; }
@media (max-width: 900px) {
  .pw { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pw-ready { position: static; }
  .ideas { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .focus-top { padding: 14px 16px; gap: 12px; }
  .focus-top .logo span { display: none; }
  .focus-main { padding: 12px 16px 60px; }
  .wl-cards-2, .wl-cards-3 { grid-template-columns: minmax(0, 1fr); }
  .wl-cards-3 .wl-card { flex-direction: row; align-items: center; min-height: 68px; }
  .wl-card { padding: 14px; min-height: 64px; }
  .wl-actions .btn-lg { width: 100%; }
  .pw-ready { padding: 20px; }
  .wl-plan { grid-template-columns: minmax(0, 1fr); }
  .wl-plan-price { grid-row: auto; text-align: left; }
  .wl-plan-price small { display: inline; margin-left: 4px; }
}

/* ---------- live chat button (public/chat.js) ---------- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid rgba(27, 23, 18, .12); border-radius: 50%; background: var(--inverse); color: #fff; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s ease, background .15s ease; }
.chat-fab:hover { background: var(--inverse-hover); transform: translateY(-1px); }
.chat-fab:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.chat-fab .ic { width: 22px; height: 22px; }
.chat-fab.is-loading { opacity: .7; cursor: progress; }
.chat-fab-dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid var(--inverse); opacity: 0; }
.chat-fab.is-unread .chat-fab-dot { opacity: 1; }
/* Keep the last buttons on a page (composer submit, paywall checkout) clear of the chat button. */
body.has-chat .site-footer { padding-bottom: 72px; }
body.has-chat .app-main { padding-bottom: 96px; }
body.has-chat .focus-main { padding-bottom: 104px; }
@media (max-width: 600px) {
  .chat-fab { right: 14px; bottom: 14px; width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .chat-fab { transition: none; } .chat-fab:hover { transform: none; } }

/* Hosted accounts order card (src/views/hosted.mjs hostedCard; public/hosted.js) */
.hc-wrap { margin-top: 96px; }
.hc-intro { max-width: 640px; margin: 0 auto 28px; text-align: center; }
.hc-intro h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.1; }
.hc-intro p { margin: 12px 0 0; color: var(--muted); }
/* Sized to fit a laptop screen (about 1470x840) in one view with the page title: two-column
   promises on the left, shared rows and the total beside the button on the right. */
.hc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); text-align: left; }
.hc-pitch { background: var(--inverse); color: #f3ece2; padding: 30px 36px 26px; display: flex; flex-direction: column; }
.hc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hc .hc-title { font-family: var(--font); color: var(--brand-2); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.hc-price { margin: 12px 0 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hc-price b { font-family: var(--serif); font-weight: 400; font-size: clamp(3.2rem, 5vw, 4.2rem); line-height: .9; color: #fff; }
.hc-price > span:last-child { color: #c9bfb1; }
/* Otto holds the phones beside the price; negative margins keep him from adding height */
.hc-otto { width: 128px; margin: -16px -14px -30px 0; }
.hc-lede { margin: 16px 0 0; color: #d8cfc2; max-width: 52ch; font-size: .95rem; line-height: 1.55; }
.hc-points { list-style: none; margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, auto); grid-auto-flow: column; gap: 11px 22px; font-size: .88rem; line-height: 1.45; }
.hc-points li { display: grid; grid-template-columns: 16px 1fr; gap: 9px; align-items: start; }
.hc-points svg { width: 16px; height: 16px; margin-top: 2px; color: var(--brand); stroke-width: 2.6; }
.hc-guarantee { margin: auto 0 0; padding-top: 20px; display: flex; align-items: center; gap: 10px; color: var(--brand-2); font-weight: 600; font-size: .9rem; }
.hc-guarantee svg { width: 18px; height: 18px; flex: none; }
/* The device choice swaps the price and device name on the left (works without JavaScript). */
.hc .hc-dev-iphone, .hc:has(#hc-iphone:checked) .hc-dev-android { display: none; }
.hc:has(#hc-iphone:checked) .hc-dev-iphone { display: inline; }
.hc-order { padding: 30px 36px 26px; display: flex; flex-direction: column; gap: 18px; }
/* the instructions box takes up whatever height the promises leave over */
.hc-field.hc-notes { flex: 1; display: flex; flex-direction: column; }
.hc-notes textarea { flex: 1; }
.hc-notes .hc-count { align-self: flex-end; }
.hc-field { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
.hc-field > span, .hc-field > legend { font-weight: 600; font-size: .88rem; padding: 0; margin-bottom: 7px; }
.hc-field em { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 4px; }
.hc-field select, .hc-field textarea, .hc-qty { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; }
.hc-field select { text-overflow: ellipsis; }
.hc-field select:focus-visible, .hc-field textarea:focus-visible, .hc-qty:focus-within { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.hc-field textarea { resize: vertical; min-height: 66px; line-height: 1.45; }
.hc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hc-row-qd { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: end; }
.hc-row-3 { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1.15fr); }
.hc-stepper { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; height: 52px; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.hc-stepper:not(:has(.hc-step:not([hidden]))) { grid-template-columns: 1fr; }
.hc-step { font-size: 1.3rem; background: var(--soft); border: 0; color: var(--ink); cursor: pointer; }
.hc-step:hover:not(:disabled) { background: var(--paper-2); }
.hc-step:disabled { color: var(--faint); cursor: default; }
.hc-step:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: -2px; }
.hc-qty { border: 0; border-radius: 0; display: flex; justify-content: center; align-items: center; gap: 6px; padding: 0 4px; font-weight: 600; font-size: .95rem; min-width: 0; }
.hc-qty input { width: 3ch; border: 0; font: inherit; font-size: 1.1rem; text-align: right; color: var(--ink); background: transparent; -moz-appearance: textfield; }
.hc-qty input::-webkit-outer-spin-button, .hc-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hc-qty input:focus { outline: none; }
.hc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; height: 52px; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.hc-seg input { position: absolute; opacity: 0; pointer-events: none; }
/* name above its price, so both devices fit half a row */
.hc-seg label { display: grid; place-content: center; text-align: center; padding: 0 6px; border-radius: 9px; font-weight: 600; font-size: .92rem; line-height: 1.2; cursor: pointer; color: var(--muted); }
.hc-seg label span { font-weight: 400; font-size: .78rem; }
.hc-seg input:checked + label { background: var(--raised); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 23, 18, .12), 0 0 0 1px var(--line); }
.hc-seg input:focus-visible + label { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.hc-count { justify-self: end; color: var(--faint); font-size: .78rem; margin-top: -4px; }
.hc-count:empty { display: none; }
/* the total and the order button share a row */
.hc-buy { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 16px; border-top: 1px dashed var(--line-strong); }
.hc-total { display: grid; gap: 2px; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.hc-total p { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.hc-total b { font-family: var(--serif); font-weight: 400; font-size: 2.3rem; line-height: 1; color: var(--ink); }
.hc-total p span { font-size: .95rem; }
.hc-cta { flex: 1; max-width: 300px; padding: 15px 20px; font-size: 1.02rem; }
.hc-note { margin: -6px 0 0; text-align: right; color: var(--muted); font-size: .82rem; }
.hc-error { margin: 0; padding: 9px 14px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-weight: 500; }
.app .hc { margin-top: 4px; }
/* smaller laptops (1280 wide): the promises go back to one column in smaller type, and the niche
   gets a row of its own so no choice is cut off */
@media (max-width: 1380px) and (min-width: 901px) {
  .hc-pitch, .hc-order { padding-left: 28px; padding-right: 28px; }
  .hc-pitch { padding-top: 26px; }
  .hc-order { padding-top: 26px; gap: 14px; }
  .hc-otto { width: 112px; }
  .hc-price b { font-size: 3.2rem; }
  .hc-lede { font-size: .88rem; margin-top: 12px; }
  .hc-points { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; gap: 6px; margin-top: 16px; padding-top: 16px; font-size: .84rem; line-height: 1.4; }
  .hc-guarantee { padding-top: 16px; }
  .hc-row-qd { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; }
  .hc-row-3 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hc-row-3 > :last-child { grid-column: 1 / -1; }
  .hc-cta { padding: 13px 16px; }
}
@media (max-width: 900px) {
  .hc { grid-template-columns: 1fr; }
  .hc-pitch, .hc-order { padding: 28px 24px; }
  .hc-guarantee { margin-top: 0; }
  .hc-wrap { margin-top: 72px; }
}
@media (max-width: 600px) {
  .hc-otto { width: 96px; margin: -10px -8px -18px 0; }
  .hc-points { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; gap: 9px; }
  .hc-row-3 { grid-template-columns: 1fr 1fr; }
  .hc-row-3 > :last-child { grid-column: 1 / -1; }
  .hc-buy { flex-direction: column; align-items: stretch; gap: 12px; }
  .hc-total { grid-template-columns: 1fr auto; align-items: baseline; }
  .hc-cta { max-width: none; }
  .hc-note { text-align: center; }
  .hc-field textarea { min-height: 92px; }
}
@media (max-width: 420px) { .hc-row-qd { grid-template-columns: 1fr; } }

/* /admin/hosted/accounts/:id revealed logins */
.secret-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); align-items: start; }
.secret-row:first-of-type { border-top: 0; }
.secret-row code { white-space: pre-wrap; word-break: break-all; user-select: all; }
@media (max-width: 560px) { .secret-row { grid-template-columns: 1fr; gap: 2px; } }
.hc-login { margin: 0 0 12px 44px; padding: 12px 16px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
@media (max-width: 560px) { .hc-login { margin-left: 0; } }

/* ---------- Otto mascot (public/otto.js, otto() in src/views/ui.mjs) ---------- */
/* A still <img> of the pose until otto.js swaps in the animated drawing. Sizes are classes because
   style attributes are blocked by the CSP. */
.otto { display: inline-block; position: relative; flex: none; width: 96px; aspect-ratio: 1; line-height: 0; vertical-align: middle; }
.otto-xs { width: 30px; }
.otto-sm { width: 56px; }
.otto-md { width: 96px; }
.otto-lg { width: 140px; }
.otto-xl { width: 200px; }
@media (max-width: 600px) { .otto-xl { width: 128px; } }
.otto-img { width: 100%; height: 100%; }
.otto-stage, .otto-body { position: absolute; inset: 0; }
.otto-art, .otto-fx { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.otto-fx { pointer-events: none; }
/* where he sits */
.empty > .otto, .auth-card > .otto { display: block; margin: 0 auto 12px; }
.wl > .otto { display: block; margin: 0 0 14px -6px; }
.wl.setup > .otto { margin: 0 auto 22px; }
.panel-head-otto { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.otto-note { display: flex; align-items: center; gap: 10px; }
.compose-otto { display: block; margin: 14px auto 0; }
/* a tiny celebrating Otto in place of the success banner's check, sized to its line */
.banner > .banner-otto { flex: none; margin: -5px -2px -5px -6px; }
/* marketing pages */
/* the landing page places its own Ottos (hero-otto, net-otto, cta-otto) in the landing block */
.pricing-otto { display: block; width: 112px; margin: -24px auto 6px; }
.vl-hero .container { position: relative; }
.vl-otto { position: absolute; right: 40px; top: 4px; }
.page-hero-otto { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-hero-otto > .otto { margin-bottom: -6px; }
@media (max-width: 1080px) {
  .vl-otto { position: relative; right: auto; top: auto; display: block; width: 96px; margin: -20px 0 10px -6px; }
}
@media (max-width: 600px) {
  .pricing-otto { width: 96px; margin-top: -8px; }
  .page-hero-otto > .otto { width: 72px; }
}

/* ---------- theme picker (themeSwitch() in src/views/ui.mjs, public/theme.js) ---------- */
/* Black network marks (TikTok, Threads, X) turn cream on dark pages, except on their white chips. */
.pf path[fill="#000000"] { fill: var(--pf-mono); }
.vl-handle .pf path[fill="#000000"] { fill: #000000; }
.btn-tiktok path[fill="#000"] { fill: var(--pf-mono); }
.theme-switch { position: relative; display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); flex: none; }
.theme-switch button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--raised); color: var(--brand-deep); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.theme-switch .ic { width: 15px; height: 15px; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .85rem; font-weight: 500; }
.side-theme { padding: 6px 10px 8px; }
.side-nav .side-theme { display: none; }
.nav-theme { display: none; }
.focus-actions .theme-switch { margin-right: 6px; }
@media (max-width: 900px) {
  .nav-right .theme-switch { display: none; }
  .nav-links .nav-theme { display: flex; padding: 12px 0 2px; }
  .side-nav .side-theme { display: flex; flex: none; padding: 0 0 0 8px; }
  .side-nav .side-theme > span { display: none; }
}
@media (max-width: 640px) { .focus-actions .theme-switch { margin-right: 0; } }
/* A soft cross-fade while the theme changes (theme.js adds the class for a moment). */
@media (prefers-reduced-motion: no-preference) {
  html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after { transition: background-color .3s ease, border-color .3s ease, color .3s ease, fill .3s ease, box-shadow .3s ease !important; }
}

/* ---------- "Scanned on your app" (src/views/scan.mjs) ---------- */
.seg-col { flex-direction: column; align-items: stretch; }
.seg-col label { justify-content: flex-start; }
.scan-pick { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; font-size: .85rem; color: var(--muted); }
.scan-pick img { width: 72px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r); background: var(--line-2); flex: none; }
.scan-stock { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.scan-stock h3 { margin: 0 0 8px; font-size: 1rem; }
.scan-preview { width: 100%; max-width: 280px; max-height: 50vh; border-radius: var(--r); background: #000; display: block; margin: 0 0 12px; }
.scan-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.scan-time { display: grid; gap: 6px; }
.scan-time .btn { justify-self: start; }
/* Voice picker (voicePicker in src/views/voice.mjs, public/studio.js) */
.voice-picker { margin: 10px 0 12px; }
.voice-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--line-2); width: fit-content; max-width: 100%; overflow-x: auto; }
.voice-tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: .88rem; padding: 7px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; min-height: 36px; }
.voice-tab:hover { color: var(--ink); }
.voice-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.voice-tab:focus-visible, .voice-play:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.voice-group { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.voice-legend { font-weight: 700; font-size: .9rem; margin: 0 0 6px; padding: 0; }
.voice-picker-tabs .voice-legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.voice-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.voice-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; min-height: 54px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.voice-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.voice-card.playing { border-color: var(--brand-line); }
.voice-pick { min-width: 0; display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: .9rem; cursor: pointer; min-height: 36px; }
.voice-pick input { accent-color: var(--brand); width: 16px; height: 16px; flex: none; margin: 0; }
.voice-play { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.voice-play:hover { border-color: var(--brand); color: var(--brand-ink); }
.voice-play .ic { width: 15px; height: 15px; grid-area: 1 / 1; }
.voice-play .voice-play-ic { fill: currentColor; margin-left: 2px; }
.voice-play .voice-pause-ic { stroke-width: 3; display: none; }
.voice-play[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.voice-play[aria-pressed="true"] .voice-play-ic { display: none; }
.voice-play[aria-pressed="true"] .voice-pause-ic { display: block; }
.voice-card audio { height: 32px; width: 100%; grid-column: 1 / -1; }
.voice-pick span { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 520px) { .voice-list { grid-template-columns: 1fr; } .voice-tabs { width: 100%; } .voice-tab { flex: 1; padding: 7px 8px; } }
.voice-save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.voice-save .check { margin: 0; font-size: .9rem; }
/* The default voice: the new-video forms' folded line (newVideoVoiceLine) and the render panel's note */
.voice-line { margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.voice-line > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px 14px; font-size: .92rem; color: var(--ink-2); min-height: 44px; }
.voice-line > summary::-webkit-details-marker { display: none; }
.voice-line > summary .ic, .voice-note .ic { width: 16px; height: 16px; color: var(--muted); flex: none; }
.voice-line > summary b { color: var(--ink); }
.voice-line-change { color: var(--brand-ink); font-weight: 600; }
.voice-line-body { padding: 0 14px 12px; border-top: 1px solid var(--line); }
.voice-line-body .check { margin: 0; }
.voice-note { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-size: .9rem; color: var(--ink-2); }
.voice-note a { color: var(--brand-ink); font-weight: 600; }
.scan-problems { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.scan-problems .ic { width: 14px; height: 14px; color: var(--warn, #c77700); vertical-align: -2px; }
.stock-grid .photo-pick img { aspect-ratio: 16 / 9; }
.stock-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.scan-attribution { font-size: .8rem; color: var(--muted); margin: 0 0 10px; }
.scan-cta .btn { margin-top: 4px; }

/* Scan videos: style picker, the reveal tip, footage per line */
.scan-styles { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.scan-styles legend { font-weight: 700; margin-bottom: 8px; }
.scan-style { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.scan-style:has(input[name="style"]:checked) { border-color: var(--brand); background: var(--brand-soft); }
.scan-style > input { accent-color: var(--brand); margin-top: 4px; }
.scan-style span { display: grid; gap: 4px; min-width: 0; flex: 1; }
.scan-style small { color: var(--muted); line-height: 1.4; }
.scan-style input[type="url"] { margin-top: 6px; width: 100%; }
.scan-tip { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); font-size: .92rem; display: flex; gap: 8px; align-items: flex-start; }
.scan-pool h3 { font-size: .9rem; margin: 12px 0 6px; color: var(--muted); }
.scan-pool img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.scan-match { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.scan-match .studio-upload { margin-top: 6px; }
.scan-templates { margin: 0 0 16px; }
.scan-templates summary { cursor: pointer; padding: 6px 0 10px; }
/* The reference already chosen (from the library), and the folded "Use a different video" choices */
.scan-ref { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border: 1px solid var(--brand); background: var(--brand-soft); border-radius: 12px; }
.scan-ref img, .scan-ref-ph { width: 72px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.scan-ref-body { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.scan-ref-caption { font-size: .88rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scan-ref-body a { color: var(--brand-ink); display: inline-flex; align-items: center; gap: 4px; width: fit-content; text-decoration: none; }
.scan-ref-body a:hover { text-decoration: underline; }
.scan-ref-body a .ic { width: 14px; height: 14px; }
.scan-app-fields [data-upload-status]:empty, .scan-upload [data-upload-status]:empty { display: none; }
.scan-change > summary, .scan-upload > summary { cursor: pointer; color: var(--brand-ink); font-size: .9rem; font-weight: 600; width: fit-content; }
.scan-change-body { display: grid; gap: 10px; margin-top: 12px; }
.scan-change-body .scan-templates { margin: 0; }
.scan-upload .field { margin-top: 8px; }
.scan-app { margin-top: 6px; }
.scan-app-fields { margin: 0 0 6px 26px; padding-left: 14px; border-left: 2px solid var(--line); }
.scan-app-fields .field:first-child { margin-top: 4px; }
.scan-next { max-width: 62ch; }
.scan-form-h { font-size: 1.05rem; margin: 8px 0 4px; }
.scan-lines { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 12px; }
.scan-line { margin: 0 0 6px; font-weight: 600; }
/* The progress card while a scan video is being prepared or rendered */
.progress-card { overflow-wrap: anywhere; }
.progress-card .panel-head h2 { margin-bottom: 4px; }
.progress-steps { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.progress-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.progress-steps li.is-done { color: var(--ink); }
.progress-steps li.is-done .ic { width: 18px; height: 18px; color: var(--brand); flex: none; }
.progress-steps li.is-current { color: var(--ink); font-weight: 700; }
.progress-dot { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--muted); opacity: .55; box-sizing: border-box; }
.progress-steps li.is-current .progress-dot { opacity: 1; }
.progress-steps li.is-current .progress-dot { border-color: var(--brand); background: var(--brand-soft); }
.progress-card progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--line); color: var(--brand); overflow: hidden; }
.progress-card progress::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
.progress-card progress::-webkit-progress-value { background: var(--brand); border-radius: 99px; }
.progress-card progress::-moz-progress-bar { background: var(--brand); border-radius: 99px; }
.progress-eta { margin: 10px 0 0; font-size: .92rem; color: var(--muted); }
.panel.owner-only { border-style: dashed; }
.owner-only summary { cursor: pointer; }
.owner-only > summary + * { margin-top: 10px; }
.banner-gift { background: var(--paper); color: var(--ink); border-color: var(--line); }
.banner-gift .ic { color: var(--brand); }
.gift-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.gift-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scan-lines img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }

/* Unlisted sample video pages (/s/<slug>) */
.sample-page { padding: 32px 0 56px; }
.sample-inner { display: grid; gap: 28px; justify-items: center; }
.sample-video { width: min(100%, 380px); aspect-ratio: 9 / 16; border-radius: 18px; background: #000; box-shadow: 0 18px 50px rgba(0, 0, 0, .18); }
.sample-copy { max-width: 520px; text-align: center; }
.sample-copy h1 { font-size: 1.6rem; margin: 0 0 8px; }
.sample-made { color: var(--muted); }
@media (min-width: 900px) {
  .sample-inner { grid-template-columns: auto minmax(0, 420px); align-items: center; justify-content: center; }
  .sample-copy { text-align: left; }
}

/* /admin/radar */
.radar-trend, .radar-level { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.radar-rising, .radar-open { background: var(--ok-soft); color: var(--ok); }
.radar-cooling, .radar-crowded { background: var(--bad-soft); color: var(--bad); }
.radar-some { background: var(--warn-soft); color: var(--warn); }

/* "Match the original's layout" (src/views/studio.mjs layoutNote) */
.studio-layout { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; color: var(--muted); font-size: .85rem; }
.studio-layout .ic, .studio-layout-tag .ic { width: 14px; height: 14px; vertical-align: -2px; }
.studio-layout-tag { color: var(--muted); }
.tpl-plain .tpl-caption { position: absolute; left: 5px; right: 5px; top: 58%; height: 4px; background: #ffffff; border-radius: 1px; }
.tpl-plain .tpl-caption.short { top: calc(58% + 6px); left: 9px; right: 9px; background: #ffe14d; }

/* What each studio choice makes, how long and what it costs (src/views/choices.mjs). A choice row (.choice) is one
   link: icon, bold title, a one-line description and time/cost chips. The recommended row is orange; the others
   are quiet. The library post page groups them in a "Make your version" card (.make-card). */
.choice-note { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 6px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); font: 600 .72rem/1.4 var(--font); }
.chip .ic { width: 11px; height: 11px; flex: none; align-self: flex-start; margin-top: 2px; color: var(--muted); }
.make-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.make-card > h2 { font-size: 1rem; font-weight: 700; margin: 2px 2px 12px; }
.choice-list { display: grid; gap: 8px; }
.choice { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--line-strong); background: var(--soft); }
.choice-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); color: var(--ink-2); }
.choice-ic .ic { width: 19px; height: 19px; }
.choice-body { display: grid; min-width: 0; }
.choice-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 22px; padding-right: 24px; }
.choice-head b { font-size: .98rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.choice-tag { padding: 2px 8px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font: 700 .68rem/1.4 var(--font); }
.choice-what { margin-top: 3px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.choice-go { position: absolute; top: 17px; right: 13px; width: 16px; height: 16px; color: var(--faint); transition: transform .15s, color .15s; }
.choice:hover .choice-go { color: var(--ink-2); transform: translateX(2px); }
.choice-main { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.choice-main:hover { border-color: var(--brand-deep); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-deep); }
.choice-main .choice-ic { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: inset 0 -2px 0 rgba(27, 23, 18, .14); }
.choice-main .choice-what { color: var(--ink-2); }
.choice-main .chip { background: var(--surface); }
.choice-main .chip .ic { color: var(--brand-deep); }
.choice-main .choice-go, .choice-main:hover .choice-go { color: var(--brand-deep); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-quiet:hover:not([disabled]) { background: var(--line-2); color: var(--ink); }
.btn-quiet .ic { color: var(--muted); }
.lib-utility { display: flex; flex-wrap: wrap; gap: 4px; margin: -8px 0 0 4px; }
.studio-real .choice { margin-top: 2px; }
.match-outcomes { margin: 12px 0 8px; display: grid; gap: 8px; }
.match-outcomes div { display: grid; gap: 2px; }
.match-outcomes dt { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; }
.match-outcomes dt .ic { width: 14px; height: 14px; color: var(--brand); }
.match-outcomes dd { margin: 0; }
.format-notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.format-notes li { font-size: .82rem; line-height: 1.4; }
.format-notes li b { font-size: .82rem; }
.format-notes .choice-note { display: inline; }
.format-notes .choice-chips, .match-outcomes .choice-chips { margin-top: 4px; }
.studio-trending-tag { font-size: .74rem; font-weight: 600; color: #fff; opacity: .9; }
.scan-promise { margin: 4px 0 14px; }
@media (max-width: 560px) {
  .make-card { padding: 12px; }
  /* On phones the icon sits beside the title only, so the description and chips get the row's full width. */
  .choice { grid-template-columns: 32px minmax(0, 1fr); gap: 0 10px; padding: 12px; align-items: center; }
  .choice-body { display: contents; }
  .choice-what, .choice-chips { grid-column: 1 / -1; }
  .choice-what { margin-top: 8px; }
  .choice-ic { width: 32px; height: 32px; border-radius: 9px; }
  .choice-ic .ic { width: 16px; height: 16px; }
  .choice-go { top: 20px; right: 11px; }
}


/* Instagram beta while Meta reviews the app (src/views/instagram.mjs): the step before Meta's sign-in, the
   Accounts banners and the /admin tester requests. */
.ig-badge { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-line); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.connect-card .ig-badge { margin-left: 6px; padding: 0 6px; font-style: normal; font-size: .62rem; vertical-align: 2px; white-space: nowrap; }
.ig-beta { padding: 26px; }
.ig-intro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.ig-intro .ig-badge { margin: 0 0 6px; }
.ig-intro p { color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.ig-form { margin-top: 4px; }
.ig-form .btn { margin-top: 14px; }
.ig-at { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.ig-at > span { padding: 0 2px 0 12px; color: var(--muted); font-weight: 600; }
.ig-at input:not([type]) { border: 0; background: transparent; padding-left: 4px; box-shadow: none; }
.ig-at:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255, 106, 31, .12); }
.ig-at:has(input[aria-invalid="true"]) { border-color: var(--bad-line); }
.ig-form .alert { margin-top: 8px; }
.ig-confirm { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.ig-confirm-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-line); }
.ig-confirm-ic .ic { width: 20px; height: 20px; }
.ig-confirm h2 { font-size: 1.1rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.ig-confirm p { margin-top: 6px; color: var(--muted); font-size: .92rem; }
.ig-steps { list-style: none; margin: 20px 0 0; padding: 16px; display: grid; gap: 12px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line-2); }
.ig-step { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .92rem; color: var(--ink-2); line-height: 1.45; }
.ig-step-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.ig-step.is-done .ig-step-n { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.ig-step-n .ic { width: 13px; height: 13px; }
.ig-invite-link { display: inline-block; margin-top: 4px; line-height: 1.45; font-weight: 600; font-size: .9rem; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.ig-invite-link .ic { width: 13px; height: 13px; margin-left: 3px; vertical-align: -1px; }
.ig-requests { margin-top: 20px; }
.ig-requests h3 { font-size: .85rem; font-weight: 700; color: var(--muted); }
.ig-requests ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ig-requests li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .9rem; }
.ig-handle { font-weight: 600; overflow-wrap: anywhere; }
.ig-status { color: var(--muted); font-size: .85rem; }
.ig-status-added { color: var(--ok); font-weight: 600; }
.ig-continue { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.ig-continue { flex-direction: column; align-items: flex-start; }
.ig-continue > div { flex: none; }
.ig-continue .ig-invite-link { display: inline-block; margin-top: 6px; line-height: 1.4; }
.ig-nowrap, .ig-continue .ig-nowrap { display: inline; margin: 0; color: inherit; font-size: inherit; white-space: nowrap; }
.ig-continue b { display: block; font-size: .95rem; }
.ig-continue span { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.ig-url { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; max-width: 100%; }
.ig-url code { flex: 1 1 auto; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .8rem; line-height: 1.4; }
.ig-url .copy-btn { height: 32px; }
.ig-url code.select { word-break: normal; overflow-wrap: anywhere; }
.ig-sub { display: block; margin-top: 4px; }
.ig-continue .ig-url { display: flex; margin-top: 8px; color: inherit; font-size: inherit; }
.ig-continue .copy-btn span { display: inline; margin: 0; color: inherit; font-size: inherit; }
.ig-continue .ig-sub { margin-top: 4px; }
.ig-continue span b { display: inline; font-size: inherit; }
.ig-net { font-weight: 600; }
.ig-banner > .ic { align-self: flex-start; flex: none; margin-top: 3px; }
.ig-another { margin-top: 14px; }
.ig-another a { color: var(--brand-ink); }
.ig-error-help { max-width: 560px; margin: -10px 0 18px; color: var(--ink-2); font-size: .92rem; }
.ig-testers .row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ig-testers .ic { width: 12px; height: 12px; vertical-align: -1px; }
@media (max-width: 560px) {
  .ig-beta { padding: 18px; }
  .ig-banner { flex-wrap: wrap; }
  .ig-banner > span { flex: 1 1 calc(100% - 40px); }
  .ig-banner .btn { width: 100%; justify-content: center; }
  .ig-testers, .ig-testers tbody, .ig-testers tr, .ig-testers td { display: block; }
  .ig-testers { min-width: 0; }
  .ig-testers thead { display: none; }
  .ig-testers tr { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .ig-testers td { padding: 2px 0; border: 0; }
  .ig-testers .row-actions { justify-content: flex-start; margin-top: 8px; }
  .ig-continue .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; padding-left: 14px; padding-right: 14px; }
  .ig-form .btn { width: 100%; justify-content: center; }
  .ig-url, .ig-continue .ig-url { flex-wrap: wrap; }
  .ig-url code { flex-basis: 100%; }
}

/* A matched video's format, shot by shot (src/views/blueprint.mjs). */
.bp-shots { margin: 12px 0; padding-left: 20px; display: grid; gap: 10px; }
.bp-shots li { display: grid; gap: 2px; }
.bp-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.85em; }
.bp-text { font-style: italic; }
.bp-fill { font-size: 0.85em; color: var(--muted); }
.bp-needs { margin: 6px 0 12px; padding-left: 20px; }
.bp-held { margin: 12px 0; font-weight: 600; }
.bp-choices { display: flex; flex-wrap: wrap; gap: 8px; }
