/* InstaBot Next — design tokens.
   Dark-first. One accent (InstaBot orange); the orange→coral "spark" gradient is
   reserved for AI moments (create, thinking, Welcome Week). Manrope covers Latin,
   Greek and Cyrillic. */
:root {
  --bg: #16131f;
  --bg-raise: #1e1a29;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-3: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.085);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #f6f3fb;
  --text-2: #cfc9db;
  --muted: #9a93ab;
  --accent: #ff7a45;
  --accent-ink: #ffb592;
  --accent-soft: rgba(255, 122, 69, 0.15);
  --spark-a: #ff7a45;
  --spark-b: #ff4f8b;
  --spark-c: #ffc35a;
  /* one colour per area */
  --c-week: #ff7a45;
  --c-brand: #ff5c9a;
  --c-results: #2fd6bd;
  --c-seo: #7aa2ff;
  --c-shop: #2fbf8f;
  --c-settings: #b9a7ff;
  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, 0.14);
  --warn: #ffc24b;
  --warn-soft: rgba(255, 194, 75, 0.14);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, 0.14);
  --info: #8fb3ff;
  --info-soft: rgba(143, 179, 255, 0.14);
  --shadow: 0 24px 60px -24px rgba(5, 2, 15, 0.7), 0 2px 8px rgba(5, 2, 15, 0.3);
  --radius: 18px;
  --radius-sm: 10px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --rail: 236px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f4f1;
  --bg-raise: #ffffff;
  --c-week: #f0561a;
  --c-brand: #e0326f;
  --c-results: #0f9e8a;
  --c-seo: #3b62d6;
  --c-shop: #12866a;
  --c-settings: #6b55d6;
  --surface: rgba(20, 18, 14, 0.03);
  --surface-2: rgba(20, 18, 14, 0.05);
  --surface-3: rgba(20, 18, 14, 0.08);
  --line: rgba(20, 18, 14, 0.09);
  --line-2: rgba(20, 18, 14, 0.16);
  --text: #15151a;
  --text-2: #3c3c45;
  --muted: #6e6f78;
  --accent: #f0561a;
  --accent-ink: #c2410c;
  --accent-soft: rgba(240, 86, 26, 0.1);
  --ok: #129a62;
  --ok-soft: rgba(18, 154, 98, 0.1);
  --warn: #b7791f;
  --warn-soft: rgba(183, 121, 31, 0.12);
  --bad: #d43d3d;
  --bad-soft: rgba(212, 61, 61, 0.1);
  --info: #3b62d6;
  --info-soft: rgba(59, 98, 214, 0.1);
  --shadow: 0 20px 50px -24px rgba(30, 20, 10, 0.25), 0 1px 3px rgba(30, 20, 10, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

/* ── boot ─────────────────────────────────────────────────────────────── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 44px; height: 44px; border-radius: 14px; background: conic-gradient(from 0deg, var(--spark-a), var(--spark-b), var(--spark-c), var(--spark-a)); animation: spin 1.6s linear infinite; padding: 3px; }
.boot-mark span { display: block; width: 100%; height: 100%; border-radius: 11px; background: var(--bg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── shell ────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-raise), var(--bg));
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.logo:hover { text-decoration: none; }
/* The InstaBot logo, as on the sign-in page: amber → orange → red tile, "Bot" in amber → orange. */
.logo-mark { width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, #fbbf24, #f97316, #dc2626); display: grid; place-items: center; color: #fff; font-family: 'Unbounded', 'Manrope', sans-serif; font-size: 12px; font-weight: 900; box-shadow: 0 6px 18px -6px rgba(249,115,22,.6); }
.logo-name { font-family: 'Unbounded', 'Manrope', sans-serif; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.logo-name span { background: linear-gradient(90deg, #fbbf24, #f97316); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 11px;
  color: var(--text-2); font-weight: 600; font-size: 14.5px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--surface-3); color: var(--text); }
.nav a.on svg { color: var(--accent); }
.nav svg { width: 19px; height: 19px; flex: none; }
.rail-foot { margin-top: auto; display: grid; gap: 10px; }
.plan-card { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--surface); display: grid; gap: 8px; font-size: 13px; }
.plan-card b { font-size: 13.5px; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--spark-a), var(--spark-b)); }
.me-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; color: var(--muted); font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; color: var(--text); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand-chip { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; max-width: 320px; }
.brand-chip .avatar { width: 26px; height: 26px; font-size: 12px; }
.brand-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .grow { flex: 1; }
.ask {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13.5px;
}
.ask:hover { border-color: var(--line-2); color: var(--text); }
.ask .spark-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--spark-a), var(--spark-b)); box-shadow: 0 0 12px var(--spark-b); }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }

.page { padding: 28px; max-width: 1360px; width: 100%; margin: 0 auto; display: grid; gap: 22px; align-content: start; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.page-head .grow { flex: 1; }
.eyebrow { font: 500 11.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* aurora behind the top of each page */
.aurora { position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(42vw 34vh at 88% -4%, rgba(255, 92, 154, 0.20), transparent 70%),
    radial-gradient(36vw 30vh at 52% -8%, rgba(255, 122, 69, 0.18), transparent 70%),
    radial-gradient(40vw 40vh at 105% 70%, rgba(47, 214, 189, 0.09), transparent 70%),
    radial-gradient(30vw 30vh at 20% 110%, rgba(122, 162, 255, 0.10), transparent 70%); }
:root[data-theme="light"] .aurora { opacity: 0.6; }

/* ── buttons, inputs, chips ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform 0.08s ease, background 0.15s, border-color 0.15s; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--text); color: var(--bg); border-color: transparent; }
.btn.primary:hover { background: color-mix(in oklab, var(--text) 88%, var(--bg)); }
.btn.spark { color: #fff; border: 0; background: linear-gradient(120deg, var(--spark-a), var(--spark-b) 60%, var(--spark-a)); background-size: 200% 100%; box-shadow: 0 10px 30px -12px var(--spark-b); }
.btn.spark:hover { background-position: 100% 0; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }

.field { display: grid; gap: 7px; }
.field > label, .label { font-weight: 700; font-size: 13px; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  padding: 11px 13px; font-size: 14.5px; font-weight: 500; transition: border-color 0.15s, background 0.15s;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--line-2); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font: 600 11.5px/1 var(--font); letter-spacing: 0.01em; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.chip.ready { background: var(--warn-soft); color: var(--warn); }
.chip.posted { background: var(--ok-soft); color: var(--ok); }
.chip.sent { background: var(--info-soft); color: var(--info); }
.chip.draft { background: var(--surface-3); color: var(--muted); }
.chip.auto { background: var(--accent-soft); color: var(--accent-ink); }
.chip.plain::before { display: none; }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; }
.seg button.on { background: var(--bg-raise); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-opt { height: 38px; padding: 0 15px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13.5px; color: var(--text-2); }
.pill-opt:hover { border-color: var(--line-2); color: var(--text); }
.pill-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background 0.2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform 0.2s; }
.switch input:checked + i { background: linear-gradient(120deg, var(--spark-a), var(--spark-b)); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── cards ────────────────────────────────────────────────────────────── */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; display: grid; gap: 14px; align-content: start; }
.card h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.card .card-sub { color: var(--muted); font-size: 13.5px; margin-top: -8px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.saved { font: 500 12px/1 var(--mono); color: var(--ok); opacity: 0; transition: opacity 0.3s; }
.saved.show { opacity: 1; }

/* Welcome / upsell banners */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px;
  border: 1px solid color-mix(in oklab, var(--spark-b) 30%, var(--line));
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(255, 79, 123, 0.22), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(255, 106, 43, 0.18), transparent 60%),
    var(--bg-raise);
  display: grid; gap: 14px;
}
.hero h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; max-width: 34ch; }
.hero p { margin: 0; color: var(--text-2); max-width: 62ch; }
.hero .row { margin-top: 4px; }
.progress-dots { display: flex; gap: 6px; }
.progress-dots i { width: 28px; height: 6px; border-radius: 99px; background: var(--surface-3); }
.progress-dots i.on { background: linear-gradient(90deg, var(--spark-a), var(--spark-b)); }

.upsell { display: flex; align-items: center; gap: 14px; border-radius: 14px; padding: 14px 16px; border: 1px dashed color-mix(in oklab, var(--accent) 45%, var(--line)); background: var(--accent-soft); font-size: 14px; }
.upsell b { font-weight: 800; }

/* ── week ─────────────────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-title { font-weight: 800; font-size: 15px; min-width: 150px; text-align: center; }
.autopilot-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.autopilot-bar .title { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.autopilot-bar .desc { color: var(--muted); font-size: 13.5px; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.day { display: grid; gap: 10px; align-content: start; min-height: 220px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.day.today { border-color: color-mix(in oklab, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 30%, transparent) inset; }
.day.past { opacity: 0.72; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 4px; }
.day-head .dn { font: 600 11.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.day-head .dd { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.day.today .dd { color: var(--accent-ink); }

.post { position: relative; display: grid; gap: 0; border-radius: 12px; overflow: hidden; background: var(--bg-raise); border: 1px solid var(--line); text-align: left; padding: 0; transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s; }
.post:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow); }
.post .thumb { aspect-ratio: 1; background: var(--surface-3) center/cover no-repeat; }
.post .meta { padding: 9px 10px 10px; display: grid; gap: 6px; }
.post .cap { font-size: 12.5px; color: var(--text-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .chip { justify-self: start; }

.slot { display: grid; gap: 6px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 12.5px; }
.slot b { color: var(--text-2); font-size: 13px; }
.add-day { height: 40px; border-radius: 11px; border: 1px dashed var(--line-2); background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.add-day:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.day-upsell { font-size: 12px; color: var(--muted); padding: 2px 4px; line-height: 1.35; }
.day-upsell a { font-weight: 700; }

/* thinking card */
.thinking { position: relative; border-radius: 12px; padding: 1.5px; background: conic-gradient(from var(--a, 0deg), var(--spark-a), var(--spark-b), var(--spark-c), var(--spark-a)); animation: rotate 3s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes rotate { to { --a: 360deg; } }
.thinking > div { border-radius: 11px; background: var(--bg-raise); display: grid; gap: 8px; padding: 10px; }
.shimmer { border-radius: 8px; background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.thinking .shimmer.img { aspect-ratio: 1; }
.thinking .shimmer.line { height: 9px; }
.thinking .label { font: 500 11px/1.3 var(--mono); color: var(--accent-ink); letter-spacing: 0.04em; }

/* ── grid view (phone) ────────────────────────────────────────────────── */
.grid-wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
.phone { border-radius: 34px; padding: 12px; background: #050507; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
:root[data-theme="light"] .phone { background: #101014; }
.phone-screen { border-radius: 24px; overflow: hidden; background: #000; color: #f5f5f5; }
.ig-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px 16px 12px; }
.ig-avatar { width: 72px; height: 72px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, #feda75, #fa7e1e, #d62976, #962fbf); }
.ig-avatar > div { width: 100%; height: 100%; border-radius: 50%; border: 3px solid #000; background: #222 center/cover; display: grid; place-items: center; font-weight: 800; font-size: 22px; }
.ig-name { font-weight: 800; font-size: 15px; }
.ig-handle { font-size: 13px; color: #aaa; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-cell { position: relative; aspect-ratio: 4 / 5; background: #1a1a1a center/cover no-repeat; border: 0; padding: 0; }
.ig-cell.planned::after { content: ""; position: absolute; inset: 3px; border: 2px dashed rgba(255, 181, 71, 0.9); border-radius: 2px; pointer-events: none; }
.ig-cell .tag { position: absolute; left: 6px; bottom: 6px; font: 600 10px/1 var(--mono); background: rgba(0, 0, 0, 0.65); color: #fff; padding: 4px 6px; border-radius: 6px; }
.ig-cell.empty { background: repeating-linear-gradient(45deg, #111, #111 6px, #151515 6px, #151515 12px); }

/* ── drawer / modal ───────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0 var(--copilot-w, 0px) 0 0; z-index: 50; background: rgba(5, 5, 8, 0.55); backdrop-filter: blur(4px); animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: var(--copilot-w, 0px); bottom: 0; z-index: 51; transition: right .3s ease-in-out; width: min(560px, 100vw); background: var(--bg-raise); border-left: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slidein 0.22s cubic-bezier(.2, .8, .2, 1); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 800; flex: 1; }
.drawer-body { overflow: auto; padding: 20px; display: grid; gap: 18px; align-content: start; flex: 1; }
.drawer-foot { padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-2); display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--bg-raise); box-shadow: 0 -12px 28px -16px rgba(0,0,0,.55); position: relative; z-index: 2; }
.drawer-foot .btn { min-height: 44px; }
/* Inside the CRM the frame can end right at the screen edge: a little more room. */
html[data-embed] .drawer-foot { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
.modal { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--bg-raise); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 18px; animation: pop 0.2s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { transform: translate(-50%, -48%) scale(0.98); opacity: 0; } }
.modal h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }

.ig-preview { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.ig-preview .bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 700; font-size: 13.5px; }
.ig-preview .bar .avatar { width: 30px; height: 30px; font-size: 12px; }
.ig-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-3); }

/* ── brand page ───────────────────────────────────────────────────────── */
.you { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.logo-drop { width: 88px; height: 88px; border-radius: 22px; border: 1px dashed var(--line-2); background: var(--surface) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; position: relative; overflow: hidden; }
.logo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.you h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.swatches { display: flex; gap: 8px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); position: relative; overflow: hidden; }
.swatch input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; opacity: 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.list-edit { display: grid; gap: 8px; }
.list-item { display: flex; gap: 8px; align-items: flex-start; }
.list-item .input, .list-item .textarea { flex: 1; }

/* ── results ──────────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--surface); display: grid; gap: 4px; }
.kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi .k { color: var(--muted); font-size: 13px; font-weight: 600; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 44px 1fr 48px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .track { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--spark-a), var(--spark-b)); }
.bar-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.tops { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }

.empty { display: grid; justify-items: start; gap: 8px; padding: 22px; border: 1px dashed var(--line-2); border-radius: 16px; color: var(--muted); }
.empty b { color: var(--text); font-size: 15px; }

/* ── onboarding ───────────────────────────────────────────────────────── */
.onb { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.onb-card { width: min(560px, 100%); display: grid; gap: 22px; }
.onb-card h1 { margin: 0; font-size: clamp(30px, 5vw, 40px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.onb-card .lede { color: var(--text-2); font-size: 16px; margin: 0; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); }
.steps i.on { background: linear-gradient(90deg, var(--spark-a), var(--spark-b)); }
.you-card { border-radius: 22px; padding: 22px; border: 1px solid var(--line-2); background: radial-gradient(90% 120% at 100% 0%, rgba(255, 79, 123, 0.16), transparent 60%), var(--bg-raise); display: grid; gap: 14px; box-shadow: var(--shadow); }
.you-card dl { margin: 0; display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; font-size: 14px; }
.you-card dt { color: var(--muted); font-weight: 600; }
.you-card dd { margin: 0; color: var(--text); }

/* ── toast ────────────────────────────────────────────────────────────── */
#toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; width: min(460px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 13px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: pop2 0.2s ease; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes pop2 { from { transform: translateY(8px); opacity: 0; } }

/* ── mobile ───────────────────────────────────────────────────────────── */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { padding: 12px 16px; }
  .page { padding: 18px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .page-head h1 { font-size: 25px; }
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .day .posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cols-2 { grid-template-columns: 1fr; }
  .you { grid-template-columns: auto 1fr; }
  .you > :last-child { grid-column: 1 / -1; }
  .ask { padding: 8px 12px; gap: 8px; font-size: 13px; white-space: nowrap; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;   /* any number of tabs on one row */
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in oklab, var(--bg-raise) 90%, transparent); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); padding: 4px 0;
              min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on svg { color: var(--accent); }
  .tabbar svg { width: 21px; height: 21px; }
  .you-card dl { grid-template-columns: 1fr; gap: 2px 0; }
  .you-card dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* icon sizes inside compact controls */
.add-day svg, .upsell svg, .slot svg, .chip svg { width: 16px; height: 16px; flex: none; }
.upsell > svg { width: 20px; height: 20px; color: var(--accent); }
.day, .post, .post .meta { min-width: 0; }
.chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hero .row > .grow { min-width: min(260px, 100%); }
.upsell { flex-wrap: wrap; }
.upsell > .grow { min-width: min(220px, 100%); flex: 1; }
@media (max-width: 860px) {
  .hero { padding: 20px; }
  .hero h2 { font-size: 21px; }
  .page-head .seg { order: 3; }
}
@media (max-width: 860px) {
  .day.past:not(.mday):not(:has(.post)):not(:has(.slot)) { display: none; }
}


/* ── colour per area ─────────────────────────────────────────────────── */
.nav a[href="#/week"] { --c: var(--c-week); }
.nav a[href="#/brand"] { --c: var(--c-brand); }
.nav a[href="#/results"] { --c: var(--c-results); }
.nav a[href="#/seo"] { --c: var(--c-seo); } .nav a[href="#/shop"] { --c: var(--c-shop); }
.nav a[href="#/settings"] { --c: var(--c-settings); }
.nav a .tile, .tile { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: color-mix(in oklab, var(--c, var(--accent)) 16%, transparent); color: var(--c, var(--accent)); }
.nav a .tile svg { width: 17px; height: 17px; }
.nav a.on { background: color-mix(in oklab, var(--c) 12%, var(--surface-2)); }
.nav a.on .tile { background: var(--c); color: #fff; box-shadow: 0 6px 16px -6px var(--c); }
.tabbar a[href="#/week"] { --c: var(--c-week); } .tabbar a[href="#/brand"] { --c: var(--c-brand); }
.tabbar a[href="#/results"] { --c: var(--c-results); } .tabbar a[href="#/seo"] { --c: var(--c-seo); }
.tabbar a[href="#/settings"] { --c: var(--c-settings); }
.tabbar a.on svg { color: var(--c); }
.rail { background: linear-gradient(180deg, color-mix(in oklab, var(--bg-raise) 92%, var(--c-brand)), var(--bg)); }

/* cards with a soft tinted edge */
.card { background: linear-gradient(180deg, color-mix(in oklab, var(--bg-raise) 70%, transparent), color-mix(in oklab, var(--bg-raise) 40%, transparent)); border-color: var(--line); }
.card.tint { --c: var(--accent); border-color: color-mix(in oklab, var(--c) 28%, var(--line));
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--c) 14%, transparent), transparent 60%), color-mix(in oklab, var(--bg-raise) 70%, transparent); }
.card-title { display: flex; align-items: center; gap: 10px; }
.card-title h2 { flex: 1; }
.day { background: color-mix(in oklab, var(--bg-raise) 60%, transparent); }
.page-head h1 .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); margin-left: 8px; vertical-align: middle; box-shadow: 0 0 16px var(--c, var(--accent)); }

/* ── results ──────────────────────────────────────────────────────────── */
.kpi { --c: var(--c-results); position: relative; overflow: hidden; background: radial-gradient(120% 100% at 100% 0%, color-mix(in oklab, var(--c) 13%, transparent), transparent 60%), color-mix(in oklab, var(--bg-raise) 70%, transparent); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.kpi .tile { --c: inherit; background: color-mix(in oklab, var(--c) 18%, transparent); color: var(--c); }
.kpi .tile svg { width: 16px; height: 16px; }
svg.spark { width: 110px; height: 32px; }   /* the KPI sparkline only, not .btn.spark buttons */
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.insight { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid color-mix(in oklab, var(--spark-b) 25%, var(--line)); background: radial-gradient(120% 120% at 0% 0%, rgba(255, 92, 154, 0.12), transparent 60%), var(--surface); font-weight: 600; font-size: 14px; line-height: 1.45; }
.insight .tile { --c: var(--spark-b); }
.insight .tile svg { width: 16px; height: 16px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 500 11px var(--mono); }
.chart .bar-made { fill: color-mix(in oklab, var(--c-week) 35%, transparent); }
.chart .bar-posted { fill: var(--c-week); }
.chart .eng-line { fill: none; stroke: var(--c-brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .eng-dot { fill: var(--c-brand); stroke: var(--bg); stroke-width: 2; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-made { background: color-mix(in oklab, var(--c-week) 35%, transparent); } .lg-posted { background: var(--c-week); } .lg-eng { background: var(--c-brand); border-radius: 50% !important; }
.bar-row { grid-template-columns: minmax(60px, 120px) 1fr 48px; }
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.hour { height: 26px; border-radius: 5px; background: color-mix(in oklab, var(--c-results) calc(var(--a) * 100%), var(--surface-2)); }
.hours-axis { display: flex; justify-content: space-between; font: 500 10.5px var(--mono); color: var(--muted); }

/* ── brand page ───────────────────────────────────────────────────────── */
.brand-hero { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 24px; border-radius: 24px; overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--c-brand) 30%, var(--line));
  background: radial-gradient(70% 140% at 100% 0%, color-mix(in oklab, var(--c-brand) 22%, transparent), transparent 60%),
              radial-gradient(60% 120% at 0% 100%, color-mix(in oklab, var(--c-week) 16%, transparent), transparent 60%), var(--bg-raise); }
.brand-hero .logo-drop { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; gap: 4px; align-content: center; font-size: 11.5px; }
.brand-hero .logo-drop svg { width: 22px; height: 22px; }
.brand-hero-main h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.brand-hero-main p { margin: 4px 0 12px; color: var(--text-2); max-width: 60ch; }
.brand-hero-side { display: grid; gap: 14px; justify-items: end; }
.chip.voice { background: color-mix(in oklab, #b48cff 20%, transparent); color: #d9c8ff; }
:root[data-theme="light"] .chip.voice { color: #5b3fc4; }
.swatches.big .swatch { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); }
.swatch.add { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border-style: dashed; }
.swatch.add svg { width: 16px; height: 16px; }
.select.compact { width: auto; height: 34px; padding: 4px 34px 4px 12px; font-size: 13px; border-radius: 10px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.choice { --cc: var(--c, var(--accent)); display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); transition: border-color .15s, background .15s, transform .12s; }
.choice:hover { border-color: var(--line-2); transform: translateY(-1px); }
.choice b { color: var(--text); font-size: 14.5px; }
.choice > span:not(.tile) { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.choice .quote { font-style: italic; }
.choice.on { border-color: var(--cc); background: color-mix(in oklab, var(--cc) 12%, var(--surface)); box-shadow: 0 0 0 1px var(--cc) inset; }
.choice .tile { width: 32px; height: 32px; }
.choice .tile svg { width: 17px; height: 17px; }

.prose { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.prose:hover { border-color: var(--line-2); background: var(--surface-2); }
.prose-label { grid-column: 1; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.prose-text { grid-column: 1; color: var(--text); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prose-text.empty { color: var(--muted); font-style: italic; }
.prose-edit { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); }
.prose-edit svg { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.chips:focus-within { border-color: var(--accent); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 99px; background: var(--surface-3); font-size: 13px; font-weight: 600; }
.tag button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; }
.tag button:hover { background: var(--surface-2); color: var(--text); }
.tag-input { flex: 1; min-width: 140px; border: 0; background: transparent; padding: 4px 6px; font-size: 13.5px; }
.tag-input:focus { outline: none; }
.offers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.offer-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 12px; background: color-mix(in oklab, var(--c-week) 14%, var(--surface)); border: 1px solid color-mix(in oklab, var(--c-week) 30%, var(--line)); font-size: 13.5px; }
.offer-chip button { border: 0; background: transparent; color: var(--muted); font-size: 16px; width: 22px; height: 22px; border-radius: 50%; }

/* reader */
.reader-orb { position: relative; height: 120px; display: grid; place-items: center; }
.reader-orb span { position: absolute; width: 74px; height: 74px; border-radius: 50%; filter: blur(2px); mix-blend-mode: screen; animation: orb 3.2s ease-in-out infinite; }
.reader-orb span:nth-child(1) { background: radial-gradient(circle at 30% 30%, var(--spark-a), transparent 70%); }
.reader-orb span:nth-child(2) { background: radial-gradient(circle at 70% 40%, var(--spark-b), transparent 70%); animation-delay: -1s; }
.reader-orb span:nth-child(3) { background: radial-gradient(circle at 50% 70%, var(--c-results), transparent 70%); animation-delay: -2s; }
@keyframes orb { 0%, 100% { transform: translate(-14px, 4px) scale(1); } 33% { transform: translate(12px, -10px) scale(1.15); } 66% { transform: translate(4px, 12px) scale(.9); } }
.meter.big { height: 10px; }
.meter i { transition: width .8s ease; }
.rd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rd-steps li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; font-weight: 600; color: var(--muted); }
.rd-steps li.rd-running, .rd-steps li.rd-done { color: var(--text); }
.rd-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.rd-done .rd-ico { background: var(--ok-soft); color: var(--ok); }
.rd-failed .rd-ico { background: var(--bad-soft); color: var(--bad); }
.rd-ico svg { width: 14px; height: 14px; }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; vertical-align: -2px; }
.rd-list { display: grid; gap: 8px; max-height: 46vh; overflow: auto; }
.rd-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.rd-item input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.rd-item .label { display: block; margin-bottom: 2px; }
.rd-val { font-size: 14px; color: var(--text); }
.mini-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin: 0 4px 0 8px; }
.ig-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; border-radius: 12px; overflow: hidden; }
.ig-strip div { aspect-ratio: 1; background: var(--surface-3) center/cover; }

/* look */
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.style-tile { display: grid; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: transform .12s, border-color .15s; }
.style-tile:hover { transform: translateY(-2px); border-color: var(--line-2); }
.style-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-3); }
.style-tile span { display: grid; padding: 8px 10px 10px; gap: 2px; }
.style-tile b { font-size: 13px; }
.style-tile i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.style-tile.on { border-color: var(--c-seo); box-shadow: 0 0 0 2px var(--c-seo); }
.templates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 520px; }
.tpl { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.tpl.on { box-shadow: 0 0 0 2px var(--c-seo); border-color: var(--c-seo); }
.tpl-img { width: 100%; height: 100%; border: 0; padding: 0; background: var(--surface-3) center/cover; }
.tpl-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; }
.tpl.empty { display: grid; place-items: center; border-style: dashed; background: var(--surface); color: var(--muted); cursor: pointer; }
.tpl.empty input { display: none; }
.tpl.empty svg { width: 18px; height: 18px; }
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 26px; border-radius: 16px; border: 1.5px dashed color-mix(in oklab, var(--c-results) 45%, var(--line)); background: color-mix(in oklab, var(--c-results) 6%, transparent); cursor: pointer; text-align: center; transition: background .15s; }
.dropzone:hover, .dropzone.over { background: color-mix(in oklab, var(--c-results) 14%, transparent); }
.dropzone.busy { opacity: .6; pointer-events: none; }
.dropzone input { display: none; }
.dropzone svg { width: 26px; height: 26px; color: var(--c-results); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 10px; background: var(--surface-3) center/cover; }
.photo button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; opacity: 0; transition: opacity .15s; }
.photo:hover button { opacity: 1; }
.preview-cap { white-space: pre-wrap; font-size: 14px; line-height: 1.55; color: var(--text-2); max-height: 30vh; overflow: auto; }
@media (max-width: 860px) {
  .brand-hero { grid-template-columns: auto 1fr; padding: 18px; }
  .brand-hero-side { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; align-items: center; justify-content: space-between; }
  .templates { max-width: none; }
}
.page { grid-template-columns: minmax(0, 1fr); }
.page > * { min-width: 0; }
@media (max-width: 860px) {
  .brand-hero-side { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; width: 100%; }
  .brand-hero-main h2 { font-size: 22px; }
}
.card-title { flex-wrap: wrap; }
.select.compact { max-width: 100%; }
.choice-grid { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.styles { grid-template-columns: repeat(auto-fill, minmax(min(150px, 46%), 1fr)); }
.brand-chip { min-width: 0; flex: 0 1 auto; }
.topbar { min-width: 0; }
.topbar > * { flex-shrink: 0; }
.topbar > .brand-chip { flex-shrink: 1; }
.row > svg, .muted > svg, .small > svg { width: 16px; height: 16px; flex: none; }
.meter i.failed { background: var(--bad); }
/* The copilot (Chainlit) is themed from next_app/copilot.css inside its shadow root. */
#chainlit-copilot { font-family: var(--font); }

/* ── brand card (read, don't fill) ────────────────────────────────────── */
.brand-sheet { max-width: 760px; width: 100%; margin: 0 auto; display: grid; gap: 18px; }
.brand-top { display: flex; align-items: center; gap: 16px; }
.brand-top .logo-drop { width: 72px; height: 72px; border-radius: 20px; flex: none; display: grid; place-items: center; }
.brand-top .logo-drop svg { width: 22px; height: 22px; }
.brand-top h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.brand-top-text { flex: 1; min-width: 0; }
.blines { border-radius: 22px; border: 1px solid var(--line); background: color-mix(in oklab, var(--bg-raise) 75%, transparent); overflow: hidden; }
.bline { display: grid; grid-template-columns: 170px 1fr auto; gap: 16px; align-items: center; width: 100%; padding: 16px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; transition: background .15s; }
.bline:last-child { border-bottom: 0; }
.bline:hover { background: var(--surface-2); }
.bline-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.bline-value { color: var(--text); font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bline-value.blank { color: var(--muted); font-style: italic; }
.bline-value i { font-style: italic; color: var(--text-2); }
.bline-go { color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.dot-swatch { display: inline-block; width: 22px; height: 22px; border-radius: 7px; margin-right: 6px; vertical-align: middle; border: 1px solid var(--line-2); }
.look-chip { display: inline-block; width: 22px; height: 22px; border-radius: 7px; margin-right: 8px; vertical-align: middle; }
.look-chip.big { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.brand-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pick-list { display: grid; gap: 8px; }
.pick { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.pick:hover { border-color: var(--line-2); background: var(--surface-2); }
.pick.on { border-color: var(--accent); background: var(--accent-soft); }
.pick > span { display: grid; gap: 2px; }
.pick b { font-size: 15px; }
.pick span span { color: var(--muted); font-size: 13px; }
@media (max-width: 860px) {
  .bline { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; }
  .bline-label { grid-column: 1 / -1; }
}

/* ── setup ────────────────────────────────────────────────────────────── */
.onb-card { gap: 18px; }
.onb-fields { display: grid; gap: 10px; }
.input.big { height: 54px; font-size: 16px; padding: 0 16px; border-radius: 14px; }
.btn.wide { width: 100%; }
.you-card { gap: 0; padding: 6px 18px; }
.you-line { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.you-line:last-child { border-bottom: 0; }
.you-line span { color: var(--muted); font-weight: 600; }
.you-line b { font-weight: 600; }
@media (max-width: 860px) { .you-line { grid-template-columns: 1fr; gap: 2px; } }

/* ── post card: download + reel ───────────────────────────────────────── */
.post { cursor: pointer; }
.post .thumb { position: relative; }
.post .dl { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 10px; border: 0; display: grid; place-items: center;
  background: rgba(10, 8, 16, 0.72); color: #fff; backdrop-filter: blur(6px); transition: transform .12s, background .15s; }
.post .dl:hover { background: var(--accent); transform: scale(1.06); }
.post .dl svg { width: 17px; height: 17px; }
.reel-badge { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 6px; border-radius: 99px; background: rgba(10, 8, 16, 0.72); color: #fff; font: 700 11px/1 var(--font); }
.reel-badge svg { width: 12px; height: 12px; }
.pill-opt svg { width: 13px; height: 13px; margin-right: 4px; vertical-align: -1px; }
@media (max-width: 860px) {
  .hero .btn.lg, .upsell .btn { white-space: normal; height: auto; min-height: 46px; padding-block: 10px; text-align: center; }
  .hero .btn.lg { width: 100%; }
  .page-head .btn.spark { flex: 1; }
}
.modal.wide { width: min(760px, calc(100vw - 32px)); }
.modal { overflow-x: hidden; }
.modal .chip { white-space: normal; height: auto; min-height: 24px; padding: 5px 10px; line-height: 1.35; max-width: 100%; }
.modal .chip::before { flex: none; }
.rd-val, .rd-item span { overflow-wrap: anywhere; }

/* ── Brand Studio ─────────────────────────────────────────────────────── */
.studio { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }
.studio-preview { position: sticky; top: 84px; display: grid; gap: 14px; }
.studio-panels { display: grid; gap: 16px; min-width: 0; }
.studio-title { display: flex; align-items: flex-end; gap: 12px; }
.studio-title > div { flex: 1; min-width: 0; }
.studio-title h1 { margin: 2px 0 2px; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.panel { --c: var(--accent); display: grid; gap: 14px; padding: 20px; border-radius: 22px; border: 1px solid color-mix(in oklab, var(--c) 22%, var(--line));
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in oklab, var(--c) 10%, transparent), transparent 55%), color-mix(in oklab, var(--bg-raise) 75%, transparent); }
.panel h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }
.panel .tile { --c: inherit; }
.panel .tile svg { width: 16px; height: 16px; }
.panel .label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.opt > span { font-weight: 700; font-size: 14px; }
.opt .seg button { padding: 0 12px; }
.logo-opts { transition: opacity .2s; }
.logo-opts.off { opacity: .35; pointer-events: none; }
.identity { display: flex; gap: 16px; align-items: center; }
.identity .logo-drop { width: 84px; height: 84px; border-radius: 22px; flex: none; background-size: contain; background-color: #fff; background-repeat: no-repeat; background-position: center; display: grid; place-items: center; }
.identity .logo-drop svg { width: 22px; height: 22px; color: #999; }
.identity .grow { display: grid; gap: 8px; }

/* pickers */
.font-row, .look-row, .voice-row, .goal-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.font-card, .look-card, .voice-card, .goal-card { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 10px; display: grid; gap: 6px; justify-items: center; text-align: center; transition: border-color .15s, transform .12s, background .15s; }
.font-card:hover, .look-card:hover, .voice-card:hover, .goal-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.font-card.on, .look-card.on, .voice-card.on, .goal-card.on { border-color: var(--c); background: color-mix(in oklab, var(--c) 12%, var(--surface)); box-shadow: 0 0 0 1px var(--c) inset; }
.font-card span { font-size: 30px; line-height: 1.1; }
.font-card i, .look-card b, .goal-card b { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.look-card > div { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; position: relative; }
.voice-card { justify-items: start; text-align: left; padding: 12px; }
.voice-card b { font-size: 14px; }
.voice-card span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.goal-card { padding: 14px 10px; }
.goal-card svg { width: 20px; height: 20px; color: var(--c); }
.kind-row { display: flex; flex-wrap: wrap; gap: 8px; }
.kind { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13px; color: var(--muted); }
.kind svg { width: 14px; height: 14px; }
.kind.on { color: var(--text); border-color: var(--c); background: color-mix(in oklab, var(--c) 14%, var(--surface)); }
.corner-pick { display: grid; grid-template-columns: repeat(2, 22px); gap: 4px; padding: 6px; border-radius: 10px; background: var(--surface-2); }
.corner-pick button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; }
.corner-pick button.on { background: var(--c); border-color: var(--c); }
.photos-tile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--surface); text-align: left; }
.photos-tile > svg { width: 22px; height: 22px; color: var(--c); flex: none; }
.photos-tile > span:not(.bline-go) { flex: 1; display: grid; }
.photos-tile span span { color: var(--muted); font-size: 13px; }
.about-line { display: grid; gap: 3px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.about-line:hover { border-color: var(--line-2); }
.about-line > span:last-child { font-size: 14px; color: var(--text); line-height: 1.45; }
.about-line .blank { color: var(--muted); font-style: italic; }

/* live post preview */
.pv-post { border-radius: 18px; overflow: hidden; background: #fff; color: #111; box-shadow: var(--shadow); }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; }
.pv-head .muted { color: #888; }
.pv-ava { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #f2f2f2; font-size: 11px; border: 1px solid #eee; }
.pv-ava img { width: 100%; height: 100%; object-fit: contain; }
.pv-img { position: relative; aspect-ratio: 1; overflow: hidden; }
.pv-scene { position: absolute; inset: 0; }
.pv-actions { display: flex; gap: 14px; padding: 10px 12px 2px; }
.pv-actions svg { width: 22px; height: 22px; }
.pv-cap { padding: 4px 12px 14px; font-size: 13px; line-height: 1.45; }
.pv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; }
.pv-grid > div { position: relative; aspect-ratio: 4 / 5; }
.pv-note { margin: 0; }

/* the four looks, drawn with the brand colours */
.look-realistic .pv-scene { background:
  radial-gradient(60% 50% at 70% 25%, rgba(255, 255, 255, .55), transparent 60%),
  radial-gradient(70% 60% at 30% 85%, color-mix(in oklab, var(--c2) 70%, transparent), transparent 70%),
  linear-gradient(160deg, var(--c3), color-mix(in oklab, var(--c1) 70%, #d9b38c) 55%, color-mix(in oklab, var(--c2) 80%, #000)); }
.look-editorial .pv-scene { background:
  radial-gradient(circle at 68% 42%, var(--c1) 0 26%, transparent 26.5%),
  linear-gradient(90deg, transparent 0 8%, color-mix(in oklab, var(--c3) 60%, transparent) 8% 8.6%, transparent 8.6%),
  var(--c2); }
.look-minimal .pv-scene { background:
  radial-gradient(circle at 50% 46%, var(--c1) 0 9%, transparent 9.5%),
  color-mix(in oklab, var(--c3) 85%, #fff); }
.look-illustration .pv-scene { background:
  radial-gradient(circle at 25% 75%, var(--c3) 0 22%, transparent 22.5%),
  radial-gradient(circle at 78% 30%, var(--c2) 0 16%, transparent 16.5%),
  radial-gradient(ellipse 55% 30% at 60% 88%, color-mix(in oklab, var(--c2) 60%, var(--c3)) 0 98%, transparent 100%),
  var(--c1); }

/* headline lettering */
.pv-text { position: absolute; left: 7%; right: 7%; bottom: 9%; display: grid; gap: 8px; justify-items: start; }
.pv-h { font-size: 26px; line-height: 1.08; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); max-width: 90%; }
.look-minimal .pv-h { color: #161616; text-shadow: none; }
.pv-cta { font: 800 12px/1 var(--font); padding: 8px 12px; border-radius: 99px; background: #fff; color: #111; }
.font-modern .pv-h { font-family: var(--font); font-weight: 800; letter-spacing: -0.02em; }
.font-classic .pv-h { font-family: "Literata", Georgia, "Times New Roman", serif; font-weight: 600; }
.font-bold .pv-h { font-family: var(--font); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; font-size: 24px; }
.font-handwritten .pv-h { font-family: "Caveat", "Comic Sans MS", cursive; font-weight: 600; font-size: 34px; }
.font-card.font-modern span { font-family: var(--font); font-weight: 800; }
.font-card.font-classic span { font-family: "Literata", Georgia, serif; font-weight: 600; }
.font-card.font-bold span { font-family: var(--font); font-weight: 800; text-transform: uppercase; }
.font-card.font-handwritten span { font-family: "Caveat", cursive; font-weight: 600; font-size: 36px; }

/* logo stamp */
.pv-logo { position: absolute; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .92); padding: 4px; }
.pv-logo img { width: 100%; height: 100%; object-fit: contain; }
.pv-logo b { font-size: 11px; color: #111; }
.pv-logo.size-s { width: 11%; height: 11%; } .pv-logo.size-m { width: 15%; height: 15%; } .pv-logo.size-l { width: 20%; height: 20%; }
.pv-logo.pos-top-left { top: 3.5%; left: 3.5%; } .pv-logo.pos-top-right { top: 3.5%; right: 3.5%; }
.pv-logo.pos-bottom-left { bottom: 3.5%; left: 3.5%; } .pv-logo.pos-bottom-right { bottom: 3.5%; right: 3.5%; }

@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; }
  .studio-preview { position: static; max-width: 420px; width: 100%; margin: 0 auto; }
}
@media (max-width: 860px) {
  .font-row, .look-row, .goal-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice-row { grid-template-columns: 1fr 1fr; }
  .pv-grid { display: none; }
}
/* real brand photos in the preview, tinted by the chosen look */
.pv-scene.photo { background-size: cover; background-position: center; }
.look-editorial .pv-scene.photo { filter: contrast(1.08) saturate(.85); }
.look-editorial .pv-scene.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, color-mix(in oklab, var(--c2) 75%, transparent)); }
.look-minimal .pv-scene.photo { inset: 12%; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.look-minimal { background: color-mix(in oklab, var(--c3) 85%, #fff); }
.look-illustration .pv-scene.photo { filter: saturate(1.6) contrast(1.15); }
.look-illustration .pv-scene.photo::after { content: ""; position: absolute; inset: 0; background: color-mix(in oklab, var(--c1) 22%, transparent); mix-blend-mode: multiply; }
.look-realistic .pv-scene.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35)); }
.brand-chip .avatar img, .avatar img { object-fit: contain; background: #fff; }
.swatch-wrap { position: relative; display: inline-block; }
.swatch-x { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--bg-raise); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); font-size: 13px; line-height: 1; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.swatch-wrap:hover .swatch-x, .swatch-x:focus-visible { opacity: 1; }
@media (pointer: coarse) { .swatch-x { opacity: 1; } }
/* post panel: never squeeze the preview; let long fields wrap */
.drawer-body { display: flex; flex-direction: column; }
.drawer-body > * { flex-shrink: 0; }
.ig-preview img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.ig-preview video { display: block; }
#pd-tags { min-height: 64px; resize: vertical; }
/* carousel viewer */
.ig-preview img, .slides img { aspect-ratio: 4 / 5; }
.slides { position: relative; }
.slides img { display: none; width: 100%; object-fit: cover; }
.slides img.on { display: block; }
.slides .sl-prev, .slides .sl-next { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); color: #111; display: grid; place-items: center; }
.slides .sl-prev { left: 8px; } .slides .sl-next { right: 8px; }
.slides .sl-prev svg, .slides .sl-next svg { width: 16px; height: 16px; }
.slides .sl-count { position: absolute; top: 8px; right: 8px; font: 700 11px/1 var(--font); color: #fff; background: rgba(0,0,0,.6); padding: 5px 8px; border-radius: 99px; }
.post .thumb { aspect-ratio: 4 / 5; }
.pv-real { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-img:has(.pv-real) { aspect-ratio: 4 / 5; }
.pv-example { position: absolute; top: 10px; left: 10px; font: 700 11px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; padding: 6px 9px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; }
.pv-grid.real > div { background-size: cover; background-position: center; background-color: var(--surface-3); }
.feed-style { font-size: 13px; color: var(--text-2); }
.feed-style summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.feed-style p { margin: 8px 0 0; line-height: 1.5; }
.feed-thumb { width: 100%; aspect-ratio: 1; border-radius: 10px; background: var(--surface-3) center/cover; }
.font-row, .look-row { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.ap-explain { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: color-mix(in oklab, var(--c-week) 10%, var(--surface)); border: 1px solid color-mix(in oklab, var(--c-week) 30%, var(--line)); font-size: 14px; }
.ap-explain ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; color: var(--text-2); }
.stepper { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.stepper button { width: 34px; height: 32px; border-radius: 9px; border: 0; background: transparent; font-size: 18px; font-weight: 700; }
.stepper button:hover { background: var(--surface-3); }
.stepper b { min-width: 24px; text-align: center; font-size: 16px; }
/* the profile grid shows posts as 3:4 tiles, like Instagram does today */
.ig-cell { aspect-ratio: 3 / 4; }

/* offers found by the reading, waiting for the owner's answer */
.offer-ask { margin-top: 10px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.offer-ask-q { font-size: 13px; margin-bottom: 8px; opacity: .85; }
.offer-ask-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; flex-wrap: wrap; }
.offer-ask-row span { flex: 1 1 180px; min-width: 0; font-size: 14px; }

/* autosave pill */
#save-pill { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line, rgba(255,255,255,.12));
  box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; max-width: calc(100vw - 32px); }
#save-pill.show { opacity: 1; transform: translate(-50%, 0); }
#save-pill.saved svg { color: var(--ok); width: 16px; height: 16px; }
#save-pill.error { display: none; }
#save-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); animation: isiPulse 1s infinite ease-in-out; }
@keyframes isiPulse { 50% { opacity: .3; } }
.autosave-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.autosave-note svg { width: 14px; height: 14px; color: var(--ok); }
.pill-opt.soon { opacity: .5; cursor: not-allowed; }
.pill-opt.soon small { margin-left: 6px; font-size: 11px; opacity: .8; }
/* modals never grow past the screen: content shrinks and wraps instead */
.modal { grid-template-columns: minmax(0, 1fr); }
.modal .pills { flex-wrap: wrap; }
.modal .seg { max-width: 100%; }
.modal .seg button { flex: 1 1 0; min-width: 0; white-space: normal; line-height: 1.2; }
.modal .field { grid-template-columns: minmax(0, 1fr); }
.modal .seg button { padding: 0 6px; height: auto; min-height: 32px; }
#save-pill { font-family: inherit; width: max-content; line-height: 1.3; }
@media (max-width: 900px) { #save-pill { bottom: calc(92px + env(safe-area-inset-bottom)); } }
.studio-title { flex-wrap: wrap; row-gap: 6px; }
.studio-title > div { min-width: 0; }
/* modal action rows: long labels (Greek) wrap inside the button instead of
   spilling out; on phones the buttons share the row evenly */
.modal > .row:last-child { flex-wrap: wrap; gap: 10px; }
.modal > .row:last-child .btn { white-space: normal; height: auto; min-height: 44px; padding: 10px 16px; line-height: 1.2; text-align: center; max-width: 100%; }
@media (max-width: 520px) {
  .modal > .row:last-child > .grow { display: none; }
  .modal > .row:last-child .btn { flex: 1 1 0; min-width: 0; }
  .modal > .row:last-child .btn.spark { flex-grow: 2; }
}

.ap-reels { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.ap-reels .opt b { display: inline-flex; align-items: center; gap: 6px; }
.ap-reels .opt b svg { width: 16px; height: 16px; }
.modal .seg button { flex: 1 1 auto; }

/* drag a post to another day */
.post.movable { cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.post.dragging { opacity: .35; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: .95;
  box-shadow: 0 18px 50px rgba(0,0,0,.45); border-radius: 14px; cursor: grabbing; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.day.drop-on { outline: 2px dashed var(--c-week, #ff7a45); outline-offset: 2px; background: color-mix(in srgb, var(--c-week, #ff7a45) 8%, transparent); }
/* post window: the whole post is always visible (never taller than the
   screen, never cut by the action bar); letterboxed instead of cropped */
.ig-preview > img, .ig-preview .slides img { max-height: 62vh; object-fit: contain; background: #0b0b0f; }
.ig-preview .slides { max-height: 62vh; }

/* planner status notices + failed chip */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; }
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.notice.bad { background: color-mix(in srgb, #e5484d 12%, transparent); border-color: color-mix(in srgb, #e5484d 40%, transparent); }
.chip.failed { background: color-mix(in srgb, #e5484d 18%, transparent); color: #ff8b8f; }

/* agency: brand switcher + all-brands page */
button.brand-chip { cursor: pointer; color: var(--text); font: inherit; font-weight: 700; }
button.brand-chip:hover { background: var(--surface-2); }
.brand-chip > svg { width: 14px; height: 14px; opacity: .6; transform: rotate(90deg); flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.ag-card { text-align: left; display: grid; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; transition: border-color .15s, transform .08s; }
.ag-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.ag-card.on { border-color: var(--c-week, #ff7a45); }
.ag-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ag-name { display: grid; min-width: 0; flex: 1; }
.ag-name b, .ag-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ag-stats span { display: grid; padding: 8px; border-radius: 12px; background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.ag-stats b { font-size: 20px; color: var(--text); }
.ag-foot { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-foot .chip svg { width: 12px; height: 12px; }
.ag-list { display: grid; gap: 6px; max-height: 55vh; overflow: auto; }
.ag-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ag-row:hover { background: var(--surface-2); }
.ag-row.on { border-color: var(--line-2); background: var(--surface-2); }
.ag-row .grow { display: grid; min-width: 0; }
.ag-row svg { width: 18px; height: 18px; }
.dot-bad { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; flex: none; }

.ag-foot .grow { flex: 1; }
.ag-remove { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; color: var(--text-2); font-size: 12px; }
.ag-remove:hover { background: color-mix(in srgb, #e5484d 15%, transparent); color: #ff8b8f; }
.ag-remove svg { width: 14px; height: 14px; }

.review-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; margin-bottom: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, #ff7a45 16%, transparent), color-mix(in srgb, #e5484d 10%, transparent));
  border: 1px solid color-mix(in srgb, #ff7a45 35%, transparent); }
.review-banner > svg { width: 20px; height: 20px; color: #ff7a45; flex: none; }
.review-banner .grow { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 520px) { .review-banner { flex-wrap: wrap; } .review-banner .btn { width: 100%; } }

/* credits */
.cr-line { margin: 6px 0 8px; }
.cr-line b { font-size: 20px; }
.credits-card .cr-total { display: flex; align-items: baseline; gap: 8px; }
.credits-card .cr-total b { font-size: 40px; letter-spacing: -0.02em; }
.cr-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 12px 0; }
.cr-prices > span { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.cr-hist { margin-top: 12px; }
.cr-hist summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.cr-hist .row { padding: 6px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.cr-hist b.plus { color: var(--ok); }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pack { position: relative; display: grid; gap: 4px; justify-items: center; padding: 18px 10px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.pack:hover { border-color: var(--c-week, #ff7a45); }
.pack.best { border-color: var(--c-week, #ff7a45); box-shadow: 0 0 0 1px var(--c-week, #ff7a45) inset; }
.pack b { font-size: 28px; }
.pack .price { font-weight: 700; font-size: 18px; margin-top: 6px; }
.pack .chip { position: absolute; top: -10px; }
@media (max-width: 520px) { .packs { grid-template-columns: 1fr; } }
.review-banner.bad { background: color-mix(in srgb, #e5484d 14%, transparent); border-color: color-mix(in srgb, #e5484d 40%, transparent); }
.review-banner.bad > svg { color: #ff8b8f; }

/* settings cards keep their own height (no empty stretched boxes) */
.cols-2 { align-items: start; }
/* composer: the Create button always shows its full label (with the credit price) */
#cp-go { flex: none !important; white-space: nowrap; }
#cp-go small { font-weight: 600; opacity: .9; margin-left: 4px; }
@media (max-width: 520px) { #cp-go { width: 100%; } }

.post.pulse { animation: isiPulseRing 0.9s ease-in-out 3; border-radius: 14px; }
@keyframes isiPulseRing { 0%,100% { box-shadow: 0 0 0 0 rgba(255,122,69,0); } 50% { box-shadow: 0 0 0 4px rgba(255,122,69,.75); } }

/* design choice (Smart / Ultra) + Autopilot estimate */
.q-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-card { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.q-card b { font-size: 15px; }
.q-card span { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.q-card em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--c-week, #ff7a45); }
.q-card.on { border-color: var(--c-week, #ff7a45); box-shadow: 0 0 0 1px var(--c-week, #ff7a45) inset; }
.q-card.pro { opacity: .75; }
.q-card.pro em { color: var(--text-2); }
.ap-estimate { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.ap-estimate > svg { width: 18px; height: 18px; color: var(--c-week, #ff7a45); flex: none; margin-top: 1px; }
.ap-estimate > span { display: grid; gap: 2px; }
.ap-estimate.over { border-color: color-mix(in srgb, #e5484d 45%, transparent); }

.anim-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.anim-opt > span:first-child { flex: 1; min-width: 0; }
.anim-opt b { display: inline-flex; align-items: center; gap: 6px; }
.anim-opt b svg { width: 14px; height: 14px; }
.anim-price { font-weight: 700; font-size: 13px; color: var(--c-week, #ff7a45); }
/* icons inside option rows always stay icon-sized */
.opt b { display: inline-flex; align-items: center; gap: 6px; }
.opt b svg, .opt > span > svg { width: 16px; height: 16px; flex: none; }

.q-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .q-cards.three { grid-template-columns: 1fr; } }
.q-card b svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Settings → Instagram & publishing */
.ig-card { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.ig-account { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--surface-2, rgba(127,127,127,.08)); }
.ig-account img, .ig-account .ig-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--surface-3, rgba(127,127,127,.15)); }
.ig-steps { list-style: none; counter-reset: igs; margin: 0; padding: 0; display: grid; gap: 10px; }
.ig-steps li { counter-increment: igs; display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 12px; border-radius: 14px; background: var(--surface-2, rgba(127,127,127,.08)); }
.ig-steps li::before { content: counter(igs); grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; background: var(--accent, #ff7a45); color: #fff; }
.ig-steps li b { grid-column: 2; } .ig-steps li .muted { grid-column: 2; } .ig-steps li .btn { grid-column: 3; grid-row: 1 / 3; }
.ig-choose { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ig-pick { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line, rgba(127,127,127,.3)); background: none; color: inherit; cursor: pointer; }
.ig-pick img { width: 26px; height: 26px; border-radius: 50%; }
.ig-own summary { cursor: pointer; font-weight: 600; }
.notice.bad { border-color: var(--bad, #e5484d); }
@media (max-width: 640px) { .ig-steps li { grid-template-columns: 34px 1fr; } .ig-steps li .btn { grid-column: 2; grid-row: auto; margin-top: 8px; justify-self: start; } }
.ig-direct { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface-2, rgba(127,127,127,.08)); }
.ig-manual summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.ig-picker { display: flex; flex-direction: column; gap: 10px; }
.ig-options { display: grid; gap: 8px; }
.ig-option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line, rgba(127,127,127,.3)); cursor: pointer; }
.ig-option:has(input:checked) { border-color: var(--accent, #ff7a45); background: var(--surface-2, rgba(127,127,127,.08)); }
.ig-option img, .ig-option .ig-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.ig-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.ig-week > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface-2, rgba(127,127,127,.08)); }
.ig-week b { font-size: 22px; }
.cost-days { display: grid; gap: 6px; }
.cost-day { display: grid; grid-template-columns: 96px 1fr 70px; gap: 10px; align-items: center; }
.cost-day > .muted:last-child { grid-column: 2 / 4; margin-top: -4px; }
.cost-bar { height: 10px; border-radius: 6px; background: var(--surface-2, rgba(127,127,127,.12)); overflow: hidden; }
.cost-bar i { display: block; height: 100%; background: var(--accent, #ff7a45); }
.cost-table { overflow-x: auto; } .cost-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cost-table th, .cost-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); white-space: nowrap; }
.plan-notice { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 18px; border-radius: 16px; background: var(--bg-raise, #222); border: 1px solid var(--line, rgba(127,127,127,.3));
  box-shadow: 0 12px 40px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.q-card.locked, .pill-opt.locked { opacity: .55; }
.q-card .lock-tag, .pill-opt .lock-tag { display: block; font-size: 11px; font-weight: 700; color: var(--accent, #ff7a45); }
.seg button.locked { opacity: .45; }
.slot .slot-skip { margin-top: 6px; align-self: flex-start; background: none; border: 1px solid var(--line, rgba(127,127,127,.3)); color: inherit;
  border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.slot.skipped { opacity: .6; }
/* Post drawer → Edit */
.edit-panel { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface-2, rgba(127,127,127,.08)); position: relative; }
.edit-panel details { border-top: 1px solid var(--line, rgba(127,127,127,.2)); padding-top: 10px; }
.edit-panel summary { cursor: pointer; font-weight: 700; font-size: 13px; letter-spacing: .02em; margin-bottom: 8px; }
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line, rgba(127,127,127,.3));
  background: var(--bg-raise, transparent); color: inherit; cursor: pointer; font-size: 13px; font-weight: 600; }
.chip-btn:hover { border-color: var(--accent, #ff7a45); }
.chip-btn small, .edit-panel .btn small { opacity: .6; font-weight: 700; }
.chip-btn small::after, .edit-panel .btn small::after { content: " cr"; }
.ed-row { display: flex; gap: 8px; } .ed-row .input { flex: 1; min-width: 0; }
.ed-grid { display: grid; gap: 6px; margin-bottom: 8px; }
.ed-busy { display: none; position: absolute; inset: 0; border-radius: 16px; background: color-mix(in oklab, var(--bg, #000) 70%, transparent);
  align-items: center; justify-content: center; gap: 10px; font-weight: 700; }
.edit-panel.busy .ed-busy { display: flex; }
.ig-preview.working { opacity: .55; transition: opacity .2s; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.edit-panel svg { width: 16px; height: 16px; vertical-align: -3px; }

/* Edits running in the background, and every earlier version */
.ed-busy { text-align: center; padding: 16px; line-height: 1.4; }
.post.updating .thumb { filter: saturate(.6); }
.post .upd { position: absolute; inset: auto 8px 8px 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(20, 16, 30, .72); backdrop-filter: blur(6px); }
.post .upd .spinner { width: 12px; height: 12px; }
.post .thumb { position: relative; }
.ed-versions { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.ed-versions .ver { flex: 0 0 84px; display: grid; gap: 4px; padding: 0; border: 0; background: none; color: var(--muted);
  font-size: 11px; font-weight: 600; text-align: center; cursor: pointer; scroll-snap-align: start; }
.ed-versions .ver img { width: 84px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; border: 1px solid var(--line);
  transition: transform .15s ease, border-color .15s ease; }
.ed-versions button.ver:hover img { transform: translateY(-2px); border-color: var(--accent); }
.ed-versions .ver.now { cursor: default; color: var(--text); }
.ed-versions .ver.now img { border: 2px solid var(--accent); }
.edit-panel .btn.spark.sm { padding: 6px 12px; font-size: 12.5px; }

/* ── month view ─────────────────────────────────────────────────────────── */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.month .mname { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 6px 2px; }
.month .day.mday { position: relative; min-height: 132px; padding: 8px; gap: 6px; border-radius: 14px; align-content: start; }
.month .day.mday.out { opacity: .45; }
.month .day.mday.past { opacity: .62; }
.month .day.mday.out.past { opacity: .35; }
.mday-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 20px; }
.mday-head .dd { font-weight: 800; font-size: 13.5px; margin-right: auto; }
.day.today .mday-head .dd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px;
  background: var(--accent); color: #fff; }
.mslot { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 99px; font-size: 10.5px; font-weight: 700;
  color: var(--accent-ink); background: var(--accent-soft); }
.mslot svg { width: 10px; height: 10px; }
.mslot.skipped { opacity: .55; text-decoration: line-through; }
.mposts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.post.mpost { aspect-ratio: 4 / 5; border-radius: 8px; background: var(--surface-3) center/cover no-repeat; border: 1px solid var(--line); min-height: 0; }
.post.mpost:hover { transform: translateY(-1px); border-color: var(--accent); }
.mpost .st { position: absolute; left: 4px; top: 4px; }
.mpost .mk { position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center;
  background: rgba(10, 8, 16, .6); color: #fff; }
.mpost .mk svg { width: 10px; height: 10px; }
.mpost .spinner, .mpost.thinking .spinner { position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; color: #fff; }
.mpost.updating { filter: saturate(.5) brightness(.8); }
.mpost.thinking { position: relative; aspect-ratio: 4 / 5; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); }
.mpost.thinking .spinner { color: var(--accent-ink); }
.mmore { display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--muted);
  background: var(--surface-2, var(--surface)); border: 1px dashed var(--line); }
i.st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); }
i.st.ready { background: #f5a524; } i.st.sent { background: #3b82f6; } i.st.posted { background: #22c55e; } i.st.failed { background: #ef4444; }
.m-add { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 9px; border: 1px dashed var(--line-2, var(--line));
  background: transparent; color: var(--muted); display: grid; place-items: center; opacity: 0; transition: opacity .15s; cursor: pointer; }
.m-add svg { width: 14px; height: 14px; }
.mday:hover .m-add { opacity: 1; }
.m-add:hover { color: var(--accent-ink); border-color: var(--accent); }
.m-legend { display: flex; gap: 14px; align-items: center; margin-left: auto; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.m-legend span { display: inline-flex; align-items: center; gap: 6px; }
.m-legend svg { width: 12px; height: 12px; color: var(--accent-ink); }
.toolbar:has(.m-legend) { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Phones: dots instead of previews; a day opens its week */
@media (max-width: 700px) {
  .month { gap: 4px; }
  .month .mname { font-size: 10px; letter-spacing: .02em; padding: 0 2px; text-align: center; }
  .month .day.mday { min-height: 64px; padding: 5px 4px; border-radius: 10px; cursor: pointer; gap: 4px; }
  .mday-head { justify-content: center; }
  .mday-head .dd { margin: 0; font-size: 12.5px; }
  .mslot { padding: 0; background: none; font-size: 0; }
  .mslot svg { width: 10px; height: 10px; }
  .mposts { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .post.mpost, .mpost.thinking { width: 8px; height: 8px; aspect-ratio: auto; border-radius: 50%; background-image: none !important; border: 0;
    pointer-events: none; }
  .post.mpost.ready { background: #f5a524; }
  .mpost .st { position: static; width: 8px; height: 8px; box-shadow: none; }
  .mpost .mk, .mpost .spinner { display: none; }
  .mmore { aspect-ratio: auto; border: 0; background: none; font-size: 10px; }
  .m-add, .m-legend { display: none; }
}

/* ── SEO Blog (native page) ─────────────────────────────────────────────── */
.seo-hero { gap: 16px; }
.seo-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.seo-kpis .kpi { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2, var(--surface)); border: 1px solid var(--line); }
.seo-kpis .kpi b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.seo-kpis .kpi b small { font-size: 13px; color: var(--muted); font-weight: 700; }
.seo-kpis .kpi span { font-size: 12.5px; color: var(--muted); }
.seo-kpis .bar { display: block; height: 5px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.seo-kpis .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--spark-a), var(--spark-b)); }
.seo-settings { display: grid; gap: 12px; margin-top: 4px; }
.seo-settings > details > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.seo-settings > details > summary::-webkit-details-marker { display: none; }
.seo-settings > details > summary h2 { flex: 1; }
.seo-settings > details > summary::after { content: '▾'; color: var(--muted); transition: transform .2s; }
.seo-settings > details[open] > summary::after { transform: rotate(180deg); }
.seo-settings > details:not([open]) { gap: 0; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.seo-rows { display: grid; gap: 6px; }
.seo-row { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto; gap: 6px; align-items: center; }
.seo-row.topic { grid-template-columns: 1.4fr 1.4fr 70px auto; }
.seo-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seo-modes .opt { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; }
.seo-modes .opt span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.seo-modes .opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.seo-toggle { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.seo-adv > summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.seo-adv { display: grid; gap: 12px; }
.seo-list { display: grid; gap: 8px; }
.seo-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.seo-item b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-save { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px 10px 16px;
  border-radius: 16px; border: 1px solid var(--line); background: color-mix(in oklab, var(--bg-raise) 88%, transparent); backdrop-filter: blur(10px);
  box-shadow: var(--shadow); }
.chip-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 700px) {
  .seo-kpis, .seo-modes { grid-template-columns: 1fr; }
  .seo-row, .seo-row.topic { grid-template-columns: 1fr auto; }
  .seo-row .input:not(:first-child) { grid-column: 1; }
  .seo-row .icon-btn { grid-row: 1; grid-column: 2; }
  .seo-save { bottom: 74px; }
}
/* <details> does not lay its content out as a grid in every browser: space it explicitly */
.seo-settings > details > * + *, .seo-adv > * + * { margin-top: 12px; }
.seo-settings > details { display: block; }
.cost-table tr.click { cursor: pointer; }
.cost-table tr.click:hover td { background: var(--accent-soft); }
.cost-table td.neg, .kpi .v.neg { color: var(--bad, #ef4444); }
.drawer .kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ── header: Autopilot and credits pills, profile menu ──────────────────── */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); font: 700 13px var(--font); cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.pill:hover { border-color: var(--line-2, var(--accent)); color: var(--text); }
.pill svg { width: 15px; height: 15px; }
.pill .pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px color-mix(in oklab, var(--muted) 18%, transparent); }
.pill.on .pill-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); animation: ap-pulse 2.4s ease-in-out infinite; }
@keyframes ap-pulse { 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, .06); } }
.pill .pill-tag { padding: 2px 8px; border-radius: 99px; font-size: 11.5px; background: var(--surface-2, var(--line)); color: var(--muted); }
.pill.on .pill-tag { background: rgba(34, 197, 94, .14); color: #16a34a; }
.pill.credits svg { color: var(--accent); }
.pill.credits b { color: var(--text); }
.me-menu { position: relative; }
.me-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.me-btn .avatar { width: 28px; height: 28px; font-size: 11.5px; }
.me-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px; padding: 6px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--bg-raise); box-shadow: var(--shadow); display: grid; gap: 2px; }
.me-pop[hidden] { display: none; }
.me-pop .me-who { display: grid; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-pop .me-who span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.me-pop a, .me-pop button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 0; background: none; color: var(--text);
  font: 600 13.5px var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.me-pop a:hover, .me-pop button:hover { background: var(--surface-2, var(--line)); }
.me-pop svg { width: 16px; height: 16px; color: var(--muted); }
.me-pop .danger, .me-pop .danger svg { color: var(--bad, #ef4444); }
.me-row .icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.me-row .icon-btn.sm svg { width: 15px; height: 15px; }
.me-row .icon-btn.sm:hover { color: var(--bad, #ef4444); border-color: color-mix(in oklab, var(--bad, #ef4444) 40%, var(--line)); }
.ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .pill .pill-l { display: none; } }
@media (max-width: 520px) {
  .pill { padding: 0 10px; gap: 6px; }
  .pill.credits { display: none; }       /* phones: credits sit in Settings and the menu */
  .topbar { gap: 6px; }
}

/* ── review queue ───────────────────────────────────────────────────────── */
.modal.rq-sheet { width: min(980px, calc(100vw - 32px)); padding: 0; gap: 0; }
.rq { display: grid; }
.rq-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.rq-bar { height: 3px; margin: 0 18px; border-radius: 9px; background: var(--surface-3, var(--line)); overflow: hidden; }
.rq-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--spark-a), var(--spark-b)); transition: width .3s ease; }
.rq-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; padding: 18px; }
.rq-media { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 5; max-height: 62vh; justify-self: center; width: 100%; }
.rq-media img, .rq-media video { width: 100%; height: 100%; object-fit: contain; display: block; }
.rq-count { position: absolute; right: 10px; top: 10px; display: inline-flex; gap: 5px; align-items: center; padding: 4px 9px; border-radius: 99px;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 700; }
.rq-count svg { width: 13px; height: 13px; }
.rq-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rq-cap { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; max-height: 46vh; overflow: auto; padding-right: 4px; }
.rq-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); }
.rq-hint { padding: 0 18px 14px; }
.rq-done { display: grid; justify-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.rq-done h3 { margin: 0; }
.rq-done-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 12px 30px -10px rgba(34, 197, 94, .6); }
.rq-done-mark svg { width: 26px; height: 26px; }
@media (max-width: 700px) {
  .rq-body { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
  .rq-media { max-height: 48vh; }
  .rq-cap { max-height: none; }
  .rq-actions { position: sticky; bottom: 0; background: var(--bg-raise); }
  .rq-actions .btn span { display: none; }
  .rq-hint { display: none; }
}

/* ── Today ──────────────────────────────────────────────────────────────── */
:root { --c-today: #f5a524; }
.nav a[href="#/today"], .tabbar a[href="#/today"] { --c: var(--c-today); }
.nav a[href="#/agency"], .nav a[href="#/costs"] { --c: var(--c-settings); }
.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.td-main, .td-side { display: grid; gap: 16px; min-width: 0; }
.td-needs { display: grid; gap: 8px; }
.td-need { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.td-need > svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.td-need.hot { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.td-need.bad > svg { color: var(--bad, #ef4444); }
.td-clear { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(34, 197, 94, .1); color: #16a34a; font-weight: 700; }
.td-clear svg { width: 18px; height: 18px; }
.td-today { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.td-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); color: var(--muted); }
.td-empty span { flex: 1; }
.td-days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.td-day { display: grid; gap: 8px; align-content: start; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-height: 110px; }
.td-day-name { display: flex; align-items: baseline; gap: 6px; } .td-day-name span { color: var(--muted); font-size: 12.5px; }
.td-day-items { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.td-thumb { position: relative; width: 38px; aspect-ratio: 4 / 5; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-3) center / cover; cursor: pointer; padding: 0; }
.td-thumb .st { position: absolute; left: 3px; top: 3px; width: 7px; height: 7px; }
.td-add { width: 38px; aspect-ratio: 4 / 5; border-radius: 8px; border: 1px dashed var(--line-2, var(--line)); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.td-add svg { width: 14px; height: 14px; } .td-add:hover { color: var(--accent-ink); border-color: var(--accent); }
.td-tip p { margin: 6px 0 12px; font-weight: 600; line-height: 1.45; }
.td-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.td-kpis .kpi { padding: 10px; }
.td-kpis .kpi .v { font-size: 20px; }
.td-ask-chips { display: grid; gap: 6px; }
.td-ask-chips .chip-btn { text-align: left; justify-content: flex-start; white-space: normal; height: auto; padding: 9px 12px; }
.td-first { padding: 22px; border-radius: var(--radius); border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--line));
  background: radial-gradient(80% 140% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface); margin-bottom: 16px; }
.td-first h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; } .td-first > p { margin: 4px 0 16px; }
.td-first-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.td-opt { display: grid; gap: 6px; text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-raise); color: var(--text); cursor: pointer;
  transition: transform .15s, border-color .15s; font: inherit; }
.td-opt:hover { transform: translateY(-2px); border-color: var(--accent); }
.td-opt svg { width: 22px; height: 22px; color: var(--accent); } .td-opt span { color: var(--muted); font-size: 13px; }
.skel { border-radius: 12px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2, var(--line)) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { to { background-position: -200% 0; } }
@media (max-width: 1100px) { .td-grid { grid-template-columns: 1fr; } .td-days { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .td-first-grid { grid-template-columns: 1fr; }
  .td-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-today { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── phone tab bar: Create in the middle, More sheet ────────────────────── */
@media (max-width: 700px) {
  .tabbar { align-items: center; }
  .tabbar > button { display: grid; justify-items: center; gap: 3px; font: 700 10.5px var(--font); color: var(--muted); background: none; border: 0; padding: 4px 0; }
  .tabbar > button.on { color: var(--text); }
  .tabbar > button.on svg { color: var(--accent); }
  .tabbar .tab-create { justify-self: center; width: 50px; height: 50px; border-radius: 50%; padding: 0; margin-top: -22px; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--spark-a), var(--spark-b)); box-shadow: 0 10px 24px -8px rgba(255, 90, 80, .7), 0 0 0 4px var(--bg); }
  .tabbar .tab-create svg { width: 24px; height: 24px; color: #fff; }
}
.more-modal { padding: 10px !important; }
.more-sheet { display: grid; gap: 2px; }
.more-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 0; background: none; color: var(--text);
  font: 700 15px var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.more-item:hover { background: var(--surface-2, var(--line)); }
.more-item.danger { color: var(--bad, #ef4444); }
.more-item[href="#/brand"] { --c: var(--c-brand); } .more-item[href="#/seo"] { --c: var(--c-seo); } .more-item[href="#/shop"] { --c: var(--c-shop); } .more-item[href="#/settings"] { --c: var(--c-settings); }

/* ── phones: dialogs come up from the bottom ────────────────────────────── */
@media (max-width: 600px) {
  .modal { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); animation: sheet-up .24s cubic-bezier(.2, .8, .2, 1); }
  .modal::before { content: ''; justify-self: center; width: 40px; height: 4px; border-radius: 9px; background: var(--line-2, var(--line)); margin: -10px 0 -6px; }
  .drawer { width: 100vw; animation: sheet-up .24s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.review-btn { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.review-btn svg { width: 14px; height: 14px; color: var(--accent); }
.badge-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 800;
  background: linear-gradient(135deg, var(--spark-a), var(--spark-b)); color: #fff; margin-left: 2px; }

/* ── settings tabs, usage chart ─────────────────────────────────────────── */
.s-tabs { margin-bottom: 14px; }
.s-pane { display: none; }
.s-pane.on { display: grid; }
.s-pane[data-pane="ig"].on { display: block; }
.usage-bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; align-items: end; height: 110px; margin: 12px 0 6px; }
.usage-bars i { display: block; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--spark-a), var(--spark-b)); min-height: 3px; }
.usage-bars i.zero { background: var(--surface-3, var(--line)); }
@media (max-width: 520px) { .s-tabs { display: flex; width: 100%; } .s-tabs button { flex: 1; padding: 0 6px; } }
.td-more { display: grid; place-content: center; text-align: center; gap: 4px; border-radius: 12px; border: 1px dashed var(--line-2, var(--line));
  color: var(--text); text-decoration: none; font-size: 26px; font-weight: 800; min-height: 140px; }
.td-more span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.td-more:hover { border-color: var(--accent); }
.rq-head .grow, .rq-actions .grow, .td-need .grow, .me-row .grow { flex: 1; }
.pill.on svg { color: #16a34a; }
@media (min-width: 901px) { .pill .pill-dot + svg { display: none; } }   /* desktop: the word says it */
@media (max-width: 700px) { .page-head [data-act="t-create"] { display: none; } }   /* phones: the + in the tab bar */
/* Plan & credits: Plan and usage stacked on the left, Credits beside them (no hole under Plan) */
.s-pane[data-pane="plan"].on { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "plan cr" "use cr"; align-items: start; }
.s-pane[data-pane="plan"] .s-plan { grid-area: plan; }
.s-pane[data-pane="plan"] .credits-card { grid-area: cr; }
.s-pane[data-pane="plan"] .s-usage { grid-area: use; }
@media (max-width: 900px) { .s-pane[data-pane="plan"].on { grid-template-columns: 1fr; grid-template-areas: "plan" "cr" "use"; } }

/* Inside a CRM sub-account: the CRM owns sign-in and sign-out. */
html[data-embed] [data-act="signout"] { display: none !important; }

/* the CRM agency view: its sub-accounts, on or off its plan. */
.gh-h { font-size: 15px; margin: 22px 0 10px; color: var(--muted); font-weight: 700; letter-spacing: .01em; }
.gh-list { display: grid; gap: 8px; }
.gh-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.gh-row .grow { display: flex; flex-direction: column; min-width: 0; }
.gh-row .grow b, .gh-row .grow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .gh-row { flex-wrap: wrap; } .gh-row .grow { flex: 1 1 60%; } }

/* Stripe could not open in a new tab: a link to click (inside the CRM). */
.stripe-fallback { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.55); }
.stripe-fallback .sf-card { max-width: 420px; display: grid; gap: 14px; padding: 22px; border-radius: 18px; background: var(--surface-2, #1c1724); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }

/* Create post: AI or your own */
.cp-mode { width: 100%; display: flex; }
.cp-mode button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 10px; white-space: nowrap; }
.cp-mode button svg { width: 16px; height: 16px; flex: none; }
/* When a post goes out */
.sw-opt { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
button.sw-opt:hover { border-color: rgba(249,115,22,.6); background: var(--surface-2); }
.sw-at { cursor: default; }
.sw-opt .grow { display: flex; flex-direction: column; min-width: 0; }
#sw-msg.bad { color: #f87171; }
/* Your own post: photo grid */
.own-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.own-grid:empty { display: none; }
.own-thumb { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.own-thumb img, .own-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.own-grid:has(video) { grid-template-columns: minmax(0, 220px); }
.own-thumb .icon-btn { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; }
.own-thumb .chip { position: absolute; left: 6px; bottom: 6px; }
.own-thumb .own-play { position: absolute; left: 6px; top: 6px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 700; }
.own-add { align-self: flex-start; cursor: pointer; margin-top: 8px; }

/* Brand "About" lines stay short; the full text opens on click. */
.about-line > span:last-child { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rd-extra-row { gap: 6px; margin-bottom: 6px; }
.rd-extra-row .input { min-width: 0; }

/* Also publish to (Settings) and the network ticks in the send window */
.net-list { display: grid; gap: 10px; margin-top: 12px; }
.net-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.net-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.net-acct button { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.net-mode button { white-space: nowrap; }
.sw-nets { display: grid; gap: 6px; }
.sw-net-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-net { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }

.ap-off-choice { flex-basis: 100%; order: 9; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }

/* Results: network switch and the per-network lines under "All" */
.r-nets { margin: -4px 0 4px; flex-wrap: wrap; }
.r-net-rows { display: grid; gap: 6px; margin-top: 12px; }
.r-net-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; }

/* Reel editor: voice choice */
.ed-voices { display: grid; gap: 8px; }
.ed-voice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.ed-voice.on { border-color: var(--accent, #ff6a3d); }
.cp-voices { max-height: 340px; overflow: auto; margin-top: 10px; padding-right: 4px; }
.cp-voices .ed-voice { cursor: pointer; } .cp-voices .ed-voice.on { background: rgba(255, 106, 61, .06); }

/* Products (e-shop) */
.shop-hero { display: grid; gap: 14px; }
.shop-set { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 6px; }
.shop-set-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; flex-wrap: wrap; }
.shop-set-row + .shop-set-row { border-top: 1px dashed var(--line); }
.shop-set-row.dim { opacity: .55; }
.shop-set-row .grow { min-width: 220px; }
.shop-picks, .shop-promos { display: grid; gap: 8px; }
.shop-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 14px; }
.shop-pick { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.scrim .shop-pick { grid-template-columns: 54px minmax(0, 1fr); }
.shop-pick img { width: 54px; height: 54px; object-fit: contain; border-radius: 10px; background: #fff; flex: none; }
.shop-pick .grow { min-width: 0; display: grid; gap: 3px; justify-items: start; }
.shop-pick b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.shop-made { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.shop-pick select { width: auto; max-width: 210px; }
.shop-promo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; flex-wrap: wrap; }
.shop-promo.ended { opacity: .6; }
.shop-promo .grow { min-width: 180px; }
.promo-code { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font: 800 13px/1 var(--font); letter-spacing: .04em;
  background: color-mix(in oklab, var(--c-shop) 16%, var(--surface)); color: var(--c-shop); border: 1px dashed color-mix(in oklab, var(--c-shop) 55%, transparent); }
.promo-code svg { width: 14px; height: 14px; }
.promo-code.sm { position: absolute; left: 8px; top: 8px; padding: 3px 7px; font-size: 11px; background: var(--surface); }
.sh-search { width: 220px; max-width: 100%; }
.sh-cat { width: auto; max-width: 220px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.shop-grid.compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: 46vh; overflow: auto; padding: 2px; }
.shop-card { display: grid; gap: 6px; align-content: start; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.shop-card.oos { opacity: .55; }
.shop-card.excluded .shop-img { filter: grayscale(1); opacity: .6; }
.shop-img { position: relative; aspect-ratio: 1; border-radius: 11px; overflow: hidden; background: #fff; }
.shop-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shop-name { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card .sale { color: var(--c-shop); }
.shop-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.shop-acts .btn { flex: 1; justify-content: center; padding-inline: 8px; }
.shop-check { display: flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.shop-connect { display: grid; gap: 16px; }
.shop-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.shop-steps > div { display: grid; gap: 4px; justify-items: start; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.shop-steps .tile { --c: var(--c-shop); }
@media (max-width: 640px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .sh-search, .sh-cat { width: 100%; max-width: none; }
  .shop-pick { grid-template-columns: 54px minmax(0, 1fr) auto; }
  .shop-pick select { max-width: 100%; width: 100%; grid-column: 2 / 3; }
}
.post-product { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; }
.post-product svg { width: 16px; height: 16px; flex: none; color: var(--c-shop); }
.post-product .promo-code { padding: 3px 7px; font-size: 11px; }
.promo-acts { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.shop-hero h2, .card h2.grow { white-space: nowrap; }

.reel-badge.making { background: rgba(255,166,48,.92); color: #16131f; animation: isiPulse 1.6s ease-in-out infinite; }
.reel-badge.failed { background: rgba(208,72,96,.92); color: #fff; }
@keyframes isiPulse { 50% { opacity: .6; } }
.vid-making { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #000; }
.vid-making img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.45) blur(2px); }
.vid-making > div { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; color: #fff; }
.vid-making b { font-size: 17px; } .vid-making small { font-size: 13px; opacity: .85; max-width: 300px; }
.vid-making .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #ffa630; animation: isiSpin 1s linear infinite; }
.vid-making.failed svg { width: 30px; height: 30px; color: #ff8a9b; }
.vid-making .vid-retry { margin-top: 8px; } .vid-making.failed .vid-retry svg { width: 16px; height: 16px; color: inherit; }
@keyframes isiSpin { to { transform: rotate(360deg); } }
.thumb.aiv-wait, .vid-making.aiv { background: radial-gradient(120% 80% at 80% 0%, rgba(255,106,61,.55), transparent 60%), radial-gradient(100% 70% at 0% 100%, rgba(139,92,246,.5), transparent 60%), #15121f; }
.thumb.aiv-wait { display: grid; place-items: center; }
.aiv-ph { display: grid; justify-items: center; gap: 6px; color: #fff; font-size: 12px; font-weight: 700; text-align: center; padding: 10px; animation: isiPulse 1.6s ease-in-out infinite; }
.aiv-ph svg { width: 26px; height: 26px; color: #ffa630; }
.ed-sound { display: grid; gap: 8px; }
.ed-voices .label { display: block; margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ed-voice .tile.sm { width: 32px; height: 32px; flex: none; }
.ed-voice .grow { flex: 1; min-width: 0; } .ed-voice .btn, .ed-voice .chip { flex: none; }
/* Welcome Week made: what paying adds (locked tiles) */
.welcome-made .wn-tiles { display: grid; gap: 8px; margin-top: 8px; }
.welcome-made .wn-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in oklab, var(--bg-raise) 70%, transparent); }
.welcome-made .wn-tile .tile.sm { width: 34px; height: 34px; flex: none; }
.welcome-made .wn-tile .grow { flex: 1; min-width: 0; }
.welcome-made .wn-tile .chip { flex: none; }
.welcome-made .wn-tile.locked .tile { opacity: .75; }
.welcome-made p svg, .hero p.small svg { width: 15px; height: 15px; vertical-align: -2px; }
/* Locked Ultra previews (free accounts) */
.welcome-made .up-box { margin-top: 14px; padding: 14px; border: 1px solid color-mix(in oklab, var(--accent, #ff6a3d) 45%, var(--line)); border-radius: 16px; background: color-mix(in oklab, var(--accent, #ff6a3d) 7%, transparent); }
.welcome-made .up-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 420px; }
.welcome-made .up-img img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
/* Invite a business (referral) */
.ref-card { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-raise); }
.ref-card .ref-head { display: flex; gap: 12px; align-items: center; }
.ref-card .ref-head .tile { flex: none; }
.ref-card .ref-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ref-card .ref-row .input { flex: 1 1 220px; min-width: 0; font-size: 13px; }

/* Plans shown where credit packs need a plan */
.pl-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 8px; }
.pl-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.top-plans { white-space: nowrap; }
.you-logo { max-height: 34px; max-width: 150px; background: #fff; padding: 4px 8px; border-radius: 8px; vertical-align: middle; }

/* Brand page guidance */
.brand-intro { margin: 0 0 4px; }
.look-ex { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.look-card .look-d { font-size: 11.5px; line-height: 1.35; color: var(--text-3, var(--muted)); font-weight: 500; }
@media (max-width: 720px) { .look-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.look-row { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }

/* Create post: product picker */
.cp-prod-sel { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.cp-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 4px 3px 3px; border-radius: 99px; background: var(--accent-soft); border: 1px solid var(--accent); font-size: 12.5px; font-weight: 600; }
.cp-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: contain; background: #fff; }
.cp-chip button { border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; padding: 0 6px; cursor: pointer; }
.cp-prod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; }
.cp-prod { display: grid; gap: 3px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-size: 11.5px; cursor: pointer; }
.cp-prod img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.cp-prod b { font-size: 12px; }
.cp-prod.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.site-input { display: flex; align-items: center; gap: 0; padding-top: 0; padding-bottom: 0; }
.site-input > span { color: var(--muted, #8a8390); font-weight: 600; user-select: none; padding-right: 2px; }
.site-input > input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; height: 100%; padding: 0; }
.shop-read { align-self: flex-start; font-size: 11px; gap: 4px; }
.shop-read svg { width: 12px; height: 12px; }

/* Welcome Week: what InstaBot can do (while the posts are being made) */
.tour { margin-top: 14px; display: grid; gap: 8px; }
.tour-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); animation: tourIn .5s ease; }
.tour-card .tile { flex: 0 0 auto; }
.tour-dots { display: flex; gap: 5px; justify-content: center; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2, #555); transition: width .3s; }
.tour-dots i.on { width: 18px; background: var(--accent); }
@keyframes tourIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Your first 5 minutes */
.fs-card .meter { margin: 8px 0 4px; }
.fs-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.fs-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2, transparent); }
.fs-steps li.done { opacity: .6; }
.fs-steps li.done .grow { text-decoration: line-through; }
.fs-ico { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.fs-ico svg { width: 15px; height: 15px; }
.fs-steps li.done .fs-ico { background: var(--ok-soft, #1f3b2a); color: var(--ok, #3ecf8e); }
.fs-cta { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); flex-wrap: wrap; }
.notice.tip { border-color: var(--accent); }

/* Autopilot preview */
.apv-week { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.apv-day { display: grid; gap: 6px; justify-items: start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.apv-day b { text-transform: capitalize; }
@media (max-width: 520px) { .apv-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fs-card h2 { display: flex; align-items: center; gap: 8px; }
.fs-card h2 svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--accent); }
.tour-card .tile svg, .fs-cta svg { width: 18px; height: 18px; }

/* the picture's words, right under it (post drawer) */
.words-panel { display: grid; gap: 8px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--accent, #ff6a3d);
  background: var(--surface, #fff); position: relative; }
.words-panel > b { font-size: 14px; } .words-panel svg { width: 16px; height: 16px; vertical-align: -3px; }
.words-panel.painted { border-style: dashed; border-color: var(--line, rgba(127,127,127,.35)); }
.words-panel.painted p { margin: 0; }
.wp-field { display: grid; gap: 3px; } .wp-field > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.words-panel .row { gap: 10px; align-items: center; } .words-panel .row small { opacity: .7; font-weight: 700; }
.wp-free { font-style: normal; font-size: 12px; font-weight: 800; color: var(--good, #1a9e5c); }
.words-panel .ed-busy { display: none; } .words-panel.busy .ed-busy { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.words-panel.busy .btn { opacity: .5; pointer-events: none; }

/* ── Paid sign-up: the reveal, the plans, the welcome ─────────────────── */
.you-hero { position: relative; height: 132px; border-radius: 22px; overflow: hidden; margin-top: -4px;
  background: linear-gradient(120deg, var(--k1, var(--spark-a)), var(--k2, var(--spark-b)) 55%, var(--k3, var(--spark-c)));
  box-shadow: var(--shadow); animation: pop2 .5s ease both; }
.you-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(10, 6, 20, .35)); }
.you-hero-av { position: absolute; left: 18px; bottom: 16px; z-index: 2; width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  background: #fff; border: 3px solid #fff; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .55); animation: pwPop .6s .1s cubic-bezier(.2, 1.4, .4, 1) both; }
.you-hero-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.you-strip { position: absolute; right: 14px; top: 50%; z-index: 1; display: flex; gap: 8px; transform: translateY(-50%); }
.you-strip span { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .6); animation: pwRise .55s cubic-bezier(.2, 1.2, .4, 1) both; }
.you-strip span:nth-child(odd) { transform: rotate(-3deg); } .you-strip span:nth-child(even) { transform: rotate(3deg) translateY(6px); }
.you-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .you-strip span:nth-child(n+4) { display: none; } .you-strip span { width: 54px; height: 54px; } }

.pw-root { place-items: start center; padding-top: 40px; }
.pw { width: min(1180px, 100%); display: grid; gap: 26px; }
.pw-top { text-align: center; display: grid; justify-items: center; gap: 14px; }
.pw-top h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1.03; text-wrap: balance; }
.pw-top .lede { color: var(--text-2); font-size: 17px; margin: 0; max-width: 620px; }
.pw-hl { background: linear-gradient(100deg, var(--spark-a), var(--spark-b) 55%, var(--spark-c)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pw-ok { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 13.5px; animation: pwPop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.pw-ok svg { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--ok); color: #0b1f16; stroke-width: 3; }
.pw-tabs { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); margin-top: 4px; }
.pw-tabs button { border: 0; background: none; color: var(--muted); font: 700 14px var(--font); padding: 10px 18px; border-radius: 10px; cursor: pointer; transition: background .15s, color .15s; }
.pw-tabs button.on { background: var(--bg-raise); color: var(--text); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .5); }

.pw-body { display: grid; grid-template-columns: 290px 1fr; gap: 20px; align-items: start; }
.kit { position: sticky; top: 20px; border-radius: 22px; padding: 18px; display: grid; gap: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow);
  background: radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--k1, var(--spark-a)) 30%, transparent), transparent 70%),
              radial-gradient(90% 60% at 100% 100%, color-mix(in srgb, var(--k2, var(--spark-b)) 22%, transparent), transparent 70%), var(--bg-raise); }
.kit-head { display: flex; align-items: center; gap: 12px; }
.kit-head b { display: block; font-size: 17px; letter-spacing: -.01em; }
.kit-head span:not(.kit-av) { color: var(--muted); font-size: 13px; }
.kit-av { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; font-size: 20px; border: 2px solid var(--line-2); }
.kit-av img { width: 100%; height: 100%; object-fit: cover; }
.kit-colors { display: flex; gap: 8px; }
.kit-colors i { flex: 1; height: 26px; border-radius: 8px; border: 1px solid var(--line-2); }
.kit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 12px; overflow: hidden; }
.kit-grid span { aspect-ratio: 1; overflow: hidden; background: var(--surface-2); animation: fade .5s both; }
.kit-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kit-knows { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.kit-knows li { display: flex; gap: 9px; align-items: flex-start; }
.kit-knows svg { flex: none; width: 17px; height: 17px; color: var(--ok); margin-top: 1px; }

.pw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.pw-cards.n2 { grid-template-columns: repeat(2, minmax(0, 360px)); }
.pw-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px 20px 20px; border-radius: 22px; background: var(--bg-raise);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pwRise .5s cubic-bezier(.2, 1, .4, 1) both; transition: transform .2s, border-color .2s; }
.pw-card:nth-child(2) { animation-delay: .07s; } .pw-card:nth-child(3) { animation-delay: .14s; }
.pw-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.pw-card.hot { border: 0; background: linear-gradient(var(--bg-raise), var(--bg-raise)) padding-box,
  linear-gradient(140deg, var(--spark-a), var(--spark-b) 50%, var(--spark-c)) border-box; border: 2px solid transparent;
  box-shadow: 0 30px 70px -30px var(--spark-b), var(--shadow); }
.pw-ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: linear-gradient(100deg, var(--spark-a), var(--spark-b)); color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; letter-spacing: .01em; }
.pw-ribbon svg { width: 13px; height: 13px; }
.pw-card header h3 { margin: 0 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.pw-card header p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; min-height: calc(13.5px * 1.45 * 3); }   /* prices line up across cards */
.pw-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pw-price s { color: var(--muted); font-size: 18px; font-weight: 700; text-decoration-thickness: 2px; text-decoration-color: var(--bad); }
.pw-price b { font-size: 46px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.pw-price span { color: var(--muted); font-size: 13px; font-weight: 600; }
.pw-then { margin-top: -6px; color: var(--muted); font-size: 13px; }
.pw-then em { font-style: normal; color: var(--ok); font-weight: 700; }
.pw-cr { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pw-cr svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.pw-card .btn { margin-top: 2px; }
.pw-card .btn .spin { border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }
.pw-prev { color: var(--muted); font-size: 12.5px; font-weight: 700; margin-bottom: -6px; }
.pw-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; }
.pw-feats li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.35; }
.pw-feats svg { flex: none; width: 16px; height: 16px; color: var(--accent); margin-top: 1px; stroke-width: 2.4; }

.pw-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pw-trust span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 600; }
.pw-trust svg { width: 15px; height: 15px; color: var(--muted); }
.pw-trust .pw-guar { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.pw-trust .pw-guar svg { color: var(--ok); }
.pw-fine { text-align: center; color: var(--muted); font-size: 12.5px; margin: -8px 0 24px; }
.linkish { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 1020px) {
  .pw-body { grid-template-columns: 1fr; }
  .kit { position: static; grid-template-columns: auto 1fr; align-items: center; }
  .kit-head { grid-column: 1 / -1; } .kit-grid { display: none; }
  .kit-colors { grid-column: 1 / -1; } .kit-knows { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .pw-root { padding-top: 20px; }
  .pw-cards, .pw-cards.n2 { grid-template-columns: 1fr; gap: 22px; }
  .pw-card.hot { order: -1; }
  .pw-card header p { min-height: 0; }
  .kit { padding: 14px; gap: 10px; } .kit-knows { display: none; }   /* phones: the prices come first */
  .pw-tabs { width: 100%; } .pw-tabs button { flex: 1; padding: 10px 8px; }
}

.pw-done { width: min(720px, 100%); display: grid; justify-items: center; text-align: center; gap: 16px; padding-top: 6vh; }
.pw-done h1 { margin: 0; font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.pw-done .lede { margin: 0; color: var(--text-2); font-size: 16.5px; max-width: 520px; }
.pw-badge { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); }
.pw-badge .spin { width: 34px; height: 34px; border-width: 3px; }
.pw-badge svg { width: 44px; height: 44px; color: #fff; stroke-width: 2.6; }
.pw-badge.ok { border: 0; background: linear-gradient(140deg, var(--spark-a), var(--spark-b)); box-shadow: 0 20px 60px -16px var(--spark-b); animation: pwPop .7s cubic-bezier(.2, 1.5, .4, 1) both; }
.pw-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }

@keyframes pwPop { from { transform: scale(.4); opacity: 0; } }
@keyframes pwRise { from { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pw *, .pw-done *, .you-hero, .you-hero * { animation: none !important; } }
/* The reveal stays short: long answers show 4 lines (all of it is on the Brand page). */
.onb .you-line b { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.su-confirm { margin-top: 12px; gap: 10px; align-items: center; flex-wrap: wrap; }
.su-confirm:not([hidden]) { display: flex; }
.su-confirm[hidden] { display: none !important; }
.su-confirm span { flex: 1 1 260px; }
/* The intro coupon on each plan card: the same name the Stripe checkout shows. */
.pw-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--accent) 70%, transparent); background: var(--accent-soft); font-size: 12.5px; color: var(--text-2); }
.pw-code b { display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--mono); letter-spacing: .06em; color: var(--accent-ink); }
.pw-code svg { width: 14px; height: 14px; color: var(--accent); }

/* blog articles in the calendar (Autopilot's blog setting) */
.article-card { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--c-seo, #8b5cf6);
  background: color-mix(in srgb, var(--c-seo, #8b5cf6) 8%, transparent); cursor: pointer; font-size: 13px; line-height: 1.35; }
.article-card b { font-weight: 650; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .chip svg, .mpost.article svg { width: 14px; height: 14px; vertical-align: -2px; }
.article-card.created { border-style: solid; }
.article-card.failed { border-color: var(--bad, #dc2626); }
.mpost.article { display: grid; place-items: center; background: color-mix(in srgb, var(--c-seo, #8b5cf6) 14%, transparent); color: var(--c-seo, #8b5cf6); cursor: pointer; }
